|
|
@ -11,30 +11,30 @@ import cookie from 'react-cookies'
|
|
|
|
// axios.defaults.withCredentials = true;
|
|
|
|
// axios.defaults.withCredentials = true;
|
|
|
|
|
|
|
|
|
|
|
|
const setCookier = () => {
|
|
|
|
const setCookier = () => {
|
|
|
|
var u = navigator.userAgent;
|
|
|
|
// var u = navigator.userAgent;
|
|
|
|
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
|
|
// var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
|
|
|
if (isIOS) {
|
|
|
|
// if (isIOS) {
|
|
|
|
|
|
|
|
//
|
|
|
|
}else{
|
|
|
|
// }else{
|
|
|
|
const _params = window.location.search;
|
|
|
|
// const _params = window.location.search;
|
|
|
|
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], {
|
|
|
|
domain: '.educoder.net',
|
|
|
|
// domain: '.educoder.net',
|
|
|
|
path: '/',
|
|
|
|
// path: '/',
|
|
|
|
|
|
|
|
//
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
cookie.save(_arr[0], _arr[1], {
|
|
|
|
// cookie.save(_arr[0], _arr[1], {
|
|
|
|
path: '/',
|
|
|
|
// path: '/',
|
|
|
|
domain: '.educoder.net'
|
|
|
|
// domain: '.educoder.net'
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取代码块
|
|
|
|
// 获取代码块
|
|
|
|