Browse Source

中和代码

zaijin 2 years ago
parent
commit
b91d3d76ab
2 changed files with 13 additions and 5 deletions
  1. 3 3
      pages/center/index.vue
  2. 10 2
      pages/handleMonthly/handleMonthly.vue

+ 3 - 3
pages/center/index.vue

@@ -91,7 +91,7 @@ export default {
       // 默认头像
       pic: '/static/img/default-avatar.png',
       // 用户信息
-      userInfo: [],
+      userInfo: {},
       logoutPop: false,
       messageNum: 0,
       callPhoneShow: false,
@@ -108,7 +108,7 @@ export default {
         this.userInfo = Object.assign(this.userInfo, this.vuex_wxinfo);
       }
     } else {
-      this.userInfo = [];
+      this.userInfo = {};
     }
   },
   methods: {
@@ -233,7 +233,7 @@ page {
     right: 0;
     bottom: 0;
     content: '';
-    background: url(../../static/img/center-top-bg.png) no-repeat;
+    background: url('/static/img/center-top-bg.png') no-repeat;
     background-position: -90rpx 0;
     width: 305rpx;
     height: 145rpx;

+ 10 - 2
pages/handleMonthly/handleMonthly.vue

@@ -31,7 +31,7 @@
         class="handle-monthly-time-tips"
         v-if="monthlyRuleObj.minMonth && form.month >= monthlyRuleObj.minMonth && Number(monthlyRuleObj.giveFlag) === 1"
       >
-        赠送提示:可获得{{ freeMonthNum }}个月的免费停车时长
+        赠送提示:可获得{{ freeMonthNum || 0 }}个月的免费停车时长
       </view>
     </view>
     <view class="handle-monthly-item" v-else>
@@ -282,6 +282,11 @@ export default {
         }
       });
     },
+    /**
+     * @description: 计算免费的包月数量
+     * @param {*} val
+     * @return {*}
+     */
     calcFreeMonthNum(val) {
       if (this.monthlyRuleObj.giveFlag && Number(this.monthlyRuleObj.giveFlag) === 1) {
         let timesNum = parseInt(Number(val) / Number(this.monthlyRuleObj.minMonth));
@@ -295,7 +300,6 @@ export default {
     /**
      * 提交包月信息
      * @date 2022-10-09
-     * @param {any} roadNo
      * @returns {any}
      */
     submit() {
@@ -362,6 +366,10 @@ export default {
           });
         });
     },
+    /**
+     * @description: 调整到包月列表页面
+     * @return {*}
+     */
     jumpMonthList() {
       this.$u.route({
         url: '/pages/center/monthly/monthly',