diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 06d59f8..f293086 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -40,6 +40,7 @@ Page({
actId: "", //生日活动的id
actImg: "",
is_assistance: 0, //助力活动
+ ad_img:"",
},
goto_nav: function(e) {
var th = this;
@@ -56,7 +57,18 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
+ var th=this;
this.birthday();
+ getApp().request.promiseGet("/api/weshop/ad/list?pid=401&store_id=" + os.stoid, {
+ data: {
+ enabled: 1
+ }
+ }).then(res => {
+ if(res.data.code==0 && res.data.data){
+ var item=res.data.data[0];
+ th.setData({ad_img:item.ad_code})
+ }
+ })
},
/**
@@ -551,12 +563,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;
@@ -575,7 +587,7 @@ Page({
var th = this;
var actId = th.data.actId;
var giftbagid = th.data.giftbagid;
-
+
if (actId != "" && giftbagid != "") {
getApp().goto("/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3);
@@ -584,7 +596,7 @@ Page({
getApp().showWarning("请稍后重试");
}
},
- // 判断助力活动是不是存在
+ // 判断助力活动是不是存在
is_assistance: function() {
var th = this;
rq.get("/api/weshop/marketing/help/act/judge", {
@@ -607,4 +619,4 @@ Page({
-})
\ No newline at end of file
+})
diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml
index 1375433..64a77e8 100644
--- a/pages/user/index/index.wxml
+++ b/pages/user/index/index.wxml
@@ -1,7 +1,7 @@
-
-
+
+
@@ -69,19 +69,19 @@
加入plus会员预计可省3031元
-
+
立即开通
-
+
加入plus会员预计可省3031元
-
+
立即续费
@@ -232,7 +232,7 @@
助力活动
-
+
@@ -262,7 +262,7 @@
-
+
@@ -290,4 +290,4 @@
-
\ No newline at end of file
+