diff --git a/common/config.js b/common/config.js index 90f45b7..b90e949 100644 --- a/common/config.js +++ b/common/config.js @@ -1,6 +1,7 @@ const mode = 'production'; //devLocal:本地测试、devOnline:线上测试、production:生产环境 let ROOTPATH = ''; //域名 let base = "https://agent.xfgshop.com" +// let base = "https://agenttest.xfgshop.com" switch (mode) { // https://agenttest.xfgshop.com // https://agent.xfgshop.com diff --git a/common/http.interceptor.js b/common/http.interceptor.js index a9892c7..d0bcd25 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -37,17 +37,21 @@ const install = (Vue, vm) => { console.log('res-http', res) if (res.statusCode === 200) { if (res.data.hasOwnProperty("errcode")) { - if (res.data?.errcode === 40001) { + if (res.data?.errcode === 40001) { + console.log("调用用户信息失效") uni.showModal({ title: '用户信息已失效', confirmText: '重新获取', success: function(res) { - if (res.confirm) { + if (res.confirm) { + console.log("调用用户信息失效code",res) uni.removeStorageSync() uni.login({ provider: 'weixin', - success: (res) => { - let url = baseUrl + '​/api/mobile/user/login' + success: (res) => { + console.log("调用用户信息失效code12",res) + let url = `${baseUrl}/api/mobile/user/login` + console.log("调用用户信息失效url",url) uni.request({ url: url, data:{ @@ -59,34 +63,15 @@ const install = (Vue, vm) => { uni.setStorageSync("xtt_lifeData3",{'vuex_token':result.data.token}) uni.reLaunch({ url: '/pages/home/home' - }); - - // const currentPage = - // getCurrentPages()[ - // getCurrentPages() - // .length - 1]; - // const currentPagePath = - // "/" + currentPage.route; - // const currentPageOptions = - // currentPage.options; - // const queryString = Object - // .keys( - // currentPageOptions) - // .map(key => - // `${key}=${currentPageOptions[key]}` - // ) - // .join('&'); - // // 使用uni.reLaunch方法刷新当前页面 - - // uni.reLaunch({ - // url: `${currentPagePath}?${queryString}` - // }); - // console.log("reLaunch", - // `${currentPagePath}?${queryString}` - // ) - - } + }); + }, + fail:function(err2){ + console.log("err2",err2) + }, }); + }, + fail:function(err){ + console.log("err",err) } }); // login end diff --git a/components/date-picker/date-picker.vue b/components/date-picker/date-picker.vue index 19a2fd9..e8ebc61 100644 --- a/components/date-picker/date-picker.vue +++ b/components/date-picker/date-picker.vue @@ -28,7 +28,8 @@ {{dateObj.lunarData?dateObj.lunarData:''}} - 今日剩余可提货量:{{dateObj.canUse.quantity - dateObj.canUse.booked}} + + 余量充足