Commit 8fe4dbd6 authored by 何虹's avatar 何虹 💬

优化

parent e39d09ef
.DS_Store
node_modules
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
\ No newline at end of file
......@@ -179,6 +179,31 @@ class Root {
const result = this.axios(aixosCtx)
return result
}
// 最原始的 protoRequest
protoRequest (options = {}) {
if(!options.url){
alert('请传入url')
return
}
if (!options.params) {
// 加一个默认的db_name
options.params = {
db_name: this.getDbName()
}
} else if (options.params && !options.params.db_name) {
options.params.db_name = this.getDbName()
}
// 删除问号参数上的token 和 _user_info
if (options.params.token) {
delete options.params.token
}
if (options.params._user_info) {
delete options.params._user_info
}
// 删除data中的空值
this.filterEmptyValue(options.data)
return this.axios(options)
}
}
/* harmony default export */ __webpack_exports__["default"] = (Root);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment