Ver Fonte

修改登录返回404的问题

shenjj há 7 anos atrás
pai
commit
e888c5ac27

+ 10 - 1
components/mobile/Home.vue

@@ -118,12 +118,20 @@
     watch: {
       '$store.state.applyPurchase.purchaseManList.purchaseHomeList.data': {
         handler: function (val) {
-          if (this.isChange) {
+          if (val.length === 0) {
+            // console.log(111)
+            this.$store.dispatch('applyPurchase/loadMobileHomeList', {
+              pageNumber: 1,
+              pageSize: 5,
+              enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null
+            })
+          } else if (this.isChange) {
             this.purchaseManListData = []
             this.page = 1
             this.isChange = false
             this.isDataChange = false
           } else {
+            // console.log(val.content)
             this.purchaseManListData = this.purchaseManListData.concat(val.content)
             this.isSearchSearchingMore = false
             this.isDataChange = true
@@ -209,6 +217,7 @@
   }
 </script>
 <style lang="scss">
+  @import '~assets/scss/mobileCommon';
   .home {
     padding-bottom: 1rem;
     background: #f3f3f7;

+ 19 - 2
components/mobile/applyPurchase/SeekList.vue

@@ -117,7 +117,7 @@ export default {
       remindText: '',
       timeoutCount: 0,
       agreed: 0,
-      purchaseManListData: [],
+      purchaseManListData: [{}],
       url: ''
     }
   },
@@ -163,8 +163,25 @@ export default {
     }
   },
   watch: {
+    // 'purchaseManList': {
+    //   handler (newVal) {
+    //     if (this.purchaseManListData.length === 0) {
+    //       this.$store.dispatch('applyPurchase/loadMobileHomeList', {
+    //         pageNumber: 1,
+    //         pageSize: 5,
+    //         enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null
+    //       }).then(res => {
+    //         this.purchaseManListData = JSON.parse(JSON.stringify(this.purchaseManList))
+    //         console.log(this.purchaseManListData.length)
+    //       })
+    //     } else {
+    //       this.purchaseManListData = JSON.parse(JSON.stringify(this.purchaseManList))
+    //     }
+    //   },
+    //   immediate: true
+    // }
     'purchaseManList': {
-      handler () {
+      handler (newVal) {
         this.purchaseManListData = JSON.parse(JSON.stringify(this.purchaseManList))
       },
       immediate: true

+ 1 - 0
pages/index.vue

@@ -27,6 +27,7 @@
     name: 'index',
     // middleware: 'wechatInfo',
     layout (context) {
+      console.log(context.store.state.option.isMobile)
       return context.store.state.option.isMobile ? 'mobile' : 'main'
     },
     data () {

+ 1 - 1
pages/mobile/product/_batchCode.vue

@@ -118,7 +118,7 @@
         return this.commodityPrices.length > 3 ? this.commodityPrices.slice(3, this.commodityPrices.length) : []
       },
       isFocus () {
-        console.log(this.$store.state.shop.storeInfo)
+        // console.log(this.$store.state.shop.storeInfo)
         return this.$store.state.shop.storeInfo.focusList.data === 'true'
       },
       storeInfo () {