Explorar el Código

登录页面增加url编码方式

hangb hace 7 años
padre
commit
09a45a4899
Se han modificado 3 ficheros con 4 adiciones y 3 borrados
  1. 2 1
      components/login/Login.vue
  2. 1 1
      components/mobile/loginMobile.vue
  3. 1 1
      pages/agency/index.vue

+ 2 - 1
components/login/Login.vue

@@ -356,6 +356,7 @@
       },
 //      登录
       isLogin (flag) {
+        console.log(111)
         this.isShowLoading = true
         if (!this.login.username) {
           this.isShowLoading = false
@@ -399,7 +400,7 @@
                   }
                   this.isShowLoading = true
                   if (response.data.content.currentUrl) {
-                    this.$jsonp(`${response.data.content.currentUrl}?${a.substr(0, a.length - 1)}`, {
+                    this.$jsonp(`${response.data.content.currentUrl}?${encodeURIComponent(a.substr(0, a.length - 1))}`, {
                       name: 'successCallback',
                       timeout: 3000
                     }, (err, data) => {

+ 1 - 1
components/mobile/loginMobile.vue

@@ -157,7 +157,7 @@
                 }
                 this.$indicator.open('跳转中...')
                 if (response.data.content.currentUrl) {
-                  this.$jsonp(`${response.data.content.currentUrl}?${a.substr(0, a.length - 1)}`, {
+                  this.$jsonp(`${response.data.content.currentUrl}?${encodeURIComponent(a.substr(0, a.length - 1))}`, {
                     name: 'successCallback',
                     timeout: 5000
                   }, (err, data) => {

+ 1 - 1
pages/agency/index.vue

@@ -76,7 +76,7 @@
                   a += (n + '=' + param[n] + '&')
                 }
                 if (response.data.content.currentUrl) {
-                  this.$jsonp(`${response.data.content.currentUrl}?${a.substr(0, a.length - 1)}`, {
+                  this.$jsonp(`${response.data.content.currentUrl}?${encodeURIComponent(a.substr(0, a.length - 1))}`, {
                     name: 'successCallback',
                     timeout: 5000
                   }, (err, data) => {