diff --git a/src/subPackages/login/login/index.vue b/src/subPackages/login/login/index.vue index 6789dfd..dde4e0e 100644 --- a/src/subPackages/login/login/index.vue +++ b/src/subPackages/login/login/index.vue @@ -207,11 +207,12 @@ export default { }); }, callbackLogin(res) { - let { authTokenDTO, isCompanyAccount } = res.data; + let { authTokenDTO } = res.data; if (authTokenDTO.loginFlag) { uni.setStorageSync("Authorization", authTokenDTO.accessToken); - uni.setStorageSync("accountStatus", isCompanyAccount); + // uni.setStorageSync("accountStatus", isCompanyAccount); uni.setStorageSync("user", authTokenDTO.loginUser); + // console.log() uni.reLaunch({ url: "/pages/index/index", }); diff --git a/src/subPackages/site/details/index.vue b/src/subPackages/site/details/index.vue index 072d882..9ea91a8 100644 --- a/src/subPackages/site/details/index.vue +++ b/src/subPackages/site/details/index.vue @@ -153,7 +153,6 @@ export default { }, data() { return { - discountInfo: {}, params: { sitePriceAmount: "", oilProductCode: "", @@ -161,10 +160,12 @@ export default { sitePrice: "", oilSitePrice: "", }, + discountInfo: {}, siteInfo: {}, handleInfo: { number: [], spear: {}, + currentSpear: [], }, }; }, @@ -455,26 +456,7 @@ export default { font-weight: 500; } } -// .illustrate { -// min-height: 30vh; -// > .title { -// position: relative; -// padding: 30rpx 0; -// text-align: center; -// > uni-icons { -// position: absolute; -// top: 50%; -// right: 30rpx; -// transform: translateY(-50%); -// } -// } -// > .text { -// padding: 0 20rpx; -// text-align: center; -// font-size: 28rpx; -// color: #999; -// } -// } + .container { min-height: 100vh; background: #f6f6f6; diff --git a/src/utils/request.js b/src/utils/request.js index c552651..f4c1cf6 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -15,10 +15,6 @@ const instance = axios.create({ timeout: 10000, }); -let token = ""; -let unionId = ""; -let openId = ""; - instance.interceptors.request.use( (config) => { if (!config.hideLoading) { @@ -27,15 +23,9 @@ instance.interceptors.request.use( }); } - if (!token) { - token = uni.getStorageSync("Authorization") || " "; - } - if (!unionId) { - unionId = uni.getStorageSync("unionid"); - } - if (!openId) { - openId = uni.getStorageSync("openid"); - } + const token = uni.getStorageSync("Authorization") || " "; + const unionId = uni.getStorageSync("unionid"); + const openId = uni.getStorageSync("openid"); config.headers["Authorization"] = token; config.headers["imei"] = unionId;