ソースを参照

修改通知encode

yangc 7 年 前
コミット
bf37659c08
3 ファイル変更15 行追加11 行削除
  1. 6 4
      components/login/Login.vue
  2. 5 4
      components/mobile/loginMobile.vue
  3. 4 3
      pages/agency/index.vue

+ 6 - 4
components/login/Login.vue

@@ -390,9 +390,11 @@
                   for (let n in param) {
                     a += (n + '=' + param[n] + '&')
                   }
+                  let params = encodeURIComponent(a.substr(0, a.length - 1))
                   this.isShowLoading = true
                   if (response.data.content.currentUrl) {
-                    this.$jsonp(`${response.data.content.currentUrl}?${encodeURIComponent(a.substr(0, a.length - 1))}`, {
+                    console.log(params)
+                    this.$jsonp(`${response.data.content.currentUrl}?${params}`, {
                       name: 'successCallback',
                       timeout: 3000
                     }, (err, data) => {
@@ -401,11 +403,11 @@
                         this.isShowLoading = false
                         throw err
                       } else {
-                        this.loginOther(response, a)
+//                        this.loginOther(response, params)
                       }
                     })
                   } else {
-                    this.loginOther(response, a, 3000)
+//                    this.loginOther(response, params, 3000)
                   }
                 }
               } else {
@@ -476,7 +478,7 @@
         const crossAfter = this.crossAfter
         let promises = []
         for (let i in response.data.content.loginUrls) {
-          promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${encodeURIComponent(a.substr(0, a.length - 1))}`))
+          promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a.substr(0, a.length - 1)}`))
         }
         Promise.all(promises).then(() => {
           crossAfter(response.data.content.returnUrl || 'http://www.ubtob.com', timeout)

+ 5 - 4
components/mobile/loginMobile.vue

@@ -155,9 +155,10 @@
                 for (let n in param) {
                   a += (n + '=' + param[n] + '&')
                 }
+                let params = encodeURIComponent(a.substr(0, a.length - 1))
                 this.$indicator.open('跳转中...')
                 if (response.data.content.currentUrl) {
-                  this.$jsonp(`${response.data.content.currentUrl}?${encodeURIComponent(a.substr(0, a.length - 1))}`, {
+                  this.$jsonp(`${response.data.content.currentUrl}?${params}`, {
                     name: 'successCallback',
                     timeout: 5000
                   }, (err, data) => {
@@ -170,11 +171,11 @@
                       this.login.spaceUU = ''
                       throw err
                     } else {
-                      this.loginOther(response, a)
+                      this.loginOther(response, params)
                     }
                   })
                 } else {
-                  this.loginOther(response, a, 3000)
+                  this.loginOther(response, params, 3000)
                 }
               }
             } else {
@@ -230,7 +231,7 @@
         const crossAfter = this.crossAfter
         let promises = []
         for (let i in response.data.content.loginUrls) {
-          promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${encodeURIComponent(a.substr(0, a.length - 1))}`))
+          promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a.substr(0, a.length - 1)}`))
         }
         Promise.all(promises).then(() => {
           crossAfter(response.data.content.returnUrl || 'http://www.ubtob.com', timeout)

+ 4 - 3
pages/agency/index.vue

@@ -75,6 +75,7 @@
                 for (let n in param) {
                   a += (n + '=' + param[n] + '&')
                 }
+                let params = encodeURIComponent(a.substr(0, a.length - 1))
                 if (response.data.content.currentUrl) {
                   this.$jsonp(`${response.data.content.currentUrl}?${encodeURIComponent(a.substr(0, a.length - 1))}`, {
                     name: 'successCallback',
@@ -92,11 +93,11 @@
                       }, 1000)
                       throw err
                     } else {
-                      this.loginOther(response, a)
+                      this.loginOther(response, params)
                     }
                   })
                 } else {
-                  this.loginOther(response, a, 3000)
+                  this.loginOther(response, params, 3000)
                 }
               } else {
                 window.location.href = response.data.content.returnUrl || 'http://www.ubtob.com'
@@ -134,7 +135,7 @@
         const crossAfter = this.crossAfter
         let promises = []
         for (let i in response.data.content.loginUrls) {
-          promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${encodeURIComponent(a.substr(0, a.length - 1))}`))
+          promises.push(this.getJsonp(`${response.data.content.loginUrls[i]}?${a.substr(0, a.length - 1)}`))
         }
         Promise.all(promises).then(() => {
           crossAfter(response.data.content.returnUrl || 'http://www.ubtob.com', timeout)