Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-program
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
陈玉桐
wx-program
Commits
004c0538
Commit
004c0538
authored
Oct 16, 2019
by
陈玉桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5e06f631
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
12 deletions
+23
-12
app.json
app.json
+1
-1
historyDetail.js
pages/historyDetail/historyDetail.js
+5
-0
historyDetail.wxml
pages/historyDetail/historyDetail.wxml
+17
-11
No files found.
app.json
View file @
004c0538
{
"pages"
:
[
"pages/index/index"
,
"pages/historyDetail/historyDetail"
,
"pages/updatePlan/updatePlan"
,
"pages/eyesight/eyesight"
,
"pages/childInfo/childInfo"
,
...
...
@@ -10,7 +11,6 @@
"pages/message/message"
,
"pages/trainSort/trainSort"
,
"pages/starSort/starSort"
,
"pages/historyDetail/historyDetail"
,
"pages/user/user"
,
"pages/mine/mine"
,
"pages/idea/idea"
,
...
...
pages/historyDetail/historyDetail.js
View file @
004c0538
...
...
@@ -89,6 +89,8 @@ Page({
weekDuration
:
''
,
rightEye
:
''
,
leftEye
:
''
,
firstRightEye
:
''
,
firstLeftEye
:
''
,
weekLeftEye
:
''
,
weekRightEye
:
''
,
rightGlassesDegree
:
''
,
...
...
@@ -129,6 +131,9 @@ Page({
weekDuration
:
res
.
data
.
data
.
weekDuration
,
rightEye
:
res
.
data
.
data
.
rightEye
,
leftEye
:
res
.
data
.
data
.
leftEye
,
rightEye
:
res
.
data
.
data
.
rightEye
,
firstLeftEye
:
res
.
data
.
data
.
firstLeftEye
,
firstRightEye
:
res
.
data
.
data
.
firstRightEye
,
weekLeftEye
:
res
.
data
.
data
.
weekLeftEye
,
weekRightEye
:
res
.
data
.
data
.
weekRightEye
,
rightGlassesDegree
:
res
.
data
.
data
.
rightGlassesDegree
,
...
...
pages/historyDetail/historyDetail.wxml
View file @
004c0538
...
...
@@ -22,8 +22,8 @@
<view class="eyesightItem">
<view class="eyesightItemLeft">初始视力</view>
<view class="eyesightItemRight">
<text>{{
l
eftEye}}</text>
<text>{{
r
ightEye}}</text>
<text>{{
firstL
eftEye}}</text>
<text>{{
firstR
ightEye}}</text>
</view>
</view>
<view class="eyesightItem">
...
...
@@ -31,25 +31,25 @@
<view class="eyesightItemRight eyesightItemRightNowBox">
<view class="eyesightItemRightNow">
<text>{{weekLeftEye}}</text>
<view wx:if="{{weekLeftEye>
l
eftEye}}">
<view wx:if="{{weekLeftEye>
firstL
eftEye}}">
<image src="../../assets/up.png"></image>
<text>{{we
ekLeftEye-leftEye
}}</text>
<text>{{we
.toFixed1(weekLeftEye-firstLeftEye)
}}</text>
</view>
<view wx:elif="{{weekLeftEye<
l
eftEye}}">
<view wx:elif="{{weekLeftEye<
firstL
eftEye}}">
<image src="../../assets/down.png"></image>
<text>{{
leftEye-weekLeftEye
}}</text>
<text>{{
we.toFixed1(firstLeftEye-weekLeftEye)
}}</text>
</view>
<view wx:else></view>
</view>
<view class="eyesightItemRightNow">
<text>{{weekRightEye}}</text>
<view wx:if="{{weekRightEye>
r
ightEye}}">
<view wx:if="{{weekRightEye>
firstR
ightEye}}">
<image src="../../assets/up.png"></image>
<text>{{we
ekRightEye-rightEye
}}</text>
<text>{{we
.toFixed1(weekRightEye-firstRightEye)
}}</text>
</view>
<view wx:elif="{{weekRightEye<
r
ightEye}}">
<view wx:elif="{{weekRightEye<
firstR
ightEye}}">
<image src="../../assets/down.png"></image>
<text>{{
rightEye-weekRightEye
}}</text>
<text>{{
we.toFixed1(firstRightEye-weekRightEye)
}}</text>
</view>
<view wx:else></view>
</view>
...
...
@@ -115,7 +115,12 @@
var toFixed = function (value) {
return Math.floor(value);
}
var toFixed1 = function (value) {
return value.toFixed(1);
}
module.exports = {
toFixed :toFixed
toFixed :toFixed,
toFixed1 :toFixed1
}
</wxs>
\ 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