Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bms
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
iambtr
bms
Commits
dfe62578
Commit
dfe62578
authored
May 15, 2020
by
王榕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改电池
parent
cebf312b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
user_index.js
pages/user_index/user_index.js
+6
-1
user_index.wxml
pages/user_index/user_index.wxml
+3
-3
No files found.
pages/user_index/user_index.js
View file @
dfe62578
...
@@ -75,7 +75,12 @@ Page({
...
@@ -75,7 +75,12 @@ Page({
console
.
log
(
'设备列表:'
,
res
)
console
.
log
(
'设备列表:'
,
res
)
if
(
res
.
items
.
length
>
0
)
{
if
(
res
.
items
.
length
>
0
)
{
this
.
setData
({
this
.
setData
({
batteryList
:
res
.
items
batteryList
:
res
.
items
,
hasBattery
:
true
})
}
else
{
this
.
setData
({
hasBattery
:
false
})
})
}
}
})
})
...
...
pages/user_index/user_index.wxml
View file @
dfe62578
...
@@ -79,9 +79,9 @@
...
@@ -79,9 +79,9 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view
wx:if="{{!auth&&hasBattery}}"
class="bind-btn">
<view class="bind-btn">
<view wx:if="{{!auth}}" catchtap="reLogin">立即登录</view>
<view wx:if="{{!auth}}" catchtap="reLogin">立即登录</view>
<view class="btn" catchtap="bindBattery" wx:
else
>立即扫码绑定</view>
<view class="btn" catchtap="bindBattery" wx:
if="{{auth&&!hasBattery}}"
>立即扫码绑定</view>
</view>
</view>
<i-modal visible="{{ lockAction }}" title="{{targetStatus===0?'关锁中。。':'开锁中。。'}}" show-ok="{{false}}" show-cancel="{{false}}">
<i-modal visible="{{ lockAction }}" title="{{targetStatus===0?'关锁中。。':'开锁中。。'}}" show-ok="{{false}}" show-cancel="{{false}}">
<view style='padding:0 10rpx;'>
<view style='padding:0 10rpx;'>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<cover-image class="avator" src="{{user.avatarUrl||'./defaultAvator.png'}}"></cover-image>
<cover-image class="avator" src="{{user.avatarUrl||'./defaultAvator.png'}}"></cover-image>
<cover-view class="my-right">
<cover-view class="my-right">
<block wx:if="{{auth}}">
<block wx:if="{{auth}}">
<cover-view class="nickname">{{user.
nicknam
e||'Hi,您好'}}</cover-view>
<cover-view class="nickname">{{user.
mobil
e||'Hi,您好'}}</cover-view>
<cover-view catchtap="bindBattery" class="bind-btn abtn">绑定电池</cover-view>
<cover-view catchtap="bindBattery" class="bind-btn abtn">绑定电池</cover-view>
</block>
</block>
<block wx:else>
<block wx:else>
...
...
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