StephenArk30 6 лет назад
Родитель
Сommit
81456f482d

+ 5 - 5
sourcecode/h5app/vue/src/components/TabBar.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <van-tabbar v-model="active">
-            <van-tabbar-item to="/index">
+            <van-tabbar-item to="/index" name="index_icon">
                 <span>首页</span>
                 <img
                         slot="icon"
@@ -10,7 +10,7 @@
                         style="width: 30px; height: 30px"
                 >
             </van-tabbar-item>
-            <van-tabbar-item to="/me">
+            <van-tabbar-item to="/me" name="me_icon">
                 <span>我的</span>
                 <img
                         slot="icon"
@@ -33,12 +33,12 @@
         },
         data() {
             return {
-                active: this.activeI,
+                active: 0,
                 icon: {
                     index_normal: "http://pjczv6ygf.bkt.clouddn.com/bar-icon/index_icon_active.png",
-                    index_active: require('../assets/index_icon_active.png'),
+                    index_active: "http://pjczv6ygf.bkt.clouddn.com/bar-icon/index_icon_active.png",
                     me_normal: "http://pjczv6ygf.bkt.clouddn.com/bar-icon/me_icon_active.png",
-                    me_active: require('../assets/me_icon_active.png')
+                    me_active: "http://pjczv6ygf.bkt.clouddn.com/bar-icon/me_icon_active.png"
                 },
             }
         },

+ 2 - 2
sourcecode/h5app/vue/src/components/addPresentButton.vue

@@ -1,11 +1,11 @@
 <template>
     <div class="button_container">
-        <img src="../assets/add_button_active.png"
+        <img src="http://pjczv6ygf.bkt.clouddn.com/add-present-button/add_button_active.png"
              class="add_button s"
              v-if="can_add" @click="toAddPresent"
         />
 
-        <img src="../assets/add_button_inactive.png"
+        <img src="http://pjczv6ygf.bkt.clouddn.com/add-present-button/add_button_inactive.png"
              class="add_button"
              v-if="!can_add"
         />

+ 7 - 6
sourcecode/h5app/vue/src/components/schoolidCard.vue

@@ -40,12 +40,12 @@
         <p>宿舍区</p>
             <van-radio-group v-model="dormDistrict">
                 <van-radio name="0" checked-color="#fd6740" style="float: left; margin: 0 0 15px 10px"
-                           :disabled="isReadonly">
+                           :disabled="isReadonly">
                 </van-radio>
                 <van-radio name="1" checked-color="#fd6740" style="float: left; margin: 0 10px 15px 10px"
                            :disabled="isReadonly">西南
                 </van-radio>
-                <van-radio name="2" checked-color="#fd6740" style="margin: 0 10px 15px 10px" :disabled="isReadonly">
+                <van-radio name="2" checked-color="#fd6740" style="margin: 0 10px 15px 10px" :disabled="isReadonly">
                 </van-radio>
                 <van-radio name="3" checked-color="#fd6740" style="float: left; margin: 0 0 15px 10px"
                            :disabled="isReadonly">桂庙
@@ -127,9 +127,9 @@
                 if (this.personName.length === 0) {
                     this.personError = true;
                     return;
-                } else if (this.weixinName.length >= 20) {
+                } else if (this.weixinName.length < 6) {
                     this.weixinError = true;
-                    Toast.fail('最多输入20个字符');
+                    Toast.fail('请输入正确格式的微信号');
                     return;
                 }
                 // post_present()
