mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 09:26:45 +08:00
Revert "Merge remote-tracking branch 'origin/master'"
This reverts commit9e16ad6913, reversing changes made to4b3b6cdf16.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import config from '@/config/index.js'
|
||||
import {toLogin} from '@/utils/tologin.js'
|
||||
import {getToken,removeToken} from '@/utils/token.js'
|
||||
import qs from 'qs'
|
||||
|
||||
@@ -36,22 +35,21 @@ const formRequest=function(method,url,data){
|
||||
if(rs.data.status==6001){
|
||||
//uni.removeStorageSync('userInfo');
|
||||
removeToken();
|
||||
toLogin(reUrl);
|
||||
// let loginPath=config.loginPath;
|
||||
// if(loginPath.startsWith('http')){
|
||||
// // #ifdef APP-PLUS
|
||||
// plus.runtime.openURL(loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开
|
||||
// // #endif
|
||||
// // #ifdef H5
|
||||
// //window.open(loginPath)
|
||||
// let returnUrl=window.location.protocol+'//'+window.location.host+config.context;
|
||||
// location.href=config.loginPath+"?returnUrl="+encodeURIComponent(returnUrl+'/pages/login/loading');
|
||||
// // #endif
|
||||
// }else{
|
||||
// uni.redirectTo({
|
||||
// url:loginPath
|
||||
// })
|
||||
// }
|
||||
let loginPath=config.loginPath;
|
||||
if(loginPath.startsWith('http')){
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL(loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
//window.open(loginPath)
|
||||
let returnUrl=window.location.protocol+'//'+window.location.host+config.context;
|
||||
location.href=config.loginPath+"?returnUrl="+encodeURIComponent(returnUrl+'/pages/login/loading');
|
||||
// #endif
|
||||
}else{
|
||||
uni.redirectTo({
|
||||
url:loginPath
|
||||
})
|
||||
}
|
||||
}else{
|
||||
resolve(rs.data);
|
||||
}
|
||||
@@ -87,22 +85,21 @@ const jsonRequest=function(method,url,data){
|
||||
if(rs.statusCode==200){
|
||||
if(rs.data.status==6001){
|
||||
removeToken();
|
||||
toLogin(reUrl);
|
||||
// let loginPath=config.loginPath;
|
||||
// if(loginPath.startsWith('http')){
|
||||
// // #ifdef APP-PLUS
|
||||
// plus.runtime.openURL(loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开
|
||||
// // #endif
|
||||
// // #ifdef H5
|
||||
// //window.open(loginPath)
|
||||
// let returnUrl=window.location.protocol+'//'+window.location.host+config.context;
|
||||
// location.href=config.loginPath+"?returnUrl="+encodeURIComponent(returnUrl+'/pages/login/loading');
|
||||
// // #endif
|
||||
// }else{
|
||||
// uni.redirectTo({
|
||||
// url:loginPath
|
||||
// })
|
||||
// }
|
||||
let loginPath=config.loginPath;
|
||||
if(loginPath.startsWith('http')){
|
||||
// #ifdef APP-PLUS
|
||||
plus.runtime.openURL(loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
//window.open(loginPath)
|
||||
let returnUrl=window.location.protocol+'//'+window.location.host+config.context;
|
||||
location.href=config.loginPath+"?returnUrl="+encodeURIComponent(returnUrl+'/pages/login/loading');
|
||||
// #endif
|
||||
}else{
|
||||
uni.redirectTo({
|
||||
url:loginPath
|
||||
})
|
||||
}
|
||||
}else{
|
||||
resolve(rs.data);
|
||||
}
|
||||
|
||||
@@ -31,11 +31,6 @@ const getUserInfoById = function(id) {
|
||||
return ajax.postJson('/user/list',{id});
|
||||
}
|
||||
|
||||
/**获取当前登录用户的信息*/
|
||||
const getUserInfo = function() {
|
||||
return ajax.postJson('/user/info',{});
|
||||
}
|
||||
|
||||
/**
|
||||
* https://u-pre.boe.com/userbasic/audience/userAudiences
|
||||
* 获取当前用户受众信息
|
||||
@@ -86,7 +81,6 @@ export default {
|
||||
getOrgInfo,
|
||||
findOrgTreeByOrgId,
|
||||
getUserInfoById,
|
||||
getUserInfo,
|
||||
getUserCrowds,
|
||||
getOrgHrbpInfo,
|
||||
modifyPassword,
|
||||
|
||||
Reference in New Issue
Block a user