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
2832ab05
Commit
2832ab05
authored
Jan 25, 2024
by
侯体倬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
限时折扣倒计时文案优化
parent
58ba58b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
static/nativeComponents/TimeLimitedDiscount/index.js
+10
-0
static/nativeComponents/TimeLimitedDiscount/index.wxml
+1
-1
No files found.
static/nativeComponents/TimeLimitedDiscount/index.js
View file @
2832ab05
...
@@ -133,6 +133,7 @@ const componentOptions = {
...
@@ -133,6 +133,7 @@ const componentOptions = {
second
:
0
,
second
:
0
,
goodsList
:
[],
goodsList
:
[],
selectActivityValue
:
""
,
selectActivityValue
:
""
,
activityInfo
:
{},
// 活动信息
},
},
// 数据监听器
// 数据监听器
observers
:
{},
observers
:
{},
...
@@ -157,6 +158,7 @@ const componentOptions = {
...
@@ -157,6 +158,7 @@ const componentOptions = {
promoteApi
.
getSingleItemActivityV2
(
query
).
then
(
res
=>
{
promoteApi
.
getSingleItemActivityV2
(
query
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
let
copyData
=
res
.
data
.
data
;
let
copyData
=
res
.
data
.
data
;
this
.
setData
({
activityInfo
:
res
.
data
.
data
});
// 未开始和进行中的活动
// 未开始和进行中的活动
deleteFlag
=
!
[
1
,
2
].
includes
(
+
copyData
.
activityStatus
);
deleteFlag
=
!
[
1
,
2
].
includes
(
+
copyData
.
activityStatus
);
if
(
dimension
==
0
&&
copyData
.
goodsItems
.
length
==
0
)
{
if
(
dimension
==
0
&&
copyData
.
goodsItems
.
length
==
0
)
{
...
@@ -300,6 +302,14 @@ const componentOptions = {
...
@@ -300,6 +302,14 @@ const componentOptions = {
minutes
:
minutes
<
10
?
'0'
+
minutes
:
minutes
,
minutes
:
minutes
<
10
?
'0'
+
minutes
:
minutes
,
seconds
:
seconds
<
10
?
'0'
+
seconds
:
seconds
,
seconds
:
seconds
<
10
?
'0'
+
seconds
:
seconds
,
}
}
// 活动刚刚开始
const
{
isStart
,
activityInfo
}
=
this
.
data
;
if
(
days
<=
0
&&
hours
<=
0
&&
minutes
<=
0
&&
seconds
<=
0
&&
!
isStart
)
{
this
.
setData
({
isStart
:
true
});
this
.
setData
({
endTime
:
new
Date
(
activityInfo
.
endTime
.
replace
(
/-/g
,
"/"
)).
getTime
()
-
(
new
Date
().
getTime
())
});
}
this
.
setData
({
timeData
:
detail
});
this
.
setData
({
timeData
:
detail
});
},
},
onclickProduct
(
e
)
{
onclickProduct
(
e
)
{
...
...
static/nativeComponents/TimeLimitedDiscount/index.wxml
View file @
2832ab05
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
class="countDown"
class="countDown"
bind:change="onChange"
bind:change="onChange"
>
>
<text class="endTimedot">距离活动
结束
</text>
<text class="endTimedot">距离活动
{{isStart?'结束':'开始'}}
</text>
<text class="endTime days">{{ timeData.days }}</text>
<text class="endTime days">{{ timeData.days }}</text>
<text class="endTimedot"></text>
<text class="endTimedot"></text>
<text class="endTime hours">{{ timeData.hours }}</text>
<text class="endTime hours">{{ timeData.hours }}</text>
...
...
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