|
@@ -32,11 +32,11 @@ const install = (Vue, vm) => {
|
|
|
config.header.Authorization = vm.vuex_token;
|
|
|
if (config.method.toUpperCase() == 'PUT') {
|
|
|
config.method = 'POST'
|
|
|
- config.headers['X-HTTP-Method-Override'] = 'PUT'
|
|
|
+ config.header['X-HTTP-Method-Override'] = 'PUT'
|
|
|
}
|
|
|
if (config.method.toUpperCase() == 'DELETE') {
|
|
|
config.method = 'POST'
|
|
|
- config.headers['X-HTTP-Method-Override'] = 'DELETE'
|
|
|
+ config.header['X-HTTP-Method-Override'] = 'DELETE'
|
|
|
}
|
|
|
// 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
|
|
|
// config.header.token = vm.$store.state.token;
|