Commit 60e6f12b authored by beisir's avatar beisir

Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy

parents dd63a026 029635b3
...@@ -60,7 +60,7 @@ function payByWeixinH5(info) { ...@@ -60,7 +60,7 @@ function payByWeixinH5(info) {
info.params = {}; info.params = {};
} }
const vccToken = localStorage.get('vccToken'); const vccToken = localStorage.get('vccToken');
const orderNo = cookies.get('orderNo')?.orderNo; const orderNo = cookies.get('orderNo');
info.params.isWxH5 = 1; info.params.isWxH5 = 1;
info.params.vccToken = vccToken; info.params.vccToken = vccToken;
info.params.orderNo = orderNo; info.params.orderNo = orderNo;
...@@ -109,6 +109,7 @@ function payByALIH5(info) { ...@@ -109,6 +109,7 @@ function payByALIH5(info) {
function payByThirdPartyCashier(info) { function payByThirdPartyCashier(info) {
if (!info.url) return; if (!info.url) return;
const orderNo = cookies.get('orderNo')?.orderNo; const orderNo = cookies.get('orderNo')?.orderNo;
alert('bbbb-' + orderNo)
info.params.third = 1; info.params.third = 1;
info.params.orderNo = orderNo; info.params.orderNo = orderNo;
const currentPath = encodeURIComponent( const currentPath = encodeURIComponent(
......
...@@ -192,6 +192,22 @@ export default { ...@@ -192,6 +192,22 @@ export default {
}, },
goGroupPayPages(skuInfo) { goGroupPayPages(skuInfo) {
this.$router.push(`/pay?orderNo=${skuInfo.orderNo}`); this.$router.push(`/pay?orderNo=${skuInfo.orderNo}`);
if (isWxMp) {
this.nativeBridge.openNewUrl({
newUrl: `/pages/pay/index?orderNo=${skuInfo.orderNo}&from=groupbuy`
});
} else if (isApp) {
this.$router.push({ path: `/pay?orderNo=${skuInfo.orderNo}` });
} else {
// todo 处理纯h5情况
this.$dialog({
message: '请在App或小程序中参与活动~',
title: '',
showCancelButton: false,
confirmButtonText: '我知道了'
});
return;
}
}, },
async getGroupShareInfo(order) { async getGroupShareInfo(order) {
const res = await groupBuyApi.getGroupShareInfo(order); const res = await groupBuyApi.getGroupShareInfo(order);
......
...@@ -221,8 +221,8 @@ export default { ...@@ -221,8 +221,8 @@ export default {
mounted() { mounted() {
this.getQuery(); this.getQuery();
this.setIsOrder(); this.setIsOrder();
this.orderNo = this.$route.query.orderNo || cookies.get('orderNo')?.orderNo; this.orderNo = this.$route.query.orderNo;
cookies.set('orderNo', { orderNo: this.orderNo }); cookies.set('orderNo', this.orderNo);
if (this.$route?.query?.ocrflag) { if (this.$route?.query?.ocrflag) {
this.payInfo = cookies.get('info') || {}; this.payInfo = cookies.get('info') || {};
cookies.remove('ocrflag'); cookies.remove('ocrflag');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment