payServer.sendBillInfo({ feeId: this.data.feeId, individualSignature: this.data.userSignature! }).then((res: any) => {
console.log("ress", res);
var that = this;
if (res.success) {
console.log('ress success',{ billIds: [res.data.billIDMap[0].billId], feeId: this.data.feeId, openId: openId, billIDMap: res.data.billIDMap });
payServer.sendPayRequest({ billIds: [res.data.billIDMap[0].billId], feeId: this.data.feeId, openId: openId, billIDMap: res.data.billIDMap })
.then((resp: any) => {
console.log("resp", resp);
console.log("xx", "timeStamp", resp.data.timeStamp,
"nonceStr", resp.data.nonceStr,
"package", resp.data.pack,
"signType", resp.data.signType,
"paySign", resp.data.paySign);
wx.requestPayment(
{
"timeStamp": resp.data.timeStamp,
"nonceStr": resp.data.nonceStr,
"package": resp.data.pack,
"signType": resp.data.signType,
"paySign": resp.data.paySign,
"success": function (ress) {
intervalId = setInterval(that.getPayResult, 2000)
},
"fail": function (res) {
wx.navigateTo({
url: `../result/result?status=0`,
})
},
"complete": function (res) {
}
})
}).catch((errs: any) => {
console.log("发送预交费错误 原因", errs);
}).finally(() => {
Toast.clear()
})
} else {
Toast(res.message)
}
})