Merge remote-tracking branch 'boe/cloud'

This commit is contained in:
yujicun
2023-08-10 11:25:33 +08:00
6 changed files with 12 additions and 1259 deletions

View File

@@ -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=/;";

View File

@@ -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')