diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index b37183c..848f1db 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -75,7 +75,7 @@ Page({
})
},
init(){
- let options = this.data?.params;
+ let options = this.data?.params; // this.data == null ? undefined:this.data.params
var th = this;
this.setData({
getUserID: d.user_id,
@@ -85,6 +85,7 @@ Page({
isBuy: options.isBuy,
getGiftID: options.lbId,
orderSn: options.orderSn,
+ flag: options.flag, // 如果从商品详情页的促销处点击专享礼包跳转到此页,则flag为1
})
if (options.lbId) th.data.lbId = options.lbId;
//-- 获取分享人的ID --
@@ -103,11 +104,17 @@ Page({
})
}
th.close();
- if (this.data.isBuy == 0) {
- this.GetMyGiftList();
- } else {
- this.GetBuyGiftList();
- }
+
+
+ if(this.data.flag == 1) {
+ this.getZxlbDetails();
+ } else {
+ if (this.data.isBuy == 0) {
+ this.GetMyGiftList();
+ } else if (this.data.isBuy == 1) {
+ this.GetBuyGiftList();
+ };
+ };
},
onShow: function () {
@@ -329,6 +336,84 @@ Page({
});
},
+
+ getZxlbDetails: function () {
+
+ var th = this;
+ getApp().request.get('/api/weshop/marketing/giftbag/detail/getNew', {
+ isShowLoading: true,
+ data: {
+ "storeId": a.stoid, //商家ID
+ //"userId": d.user_id, //用户ID
+ "giftBagId": th.data.lbId
+ },
+ success: function (res) {
+ if (res.data.code == 0) {
+ th.setData({
+ giftImage: th.data.iurl + res.data.data.lbUrl,
+ giftTitle: res.data.data.lbTitle,
+ default_color: res.data.data.bgcolor
+ })
+ if (res.data.data.lbIntro == '') {
+ th.setData({
+ giftRemark: '暂无详情......'
+ })
+ } else {
+ th.setData({
+ giftRemark: res.data.data.lbIntro.replace(/\
{{giftTitle}}
-
-
-
- {{"活动开始时间:"+giftStart}}
-
-
-
- {{"兑换结束时间:"+giftDate}}
-
- {{"活动结束时间:"+giftDate}}
-
-
-
+
+
+
+ {{"活动开始时间:"+giftStart}}
+
+
+
+ {{"兑换结束时间:"+giftDate}}
+
+ {{"活动结束时间:"+giftDate}}
+
+
+
+
+
+ {{"兑换时间:领取后"+exchangeDay+"天内兑换"}}
+
+
+ {{"兑换时间:"+exchangeStartTime+"至"+exchangeEndTime}}
+
+
{{"¥"+giftPrice}}
@@ -39,7 +47,8 @@
{{"零售价:"+giftPosPrice+"元"}}
@@ -77,7 +86,7 @@
{{"数量:"+item.num}}
-
+
已核销
@@ -86,7 +95,7 @@
-
+
@@ -121,68 +130,73 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+