dev_tj
杨树林 5 years ago
parent 5b7657f74e
commit 4af4612a55

@ -101,9 +101,6 @@ export function initAxiosInterceptors(props) {
// proxy="https://test-jupyterweb.educoder.net" // proxy="https://test-jupyterweb.educoder.net"
//proxy="http://192.168.2.63:3001" //proxy="http://192.168.2.63:3001"
try { try {
var u = navigator.userAgent;
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if (isIOS) {
const str =window.location.pathname; const str =window.location.pathname;
if(str.indexOf("/wxcode") !== -1){ if(str.indexOf("/wxcode") !== -1){
// console.log("开始重写cookis"); // console.log("开始重写cookis");
@ -120,11 +117,11 @@ export function initAxiosInterceptors(props) {
}else{ }else{
cookie.save('autologin_trustie',_arr[1],{ path: '/' }); cookie.save('autologin_trustie',_arr[1],{ path: '/' });
cookie.save('autologin_trustie',_arr[1], { domain: '.educoder.net', path: '/'});
} }
}); });
} }
} }
}
}catch (e) { }catch (e) {
} }

@ -46,25 +46,25 @@ const App = (props) => {
// 获取路径参数 // 获取路径参数
const _params = window.location.search; const _params = window.location.search;
const setCookier = () => { const setCookier = () => {
var u = navigator.userAgent; // var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
if(isAndroid){ // if(isAndroid){
if (_params) { // if (_params) {
let _search = _params.split('?')[1]; // let _search = _params.split('?')[1];
_search.split('&').forEach(item => { // _search.split('&').forEach(item => {
// console.log(item); // // console.log(item);
const _arr = item.split('='); // const _arr = item.split('=');
cookie.remove(_arr[0], { // cookie.remove(_arr[0], {
path: '/', // path: '/',
domain: '.educoder.net' // domain: '.educoder.net'
}); // });
cookie.save(_arr[0], _arr[1], { // cookie.save(_arr[0], _arr[1], {
path: '/', // path: '/',
domain: '.educoder.net' // domain: '.educoder.net'
}); // });
}); // });
} // }
} // }
} }
setCookier(); setCookier();
const [isActive, setIsActive] = useState(-1); const [isActive, setIsActive] = useState(-1);

Loading…
Cancel
Save