post 不传参数报错问题,security-config -> security

This commit is contained in:
吕金泽 2022-03-24 02:00:03 +08:00
parent f78ca68b2e
commit bb91e96638
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ const install = (app) => {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
transformRequest: [data => Object.keys(data).map(it => encodeURIComponent(it) + '=' + encodeURIComponent(data[it] === null || data[it] === undefined ? '' : data[it])).join('&')]
transformRequest: [data => data && Object.keys(data).map(it => encodeURIComponent(it) + '=' + encodeURIComponent(data[it] === null || data[it] === undefined ? '' : data[it])).join('&')]
})
app.config.globalProperties.$postJson = (url, data) => request.post(url, JSON.stringify(data), {
headers: {

View File

@ -97,7 +97,7 @@ magic-api:
crud: # CRUD相关配置
logic-delete-column: is_del #逻辑删除列
logic-delete-value: 1 #逻辑删除值
# security-config:
# security:
# username: admin
# password: 123456