苹果手机支付出现这个,安卓没问题
代码如下:
onLoad: function (options) {
var id = options.id;
var that = this;
app.json(“orders/pay”, { “ordersId”: id }, function (json) {
if (json.success) {
var data = json.data;
wx.requestPayment(
{
‘timeStamp’: data.timeStamp,
‘nonceStr’: data.nonceStr,
‘package’: data.package,
‘signType’: data.signType,
‘paySign’: data.paySign,
‘success’: function (res) {
that.setData({ “paysuccess”: “block” });
wx.navigateBack({
delta: 2
})
},
‘fail’: function (res) {
if (res.errMsg == “requestPayment:fail cancel”) {
wx.navigateBack({
delta: 1
})
} else {
wx.showModal({
title: ‘提示’,
showCancel: false,
content: res.errMsg,
success: function (res) {
}
})
}
},
‘complete’: function (res) {
}
})
} else {
wx.showModal({
title: ‘提示’,
showCancel: false,
content: json.msg,
success: function (res) { }
})
}
})
}
14.6 在苹果(Apple)iOS 系统下,微信小程序不可提供虚拟物品的购买支付,不应展示支付功能,也不得引导至外部网页或APP来实现支付功能。具体请参阅《Apple Developer Program 许可协议》《App Store 审核指南》 等终端设备系统、应用程序商店、市场等的协议规范。https://developers.weixin.qq.com/miniprogram/product/#14-%E5%B0%8F%E7%A8%8B%E5%BA%8F%E6%94%AF%E4%BB%98%E8%A7%84%E8%8C%83