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
459ca708
You need to sign in or sign up before continuing.
Commit
459ca708
authored
Aug 08, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 列表页进度同步详情页
parent
7b8996e2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
pointList.js
src/pages/pointList/pointList.js
+1
-0
pointList.wxml
src/pages/pointList/pointList.wxml
+5
-3
tools.wxs
src/pages/pointList/tools.wxs
+6
-0
No files found.
src/pages/pointList/pointList.js
View file @
459ca708
...
...
@@ -91,6 +91,7 @@ wxService.page({
if
(
item
.
id
==
data
.
activityId
)
{
item
.
surplusPoints
=
data
.
surplusPoints
item
.
totalPoints
=
data
.
totalPoints
item
.
surplusExchangeCount
=
data
.
surplusExchangeCount
this
.
setData
({
pointList
})
...
...
src/pages/pointList/pointList.wxml
View file @
459ca708
<!--pages/pointList/pointList.wxml-->
<wxs src="./tools.wxs" module="tools" />
<view class="point-list border_box">
<block wx:for="{{pointList}}" wx:key="item">
<view class="point border_box" data-id="{{item.id}}" bindtap="handleDetail">
...
...
@@ -6,7 +8,9 @@
<view class="progress weui-flex df-j--bt">
<view class="rate">进度:
<!--<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>-->
<text class="point_color" wx:if="{{item.surplusExchangeCount}}"> {{item.totalPoints ? tools.parse(item.totalPoints / item.goal) : 0}}</text>
<text class="point_color" wx:else> {{item.totalPoints ? item.totalPoints % item.goal : 0}}</text>
/ {{item.goal}}
</view>
<view class="time-out">距离结束时间:
...
...
@@ -18,6 +22,4 @@
</view>
</block>
</view>
<!-- <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>-->
src/pages/pointList/tools.wxs
0 → 100644
View file @
459ca708
var parse = function(str) {
return parseInt(str);
};
module.exports.parse = parse;
\ No newline at end of file
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