Commit 958a65dd authored by 何虹's avatar 何虹 💬

优化加入protoRequest

parent 5c669b2f
...@@ -22169,7 +22169,7 @@ class Control { ...@@ -22169,7 +22169,7 @@ class Control {
data.page_url = this.requestClient.pageName data.page_url = this.requestClient.pageName
} }
const url = (0,_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.getPbWebDyncCode)(this.hasConfigDb()) const url = (0,_common_commonModule__WEBPACK_IMPORTED_MODULE_0__.getPbWebDyncCode)(this.hasConfigDb())
return this.requestClient.post(url, data, getInitDbConfigParam) return this.requestClient.post(url, data, this.getInitDbConfigParam())
} }
} }
/* harmony default export */ __webpack_exports__["default"] = (Control); /* harmony default export */ __webpack_exports__["default"] = (Control);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -101,6 +101,31 @@ class Root { ...@@ -101,6 +101,31 @@ class Root {
const result = this.axios(aixosCtx) const result = this.axios(aixosCtx)
return result 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)
}
} }
export default Root export default Root
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