wx.request({
url: "http://192.168.1.110:9060/power/oauth/token",
method: "POST",
data: {
username: "admin",
password: "123456",
grant_type: "password",
client_id: "eureka-client",
client_secret: "123456"
},
header: {
'content-type': 'application/json' // 默认值
},
success: function (res) {
console.log( res);
}
});
改成 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
就可以了