解决方法
用 URLSearchParams 传递参数
let param = new URLSearchParams()
param.append('username', 'admin')
param.append('pwd', 'admin')
axios({
method: 'post',
url: '/api/lockServer/search',
data: param
})
参考文章:https://blog.csdn.net/csdn_yudong/article/details/79668655