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
5e5b7bc2
Commit
5e5b7bc2
authored
Oct 15, 2019
by
陈玉桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未绑定设备不刷新图片
parent
72295a2e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
16 deletions
+31
-16
index.js
pages/index/index.js
+19
-14
index.wxml
pages/index/index.wxml
+3
-2
index.wxss
pages/index/index.wxss
+9
-0
No files found.
pages/index/index.js
View file @
5e5b7bc2
...
@@ -508,7 +508,9 @@ Page({
...
@@ -508,7 +508,9 @@ Page({
gender
:
'../../assets/icon_boy.png'
gender
:
'../../assets/icon_boy.png'
})
})
}
}
console
.
log
(
res
.
data
.
data
.
bindDeviceStatus
)
// 未绑定设备不刷新图片
if
(
res
.
data
.
data
.
bindDeviceStatus
==
1
){
//获取当前时间戳
//获取当前时间戳
var
timestamp
=
Date
.
parse
(
new
Date
());
var
timestamp
=
Date
.
parse
(
new
Date
());
timestamp
=
timestamp
/
1000
;
timestamp
=
timestamp
/
1000
;
...
@@ -614,6 +616,8 @@ Page({
...
@@ -614,6 +616,8 @@ Page({
}
}
}
}
})
})
}
me
.
setData
({
me
.
setData
({
imgUrls
:
res
.
data
.
data
.
focusMap
,
imgUrls
:
res
.
data
.
data
.
focusMap
,
...
@@ -1084,17 +1088,17 @@ Page({
...
@@ -1084,17 +1088,17 @@ Page({
url
:
'/pages/out/out?url='
+
e
.
currentTarget
.
dataset
.
url
url
:
'/pages/out/out?url='
+
e
.
currentTarget
.
dataset
.
url
})
})
},
},
onReachBottom
()
{
//
onReachBottom() {
// 上拉触底
//
// 上拉触底
let
me
=
this
//
let me = this
console
.
log
(
'上拉触底'
)
//
console.log('上拉触底')
me
.
setData
({
//
me.setData({
isLoading
:
true
//
isLoading: true
})
//
})
setTimeout
(
function
(){
//
setTimeout(function(){
me
.
setData
({
//
me.setData({
isLoading
:
false
//
isLoading: false
})
//
})
},
1000
)
//
},1000)
}
//
}
})
})
\ No newline at end of file
pages/index/index.wxml
View file @
5e5b7bc2
...
@@ -48,7 +48,8 @@
...
@@ -48,7 +48,8 @@
<!-- 监控 -->
<!-- 监控 -->
<view class="checkCon">
<view class="checkCon">
<view class="checkDes">
<view class="checkDes">
<text id="trainTime" wx:if="{{trainingStatus==2 || trainingStatus==5}}">{{watchImgText}}</text>
<text id="trainTime" wx:if="{{bindDeviceStatus==0}}">设备未绑定</text>
<text id="trainTime" wx:elif="{{trainingStatus==2 || trainingStatus==5}}">{{watchImgText}}</text>
<text id="trainTime" wx:elif="{{trainingStatus==3}}">设备未在线</text>
<text id="trainTime" wx:elif="{{trainingStatus==3}}">设备未在线</text>
<text id="trainTime" wx:elif="{{trainingStatus==4}}">监控画面加载失败,请您手动刷新</text>
<text id="trainTime" wx:elif="{{trainingStatus==4}}">监控画面加载失败,请您手动刷新</text>
<text id="trainTime" wx:else>设备使用中,今日已训练{{trainingTime}}分钟</text>
<text id="trainTime" wx:else>设备使用中,今日已训练{{trainingTime}}分钟</text>
...
@@ -244,7 +245,7 @@
...
@@ -244,7 +245,7 @@
</view>
</view>
</view>
</view>
<view id="indexBottom"></view>
<view id="indexBottom"></view>
<
view id="indexBottomText" hidden="{{!isLoading}}">底下没有了~</view
>
<
!-- <view id="indexBottomText" hidden="{{!isLoading}}">底下没有了~</view> --
>
<!-- 更新训练计划弹窗 -->
<!-- 更新训练计划弹窗 -->
<view id="mustUpdate" catchtouchmove="preventTouchMove" hidden="{{mustUpdate}}">
<view id="mustUpdate" catchtouchmove="preventTouchMove" hidden="{{mustUpdate}}">
...
...
pages/index/index.wxss
View file @
5e5b7bc2
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
height: 230rpx;
height: 230rpx;
background-color: #e6ece5;
background-color: #e6ece5;
}
}
page{
background: #e6ece5;
}
/* .swiperCon{
/* .swiperCon{
border-radius:20rpx;
border-radius:20rpx;
} */
} */
...
@@ -106,6 +109,7 @@
...
@@ -106,6 +109,7 @@
}
}
#userBox{
#userBox{
background-color: #fff;
display: flex;
display: flex;
position: relative;
position: relative;
padding: 10rpx 0 10rpx 50rpx;
padding: 10rpx 0 10rpx 50rpx;
...
@@ -154,6 +158,7 @@
...
@@ -154,6 +158,7 @@
/* 训练计划按钮 */
/* 训练计划按钮 */
#userBtnBox{
#userBtnBox{
background-color: #fff;
padding: 30rpx 20rpx;
padding: 30rpx 20rpx;
display: flex;
display: flex;
justify-content: space-between;
justify-content: space-between;
...
@@ -168,6 +173,7 @@
...
@@ -168,6 +173,7 @@
/* 监控 */
/* 监控 */
.checkCon{
.checkCon{
background-color: #fff;
padding: 30rpx 20rpx;
padding: 30rpx 20rpx;
}
}
.checkDes{
.checkDes{
...
@@ -275,6 +281,7 @@
...
@@ -275,6 +281,7 @@
/* 训练报告 */
/* 训练报告 */
.report{
.report{
background-color: #fff;
padding: 0 25rpx;
padding: 0 25rpx;
}
}
.reportTitle{
.reportTitle{
...
@@ -392,6 +399,7 @@
...
@@ -392,6 +399,7 @@
#trainSort,#resultSort{
#trainSort,#resultSort{
color: #666;
color: #666;
font-size: 32rpx;
font-size: 32rpx;
background-color: #fff;
}
}
.trainSortTitle,.resultSortTitle{
.trainSortTitle,.resultSortTitle{
display: flex;
display: flex;
...
@@ -464,6 +472,7 @@
...
@@ -464,6 +472,7 @@
#achieve{
#achieve{
color: #555;
color: #555;
padding: 0 20rpx;
padding: 0 20rpx;
background-color: #fff;
}
}
.achieveTitle{
.achieveTitle{
display: flex;
display: flex;
...
...
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