调整ui
This commit is contained in:
@@ -12,8 +12,11 @@ const install = (Vue, vm) => {
|
||||
// config.header.Token = '5d33018e653d897fc259b42cf022c1b3';
|
||||
// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
|
||||
// 自定义token头
|
||||
// config.header.Authorization = vm.vuex_token;
|
||||
return config;
|
||||
config.header = {
|
||||
...config.header, // ⭐ 保留你外部传入的 header
|
||||
'content-type': 'application/json'
|
||||
}
|
||||
return config;
|
||||
};
|
||||
// 响应拦截,判断状态码是否通过
|
||||
Vue.prototype.$u.http.interceptor.response = (res) => {
|
||||
|
||||
Reference in New Issue
Block a user