Commit b5688008 by 李嘉林

新人有礼

parent 467b4965
......@@ -19,4 +19,8 @@ export default {
queryDialogCoupons(data) {
return requestPOST(`${process.env.OLSHOP_URL}/promotion/query_dialog_coupons`, data)
},
// 查询我领取的礼物
query_my_new_customer_gift(data) {
return requestPOST(`${process.env.OLSHOP_URL}/promotion/query_my_new_customer_gift`, data)
},
};
\ No newline at end of file
......@@ -70,11 +70,14 @@ export default {
data() {
return {
datas: [],
sessionId:"",
};
},
computed:{
sessionId (){
return wx.getStorageSync('sessionid');
}
},
mounted(){
this.sessionId = wx.getStorageSync('sessionid');
if(process.browser && wx.getStorageSync("sessionid")){
// this.init();
}
......
......@@ -515,11 +515,11 @@ export default {
live.getUserInfo().then((res) => {
if (res.data.code == 200) {
// 已经领取过的话,就判断是否展示弹框
// 判断是否是新
// 判断是否是新
let isNewUser = false;
res.data.data.tagNames.forEach(function (item) {
console.log(item.tagName + "999999");
if (item.tagName == "新") {
if (item.tagName == "新") {
isNewUser = true;
}
});
......@@ -533,23 +533,27 @@ export default {
isNewUser == true
) {
this.showgiftBag = true; //弹框展示
console.log(this.showgiftBag,'showgiftBag-----------1')
this.showNewUser = false; //入口隐藏
this.getUserreceiveGift(); //定时查我领取的新客礼包
} else {
// 不是新用户,
this.showNewUser = false; //入口关闭
this.showgiftBag = false; //弹框不显示
console.log(this.showgiftBag,'showgiftBag-----------2')
}
} else {
// 未领取过的,判断是不是新用户
if (isNewUser == true) {
// 是新用户的,弹弹框提示,
this.showgiftBag = true;
console.log(this.showgiftBag,'showgiftBag-----------3')
this.getUserreceiveGift();
} else {
// 不是新用户,
this.showNewUser = false; //入口关闭
this.showgiftBag = false; //弹框不显示
console.log(this.showgiftBag,'showgiftBag-----------4')
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment