vue pro change

This commit is contained in:
caoqianming 2020-03-24 09:03:46 +08:00
parent 8073c0fa90
commit 971d77e9ab
3 changed files with 8 additions and 4 deletions

View File

@ -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'

View File

@ -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,
}

View File

@ -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({