xiongzhu 4 жил өмнө
parent
commit
11602c413c

+ 17 - 1
src/views/user/BalanceRecord.vue

@@ -7,7 +7,13 @@
         @refresh="onRefresh"
     >
         <van-list :loading="loading" :finished="finished" finished-text="" @load="getData">
-            <div class="record-item" v-for="item in list" :key="item.id" :class="item.amount > 0 ? 'add' : 'min'">
+            <div
+                class="record-item"
+                v-for="item in list"
+                :key="item.id"
+                :class="item.amount > 0 ? 'add' : 'min'"
+                @click="click(item)"
+            >
                 <img
                     :src="
                         item.amount > 0
@@ -65,6 +71,16 @@ export default {
         onRefresh() {
             this.page = 0;
             this.getData();
+        },
+        click(item) {
+            if (item.type === 'RETURN' && item.remark) {
+                this.$dialog
+                    .alert({
+                        message: item.remark,
+                        theme: 'round-button'
+                    })
+                    .then(() => {});
+            }
         }
     }
 };