Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
d41cede1
Commit
d41cede1
authored
May 15, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商品详情和广告
parent
b3decc88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
adDialog.js
src/component/adDialog/adDialog.js
+3
-2
productDetail.js
src/pages/productDetail/productDetail.js
+16
-6
No files found.
src/component/adDialog/adDialog.js
View file @
d41cede1
...
...
@@ -153,8 +153,7 @@ Component({
else
{
//先设置进去
dialogInfo
[
key
]
=
true
;
wx
.
setStorageSync
(
'dialogInfo'
,
dialogInfo
);
//获取今天的当前也的key
let
expiredAllKey
=
[];
for
(
let
k
in
dialogInfo
){
...
...
@@ -167,6 +166,8 @@ Component({
expiredAllKey
.
forEach
(
item
=>
{
delete
dialogInfo
[
item
];
});
wx
.
setStorageSync
(
'dialogInfo'
,
dialogInfo
);
}
},
//获取今天是否已经弹出了
...
...
src/pages/productDetail/productDetail.js
View file @
d41cede1
...
...
@@ -164,6 +164,7 @@ wxService.page({
//确定领取优惠券
onTapSureGetCoupon
(
e
){
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
let
item
=
e
.
currentTarget
.
dataset
.
item
;
if
(
!
memberId
){
wx
.
showToast
({
title
:
'请先登录'
,
...
...
@@ -172,11 +173,19 @@ wxService.page({
return
;
}
if
(
this
.
todayHasGot
(
item
.
id
)){
wx
.
showToast
({
title
:
'您今天已经领取过了,请明天再来领取吧'
,
icon
:
'none'
});
return
;
}
wx
.
showLoading
({
title
:
'领取中..'
,
});
let
item
=
e
.
currentTarget
.
dataset
.
item
;
wxService
.
post
(
`/coupon/coupon/draw`
,{
couponSettingId
:
item
.
id
,
memberId
:
memberId
,
...
...
@@ -187,7 +196,7 @@ wxService.page({
title
:
'领取成功'
,
});
// this.setLocalStorageByKey(couponSettingI
d);
this
.
setLocalStorageByKey
(
item
.
i
d
);
}
})
},
...
...
@@ -204,8 +213,7 @@ wxService.page({
else
{
//先设置进去
getCouponData
[
key
]
=
true
;
wx
.
setStorageSync
(
'getCouponData'
,
getCouponData
);
//获取今天的当前也的key
let
expiredAllKey
=
[];
for
(
let
k
in
getCouponData
){
...
...
@@ -218,6 +226,8 @@ wxService.page({
expiredAllKey
.
forEach
(
item
=>
{
delete
getCouponData
[
item
];
});
wx
.
setStorageSync
(
'getCouponData'
,
getCouponData
);
}
},
...
...
@@ -225,11 +235,11 @@ wxService.page({
todayHasGot
(
couponSettingId
){
let
getCouponData
=
wx
.
getStorageSync
(
'getCouponData'
);
let
key
=
`
${
couponSettingId
}
_d_
${
this
.
getCurrentYearMonDay
()}
`
;
if
(
!
dialogInfo
){
if
(
!
getCouponData
){
return
false
;
}
if
(
dialogInfo
[
key
]){
if
(
getCouponData
[
key
]){
return
true
}
...
...
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