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


刚开始学着做微信小程序,很多还不太了解,不知道怎么解决,哪位大佬帮帮忙,十分感谢


展开全部
收起
0回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部