Commit 1a46fd41 authored by 何虹's avatar 何虹 💬

优化api

parent 3bed9211
...@@ -22033,10 +22033,11 @@ class RestFul { ...@@ -22033,10 +22033,11 @@ class RestFul {
this.moduleName = 'RestFulModule' this.moduleName = 'RestFulModule'
// 如果isService 是字符串就直接试用这个字符串作为代理前缀,是不尔值:true就使用用默认的字符串:SERVICE_PROXY // 如果isService 是字符串就直接试用这个字符串作为代理前缀,是不尔值:true就使用用默认的字符串:SERVICE_PROXY
const typeof_isService = typeof isService const typeof_isService = typeof isService
this.MODULE_API = _common_commonModule__WEBPACK_IMPORTED_MODULE_0__.TOOL_API
if (typeof_isService === 'boolean') { if (typeof_isService === 'boolean') {
this.MODULEAPI = isService ? _common_commonModule__WEBPACK_IMPORTED_MODULE_0__.SERVICE_API : _common_commonModule__WEBPACK_IMPORTED_MODULE_0__.TOOL_API this.MODULE_API = isService ? _common_commonModule__WEBPACK_IMPORTED_MODULE_0__.SERVICE_API : _common_commonModule__WEBPACK_IMPORTED_MODULE_0__.TOOL_API
} else if (typeof_isService === 'string' && isService) { } else if (typeof_isService === 'string' && isService) {
this.MODULEAPI = isService this.MODULE_API = isService
} }
} }
// 处理传入的data 如果有appCode dbName // 处理传入的data 如果有appCode dbName
...@@ -22058,7 +22059,7 @@ class RestFul { ...@@ -22058,7 +22059,7 @@ class RestFul {
query (data) { query (data) {
this.packParamHandle(data) this.packParamHandle(data)
const { tableName, appCode, group, parms, bodyData, isQueryMaster } = data const { tableName, appCode, group, parms, bodyData, isQueryMaster } = data
let url = `${MODULEAPI}${appCode}/${tableName}/` let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存 if (group) { // 非标准保存
url = `${url}${group}/` url = `${url}${group}/`
} }
...@@ -22072,7 +22073,7 @@ class RestFul { ...@@ -22072,7 +22073,7 @@ class RestFul {
save (data) { save (data) {
this.packParamHandle(data) this.packParamHandle(data)
const { tableName, appCode, bodyData, group, parms } = data const { tableName, appCode, bodyData, group, parms } = data
let url = `${MODULEAPI}${appCode}/${tableName}/` let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存 if (group) { // 非标准保存
url = `${url}${group}/` url = `${url}${group}/`
} }
...@@ -22081,7 +22082,7 @@ class RestFul { ...@@ -22081,7 +22082,7 @@ class RestFul {
queryOne (data) { queryOne (data) {
this.packParamHandle(data) this.packParamHandle(data)
const { tableName, id, appCode, parms, group, bodyData, isQueryMaster } = data const { tableName, id, appCode, parms, group, bodyData, isQueryMaster } = data
let url_ = `${MODULEAPI}${appCode}/${tableName}/${id}/` let url_ = `${this.MODULE_API}${appCode}/${tableName}/${id}/`
if (group) { if (group) {
url_ = `${url_}${group}/` url_ = `${url_}${group}/`
} }
...@@ -22095,7 +22096,7 @@ class RestFul { ...@@ -22095,7 +22096,7 @@ class RestFul {
put (data) { put (data) {
this.packParamHandle(data) this.packParamHandle(data)
const { tableName, appCode, bodyData, group, parms, isQueryMaster } = data const { tableName, appCode, bodyData, group, parms, isQueryMaster } = data
let url = `${MODULEAPI}${appCode}/${tableName}/` let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存 if (group) { // 非标准保存
url = `${url}${group}/` url = `${url}${group}/`
} }
...@@ -22105,7 +22106,7 @@ class RestFul { ...@@ -22105,7 +22106,7 @@ class RestFul {
queryList (data) { queryList (data) {
this.packParamHandle(data) this.packParamHandle(data)
const { tableName, appCode, parms, group, bodyData, isQueryMaster } = data const { tableName, appCode, parms, group, bodyData, isQueryMaster } = data
let url_ = `${MODULEAPI}${appCode}/${tableName}/` let url_ = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { if (group) {
url_ = `${url_}${group}/` url_ = `${url_}${group}/`
} }
...@@ -22120,7 +22121,7 @@ class RestFul { ...@@ -22120,7 +22121,7 @@ class RestFul {
deleteList (data) { deleteList (data) {
this.packParamHandle(data) this.packParamHandle(data)
const { tableName, appCode, bodyData, parms } = data const { tableName, appCode, bodyData, parms } = data
const url_ = `${MODULEAPI}${appCode}/${tableName}/` const url_ = `${this.MODULE_API}${appCode}/${tableName}/`
return this.requestClient.delete(url_, bodyData, parms) return this.requestClient.delete(url_, bodyData, parms)
} }
} }
......
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