|
@@ -54,7 +54,13 @@ const post = (
|
|
|
) => {
|
|
) => {
|
|
|
const requestUrl = `${BASE_URL}${normal[type]}`
|
|
const requestUrl = `${BASE_URL}${normal[type]}`
|
|
|
const isQueryType = type === 'query'
|
|
const isQueryType = type === 'query'
|
|
|
-
|
|
|
|
|
|
|
+ if (type === 'update') {
|
|
|
|
|
+ const params = Object.isObject(data) ? data : JSON.parse(data)
|
|
|
|
|
+ if (!params.updList || params.updList.length < 1) {
|
|
|
|
|
+ console.log('update更新请求参数为空中断请求!')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// 查询类型默认无 loading 动画,非查询类型要关闭 loading 动画需传参 loading:true
|
|
// 查询类型默认无 loading 动画,非查询类型要关闭 loading 动画需传参 loading:true
|
|
|
const isLoading = ['sql', 'query'].includes(type) ? loading : !loading
|
|
const isLoading = ['sql', 'query'].includes(type) ? loading : !loading
|
|
|
|
|
|