xuqiang %!s(int64=4) %!d(string=hai) anos
pai
achega
89b96762a6

+ 10 - 2
src/pages/electricDetails.vue

@@ -67,7 +67,12 @@
             </template>
         </div>
         <van-popup :show="newShow" position="bottom" @close="newShow = false">
-            <van-datetime-picker type="year-month" :value="currentDate" @confirm="onConfirm" />
+            <van-datetime-picker
+                type="year-month"
+                @cancel="newShow = false"
+                :value="currentDate"
+                @confirm="onConfirm"
+            />
         </van-popup>
     </div>
 </template>
@@ -112,7 +117,10 @@ export default {
                     this.empty = res.empty;
                 })
                 .catch(e => {
-                    console.log(e);
+                    wx.showToast({
+                        icon: 'none',
+                        title: e.error
+                    });
                 });
         },
         timeFormat(date, fmt) {

+ 11 - 1
src/pages/feeDetail.vue

@@ -32,7 +32,12 @@
         </template>
         <van-empty v-if="empty" description="暂无记录哦"> </van-empty>
         <van-popup :show="newShow" position="bottom" @close="newShow = false">
-            <van-datetime-picker type="year-month" :value="currentDate" @confirm="onConfirm" />
+            <van-datetime-picker
+                type="year-month"
+                @cancel="newShow = false"
+                :value="currentDate"
+                @confirm="onConfirm"
+            />
         </van-popup>
     </div>
 </template>
@@ -71,6 +76,9 @@ export default {
     },
     methods: {
         Info() {
+            wx.showLoading({
+                title: '加载中'
+            });
             let query = {
                 page: 0,
                 size: 1000,
@@ -81,6 +89,7 @@ export default {
             this.$http
                 .get('/api/mp/roomFeeRecord', query)
                 .then(res => {
+                    wx.hideLoading();
                     // console.log(res);
                     this.list = res.content;
                     this.empty = res.empty;
@@ -94,6 +103,7 @@ export default {
                     }
                 })
                 .catch(e => {
+                    wx.hideLoading();
                     wx.showToast({
                         icon: 'none',
                         title: e.error

+ 9 - 4
src/pages/personDetail.vue

@@ -11,7 +11,7 @@
         <van-sticky :offset-top="0">
             <div class="box">
                 <div class="time-box" @click="newShow = true">
-                    <div class="text">{{ createdAt ? createdAt : '请选择时间' }}</div>
+                    <div class="text">{{ yearMonth ? yearMonth : '请选择时间' }}</div>
                 </div>
                 <div class="money1">共充值 ¥{{ count || 0 }}</div>
             </div>
@@ -47,7 +47,7 @@ export default {
         return {
             page: 0,
             last: false,
-            createdAt: '',
+            yearMonth: '',
             empty: false,
             time: 0,
             newShow: false,
@@ -74,16 +74,20 @@ export default {
     },
     methods: {
         Info() {
+            wx.showLoading({
+                title: '加载中'
+            });
             let query = {
                 page: 0,
                 size: 1000,
-                createdAt: this.createdAt
+                yearMonth: this.yearMonth
             };
             query.userId = this.userInfo.id;
             this.$http
                 .get('/api/mp/feeRecord', query)
                 .then(res => {
                     // console.log(res);
+                    wx.hideLoading();
                     this.list = res.content;
                     let countArr = this.list.filter(item => {
                         return item.amount > 0;
@@ -96,6 +100,7 @@ export default {
                     this.empty = res.empty;
                 })
                 .catch(e => {
+                    wx.hideLoading();
                     wx.showToast({
                         icon: 'none',
                         title: e.error
@@ -119,7 +124,7 @@ export default {
         onConfirm(event) {
             this.currentDate = event.detail;
             var timeValue = this.timeFormat(new Date(event.detail), 'yyyy-MM');
-            this.createdAt = timeValue;
+            this.yearMonth = timeValue;
             this.Info();
             this.newShow = false;
         }

+ 10 - 0
src/pages/walletdetails.vue

@@ -101,6 +101,9 @@ export default {
             //     url += '&roomId=' + this.roomInfo.roomId + '&amount=' + this.form.amount;
             // }
             if (this.type === 'PERSON') {
+                wx.showLoading({
+                    title: '加载中'
+                });
                 this.$http
                     .post('/userMoneyWithdrawApply/applyAndPass', {
                         account: '',
@@ -110,6 +113,7 @@ export default {
                     })
                     .then(res => {
                         // console.log(res);
+                        wx.hideLoading();
                         wx.showToast({
                             title: '提现审核中'
                         });
@@ -119,12 +123,16 @@ export default {
                         // this.navigateTo('/pages/walletreview?attach=' + res.id);
                     })
                     .catch(e => {
+                        wx.hideLoading();
                         wx.showToast({
                             icon: 'none',
                             title: e.error
                         });
                     });
             } else {
+                wx.showLoading({
+                    title: '加载中'
+                });
                 this.$http
                     .post('/roomMoneyWithdrawApply/apply', {
                         roomId: this.roomInfo.roomId,
@@ -132,6 +140,7 @@ export default {
                     })
                     .then(res => {
                         // console.log(res);
+                        wx.hideLoading();
                         wx.showToast({
                             title: '提现审核中'
                         });
@@ -140,6 +149,7 @@ export default {
                         }, 1000);
                     })
                     .catch(e => {
+                        wx.hideLoading();
                         wx.showToast({
                             icon: 'none',
                             title: e.error

+ 54 - 23
src/pages/withdrawalDetails.vue

@@ -32,7 +32,12 @@
         </template>
         <van-empty v-if="empty" description="暂无记录哦"> </van-empty>
         <van-popup :show="newShow" position="bottom" @close="newShow = false">
-            <van-datetime-picker type="year-month" :value="currentDate" @confirm="onConfirm" />
+            <van-datetime-picker
+                type="year-month"
+                @cancel="newShow = false"
+                :value="currentDate"
+                @confirm="onConfirm"
+            />
         </van-popup>
     </div>
 </template>
@@ -82,6 +87,9 @@ export default {
     methods: {
         Info() {
             if (this.type === 'ROOM') {
+                wx.showLoading({
+                    title: '加载中'
+                });
                 let query = {
                     page: 0,
                     size: 1000,
@@ -89,19 +97,32 @@ export default {
                     yearMonth: this.yearMonth
                 };
                 query.roomId = this.roomInfo.roomId;
-                this.$http.get('/roomMoneyWithdrawApply/all', query).then(res => {
-                    this.list = res.content;
-                    this.empty = res.empty;
-                    let countArr = this.list.filter(item => {
-                        return item.amount > 0;
+                this.$http
+                    .get('/roomMoneyWithdrawApply/all', query)
+                    .then(res => {
+                        wx.hideLoading();
+                        this.list = res.content;
+                        this.empty = res.empty;
+                        let countArr = this.list.filter(item => {
+                            return item.amount > 0;
+                        });
+                        if (countArr.length > 0) {
+                            this.count = countArr.reduce((total, item) => {
+                                return total + item.amount;
+                            }, 0);
+                        }
+                    })
+                    .catch(e => {
+                        wx.hideLoading();
+                        wx.showToast({
+                            icon: 'none',
+                            title: e.error
+                        });
                     });
-                    if (countArr.length > 0) {
-                        this.count = countArr.reduce((total, item) => {
-                            return total + item.amount;
-                        }, 0);
-                    }
-                });
             } else {
+                wx.showLoading({
+                    title: '加载中'
+                });
                 let query = {
                     page: 0,
                     size: 1000,
@@ -109,18 +130,28 @@ export default {
                     yearMonth: this.yearMonth
                 };
                 query.userId = this.userInfo.id;
-                this.$http.get('/userMoneyWithdrawApply/all', query).then(res => {
-                    this.list = res.content;
-                    this.empty = res.empty;
-                    let countArr = this.list.filter(item => {
-                        return item.amount > 0;
+                this.$http
+                    .get('/userMoneyWithdrawApply/all', query)
+                    .then(res => {
+                        wx.hideLoading();
+                        this.list = res.content;
+                        this.empty = res.empty;
+                        let countArr = this.list.filter(item => {
+                            return item.amount > 0;
+                        });
+                        if (countArr.length > 0) {
+                            this.count = countArr.reduce((total, item) => {
+                                return total + item.amount;
+                            }, 0);
+                        }
+                    })
+                    .catch(e => {
+                        wx.hideLoading();
+                        wx.showToast({
+                            icon: 'none',
+                            title: e.error
+                        });
                     });
-                    if (countArr.length > 0) {
-                        this.count = countArr.reduce((total, item) => {
-                            return total + item.amount;
-                        }, 0);
-                    }
-                });
             }
         },
         getIcon(status) {