增加订阅消息
This commit is contained in:
@@ -217,11 +217,24 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function confirmExchange() {
|
|
||||||
// modalData.show = false;
|
function dingyue() {
|
||||||
exchange()
|
return new Promise((revlove, reject) => {
|
||||||
|
uni.requestSubscribeMessage({
|
||||||
|
tmplIds: ['JGPAGmqcPEgWB6mvAl0SC5cMqr5H5Qjcim8JCpHAZd0',
|
||||||
|
'F4OyUhe_ZQ9BR731jlkaN2QXAUaA3HBZuUeVPfraSz0'
|
||||||
|
],
|
||||||
|
success(res) {},
|
||||||
|
complete() {
|
||||||
|
revlove()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function payExchange() {
|
async function payExchange() {
|
||||||
|
await dingyue();
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '支付中……'
|
title: '支付中……'
|
||||||
})
|
})
|
||||||
@@ -239,6 +252,7 @@
|
|||||||
popupData.show = false;
|
popupData.show = false;
|
||||||
pay(orderRes.payInfo).then(res => {
|
pay(orderRes.payInfo).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/groupBuying/success/index?detailId=' + orderRes.goodsRecord
|
url: '/groupBuying/success/index?detailId=' + orderRes.goodsRecord
|
||||||
@@ -261,40 +275,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function exchange() {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '兑换中……'
|
|
||||||
})
|
|
||||||
const openId = await getOpenId()
|
|
||||||
uni.hideLoading()
|
|
||||||
if (openId) {
|
|
||||||
Api.exchange({
|
|
||||||
pointsGoodsId: item.id,
|
|
||||||
shopId: item.shopId,
|
|
||||||
number: 1,
|
|
||||||
price: item.extraPrice,
|
|
||||||
openId
|
|
||||||
}).then(res => {
|
|
||||||
modalData.show = false;
|
|
||||||
if (res) {
|
|
||||||
uni.setStorageSync('exchange_goods_success', res)
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/scoreShop/success/index'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '兑换失败',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '鉴权失败,兑换失败',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const item = reactive({
|
const item = reactive({
|
||||||
goodsDescription: []
|
goodsDescription: []
|
||||||
@@ -331,7 +312,7 @@
|
|||||||
const query = reactive({
|
const query = reactive({
|
||||||
shopId: '',
|
shopId: '',
|
||||||
wareId: '',
|
wareId: '',
|
||||||
groupOrderNo:''
|
groupOrderNo: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user