login:function(){
var that = this;
if (that.data.account.length === 0 || that.data.password.length === 0){
wx.showToast({
title: ‘用户名或密码不能为空’,
icon: ‘none’,
duration: 2000
})
}else{
wx.request({
url: ‘http://47.98.46.179/fsbps/login’,
data: {
username: that.data.account,
password: that.data.password
},
method: ‘POST’,
header: {
‘content-type’: ‘application/json’ // 默认值
},
success: function (res) {
console.log(res);
}
})
}
}
这是我请求的方法,
下面是报错的信息:
如若已在管理后台更新域名配置,请刷新项目配置后重新编译项目,操作路径:“项目-域名信息”
VM2504:1 http://47.98.46.179 不在以下 request 合法域名列表中,请参考文档:https://mp.weixin.qq.com/debug/wxadoc/dev/api/network-request.html
刚开始学着做微信小程序,很多还不太了解,不知道怎么解决,哪位大佬帮帮忙,十分感谢