1.修改小程序段拼团未登录情况下无法进行登录回跳的问题
2.新增订单扫码核销的功能 3.修改cookie方法未取到值返回null导致报错的问题 4.修改loading页面跳转登录的问题
This commit is contained in:
@ -211,7 +211,7 @@ export const login = () => {
|
||||
if (code) {
|
||||
auth(code)
|
||||
.then(() => {
|
||||
let redirect = cookie.get('redirect')
|
||||
let redirect = cookie.get('redirect').replace(/\ /g, '')
|
||||
console.log(redirect)
|
||||
if (redirect) {
|
||||
redirect = redirect.split('/pages')[1]
|
||||
@ -327,7 +327,7 @@ export const handleGetUserInfo = () => {
|
||||
store.dispatch('setUserInfo', res.data)
|
||||
console.log('获取用户信息后跳转回显的页面')
|
||||
|
||||
let redirect = cookie.get('redirect')
|
||||
let redirect = cookie.get('redirect').replace(/\ /g, '')
|
||||
if (redirect) {
|
||||
reLaunch({
|
||||
path: redirect,
|
||||
@ -585,11 +585,9 @@ export function routerPermissions(url, type) {
|
||||
})
|
||||
return
|
||||
}
|
||||
{
|
||||
push({
|
||||
path,
|
||||
})
|
||||
}
|
||||
push({
|
||||
path,
|
||||
})
|
||||
}).catch(error => {
|
||||
console.log('————————')
|
||||
console.log('自动登录失败,跳转到授权页面')
|
||||
@ -661,7 +659,7 @@ export function reLaunch(location, complete, fail, success) {
|
||||
uni.reLaunch(params)
|
||||
}).catch(error => {
|
||||
// 没有权限
|
||||
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
@ -850,6 +848,7 @@ export const handleLoginFailure = () => {
|
||||
// 改为授权取消
|
||||
store.commit("updateAuthorization", false);
|
||||
|
||||
|
||||
let currentPageUrl = getCurrentPageUrl()
|
||||
if (store.state.$deviceType == 'weixin') {
|
||||
// 如果不是授权页面,
|
||||
|
@ -5,7 +5,7 @@ const doc = null;
|
||||
|
||||
function get(key) {
|
||||
if (!key || !_has(key)) {
|
||||
return null;
|
||||
return '';
|
||||
}
|
||||
return uni.getStorageSync(key)
|
||||
}
|
||||
|
Reference in New Issue
Block a user