xuqiang 4 éve
szülő
commit
9a79b50215
4 módosított fájl, 38 hozzáadás és 4 törlés
  1. 3 0
      src/pages/Home.vue
  2. 1 1
      src/pages/details.vue
  3. 1 1
      src/pages/mineFollow.vue
  4. 33 2
      src/pages/wallet.vue

+ 3 - 0
src/pages/Home.vue

@@ -232,6 +232,9 @@ export default {
                 this.getData();
             });
         }
+    },
+    onShow() {
+        this.getData();
     }
 };
 </script>

+ 1 - 1
src/pages/details.vue

@@ -167,7 +167,7 @@ export default {
             }
         }
     },
-    onLoad() {
+    onShow() {
         this.details();
     },
     onShareAppMessage() {

+ 1 - 1
src/pages/mineFollow.vue

@@ -31,7 +31,7 @@ export default {
     components: {
         ProductInfo
     },
-    mounted() {
+    onShow() {
         this.getList();
     },
     methods: {

+ 33 - 2
src/pages/wallet.vue

@@ -19,7 +19,7 @@
                 <div class="text2">{{ moneyInfo.money || 0 }}</div>
             </div>
 
-            <van-button type="default" size="small">
+            <van-button type="default" size="small" @click="Withdrawal">
                 提现
             </van-button>
         </div>
@@ -65,10 +65,32 @@ export default {
         return {
             moneyInfo: {},
             time: 0,
-            option1: [{ text: '2012年5月', value: 0 }],
+            newDate: [],
+            option1: [
+                { text: '2012年1月', value: 0 },
+                { text: '2012年2月', value: 1 },
+                { text: '2012年3月', value: 2 },
+                { text: '2012年4月', value: 3 },
+                { text: '2012年5月', value: 4 },
+                { text: '2012年6月', value: 5 },
+                { text: '2012年7月', value: 6 },
+                { text: '2012年8月', value: 7 },
+                { text: '2012年9月', value: 8 },
+                { text: '2012年10月', value: 9 },
+                { text: '2012年11月', value: 10 },
+                { text: '2012年12月', value: 11 }
+            ],
             empty: true
         };
     },
+    computed: {
+        dataList() {
+            let info = [...this.newDate].find(item => {
+                return item.text;
+            });
+            return info;
+        }
+    },
     methods: {
         loginMethods() {
             this.$http.get('/memberInfo/findByUser').then(res => {
@@ -79,6 +101,15 @@ export default {
             this.$http.postJson('/memberInfo/all', {
                 query: {}
             });
+        },
+        Withdrawal() {
+            this.newDate = this.option1;
+            console.log(this.dataList.text);
+            this.$http
+                .get('/transactionRecord/showMyTransactionRecords', { yearMonth: this.dataList.text })
+                .then(res => {
+                    console.log(res);
+                });
         }
     }
 };