Commit b5688008 by 李嘉林

新人有礼

parent 467b4965
...@@ -19,4 +19,8 @@ export default { ...@@ -19,4 +19,8 @@ export default {
queryDialogCoupons(data) { queryDialogCoupons(data) {
return requestPOST(`${process.env.OLSHOP_URL}/promotion/query_dialog_coupons`, 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 { ...@@ -70,11 +70,14 @@ export default {
data() { data() {
return { return {
datas: [], datas: [],
sessionId:"",
}; };
}, },
computed:{
sessionId (){
return wx.getStorageSync('sessionid');
}
},
mounted(){ mounted(){
this.sessionId = wx.getStorageSync('sessionid');
if(process.browser && wx.getStorageSync("sessionid")){ if(process.browser && wx.getStorageSync("sessionid")){
// this.init(); // this.init();
} }
......
...@@ -515,11 +515,11 @@ export default { ...@@ -515,11 +515,11 @@ export default {
live.getUserInfo().then((res) => { live.getUserInfo().then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
// 已经领取过的话,就判断是否展示弹框 // 已经领取过的话,就判断是否展示弹框
// 判断是否是新 // 判断是否是新
let isNewUser = false; let isNewUser = false;
res.data.data.tagNames.forEach(function (item) { res.data.data.tagNames.forEach(function (item) {
console.log(item.tagName + "999999"); console.log(item.tagName + "999999");
if (item.tagName == "新") { if (item.tagName == "新") {
isNewUser = true; isNewUser = true;
} }
}); });
...@@ -533,23 +533,27 @@ export default { ...@@ -533,23 +533,27 @@ export default {
isNewUser == true isNewUser == true
) { ) {
this.showgiftBag = true; //弹框展示 this.showgiftBag = true; //弹框展示
console.log(this.showgiftBag,'showgiftBag-----------1')
this.showNewUser = false; //入口隐藏 this.showNewUser = false; //入口隐藏
this.getUserreceiveGift(); //定时查我领取的新客礼包 this.getUserreceiveGift(); //定时查我领取的新客礼包
} else { } else {
// 不是新用户, // 不是新用户,
this.showNewUser = false; //入口关闭 this.showNewUser = false; //入口关闭
this.showgiftBag = false; //弹框不显示 this.showgiftBag = false; //弹框不显示
console.log(this.showgiftBag,'showgiftBag-----------2')
} }
} else { } else {
// 未领取过的,判断是不是新用户 // 未领取过的,判断是不是新用户
if (isNewUser == true) { if (isNewUser == true) {
// 是新用户的,弹弹框提示, // 是新用户的,弹弹框提示,
this.showgiftBag = true; this.showgiftBag = true;
console.log(this.showgiftBag,'showgiftBag-----------3')
this.getUserreceiveGift(); this.getUserreceiveGift();
} else { } else {
// 不是新用户, // 不是新用户,
this.showNewUser = false; //入口关闭 this.showNewUser = false; //入口关闭
this.showgiftBag = 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