mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-03 09:06:36 +08:00
去除无用代码
This commit is contained in:
@@ -36,40 +36,5 @@ export default {
|
||||
resolve({"code": -1, "msg": error.message || "网络请求失败"});
|
||||
});
|
||||
});
|
||||
},
|
||||
put: function(path = '', data = {}) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
axios.put(path, data, {
|
||||
timeout: 12000,
|
||||
headers:{
|
||||
"Authorization": window.localStorage.getItem('token'),
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
resolve(response.data);
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.error('PUT请求错误:', error);
|
||||
resolve({"code": -1, "msg": error.message || "网络请求失败"});
|
||||
});
|
||||
});
|
||||
},
|
||||
delete: function(path = '') {
|
||||
return new Promise(function(resolve, reject) {
|
||||
axios.delete(path, {
|
||||
timeout: 12000,
|
||||
headers:{
|
||||
"Authorization": window.localStorage.getItem('token')
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
resolve(response.data);
|
||||
})
|
||||
.catch(function(error) {
|
||||
console.error('DELETE请求错误:', error);
|
||||
resolve({"code": -1, "msg": error.message || "网络请求失败"});
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user