diff --git a/pages/giftpack/birthdaygift/birthdaygift.js b/pages/giftpack/birthdaygift/birthdaygift.js index 206af80..7e3cc00 100644 --- a/pages/giftpack/birthdaygift/birthdaygift.js +++ b/pages/giftpack/birthdaygift/birthdaygift.js @@ -43,6 +43,10 @@ Page({ } }).then(res => { if (res.data.code == 0) { + th.setData({ + + giftID: res.data.data.id, + }) if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) { //礼包内容--礼券 th.setData({ diff --git a/pages/user/index/index.js b/pages/user/index/index.js index a9abb46..48e9807 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -551,10 +551,12 @@ Page({ }, // 判断生日营销的页面是不是存在 birthday: function() { + var th = this; rq.get("/api/weshop/marketing/birthday/act/judge", { data: { storeId: os.stoid, userId: app_d.user_id }, success: function (res) { + var code = res.data.code; if (code == 0) { var giftbagid = res.data.data.giftBagId; @@ -573,9 +575,11 @@ Page({ var th = this; var actId = th.data.actId; var giftbagid = th.data.giftbagid; + if (actId != "" && giftbagid != "") { wx.redirectTo({ + url: "/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3 }); } else { diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index a96c614..1375433 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -168,7 +168,7 @@ -