You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
450 B
JavaScript
24 lines
450 B
JavaScript
const switchTab = [
|
|
'/pages/main/user/user',
|
|
'/pages/main/home/home',
|
|
];
|
|
export function loginJump() {
|
|
let jump_path = uni.getStorageSync('JUMP_PATH')
|
|
if (jump_path) {
|
|
uni.removeStorageSync('JUMP_PATH')
|
|
if (switchTab.indexOf(jump_path) !== -1) {
|
|
uni.switchTab({
|
|
url: jump_path
|
|
})
|
|
} else {
|
|
uni.navigateTo({
|
|
url: jump_path
|
|
})
|
|
}
|
|
} else {
|
|
uni.switchTab({
|
|
url: '/pages/main/user/user'
|
|
})
|
|
}
|
|
}
|