瀏覽代碼

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

liyangbin 1 年之前
父節點
當前提交
952af2c646
共有 1 個文件被更改,包括 8 次插入0 次删除
  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
   })
 }