Эх сурвалжийг харах

fix: 订单预览展示修复

cuiyalong 2 сар өмнө
parent
commit
a55d01d089

+ 2 - 2
src/views/create-order/components/order-detail-submodule/OrderDetailCardProductList.vue

@@ -193,9 +193,9 @@ export default {
   },
   watch: {
     orderDetail: {
-      async handler(newVal) {
+      handler(newVal) {
         this.orderDetailInfo = newVal || {};
-        await this.init();
+        this.init();
       },
       deep: true,
       immediate: true

+ 2 - 7
src/views/create-order/components/order-detail-submodule/SelectOrderDetailCard.vue

@@ -320,18 +320,14 @@ export default {
   },
   watch: {
     orderDetail: {
-      async handler(newVal) {
+      handler(newVal) {
         this.orderDetailInfo = newVal || {};
-        await this.init();
+        this.init();
       },
       deep: true,
       immediate: true
     }
   },
-  // async mounted() {
-  //   this.orderDetailInfo =  await this.orderDetail || {}
-  //   this.init()
-  // },
   computed: {
     isUpEntRed() {
       return this.orderDetailInfo?.redPunchData?.isUpEnt || false
@@ -388,7 +384,6 @@ export default {
     async init() {
       this.orderData = this.orderDetailInfo?.orderData || {};
       let productData = this.orderDetailInfo?.productData || [];
-
       if(productData.length > 0) {
         // 使用 Promise.all 来并行处理每个 product 的异步操作
         productData = await Promise.all(