瀏覽代碼

处理切换帐套时候同步进行

Administrator 7 年之前
父節點
當前提交
46b13faa62
共有 5 個文件被更改,包括 19 次插入0 次删除
  1. 4 0
      components/default/Header.vue
  2. 4 0
      components/mobile/common/userHeader.vue
  3. 5 0
      nuxt.config.js
  4. 4 0
      pages/mobile/user/index.vue
  5. 2 0
      plugins/axios.js

+ 4 - 0
components/default/Header.vue

@@ -133,6 +133,10 @@
 //          }
           window.location.href = '/'
         })
+        // 切换帐套用
+        // this.$jsonp(`/sso/login/change/userspace?spaceUU=${en.uu}`, {timeout: 5000, name: 'successCallback'}, (res) => {
+        //   console.log(res.data)
+        // })
       },
       toVendor: function () {
         let isSelf = true

+ 4 - 0
components/mobile/common/userHeader.vue

@@ -73,6 +73,10 @@
           //   this.$emit('updateLoad')
           // })
         })
+        // 切换帐套用
+        // this.$jsonp(`/sso/login/change/userspace?spaceUU=${en.uu}`, {timeout: 5000, name: 'successCallback'}, (res) => {
+        //   console.log(res.data)
+        // })
       },
       setShowEnterpriseToggle(flag, e) {
         if (e) {

+ 5 - 0
nuxt.config.js

@@ -10,6 +10,8 @@ const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-produ
 const cmsUrl = process.env.CMS_URL || (isProdMode ? 'https://cms.usoftmall.com' : 'https://cms.usoftmall.com')
 // 消息
 const messageUrl = process.env.MESSAGE_URL || (isProdMode ? 'https://api-message.ubtob.com/' : 'http://192.168.253.6:24000/message')
+// 帐户中心
+// const ssoUrl = process.env.ssoUrl || (isProdMode ? 'https://sso.ubtob.com/' : 'http://192.168.253.6:32323/')
 
 module.exports = {
   router: {
@@ -95,6 +97,7 @@ module.exports = {
     materialUrl,
     cmsUrl,
     messageUrl
+    // ssoUrl
   },
   plugins: [
     {
@@ -191,5 +194,7 @@ module.exports = {
     '/cmsApi**': cmsUrl,
     '/mEmail/**': baseUrl,
     '/mPhone/**': baseUrl
+    // 帐套切换
+    // '/sso/**': ssoUrl
   }
 }

+ 4 - 0
pages/mobile/user/index.vue

@@ -138,6 +138,10 @@
             })
           })
         })
+        // 切换帐套用
+        // this.$jsonp(`/sso/login/change/userspace?spaceUU=${en.uu}`, {timeout: 5000, name: 'successCallback'}, (res) => {
+        //   console.log(res.data)
+        // })
       },
       logout () {
         this.$http.get('/logout/crossBefore', {params: {returnUrl: window.location.protocol + '//' + window.location.host}}).then(response => {

+ 2 - 0
plugins/axios.js

@@ -22,6 +22,8 @@ service.interceptors.request.use(config => {
       config.url = process.env.messageUrl + config.url
     } else if (config.url.indexOf('/cmsApi') === 0) {
       config.url = process.env.cmsUrl + config.url
+    // } else if (config.url.indexOf('/sso') === 0) {
+    //   config.url = process.env.ssoUrl + config.url
     } else {
       config.url = process.env.baseUrl + config.url
     }