微信小程序内点击按钮请求网络无任何反映
发布于 6 年前 作者 chengguiying 11649 次浏览 来自 问答

我在微信小程序内自定义一个用户登录,部分机型出现点击无任何反映的情况。安卓、IOS都有。

请求代码:

wx.request({

url: root + ‘/test/api’, //仅为示例,并非真实的接口地址

data: {

account: that.data.account,

password: that.data.password,

v: app.version,

act: “ULogin”,

func: “login”,

},

method: “POST”,

header: { ‘content-type’: ‘application/x-www-form-urlencoded’ },

success: function (res) {

wx.hideLoading();

console.log(‘登陆成功!’);

},

fail: function () {

wx.hideLoading()

wx.showModal({

title: ‘提示’,

content: ‘网络链接失败!’,

showCancel: false,

})

}

})

失败机型截图:

安卓

IOS

IOS

还有一个疑问,这里是首页,为什么这些点击没有反映的IOS会有“X”关闭按钮?

回到顶部