xuqiang 4 ani în urmă
părinte
comite
b47acb252e
4 a modificat fișierele cu 78 adăugiri și 61 ștergeri
  1. 1 1
      src/App.vue
  2. 22 15
      src/pages/deposit.vue
  3. 21 16
      src/pages/electricDetails.vue
  4. 34 29
      src/pages/feeDetail.vue

+ 1 - 1
src/App.vue

@@ -6,7 +6,7 @@ export default {
                 this.$http
                     .post('auth/mpLogin', { code: res.code })
                     .then(res => {
-                        console.log(res);
+                        // console.log(res);
                         this.$http.setToken(res.token);
                         this.$store
                             .dispatch('updateUserInfo')

+ 22 - 15
src/pages/deposit.vue

@@ -13,7 +13,7 @@
                     <div class="top1">
                         <img
                             @click="jump"
-                            class="top-img"
+                            class="top-img1"
                             src="../native/00-Navigation bar/4.Icons/back@3x.png"
                             alt=""
                         />
@@ -26,12 +26,14 @@
                     </div>
                 </div>
             </div>
+            <div class="title-con">
+                <div class="title">押金说明</div>
+                <div class="title1">
+                    尊敬的住户,欢迎您入住本公寓!为营造安全舒适的居住空间,请仔细阅读本须知并遵守各项条规:
+                </div>
+            </div>
         </van-sticky>
-        <div class="title">押金说明</div>
         <div class="box">
-            <div class="title1">
-                尊敬的住户,欢迎您入住本公寓!为营造安全舒适的居住空间,请仔细阅读本须知并遵守各项条规:
-            </div>
             <div v-for="(item, index) in list" :key="index">{{ item.title }}</div>
             <div class="title2">
                 以上所有条款适用于筑梦居全国所有门店!若遇特定城市的法令规范不一而有出入的,以该城市的规范为准!若遇个别门店所在地的公安部门、街道、小区或物业等,对住户提出其他规定的,住户必需配合!
@@ -212,10 +214,9 @@ export default {
                 align-items: center;
                 justify-content: space-between;
                 width: 90%;
-                .top-img {
+                .top-img1 {
                     width: 24px;
                     height: 24px;
-                    background: #00ba64;
                 }
             }
             .top-name {
@@ -245,19 +246,25 @@ export default {
             }
         }
     }
-    .title {
-        font-size: 16px;
-        font-weight: bold;
-        color: #000000;
-        line-height: 22px;
-        padding: 20px 0 16px 20px;
-    }
-    .box {
+    .title-con {
+        margin: 0px 20px;
+        background: #fff;
+        .title {
+            font-size: 16px;
+            font-weight: bold;
+            padding: 20px 0 16px;
+            color: #000000;
+            line-height: 22px;
+        }
         .title1 {
+            font-size: 14px;
             font-weight: bold;
             color: #333333;
+            line-height: 22px;
             padding-bottom: 15px;
         }
+    }
+    .box {
         background: #ffffff;
         margin: 0px 20px;
         border-radius: 4px;

+ 21 - 16
src/pages/electricDetails.vue

@@ -79,7 +79,7 @@ export default {
             empty: false,
             time: 0,
             newShow: false,
-            startTime: '',
+            createdAt: '',
             list: [
                 {
                     // name: '夏秋雨',
@@ -95,22 +95,26 @@ export default {
         ...mapState(['roomInfo', 'ammeterInfo'])
     },
     mounted() {
-        this.$http
-            .get('/rechargeRecord/ammeter', {
-                roomId: this.roomInfo.roomId,
-                page: 0,
-                size: 1000
-            })
-            .then(res => {
-                // console.log(res);
-                this.list = res.content;
-                this.empty = res.empty;
-            })
-            .catch(e => {
-                console.log(e);
-            });
+        this.Info();
     },
     methods: {
+        Info() {
+            this.$http
+                .get('/rechargeRecord/ammeter', {
+                    roomId: this.roomInfo.roomId,
+                    page: 0,
+                    size: 1000,
+                    createdAt: this.createdAt
+                })
+                .then(res => {
+                    // console.log(res);
+                    this.list = res.content;
+                    this.empty = res.empty;
+                })
+                .catch(e => {
+                    console.log(e);
+                });
+        },
         timeFormat(date, fmt) {
             var o = {
                 'M+': date.getMonth() + 1 //月份
@@ -128,7 +132,8 @@ export default {
         onConfirm(event) {
             this.currentDate = event.detail;
             var timeValue = this.timeFormat(new Date(event.detail), 'yyyy-MM');
-            this.startTime = timeValue;
+            this.createdAt = timeValue;
+            this.Info();
             this.newShow = false;
         }
     }

+ 34 - 29
src/pages/feeDetail.vue

@@ -49,7 +49,7 @@ export default {
             last: false,
             time: 0,
             count: 0,
-            startTime: '',
+            createdAt: '',
             empty: false,
             newShow: false,
             list: [
@@ -67,35 +67,39 @@ export default {
         ...mapState(['roomInfo', 'userInfo'])
     },
     mounted() {
-        let query = {
-            page: 0,
-            size: 1000,
-            sort: 'settleTime,desc'
-        };
-        query.roomId = this.roomInfo.roomId;
-        this.$http
-            .get('/api/mp/roomFeeRecord', query)
-            .then(res => {
-                // console.log(res);
-                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.showToast({
-                    icon: 'none',
-                    title: e.error
-                });
-            });
+        this.Info();
     },
     methods: {
+        Info() {
+            let query = {
+                page: 0,
+                size: 1000,
+                sort: 'settleTime,desc',
+                createdAt: this.createdAt
+            };
+            query.roomId = this.roomInfo.roomId;
+            this.$http
+                .get('/api/mp/roomFeeRecord', query)
+                .then(res => {
+                    // console.log(res);
+                    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.showToast({
+                        icon: 'none',
+                        title: e.error
+                    });
+                });
+        },
         timeFormat(date, fmt) {
             var o = {
                 'M+': date.getMonth() + 1 //月份
@@ -113,7 +117,8 @@ export default {
         onConfirm(event) {
             this.currentDate = event.detail;
             var timeValue = this.timeFormat(new Date(event.detail), 'yyyy-MM');
-            this.startTime = timeValue;
+            this.createdAt = timeValue;
+            this.Info();
             this.newShow = false;
         }
     }