wx.showToast 不弹框,没有使用wx.showLoading这些,为什么不展示?
发布于 6 年前 作者 yang22 6002 次浏览 来自 官方Issues

这是代码

toConfirm: function(){

var that = this

var data = {

userId: app.globalData.userInfo.id,

total: that.data.info.price,

type: 1,

payCode: config.payCode,

openId: app.globalData.userInfo.openId

}

app.myRequest(config.prePay, { data: JSON.stringify(data) }, function (res) {

wx.requestPayment({

timeStamp: res.data.tableData.data.timeStamp + "",

nonceStr: res.data.tableData.data.nonceStr,

package: res.data.tableData.data.package,

signType: res.data.tableData.data.signType,

paySign: res.data.tableData.data.paySign,

success: function (ree) {

wx.showToast({

title: "支付成功!",

duration: 2000,

});

this.getExchange();

},

fail: function (ree) {

wx.showToast({

title: ree,

duration: 3000

}, 2000)

},

cancel: function (ree) {

wx.showToast({

title: ree,

duration: 3000

}, 2000)

}

})

})

}

2 回复

showToast的title 只接受字符串哈

ree 是个对象,不展示,换成字符串就好了

回到顶部