|
|
@@ -4,7 +4,7 @@ import { processCreate, processEdit } from './process'
|
|
|
import { requestType, requestPath } from './requestType'
|
|
|
|
|
|
// 请求方式默认POST
|
|
|
-const post = (method, data, type = 'post') => {
|
|
|
+const post = (method, data, type = 'post', loading = false) => {
|
|
|
let path = requestType[method]
|
|
|
let requestData = ''
|
|
|
let requestParams = null
|
|
|
@@ -50,7 +50,7 @@ const post = (method, data, type = 'post') => {
|
|
|
data: requestData,
|
|
|
params: requestParams,
|
|
|
// 开启表单提交加载,查询接口除外(sql,select)
|
|
|
- isLoading: !['sql', 'select'].includes(method),
|
|
|
+ isLoading: ['sql', 'select'].includes(method) ? loading : true,
|
|
|
retainData
|
|
|
})
|
|
|
}
|