mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 10:56:47 +08:00
Merge remote-tracking branch 'boe/cloud'
This commit is contained in:
@@ -34,11 +34,12 @@ export function setToken(token) {
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
uni.removeStorageSync(TOKEN_KEY);
|
||||
uni.removeStorageSync('returnUrl');
|
||||
uni.setStorageSync('oh','quit');
|
||||
uni.removeStorageSync('userInfo');
|
||||
uni.removeStorageSync('inner');
|
||||
// uni.removeStorageSync(TOKEN_KEY);
|
||||
// uni.removeStorageSync('returnUrl');
|
||||
// //uni.setStorageSync('oh','quit');
|
||||
// uni.removeStorageSync('userInfo');
|
||||
// uni.removeStorageSync('inner');
|
||||
uni.clearStorageSync();
|
||||
// #ifdef H5
|
||||
document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
||||
document.cookie = "userInfo=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import config from '@/config/index.js'
|
||||
import {removeToken} from '@/utils/token.js'
|
||||
|
||||
export function toLogin(ajaxUrl) {
|
||||
let pageUrl=location.href;
|
||||
@@ -14,6 +15,8 @@ export function toLogin(ajaxUrl) {
|
||||
if(ajaxUrl && ajaxUrl.indexOf('/xboe/portal/init')>-1){
|
||||
return;
|
||||
}
|
||||
//跳转到登录,先把本地的登录信息清空
|
||||
//removeToken();
|
||||
//http://localhost:8081/mobile/pages/study/courseStudy?id=1028700304503054336
|
||||
if(pageUrl.indexOf('returnUrl')>-1){
|
||||
console.log(pageUrl,'to pageUrl')
|
||||
|
||||
Reference in New Issue
Block a user