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