Browse Source

Merge branch 'release-201823-wangcz'

shenjj 7 years ago
parent
commit
e49d3dafc6
1 changed files with 11 additions and 6 deletions
  1. 11 6
      pages/mobile/wechat/index.vue

+ 11 - 6
pages/mobile/wechat/index.vue

@@ -50,7 +50,7 @@
       </nuxt-link>
     </div>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
-    <div class="listAlert" ref="userContent" v-show="wechatInfo.enterprises && enuu === ''">
+    <div class="listAlert" ref="userContent" v-show="wechatInfo.enterprises">
       <ul>
         <li v-for="(item, index) in wechatInfo.enterprises" @click="clickItem(item)">
           {{item.enName}}
@@ -87,11 +87,13 @@
     },
     mounted() {
       let info = localStorage.getItem('USOFTMALLWECHATINFO')
-      if (this.$route.query.url) {
-        localStorage.setItem('RETURNURL', this.$route.query.url || '')
+      let _url = this.$route.query.url ? this.$route.query.url.split('?') : []
+      if (_url[0]) {
+        localStorage.setItem('RETURNURL', _url[0] || '')
       }
-      if (this.$route.query.enuu) {
-        this.enuu = this.$route.query.enuu
+      if (_url[1]) {
+        this.enuu = _url[1].split('=')[1]
+        localStorage.setItem('Userenuu', _url[1] || '')
       }
       let ua = this.$store.state.option.userAgent.toLowerCase()
       if (ua.match(/micromessenger/i) && ua.match(/micromessenger/i)[0] === 'micromessenger' && !this.$route.query.code && !info) {
@@ -102,6 +104,7 @@
         if (info.openid) {
           this.$store.dispatch('GerWechatInfo', {code: '', openId: info.openid}).then(res => {
             // 存在enuu
+            // this.enuu = localStorage.getItem('Userenuu')
             if (this.enuu) {
               this.loginFromEnuu()
             }
@@ -149,12 +152,13 @@
               })
              if (_url !== '') {
                localStorage.removeItem('RETURNURL')
-               this.$router.replace(_url)
+               this.$router.replace('/' + _url)
              } else if (this.$route.query.url && this.$route.query.url !== '') {
                 this.$router.replace(this.$route.query.url)
              } else {
                this.goLastPage()
              }
+             localStorage.removeItem('Userenuu')
           })
         })
       },
@@ -244,6 +248,7 @@
             this.$timer = setInterval(() => {
               this.getExtraTime--
               if (this.getExtraTime === 0) {
+                this.getExtraTime = 60
                 this.showExtraTime = false
                 clearInterval(this.$timer)
               }