|
|
|
@ -109,30 +109,38 @@ export function initAxiosInterceptors(props) {
|
|
|
|
|
// proxy="https://test-jupyterweb.educoder.net"
|
|
|
|
|
//proxy="http://192.168.2.63:3001"
|
|
|
|
|
try {
|
|
|
|
|
const str =window.location.pathname;
|
|
|
|
|
if(str.indexOf("/wxcode") !== -1){
|
|
|
|
|
// console.log("开始重写cookis");
|
|
|
|
|
const _params = window.location.search;
|
|
|
|
|
// console.log("1111");
|
|
|
|
|
if (_params) {
|
|
|
|
|
// console.log("22222");
|
|
|
|
|
let _search = _params.split('?')[1];
|
|
|
|
|
_search.split('&').forEach(item => {
|
|
|
|
|
const _arr = item.split('=');
|
|
|
|
|
if(_arr[0]==='_educoder_session'){
|
|
|
|
|
cookie.save('_educoder_session',_arr[1],{ path: '/' });
|
|
|
|
|
cookie.save('_educoder_session',_arr[1], { domain: '.educoder.net', path: '/'});
|
|
|
|
|
setCookie(_arr[1]);
|
|
|
|
|
}else{
|
|
|
|
|
cookie.save('autologin_trustie',_arr[1],{ path: '/' });
|
|
|
|
|
cookie.save('autologin_trustie',_arr[1], { domain: '.educoder.net', path: '/'});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
var u = navigator.userAgent;
|
|
|
|
|
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
|
|
|
|
|
if(isAndroid){
|
|
|
|
|
}else{
|
|
|
|
|
//苹果走
|
|
|
|
|
const str =window.location.pathname;
|
|
|
|
|
if(str.indexOf("/wxcode") !== -1){
|
|
|
|
|
// console.log("开始重写cookis");
|
|
|
|
|
const _params = window.location.search;
|
|
|
|
|
// console.log("1111");
|
|
|
|
|
if (_params) {
|
|
|
|
|
// console.log("22222");
|
|
|
|
|
let _search = _params.split('?')[1];
|
|
|
|
|
_search.split('&').forEach(item => {
|
|
|
|
|
const _arr = item.split('=');
|
|
|
|
|
if(_arr[0]==='_educoder_session'){
|
|
|
|
|
cookie.save('_educoder_session',_arr[1],{ path: '/' });
|
|
|
|
|
cookie.save('_educoder_session',_arr[1], { domain: '.educoder.net', path: '/'});
|
|
|
|
|
// setCookie(_arr[1]);
|
|
|
|
|
}else{
|
|
|
|
|
cookie.save('autologin_trustie',_arr[1],{ path: '/' });
|
|
|
|
|
cookie.save('autologin_trustie',_arr[1], { domain: '.educoder.net', path: '/'});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|