Browse Source

点击成长值项或积分项时,根据relateId与relateType选择是否跳转到某页面

shizhongqi 4 months ago
parent
commit
273239b70d
2 changed files with 12 additions and 2 deletions
  1. 6 1
      mallApp/src/pages/user/growthList.vue
  2. 6 1
      mallApp/src/pages/user/integralList.vue

+ 6 - 1
mallApp/src/pages/user/growthList.vue

@@ -10,7 +10,7 @@
           <view class="table-cell cell-balance">成长值</view>
         </view>
         <view v-for="(item, index) in list.data" :key="index" class="table-body">
-          <view class="table-row table-row-data">
+          <view class="table-row table-row-data" @click="goDetail(item)">
             <view class="table-cell cell-date">{{ formatTime(item) }}</view>
             <view class="table-cell cell-event">{{ getEvent(item) }}</view>
             <view class="table-cell cell-staff">{{ getStaff(item) }}</view>
@@ -75,6 +75,11 @@ export default {
       const res = await getGrowthList(params);
       this.completes(res);
     },
+    goDetail(item) {
+        if(item.relateId != 0 && item.relateType == 1){
+            this.$util.pageTo({ url: '/pages/order/detail?id=' + item.relateId + '&account=' + item.shopId });
+        }
+    }
   },
   async onPullDownRefresh() {
     this.resetList();

+ 6 - 1
mallApp/src/pages/user/integralList.vue

@@ -10,7 +10,7 @@
           <view class="table-cell cell-balance">积分</view>
         </view>
         <view v-for="(item, index) in list.data" :key="index" class="table-body">
-          <view class="table-row table-row-data">
+          <view class="table-row table-row-data" @click="goDetail(item)">
             <view class="table-cell cell-date">{{ formatTime(item) }}</view>
             <view class="table-cell cell-event">{{ getEvent(item) }}</view>
             <view class="table-cell cell-staff">{{ getStaff(item) }}</view>
@@ -75,6 +75,11 @@ export default {
       const res = await getIntegralList(params);
       this.completes(res);
     },
+    goDetail(item) {
+        if(item.relateId != 0 && item.relateType == 1){
+            this.$util.pageTo({ url: '/pages/order/detail?id=' + item.relateId + '&account=' + item.shopId });
+        }
+    }
   },
   async onPullDownRefresh() {
     this.resetList();