diff --git a/pages/user/index/index.js b/pages/user/index/index.js index e96911b..d46bd7a 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -30,6 +30,9 @@ Page({ cz_val:0, full_cz_val:0, is_dengji:0, //是不是等级 + is_banner:0,//是不是有生日活动 + giftbagid:"", + actId:"", }, goto_nav: function (e) { var th = this; @@ -46,7 +49,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + this.birthday(); }, /** @@ -448,7 +451,43 @@ Page({ jump: function () { getApp().goto("/pages/user/grow_value/grow_value") - } + }, + // 判断生日营销的页面是不是存在 + birthday:function(){ + + var t=this; + rq.get("/api/weshop/marketing/birthday/act/judge", { + data: { storeId: os.stoid, userId: app_d.user_id }, + success: function (su) { + var code=su.data.code; + console.log(su, "生日有礼的数据", code); + if (code==0){ + var giftbagid = su.data.data.giftBagId; + var actId = su.data.data.id; + t.setData({ giftbagid: giftbagid, actId: actId}); + } + + t.setData({is_banner:code}); + } + }) + + }, + clike_banne:function(){ + var actId=this.data.actId; + var giftbagid=this.data.giftbagid; + console.log(giftbagid, "生日有礼的数据55555", actId); + if (actId != "" && giftbagid!=""){ + + wx.redirectTo({ + url: "/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3 + }); + }else{ + + getApp().showWarning("请稍后重试"); + } + } + + }) \ No newline at end of file diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index 1d8578e..f844d0b 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -166,10 +166,18 @@ + + + + + - + 工具与服务 diff --git a/pages/user/index/index.wxss b/pages/user/index/index.wxss index 4c04d00..80e2e55 100644 --- a/pages/user/index/index.wxss +++ b/pages/user/index/index.wxss @@ -344,7 +344,7 @@ .xc-tool-service .xc-tool-service-title { width: 100%; height: 90rpx; - border: 2rpx solid #f2f2f2; + } .xc-tool-service-img { @@ -699,3 +699,14 @@ margin-top: 8rpx; margin-right: 5rpx; } +.banner-img{ + width: 95%; + height: 140rpx; + border-radius: 10px 10px 0px 0px; + margin-bottom: -5rpx; + +} +.banner-frame{ + width: 100%; + background: #f2f2f2; +} \ No newline at end of file