明天专门搞详情
This commit is contained in:
@@ -85,4 +85,14 @@ function updateURLSearchParams(obj = {}) {
|
||||
window.history.pushState({}, '', newUrl);
|
||||
}
|
||||
|
||||
export { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams }
|
||||
|
||||
// 清除所有cookies
|
||||
function clearCookies() {
|
||||
let cookies = document.cookie.split("; ");
|
||||
for (let c of cookies) {
|
||||
let [name, _] = c.split("=");
|
||||
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
|
||||
}
|
||||
}
|
||||
|
||||
export { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate, updateURLSearchParams, clearCookies }
|
||||
@@ -16,6 +16,7 @@ baseURL = {
|
||||
offer: "https://offer.gter.net",
|
||||
tenement: "https://app.gter.net",
|
||||
|
||||
|
||||
}
|
||||
|
||||
const service = axios.create({
|
||||
@@ -27,7 +28,6 @@ const service = axios.create({
|
||||
service.interceptors.request.use(config => {
|
||||
//发请求前做的一些处理,数据转化,配置请求头,设置token,设置loading等,根据需求去添加
|
||||
//注意使用token的时候需要引入cookie方法或者用本地localStorage等方法,推荐js-cookie
|
||||
// config['baseURL'] = "https://offer.gter.net"
|
||||
config['headers']['authorization'] = "qj2q1qk1on0curclipghjtv5ja1g9eq2"
|
||||
return config
|
||||
}, error => {
|
||||
|
||||
Reference in New Issue
Block a user