Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
b5688008
Commit
b5688008
authored
Jul 05, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新人有礼
parent
467b4965
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
src/api/promote.js
+5
-0
src/components/newCustomer/newPolite.vue
+5
-2
src/pages/home/index.vue
+6
-2
No files found.
src/api/promote.js
View file @
b5688008
...
...
@@ -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
src/components/newCustomer/newPolite.vue
View file @
b5688008
...
...
@@ -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();
}
...
...
src/pages/home/index.vue
View file @
b5688008
...
...
@@ -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'
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment