diff --git a/order.html b/order.html
index 19746ec..0d83b71 100644
--- a/order.html
+++ b/order.html
@@ -165,19 +165,25 @@
return this.popFunction({ title: '温馨提示', text: '立减金领取过期', status: 2, b_text: '我知道了', show: true });
}
if (item.channel == 1) {
- let bankLink = encodeURIComponent(
- window.location.origin +
- "/alipay.html?orderNumber=" + data.order_number
- );
- let link = "http://openapi.1688sup.com/alipay/oauth?jump=" + bankLink;
- let ua = navigator.userAgent.toLowerCase(); //判断用户打开链接环境
- if (ua.indexOf("micromessenger") > -1 || ua.indexOf("baiduboxapp") > -1 || ua.indexOf("firefox") > -1) {
- //在微信内置环境、百度app打开,不能唤起支付宝
- this.href = link;
- this.popFunction({ title: '温馨提示', text: `请复制链接,在其他浏览器打开`, status: 2, b_text: '点击复制', show: true });
+ 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 {
- //唤起支付宝
- window.location.replace(link);
+ let bankLink = encodeURIComponent(
+ window.location.origin +
+ "/alipay.html?orderNumber=" + data.order_number
+ );
+ let link = "http://openapi.1688sup.com/alipay/oauth?jump=" + bankLink;
+ let ua = navigator.userAgent.toLowerCase(); //判断用户打开链接环境
+ if (ua.indexOf("micromessenger") > -1 || ua.indexOf("baiduboxapp") > -1 || ua.indexOf("firefox") > -1) {
+ //在微信内置环境、百度app打开,不能唤起支付宝
+ this.href = link;
+ this.popFunction({ title: '温馨提示', text: `请复制链接,在其他浏览器打开`, status: 2, b_text: '点击复制', show: true });
+ } else {
+ //唤起支付宝
+ window.location.replace(link);
+ }
}
}
@@ -194,12 +200,18 @@
/* 红包领取 */
if (item.type === 3) {
if (item.channel === 1) {
- 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) {
- this.href = aliPaysUrl;
- this.popFunction({ title: '温馨提示', text: `请复制链接,在其他浏览器打开`, status: 2, b_text: '点击复制', show: true });
+ 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 {
- location.replace(aliPaysUrl);
+ 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) {
+ this.href = aliPaysUrl;
+ this.popFunction({ title: '温馨提示', text: `请复制链接,在其他浏览器打开`, status: 2, b_text: '点击复制', show: true });
+ } else {
+ location.replace(aliPaysUrl);
+ }
}
}
@@ -365,6 +377,7 @@
const channel = product.entity.channel;
newItem['product_name'] = product.entity.batch_goods_name;
newItem['channel'] = channel;
+ newItem['goods'] = product;
if (channel === 1) {
newItem['src'] = 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/zfbreduce.png';
}
@@ -379,6 +392,7 @@
const channels = product.entity.channel;
newItem['product_name'] = product.entity.batch_goods_name;
newItem['channel'] = channels;
+ newItem['goods'] = product;
if (channels === 1) {
newItem['src'] = 'https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/redPacktes/alipay_icon.png';
}
diff --git a/zfb-redPackets.html b/zfb-redPackets.html
index 82be245..650891c 100644
--- a/zfb-redPackets.html
+++ b/zfb-redPackets.html
@@ -162,7 +162,7 @@
.then(({ code, data, message }) => {
if (code == 200) {
this.loading = false;
- this.judgeEnvironment(data.order_number);
+ this.judgeEnvironment(data.original_order_number);
} else {
this.loading = false;
this.tip(message, 2, '关闭');
@@ -175,7 +175,7 @@
req.axiosPost(`/alipay/cash/receive/${order_number}`, this.form)
.then(({ code, data, message }) => {
if (code == 200) {
-
+ this.tip(message, 1, '关闭');
} else {
if (code == 403) {
if (this.backAble) {