StephenArk30 6 лет назад
Родитель
Сommit
9d55bb1a74

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

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <guide style="z-index: 3"/>
+        <guide style="z-index: 3" v-if="hasPresent"/>
         <van-swipe :autoplay="3000" style="margin: 10px 10px;">
             <van-swipe-item v-for="(image, index) in images" :key="index">
                 <img v-lazy="image" style="max-width: 100%"/>
@@ -66,7 +66,8 @@
                 ],
                 active: 0,
                 button_active: true,
-                presents: {}
+                presents: {},
+                hasPresent: false
             }
         },
         methods: {
@@ -95,7 +96,10 @@
                 console.log(response);
                 if (response.ret === "10000") {
                     let list = response.model.list;
-                    if (list !== undefined || list.length > 0) console.warn(list);
+                    if (list !== undefined || list.length === 0) {
+                        console.warn(list);
+
+                    }
                     list.forEach(gift => {
                         let temp = {};
                         temp.id = gift.goodid;

+ 3 - 3
sourcecode/h5app/vue/src/views/login.vue

@@ -14,9 +14,9 @@
 
     export default {
         created: function () {
-            // if (localStorage.getItem('frontend-userid')) {
-            //     this.$router.push('index');
-            // }
+            if (localStorage.getItem('frontend-userid')) {
+                this.$router.push('index');
+            }
             let otp = this.$route.query.o;
             console.log('otp: ');
             console.log(otp);