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
7b8996e2
Commit
7b8996e2
authored
Aug 08, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 集点列表
parent
ec3af9aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
pointList.js
src/pages/pointList/pointList.js
+6
-4
pointList.wxml
src/pages/pointList/pointList.wxml
+6
-4
No files found.
src/pages/pointList/pointList.js
View file @
7b8996e2
...
@@ -38,7 +38,7 @@ wxService.page({
...
@@ -38,7 +38,7 @@ wxService.page({
data
.
forEach
(
item
=>
{
data
.
forEach
(
item
=>
{
let
endT
=
item
.
endTime
let
endT
=
item
.
endTime
// ios 兼容
// ios 兼容
let
currentEndTime
=
(
new
Date
(
endT
.
replace
(
/-/g
,
'/'
))).
getTime
();
let
currentEndTime
=
(
new
Date
(
endT
.
replace
(
/-/g
,
'/'
))).
getTime
();
let
currentTime
=
(
new
Date
()).
getTime
();
let
currentTime
=
(
new
Date
()).
getTime
();
let
distancetime
=
currentEndTime
-
currentTime
let
distancetime
=
currentEndTime
-
currentTime
...
@@ -50,7 +50,7 @@ wxService.page({
...
@@ -50,7 +50,7 @@ wxService.page({
ms
:
'00'
,
ms
:
'00'
,
isOver
:
true
,
isOver
:
true
,
};
};
if
(
distancetime
>
0
)
{
if
(
distancetime
>
0
)
{
//如果大于0.说明尚未到达截止时间
//如果大于0.说明尚未到达截止时间
result
.
ms
=
Math
.
floor
((
distancetime
%
1000
)
/
100
);
result
.
ms
=
Math
.
floor
((
distancetime
%
1000
)
/
100
);
...
@@ -83,12 +83,14 @@ wxService.page({
...
@@ -83,12 +83,14 @@ wxService.page({
wxService
.
post
(
`/sale/touchpoints/pointConsumptionCount/getPointConsumptionCount?activityId=
${
activityId
}
&memberId=
${
memberId
}
`
).
then
(
res
=>
{
wxService
.
post
(
`/sale/touchpoints/pointConsumptionCount/getPointConsumptionCount?activityId=
${
activityId
}
&memberId=
${
memberId
}
`
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
const
{
pointList
}
=
this
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
const
{
pointList
}
=
this
.
data
pointList
.
forEach
(
item
=>
{
pointList
.
forEach
(
item
=>
{
if
(
item
.
id
==
activityId
)
{
if
(
item
.
id
==
data
.
activityId
)
{
item
.
surplusPoints
=
data
.
surplusPoints
item
.
surplusPoints
=
data
.
surplusPoints
item
.
totalPoints
=
data
.
totalPoints
this
.
setData
({
this
.
setData
({
pointList
pointList
})
})
...
...
src/pages/pointList/pointList.wxml
View file @
7b8996e2
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
<status-img img="{{item.listImage}}" />
<status-img img="{{item.listImage}}" />
<view class="progress weui-flex df-j--bt">
<view class="progress weui-flex df-j--bt">
<view class="rate">进度:
<view class="rate">进度:
<!--<text class="point_color">{{item.surplusPoints}}</text> -->
<!--<text class="point_color">{{item.surplusPoints}}</text> -->
<text class="point_color">{{item.totalPoints ? item.totalPoints % item.goal : 0}}</text>
<text class="point_color">{{item.totalPoints ? item.totalPoints % item.goal : 0}}</text>
/ {{item.goal}}
/ {{item.goal}}
</view>
</view>
<view class="time-out">距离结束时间:
<view class="time-out">距离结束时间:
...
@@ -17,4 +17,7 @@
...
@@ -17,4 +17,7 @@
</view>
</view>
</view>
</view>
</block>
</block>
</view>
</view>
\ No newline at end of file
<!-- <text class="point_color" wx:if="{{countObj.surplusExchangeCount}}"> {{countObj.totalPoints ? tools.parse(countObj.totalPoints / goal) : 0}}</text>
<text class="point_color" wx:else> {{countObj.totalPoints ? countObj.totalPoints % goal : 0}}</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