@@ -152,7 +152,7 @@
                     console.log("------ Data Rcvd in getIdentityInfo --------");
                     console.log(response);
                     if (response.ret === "10000") {
-                        var t = response.model.list;
+                        let t = response.model.list;
                         that.personName = t[0].name; // 左侧是vue页面内的变量名字, 右侧是后台数据里的变量名称
                         that.userDo = t[0];
                     } else {
@@ -174,8 +174,9 @@
                     if (response.ret === "10000") {
                         var t = response.model.list;
                         that.gender = ""+t[0].userSex; // 左侧是vue页面内的变量名字, 右侧是后台数据里的变量名称
-                        that.dormDistrict = ""+t[0].dormDistrict; //TODO: 请注意文本数字转换
+                        that.dormDistrict = t[0].dormDistrict.toString(); //TODO: 请注意文本数字转换
                         that.reviewDo = t[0];
+                        that.weixinName = t[0].userWxAccount;
                     } else {
                         Toast.fail("获取失败,请检查网络");
                     }

+ 10 - 0
sourcecode/h5app/vue/src/views/giftDetail.vue

@@ -94,6 +94,11 @@
         },
         methods:{
             editPresent: function() {
+                Toast.loading({
+                    mask: true,
+                    message: '加载中...',
+                    duration: 500
+                });
                 let p = this.myPresent;
                 this.$router.push({path: 'presentRegister', query: {present: p}});
             },
@@ -103,6 +108,11 @@
                 }).then(() => {
                     // on confirm
                     // TODO: 考虑 updateBatch, 就是需要 将isDel设为1, 配合首页查找进行过滤
+                    Toast.loading({
+                        mask: true,
+                        message: '加载中...',
+                        duration: 500
+                    });
                     let that = this;
                     BasicFunction.get_data("smartGoods/list?goodid=" + this.myPresent.id, function (response) {
                         console.log("------ Data Rcvd in detail --------");

+ 11 - 4
sourcecode/h5app/vue/src/views/index.vue

@@ -84,9 +84,9 @@
                     require('../assets/banners/banner3.jpg'),
                 ],
                 active: 0,
-                button_active: true,
+                button_active: false,
                 presents: {},
-                hasPresent: false,
+                hasPresent: true,
                 dec_icons: [
                     "http://pjczv6ygf.bkt.clouddn.com/dec-icon/1.png",
                     "http://pjczv6ygf.bkt.clouddn.com/dec-icon/2.png",
@@ -165,13 +165,16 @@
             console.log(userid);
 
             let presentList = [];
+            let b_a = true;
+            let h_p = false;
             let that = this;
             BasicFunction.get_data("smartGoods/list?isDel=0&ownerId=" + userid, function (response) {
                 console.log("------ Data Rcvd in Index --------");
                 console.log(response);
                 if (response.ret === "10000") {
                     let list = response.model.list;
-                    if (list.length !== 0) that.hasPresent = true;
+                    if (list.length !== 0) h_p = true;
+                    that.hasPresent = h_p;
                     list.forEach(gift => {
                         let temp = {};
                         temp.id = gift.goodid;
@@ -185,11 +188,12 @@
                         temp.desc_long = gift.description;
                         temp.time = gift.createTime.substring(0, 9);
                         temp.status = gift.sort;
-                        if (gift.sort && gift.sort !== 4) that.button_active = false; // 限制上传1个礼物
+                        if (gift.sort !== 4) b_a = false; // 限制上传1个礼物
                         temp.gender = gift.goodFirstKind;
                         temp.tags = gift.goodSecondKind;
                         presentList.push(temp);
                     });
+                    that.button_active = b_a;
                 } else {
                     // 失败的处理
                     console.warn("获取资源失败");
@@ -199,6 +203,9 @@
             console.log("presents:");
             console.log(presentList);
             this.presents = presentList;
+        },
+        mounted: function () {
+            document.getElementsByName("index_icon")[0].click(); // 保证导航栏正确
         }
     }
 

+ 7 - 6
sourcecode/h5app/vue/src/views/login.vue

@@ -16,13 +16,14 @@
         created: function () {
             Toast.loading({
                 mask: true,
-                message: '加载中...'
+                message: '加载中...',
+                duration: 1500
             });
-            if (localStorage.getItem('frontend-userid')) {
-                Toast.success('登录成功');
-                this.$router.push('index');
-                return;
-            }
+            // if (localStorage.getItem('frontend-userid')) {
+            //     Toast.success('登录成功');
+            //     this.$router.push('index');
+            //     return;
+            // }
             let otp = this.$route.query.o;
             console.log('otp: ');
             console.log(otp);

+ 7 - 3
sourcecode/h5app/vue/src/views/me.vue

@@ -25,7 +25,7 @@
         },
         data() {
             return {
-                button_active: true
+                button_active: false
             }
         },
         created: function () {
@@ -33,7 +33,7 @@
                 this.$router.push('login');
                 return;
             }
-            this.button_active = false;
+            let b_a = true;
             let userid = localStorage.getItem("frontend-userid");
             let that = this;
             BasicFunction.get_data("smartGoods/list?isDel=0&ownerId=" + userid, function (response) {
@@ -42,12 +42,16 @@
                 if (response.ret === "10000") {
                     let list = response.model.list;
                     list.forEach(gift => {
-                        if (gift.sort && gift.sort !== 4) that.button_active = false; // 限制上传1个礼物
+                        if (gift.sort !== 4) b_a = false; // 限制上传1个礼物
                     });
+                    that.button_active = b_a;
                 } else {
                     console.warn("获取资源失败");
                 }
             }, {});
+        },
+        mounted: function () {
+            document.getElementsByName("me_icon")[0].click(); // 保证导航栏正确
         }
     }
 </script>