mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 00:49:49 +08:00
【新增】增加支付宝支付功能,方便APP调用。
This commit is contained in:
@@ -139,18 +139,21 @@
|
||||
switch (code) {
|
||||
case 'alipay':
|
||||
/**
|
||||
* 支付宝支付需要模拟GET提交数据
|
||||
*/
|
||||
|
||||
* 支付宝支付需要模拟GET提交数据
|
||||
*/
|
||||
console.log("支付宝支付入参app", data)
|
||||
_this.$u.api.pay(data).then(res => {
|
||||
//console.log("支付宝支付返回参数app", res)
|
||||
//console.log("支付宝app支付get提交数据", res.data)
|
||||
if (res.status) {
|
||||
uni.requestPayment({
|
||||
provider: "alipay",
|
||||
orderInfo: res.data.data,
|
||||
orderInfo: res.data,
|
||||
success: function (data) {
|
||||
_this.$refs.uToast.show({
|
||||
message: '支付成功', type: 'success', complete: function () {
|
||||
_this.redirectHandler(res.data.paymentId)
|
||||
console.log("支付id", res.otherData.tradeNo)
|
||||
_this.redirectHandler(res.otherData.tradeNo)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -162,7 +165,7 @@
|
||||
})
|
||||
break
|
||||
case 'wechatpay':
|
||||
|
||||
|
||||
// 微信app支付
|
||||
_this.$u.api.pay(data).then(res => {
|
||||
if (res.status) {
|
||||
|
||||
Reference in New Issue
Block a user