✨ feat: 新增支付宝H5领取逻辑
This commit is contained in:
parent
66f3694277
commit
253878afba
14
order.html
14
order.html
|
@ -165,6 +165,11 @@
|
||||||
return this.popFunction({ title: '温馨提示', text: '立减金领取过期', status: 2, b_text: '我知道了', show: true });
|
return this.popFunction({ title: '温馨提示', text: '立减金领取过期', status: 2, b_text: '我知道了', show: true });
|
||||||
}
|
}
|
||||||
if (item.channel == 1) {
|
if (item.channel == 1) {
|
||||||
|
if (item.goods.entity.receive_mode === 2) { /* H5 领取 */
|
||||||
|
item.goods.available = 1;
|
||||||
|
sessionStorage.setItem('goodsInfo', JSON.stringify(item.goods));
|
||||||
|
location.href = './zfb-reduce.html';
|
||||||
|
} else {
|
||||||
let bankLink = encodeURIComponent(
|
let bankLink = encodeURIComponent(
|
||||||
window.location.origin +
|
window.location.origin +
|
||||||
"/alipay.html?orderNumber=" + data.order_number
|
"/alipay.html?orderNumber=" + data.order_number
|
||||||
|
@ -180,6 +185,7 @@
|
||||||
window.location.replace(link);
|
window.location.replace(link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (item.channel == 2) {
|
if (item.channel == 2) {
|
||||||
if (ua.indexOf("windows") > -1) {
|
if (ua.indexOf("windows") > -1) {
|
||||||
|
@ -194,6 +200,11 @@
|
||||||
/* 红包领取 */
|
/* 红包领取 */
|
||||||
if (item.type === 3) {
|
if (item.type === 3) {
|
||||||
if (item.channel === 1) {
|
if (item.channel === 1) {
|
||||||
|
if (item.goods.entity.receive_mode === 2) { /* H5 领取 */
|
||||||
|
item.goods.available = 1;
|
||||||
|
sessionStorage.setItem('goodsInfo', JSON.stringify(item.goods));
|
||||||
|
location.href = './zfb-redPackets.html';
|
||||||
|
} else {
|
||||||
const aliPaysUrl = `alipays://platformapi/startapp?appId=2021004100663111&page=pages/index/index?order_number=${encodeURIComponent(window.btoa(data.order_number))}`;
|
const aliPaysUrl = `alipays://platformapi/startapp?appId=2021004100663111&page=pages/index/index?order_number=${encodeURIComponent(window.btoa(data.order_number))}`;
|
||||||
if (isWx() || (ua.indexOf("android") > -1 && ua.indexOf("baiduboxapp") > -1) || ua.indexOf("windows") > -1) {
|
if (isWx() || (ua.indexOf("android") > -1 && ua.indexOf("baiduboxapp") > -1) || ua.indexOf("windows") > -1) {
|
||||||
this.href = aliPaysUrl;
|
this.href = aliPaysUrl;
|
||||||
|
@ -202,6 +213,7 @@
|
||||||
location.replace(aliPaysUrl);
|
location.replace(aliPaysUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (item.channel === 2) {
|
if (item.channel === 2) {
|
||||||
if (ua.indexOf("windows") > -1) {
|
if (ua.indexOf("windows") > -1) {
|
||||||
|
@ -365,6 +377,7 @@
|
||||||
const channel = product.entity.channel;
|
const channel = product.entity.channel;
|
||||||
newItem['product_name'] = product.entity.batch_goods_name;
|
newItem['product_name'] = product.entity.batch_goods_name;
|
||||||
newItem['channel'] = channel;
|
newItem['channel'] = channel;
|
||||||
|
newItem['goods'] = product;
|
||||||
if (channel === 1) {
|
if (channel === 1) {
|
||||||
newItem['src'] = 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/zfbreduce.png';
|
newItem['src'] = 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/zfbreduce.png';
|
||||||
}
|
}
|
||||||
|
@ -379,6 +392,7 @@
|
||||||
const channels = product.entity.channel;
|
const channels = product.entity.channel;
|
||||||
newItem['product_name'] = product.entity.batch_goods_name;
|
newItem['product_name'] = product.entity.batch_goods_name;
|
||||||
newItem['channel'] = channels;
|
newItem['channel'] = channels;
|
||||||
|
newItem['goods'] = product;
|
||||||
if (channels === 1) {
|
if (channels === 1) {
|
||||||
newItem['src'] = 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/alipay_icon.png';
|
newItem['src'] = 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/alipay_icon.png';
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
.then(({ code, data, message }) => {
|
.then(({ code, data, message }) => {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.judgeEnvironment(data.order_number);
|
this.judgeEnvironment(data.original_order_number);
|
||||||
} else {
|
} else {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.tip(message, 2, '关闭');
|
this.tip(message, 2, '关闭');
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
req.axiosPost(`/alipay/cash/receive/${order_number}`, this.form)
|
req.axiosPost(`/alipay/cash/receive/${order_number}`, this.form)
|
||||||
.then(({ code, data, message }) => {
|
.then(({ code, data, message }) => {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
|
this.tip(message, 1, '关闭');
|
||||||
} else {
|
} else {
|
||||||
if (code == 403) {
|
if (code == 403) {
|
||||||
if (this.backAble) {
|
if (this.backAble) {
|
||||||
|
|
Loading…
Reference in New Issue