Prechádzať zdrojové kódy

fix:后台自定义订单价格展示调整

liyangbin 1 rok pred
rodič
commit
952af2c646
1 zmenil súbory, kde vykonal 8 pridanie a 0 odobranie
  1. 8 0
      src/views/ProductManagement.vue

+ 8 - 0
src/views/ProductManagement.vue

@@ -52,6 +52,14 @@ const pagingQuery = () => {
       productId.value
   ).then((res) => {
     tableData.value = productListNameMapping(res.data.result.list)
+    // 根据支付方式设置价格
+    for (let i = 0; i < tableData.value.length; i++) {
+      if (tableData.value[i].payment === 0 || tableData.value[i].payment === 3) {
+        tableData.value[i].price = '$' + tableData.value[i].price
+      } else if (tableData.value[i].payment === 1 || tableData.value[i].payment === 2) {
+        tableData.value[i].price = '¥' + tableData.value[i].price
+      }
+    }
     total.value = res.data.result.total
   })
 }