panhui 2 лет назад
Родитель
Сommit
3b86242a11

+ 2 - 2
src/components/OrderItem.vue

@@ -161,7 +161,7 @@ export default {
         ...mapState(useUserStore, ['user']),
         ...mapState(useSystemStore, ['platformCommission', 'saleBatches']),
         riseRate() {
-            let info = this.saleBatches.find(item => item.saleBatch.id == this.info.batchId)
+            let info = this.saleBatches.find(item => item.id == this.info.batchId)
             let _back = null
             if (info) {
                 _back = info.extensions.find(item => {
@@ -436,7 +436,7 @@ export default {
         },
         delegate() {
             this.$http.get('/saleBatch/get/' + this.info.batchId).then(res => {
-                this.batchInfo = res.saleBatch
+                this.batchInfo = res
                 this.show = true
             })
         },

+ 1 - 1
src/views/HomePage.vue

@@ -290,7 +290,7 @@ function getSaleBatch() {
             batchId.value = res.value
             return http.get('/saleBatch/get/' + batchId.value).then(res => {
                 batchInfo.value = {
-                    ...res.saleBatch,
+                    ...res,
                     empty: false
                 }
                 http.post(

+ 2 - 2
src/views/OrderDetailPage.vue

@@ -201,11 +201,11 @@ export default {
         ...mapState(useSystemStore, ['saleBatches', 'getSysConfigs']),
         riseRate() {
             // return this.saleBatches.find(item => item.id == this.orderInfo.batchId)?.riseRate || 0
-            let info = this.saleBatches.find(item => item.saleBatch.id == this.info.batchId)
+            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.info.totalPrice && this.info.totalPrice <= item.maxPrice
+                    return item.minPrice <= this.orderInfo.totalPrice && this.orderInfo.totalPrice <= item.maxPrice
                 })
             }
             return _back?.riseRate || 0

+ 1 - 1
src/views/ProductListPage.vue

@@ -120,7 +120,7 @@ function getBatch() {
         .get('/saleBatch/get/' + batchId)
         .then(res => {
             batchInfo.value = {
-                ...res.saleBatch,
+                ...res,
                 empty: false
             }