拼团商品详情问题接口404

uniapp运行的H5版本,购物车报错不能购买
小程序绑定手机号会报错
uniapp 3.1 tabbar显示
This commit is contained in:
Gao xiaosong
2020-09-20 23:00:32 +08:00
parent cd942b5349
commit 32a514eb74
8 changed files with 109 additions and 61 deletions

View File

@ -275,6 +275,7 @@ export const login = () => {
console.log('登录接口调用成功')
console.log('开始检查用户信息授权')
let code = loginRes.code;
cookie.set('wxLoginCode',loginRes.code)
// 检查授权, 检查用户信息授权
authorize('userInfo').then(() => {
console.log('授权通过')
@ -516,7 +517,7 @@ export const handleLoginStatus = (location, complete, fail, success) => {
}
return new Promise((resolve, reject) => {
if (isAuth) {
// 有token
if (path == '/pages/home/index' || path == '/pages/shop/GoodsClass/index' || path == '/pages/shop/ShoppingCart/index' || path == '/pages/user/User/index') {
@ -859,13 +860,21 @@ export const handleLoginFailure = () => {
store.commit("updateAuthorization", false);
let currentPageUrl = getCurrentPageUrl()
// token 失效
// 判断当前是不是已经在登录页面或者授权页,防止二次跳转
if (store.getters.isAuthorizationPage || currentPageUrl == '/pages/user/Login/index') {
console.log(store.getters.isAuthorizationPage, currentPageUrl, '已经是登录页面或者授权页面,跳出方法')
return
if (store.state.$deviceType == 'weixin') {
if (store.getters.isAuthorizationPage){
toAuth()
}
} else {
// token 失效
// 判断当前是不是已经在登录页面或者授权页,防止二次跳转
if (store.getters.isAuthorizationPage || currentPageUrl == '/pages/user/Login/index') {
console.log(store.getters.isAuthorizationPage, currentPageUrl, '已经是登录页面或者授权页面,跳出方法')
return
}
}
console.log('————————')
console.log('当前是授权页面')
console.log(store.getters)
@ -873,6 +882,7 @@ export const handleLoginFailure = () => {
store.commit("updateAuthorizationPage", true);
let path = '/' + getCurrentPageUrlWithArgs()
let qrCode = handleQrCode()
if (qrCode) {