|
|
@@ -2,6 +2,7 @@ import request from '@/utils/request'
|
|
|
import { normal } from './requestType'
|
|
|
import { encryptByAes } from '@/utils/encrypt'
|
|
|
import { mapValues } from 'lodash'
|
|
|
+import { SHOW_PLAINTEXT } from '@/constant'
|
|
|
// 请求方式默认POST
|
|
|
const post = (type, data, method = 'post', loading = false) => {
|
|
|
const requestUrl = `business/v3/sys/universal/${normal[type]}`
|
|
|
@@ -42,9 +43,10 @@ const dealData = (args, type) => {
|
|
|
}
|
|
|
}
|
|
|
const data = typeof args === 'object' ? replaceNullWithEmpty(args) : args
|
|
|
+ const plaintext = SHOW_PLAINTEXT ? { plaintext: data } : {}
|
|
|
const res = {
|
|
|
ciphertext: encryptByAes(data),
|
|
|
- plaintext: data
|
|
|
+ ...plaintext
|
|
|
}
|
|
|
return JSON.stringify(res)
|
|
|
}
|