no message
This commit is contained in:
@@ -10,7 +10,7 @@ axios.defaults.withCredentials = true
|
||||
axios.interceptors.request.use( //响应拦截
|
||||
async config => {
|
||||
// 开发时登录用的,可以直接替换小程序的 authorization
|
||||
config['headers']['authorization'] = process.env.NODE_ENV !== "production" && "b89c4e5a1a61dca2c8f2ff21407fa210"
|
||||
config['headers']['authorization'] = process.env.NODE_ENV !== "production" && "be0e96a37a79c3ab16851b9a4318b03a"
|
||||
// config['headers']['authorization'] = "2lfrtq7h3ge634pl4ptlu2pbh2"
|
||||
return config;
|
||||
},
|
||||
@@ -41,7 +41,9 @@ axios.interceptors.response.use(response => {
|
||||
*/
|
||||
const get = (url, params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.get(url, { params }).then(res => resolve(res.data)).catch(err => reject(err.data))
|
||||
axios.get(url, { params }).then(res => {
|
||||
resolve(res.data)
|
||||
}).catch(err => reject(err.data))
|
||||
});
|
||||
}
|
||||
/**
|
||||
@@ -67,6 +69,7 @@ const post = (url, params) => {
|
||||
|
||||
// 打开登录
|
||||
const goLogin = () => {
|
||||
console.log("ajax_login");
|
||||
if (typeof ajax_login === "function") ajax_login()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user