修改手机端PC端接口分离
This commit is contained in:
@@ -253,13 +253,13 @@ export default {
|
||||
return that.Logout({}).then(() => {
|
||||
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||
// TODO 在部署线上时注掉以下代码
|
||||
that.$router.push({ path: '/user/login' })
|
||||
// that.$router.push({ path: '/user/login' })
|
||||
|
||||
// window.location.href = 'https://signin-test.nio.com/logout?client_id=100679&redirect_uri=' +
|
||||
// encodeURIComponent('http://localhost:3000/dashboard/analysis') + '&response_type=code' //本地
|
||||
// TODO 在部署线上时解开以下代码
|
||||
// window.location.href = 'https://signin.nio.com/logout?client_id=100679&redirect_uri=' +
|
||||
// encodeURIComponent('http://grp.nioint.com/dashboard/analysis') + '&response_type=code' //线上
|
||||
window.location.href = 'https://signin.nio.com/logout?client_id=100679&redirect_uri=' +
|
||||
encodeURIComponent(window.loginUrl) + '&response_type=code' //线上
|
||||
|
||||
localStorage.removeItem('language')
|
||||
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||
|
||||
@@ -135,10 +135,19 @@ const user = {
|
||||
const menuData = response.result.menu
|
||||
const authData = response.result.auth
|
||||
const allAuthData = response.result.allAuth
|
||||
window._CONFIG['domianPreviewURL'] = Vue.ls.get('domianPreviewURL') + '/jero-boot'
|
||||
window._CONFIG['domianWebSocketURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot'
|
||||
window._CONFIG['onlinePreviewDomainURL'] = Vue.ls.get('onlinePreviewDomainURL') + '/onlinePreview'
|
||||
window._CONFIG['domianWebImgURL'] = Vue.ls.get('domianWebImgURL') + '/jero-boot'
|
||||
let isPhone = localStorage.getItem('isPhone')
|
||||
if (isPhone == 'yes'){
|
||||
window._CONFIG['domianPreviewURL'] = Vue.ls.get('domianPreviewURL') + '/jero-boot'
|
||||
window._CONFIG['domianWebSocketURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot'
|
||||
window._CONFIG['onlinePreviewDomainURL'] = Vue.ls.get('onlinePreviewDomainURL') + '/onlinePreview'
|
||||
window._CONFIG['domianWebImgURL'] = Vue.ls.get('domianWebImgURL') + '/jero-boot'
|
||||
}else{
|
||||
window._CONFIG['domianPreviewURL'] = Vue.ls.get('domianPreviewURL') + '/jero-boot'
|
||||
window._CONFIG['domianWebSocketURL'] = Vue.ls.get('domianWebSocketURL') + '/jero-boot'
|
||||
window._CONFIG['onlinePreviewDomainURL'] = Vue.ls.get('onlinePreviewDomainURL') + '/onlinePreview'
|
||||
window._CONFIG['domianWebImgURL'] = Vue.ls.get('domianWebImgURL') + '/jero-boot'
|
||||
}
|
||||
|
||||
window._CONFIG['httpsOnlinePreviewDomainURL'] = Vue.ls.get('httpsOnlinePreviewDomainURL') + '/onlinePreview'
|
||||
//Vue.ls.set(USER_AUTH,authData);
|
||||
sessionStorage.setItem(USER_AUTH, JSON.stringify(authData))
|
||||
|
||||
@@ -11,7 +11,15 @@ import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
|
||||
* 则映射后端域名,通过 vue.config.js
|
||||
* @type {*|string}
|
||||
*/
|
||||
let apiBaseUrl = window._CONFIG['domianURL'] || '/jero-boot'
|
||||
|
||||
let apiBaseUrl = ''
|
||||
let isPhone = localStorage.getItem('isPhone')
|
||||
if (isPhone == 'yes'){
|
||||
apiBaseUrl = '/jero-boot/phone'
|
||||
}else{
|
||||
apiBaseUrl = '/jero-boot'
|
||||
}
|
||||
// let apiBaseUrl = window._CONFIG['domianURL'] || '/jero-boot'
|
||||
//console.log("apiBaseUrl= ",apiBaseUrl)
|
||||
// 创建 axios 实例
|
||||
const service = axios.create({
|
||||
|
||||
Reference in New Issue
Block a user