vue pro change
This commit is contained in:
parent
8073c0fa90
commit
971d77e9ab
|
@ -2,5 +2,5 @@
|
|||
ENV = 'production'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = '/api'
|
||||
|
|
|
@ -48,8 +48,10 @@ App({
|
|||
globalData: {
|
||||
userInfo: null,
|
||||
userinfo: null, // 服务器传回的消费者信息
|
||||
host: 'http://127.0.0.1:8000/api/',
|
||||
mediahost: 'http://127.0.0.1:8000/',
|
||||
host: 'https://apitest.ctcshe.com/api/',
|
||||
mediahost: 'https://apitest.ctcshe.com/',
|
||||
// host: 'http://127.0.0.1:8000/api/',
|
||||
// mediahost: 'http://127.0.0.1:8000/',
|
||||
token : '',
|
||||
subject:null,
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@ function request(url, method, data) {
|
|||
wx.hideLoading();
|
||||
if (res.data.code >= 200 && res.data.code < 400) {
|
||||
resolve(res.data);
|
||||
}else if(res.data.code == 401){
|
||||
getApp().onLaunch()
|
||||
}
|
||||
else {
|
||||
wx.showToast({
|
||||
|
|
Loading…
Reference in New Issue