Commit 0b1e6927 authored by 何虹's avatar 何虹 💬

优化

parent 193ff14a
......@@ -87,7 +87,7 @@ class Root {
return hs_util_js__WEBPACK_IMPORTED_MODULE_1___default().SystemModule.parseGlobalParams() || {}
}
getuUrlParam () {
hs_util_js__WEBPACK_IMPORTED_MODULE_1___default().SystemModule.getUrlParams() || {}
return hs_util_js__WEBPACK_IMPORTED_MODULE_1___default().SystemModule.getUrlParams() || {}
}
filterEmptyValue (obj) {
if (!obj) return
......@@ -22035,7 +22035,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _common_commonModule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
class RestFul {
constructor(requestClient, isService) {
constructor (requestClient, isService) {
this.requestClient = requestClient
this.moduleName = 'RestFulModule'
// 如果isService 是字符串就直接试用这个字符串作为代理前缀,是不尔值:true就使用用默认的字符串:SERVICE_PROXY
......@@ -22067,7 +22067,8 @@ class RestFul {
this.packParamHandle(data)
const { tableName, appCode, group, parms, bodyData, isQueryMaster } = data
let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存
if (group) {
// 非标准保存
url = `${url}${group}/`
}
const header = this.mergeHeaderQueryMaster(isQueryMaster)
......@@ -22081,15 +22082,24 @@ class RestFul {
this.packParamHandle(data)
const { tableName, appCode, bodyData, group, parms } = data
let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存
if (group) {
// 非标准保存
url = `${url}${group}/`
}
return this.requestClient.post(url, bodyData, parms)
}
queryOne (data) {
this.packParamHandle(data)
const { tableName, id, appCode, parms, group, bodyData, isQueryMaster } = data
let url_ = `${this.MODULE_API}${appCode}/${tableName}/`//${id}/`
const {
tableName,
id,
appCode,
parms,
group,
bodyData,
isQueryMaster
} = data
let url_ = `${this.MODULE_API}${appCode}/${tableName}/` //${id}/`
if (group) {
url_ = `${url_}${group}/`
}
......@@ -22105,7 +22115,8 @@ class RestFul {
this.packParamHandle(data)
const { tableName, appCode, bodyData, group, parms, isQueryMaster } = data
let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存
if (group) {
// 非标准保存
url = `${url}${group}/`
}
const header = this.mergeHeaderQueryMaster(isQueryMaster)
......@@ -22128,8 +22139,11 @@ class RestFul {
}
deleteList (data) {
this.packParamHandle(data)
const { tableName, appCode, bodyData, parms } = data
const url_ = `${this.MODULE_API}${appCode}/${tableName}/`
const { tableName, appCode, bodyData, parms, ids } = data
let url_ = `${this.MODULE_API}${appCode}/${tableName}/`
if (ids) {
url_ + ids + '/'
}
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.
import { TOOL_API, SERVICE_API } from '../common/commonModule'
class RestFul {
constructor(requestClient, isService) {
constructor (requestClient, isService) {
this.requestClient = requestClient
this.moduleName = 'RestFulModule'
// 如果isService 是字符串就直接试用这个字符串作为代理前缀,是不尔值:true就使用用默认的字符串:SERVICE_PROXY
......@@ -32,7 +32,8 @@ class RestFul {
this.packParamHandle(data)
const { tableName, appCode, group, parms, bodyData, isQueryMaster } = data
let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存
if (group) {
// 非标准保存
url = `${url}${group}/`
}
const header = this.mergeHeaderQueryMaster(isQueryMaster)
......@@ -46,15 +47,24 @@ class RestFul {
this.packParamHandle(data)
const { tableName, appCode, bodyData, group, parms } = data
let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存
if (group) {
// 非标准保存
url = `${url}${group}/`
}
return this.requestClient.post(url, bodyData, parms)
}
queryOne (data) {
this.packParamHandle(data)
const { tableName, id, appCode, parms, group, bodyData, isQueryMaster } = data
let url_ = `${this.MODULE_API}${appCode}/${tableName}/`//${id}/`
const {
tableName,
id,
appCode,
parms,
group,
bodyData,
isQueryMaster
} = data
let url_ = `${this.MODULE_API}${appCode}/${tableName}/` //${id}/`
if (group) {
url_ = `${url_}${group}/`
}
......@@ -70,7 +80,8 @@ class RestFul {
this.packParamHandle(data)
const { tableName, appCode, bodyData, group, parms, isQueryMaster } = data
let url = `${this.MODULE_API}${appCode}/${tableName}/`
if (group) { // 非标准保存
if (group) {
// 非标准保存
url = `${url}${group}/`
}
const header = this.mergeHeaderQueryMaster(isQueryMaster)
......@@ -93,8 +104,11 @@ class RestFul {
}
deleteList (data) {
this.packParamHandle(data)
const { tableName, appCode, bodyData, parms } = data
const url_ = `${this.MODULE_API}${appCode}/${tableName}/`
const { tableName, appCode, bodyData, parms, ids } = data
let url_ = `${this.MODULE_API}${appCode}/${tableName}/`
if (ids) {
url_ + ids + '/'
}
return this.requestClient.delete(url_, bodyData, parms)
}
}
......
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