panhui 2 سال پیش
والد
کامیت
c18437026c
2فایلهای تغییر یافته به همراه16 افزوده شده و 2 حذف شده
  1. 8 1
      src/components/OrderItem.vue
  2. 8 1
      src/views/OrderDetailPage.vue

+ 8 - 1
src/components/OrderItem.vue

@@ -174,7 +174,14 @@ export default {
             return this.riseRate * 100
         },
         platformCommission() {
-            return this.saleBatches.find(item => item.id == this.info.batchId)?.serviceCharge || 0
+            let info = this.saleBatches.find(item => item.id == this.info.batchId)
+            let _back = null
+            if (info) {
+                _back = info.extensions.find(item => {
+                    return item.minPrice <= this.info.totalPrice && this.info.totalPrice <= item.maxPrice
+                })
+            }
+            return _back?.serviceCharge || 0
         },
         productInfo() {
             return this.info.productInfo || {}

+ 8 - 1
src/views/OrderDetailPage.vue

@@ -214,7 +214,14 @@ export default {
             return this.riseRate * 100
         },
         platformCommission() {
-            return this.saleBatches.find(item => item.id == this.orderInfo.batchId)?.serviceCharge || 0
+            let info = this.saleBatches.find(item => item.id == this.orderInfo.batchId)
+            let _back = null
+            if (info) {
+                _back = info.extensions.find(item => {
+                    return item.minPrice <= this.orderInfo.totalPrice && this.orderInfo.totalPrice <= item.maxPrice
+                })
+            }
+            return _back?.serviceCharge || 0
         },
         pic() {
             if (this.productInfo.pic && this.productInfo.pic.length > 0) {