diff --git a/test_client/.env.production b/test_client/.env.production index 80c8103..be5dd8e 100644 --- a/test_client/.env.production +++ b/test_client/.env.production @@ -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' diff --git a/test_mini/app.js b/test_mini/app.js index 07f6491..44c7e1f 100644 --- a/test_mini/app.js +++ b/test_mini/app.js @@ -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, } diff --git a/test_mini/utils/request.js b/test_mini/utils/request.js index 75a647b..17357ce 100644 --- a/test_mini/utils/request.js +++ b/test_mini/utils/request.js @@ -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({