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
2ce1960b
Commit
2ce1960b
authored
May 10, 2020
by
王榕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电池接口接入
parent
a416261c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
256 additions
and
241 deletions
+256
-241
common.wxml
components/title/common.wxml
+20
-19
index.js
config/index.js
+5
-5
util.js
lib/util.js
+12
-0
batteryHeath.js
pages/batteryHeath/batteryHeath.js
+114
-129
batteryHeath.wxml
pages/batteryHeath/batteryHeath.wxml
+11
-11
batteryHeath.wxss
pages/batteryHeath/batteryHeath.wxss
+12
-0
index.js
pages/car_action/index.js
+0
-0
index.wxml
pages/car_action/index.wxml
+13
-15
pay.js
pages/pay/pay.js
+6
-1
pay.wxml
pages/pay/pay.wxml
+2
-2
register2.js
pages/register2/register2.js
+1
-18
user_device_list.js
pages/user_device_list/user_device_list.js
+6
-5
defaultAvator.png
pages/user_index/defaultAvator.png
+0
-0
user_index.js
pages/user_index/user_index.js
+0
-0
user_index.wxml
pages/user_index/user_index.wxml
+53
-35
user_index.wxss
pages/user_index/user_index.wxss
+1
-1
No files found.
components/title/common.wxml
View file @
2ce1960b
<view>
<view class="custom_nav" style="height:{{navbarHeight}}px;">
<
cover-
view class="custom_nav" style="height:{{navbarHeight}}px;">
<view class="custom_nav_box" style="height:{{navbarHeight}}px;">
<view class="custom_nav_bar" style="top:{{statusBarHeight}}px; height:{{cusnavH}}px;">
<
cover-
view class="custom_nav_box" style="height:{{navbarHeight}}px;">
<
cover-
view class="custom_nav_bar" style="top:{{statusBarHeight}}px; height:{{cusnavH}}px;">
<block wx:if="{{isSearch}}">
<input class="navSearch" style="height:{{navbarBtn.height-2}}px;line-height:{{navbarBtn.height-4}}px; top:{{navbarBtn.top+1}}px; left:{{navbarBtn.right}}px; border-radius:{{navbarBtn.height/2}}px;" maxlength="10" bindinput="bindKeyInput" placeholder="输入文字搜索"
/>
</block>
<block wx:else>
<view class="custom_nav_icon {{!haveBack||'borderLine'}}" style="height:{{navbarBtn.height}}px;line-height:{{navbarBtn.height-2}}px; top:{{navbarBtn.top}}px; left:{{navbarBtn.right}}px; border-radius:{{navbarBtn.height/2}}px;">
<view wx:if="{{haveBack}}" class="icon-back" bindtap='_goBack'>
<
image src='./back.png' mode='aspectFill' class='back-pre'></
image>
</view>
<
view wx:if="{{haveBack}}" class='navbar-v-line'></
view>
<view class="icon-home">
<view class="home_a" catchtap="_clickLeftIcon">
<
image src='{{more?moreIcon:homeIcon}}' mode='aspectFill' class='back-home'></
image>
</view>
</view>
</view>
<view class="nav_title" style="height:{{cusnavH}}px; line-height:{{cusnavH}}px;">
<
cover-
view class="custom_nav_icon {{!haveBack||'borderLine'}}" style="height:{{navbarBtn.height}}px;line-height:{{navbarBtn.height-2}}px; top:{{navbarBtn.top}}px; left:{{navbarBtn.right}}px; border-radius:{{navbarBtn.height/2}}px;">
<
cover-
view wx:if="{{haveBack}}" class="icon-back" bindtap='_goBack'>
<
cover-image src='./back.png' mode='aspectFill' class='back-pre'></cover-
image>
</
cover-
view>
<
cover-view wx:if="{{haveBack}}" class='navbar-v-line'></cover-
view>
<
cover-
view class="icon-home">
<
cover-
view class="home_a" catchtap="_clickLeftIcon">
<
cover-image src='{{more?moreIcon:homeIcon}}' mode='aspectFill' class='back-home'></cover-
image>
</
cover-
view>
</
cover-
view>
</
cover-
view>
<
cover-
view class="nav_title" style="height:{{cusnavH}}px; line-height:{{cusnavH}}px;">
{{vTitle}}
</view>
</
cover-
view>
</block>
</view>
</view>
</view>
</
cover-
view>
</
cover-
view>
</
cover-
view>
<!-- <view style="height:{{navbarHeight}}rpx;"></view> -->
<slot />
</view>
\ No newline at end of file
config/index.js
View file @
2ce1960b
//
const type = 'dev'
const
type
=
'pro'
const
type
=
'dev'
//
const type = 'pro'
var
config
=
{
dev
:
{
appid
:
'wxb517dae1188a1900'
,
api
:
'http://
192.168.0.102:9995
/app/'
,
api
:
'http://
47.92.207.93:8084
/app/'
,
wss
:
'wss://app.doomore.cn/websocket/app/api/'
,
payapi
:
'http://
192.168.0.102:9995
/pay/'
,
rapi
:
'http
s://app.doomore.cn/repair
/app/'
,
//repair
payapi
:
'http://
47.92.207.93:8084
/pay/'
,
rapi
:
'http
://47.92.207.93:8084
/app/'
,
//repair
version
:
'v1.0.00'
,
imgPath
:
'/static/image/'
},
...
...
lib/util.js
View file @
2ce1960b
...
...
@@ -773,9 +773,21 @@ function getPx(rpx) {
function
getRpx
(
px
)
{
return
px
*
750
/
windowWidth
}
function
arrTarrs
(
num
,
arr
)
{
// 一维数组转换为二维数组
const
iconsArr
=
[];
// 声明数组
arr
.
forEach
((
item
,
index
)
=>
{
const
page
=
Math
.
floor
(
index
/
num
);
// 计算该元素为第几个素组内
if
(
!
iconsArr
[
page
])
{
// 判断是否存在
iconsArr
[
page
]
=
[];
}
iconsArr
[
page
].
push
(
item
);
});
return
iconsArr
;
}
module
.
exports
=
{
formatTime
,
imgName
,
arrTarrs
,
api
,
getUserInfo
,
wxLogin
,
...
...
pages/batteryHeath/batteryHeath.js
View file @
2ce1960b
...
...
@@ -13,134 +13,56 @@ const {
userLocation
,
getRgbColor
,
getPx
,
arrTarrs
,
wxscan
}
=
require
(
'../../lib/util.js'
)
const
moment
=
require
(
'../../lib/moment.js'
)
let
cmd
=
null
let
app
=
getApp
()
let
timer
Page
({
/**
* 页面的初始数据
*/
data
:
{
vos
:
[
[{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
}],
[{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
}],
[{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
}],
[{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
msg
:
true
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
}]
gprsImei
:
''
,
bmsVer
:
''
,
bmsVolt
:
''
,
bmsCurrent
:
''
,
bmsState
:
''
,
bmsCycles
:
''
,
bmsSoc
:
''
,
gpsSnr
:
''
,
gpsLocate
:
''
,
updateTime
:
''
,
cellVolt
:
[
[
// {
// index: '01',
// vo: '3.544'
// }
],
],
bmsTempetrue
:
[
[
// {
// index: '01',
// vo: '3.544'
// }
],
],
tms
:
[
[{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
}],
[{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
}],
[{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
}],
[{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
msg
:
true
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
},
{
index
:
'01'
,
vo
:
'3.544'
}]
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
getCarDetail
()
clearInterval
(
timer
)
setInterval
(()
=>
{
this
.
getCarDetail
()
},
4000
)
},
drawProgressbg
:
function
()
{
...
...
@@ -201,27 +123,91 @@ Page({
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
clearInterval
(
timer
)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
getCarDetail
()
{
api
.
get
(
'device/base/deviceDetailNew'
,
{},
true
)
.
then
(
res
=>
{
let
{
data
,
model
:
{
deviceBmsInfo
}
}
=
res
let
carData
=
{
...
data
,
...
deviceBmsInfo
}
this
.
setUI2
(
carData
)
})
.
catch
(
err
=>
{
console
.
error
(
1
,
err
)
})
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
// 轮询设置
setUI2
(
data
)
{
console
.
log
(
data
)
let
{
gprsImei
,
bmsVer
,
bmsVolt
,
bmsCurrent
,
bmsState
,
bmsCycles
,
bmsSoc
,
gpsSnr
,
gpsLocate
,
cellVolt
,
bmsTempetrue
,
updateTime
}
=
data
if
(
bmsState
==
1
)
{
bmsState
=
'开锁'
}
else
{
bmsState
=
'关锁'
}
cellVolt
=
JSON
.
parse
(
cellVolt
)
bmsTempetrue
=
JSON
.
parse
(
bmsTempetrue
)
if
(
cellVolt
&&
cellVolt
.
length
)
{
cellVolt
=
arrTarrs
(
4
,
cellVolt
.
map
((
elt
,
i
)
=>
{
return
{
index
:
i
,
vo
:
elt
}
}))
}
else
{
cellVolt
=
[
[]
]
}
if
(
bmsTempetrue
&&
bmsTempetrue
.
length
)
{
bmsTempetrue
=
arrTarrs
(
4
,
bmsTempetrue
.
map
((
elt
,
i
)
=>
{
return
{
index
:
i
,
vo
:
elt
}
}))
}
else
{
cellVolt
=
[
[]
]
}
this
.
setData
({
gprsImei
,
bmsVer
,
bmsVolt
,
bmsCurrent
,
bmsState
,
bmsCycles
,
bmsSoc
,
updateTime
,
gpsSnr
,
cellVolt
,
bmsTempetrue
,
batteryDeatil
:
data
})
this
.
drawCircle
(
bmsSoc
);
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
})
\ No newline at end of file
pages/batteryHeath/batteryHeath.wxml
View file @
2ce1960b
...
...
@@ -5,7 +5,7 @@
<canvas class="cvs progress_bg" canvas-id="canvasProgressbg"> </canvas>
<canvas class="cvs progress_canvas" canvas-id="canvasProgress"> </canvas>
<view class="content">
<view class="power">
65
<view class="power">
{{bmsSoc}}
<text>%</text>
</view>
<view class="bar"></view>
...
...
@@ -13,36 +13,36 @@
</view>
<view class="b-right">
<view class="b-right-top">
<view>
ABCDEF1234567890
</view>
<view class="error"
>警告!电池异常 3345
</view>
<view>
{{batteryDeatil.bmsSn}}
</view>
<view class="error"
wx:if="{{batteryDeatil.bmsErrCode}}">警告!电池异常 {{batteryDeatil.bmsErrCode}}
</view>
</view>
<view class="b-right-bottom">
<view class="b-right-line1">
<view class="col-item">
<text>电压</text>
<text>
5.0
V</text>
<text>
{{bmsVolt}}
V</text>
</view>
<view class="col-item">
<text>电流</text>
<text>
1.0
A</text>
<text>
{{bmsCurrent}}
A</text>
</view>
<view class="col-item">
<text>状态</text>
<text>
充电中
</text>
<text>
{{bmsState}}
</text>
</view>
<view class="col-item">
<text>电池循环</text>
<text>
1
次</text>
<text>
{{bmsCycles}}
次</text>
</view>
</view>
<view class="b-right-line2">
<view class="col-item">
<text>电池版本</text>
<text>
ver33333
</text>
<text>
{{bmsVer}}
</text>
</view>
<view class="col-item">
<text>IMEI</text>
<text>
232321312312313221
</text>
<text>
{{gprsImei}}
</text>
</view>
</view>
</view>
...
...
@@ -54,7 +54,7 @@
<text>(单位:V)</text>
</view>
<view class="info-content">
<view wx:for="{{
vos
}}" wx:key="{{index}}" class="vos-row">
<view wx:for="{{
cellVolt
}}" wx:key="{{index}}" class="vos-row">
<view wx:for="{{item}}" wx:key="{{vItem.index}}" wx:for-item="vItem" class="vos-item">
<text>{{vItem.index}}</text>
<text class="num {{vItem.msg?'error':''}}">{{vItem.vo}}</text>
...
...
@@ -67,7 +67,7 @@
<text>(单位:℃)</text>
</view>
<view class="info-content">
<view wx:for="{{
vos
}}" wx:key="{{index}}" class="vos-row">
<view wx:for="{{
bmsTempetrue
}}" wx:key="{{index}}" class="vos-row">
<view wx:for="{{item}}" wx:key="{{vItem.index}}" wx:for-item="vItem" class="vos-item">
<text>{{vItem.index}}</text>
<text class="num {{vItem.msg?'error':''}}">{{vItem.vo}}</text>
...
...
pages/batteryHeath/batteryHeath.wxss
View file @
2ce1960b
...
...
@@ -82,6 +82,12 @@
justify-content: space-between;
margin-top: 16rpx;
}
.b-right-line1 .col-item{
flex: 0 0 25%;
}
.b-right-line2 .col-item{
flex: 1;
}
.col-item text:nth-of-type(1){
color: #587699;
margin-right: 10rpx;
...
...
@@ -109,11 +115,17 @@
font-size: 20rpx;
margin-bottom: 30rpx;
}
.info-body .vos-item{
flex: 1;
display: flex;
}
.vos-item text:nth-of-type(1){
padding: 3px 6px;
background-color: #587699;
border-radius: 3px;
margin-right: 14rpx;
text-align: center;
min-width: 24rpx;
}
.vos-item text:nth-of-type(2){
color: #587699;
...
...
pages/car_action/index.js
View file @
2ce1960b
This diff is collapsed.
Click to expand it.
pages/car_action/index.wxml
View file @
2ce1960b
<view class='map'>
<!-- <view class='map-top'>
<view class='top'>{{ui.deviceAdress}}</view>
<view class='bottom'>
<text decode='{{true}}'>GPS:{{ui.GPS}} GSM:{{ui.GSM}}</text>
<text>定位时间:{{ui.gps_time}}</text>
</view>
</view> -->
<map id='carMap' scale='13' markers='{{ui.locMap.markers}}' show-location bindmarkertap='markersTap' longitude='{{ui.locMap.longitude}}' latitude='{{ui.locMap.latitude}}'>
<map class="map" id='carMap' scale='13' markers='{{locMap.markers}}' polyline='{{polyline}}' show-location longitude='{{locMap.longitude}}' latitude='{{locMap.latitude}}'>
<cover-view wx:if='{{deviceLocError}}' class='out-line'>当前设备定位异常</cover-view>
<!-- </cover-view> -->
</map>
<view>
<view class="map-bottom">
<view class="map-bottom-right">
<view>当前位置:{{ui.deviceAdress}}</view>
<view>最后上报:{{ui.gps_time}}</view>
<view>信号强度:GPS <text class="error">{{ui.GPS}}</text> GSM {{ui.GSM}}</view>
<view>当前位置:{{batteryDeatil.address}}</view>
<view>最后上报:{{batteryDeatil.time}}</view>
<view>信号强度:GPS
<text class="{{batteryDeatil.gpsSnr?'':'error'}}">{{batteryDeatil.gpsSnr}}</text> GSM
<text class="{{batteryDeatil.gsmSnr?'':'error'}}">{{batteryDeatil.gsmSnr}}</text>
</view>
</view>
<view class="abtn detail-btn" bindtap="chooseTime">查看轨迹</view>
</view>
<picker mode="multiSelector" bindchange="bindTimeChange" bindcolumnchange="bindTimeColumnChange" value="{{multiIndex}}" range="{{multiArray}}">
<view class="abtn detail-btn" bindtap="chooseTime">查看轨迹</view>
</picker>
</view>
<!-- <view class='map-bottom'>
</view>
<!-- <view class='map-bottom'>
<view catchtap='showMyLoc'>
<image src='{{imgToloc}}'></image>
<text>我的位置</text>
...
...
pages/pay/pay.js
View file @
2ce1960b
...
...
@@ -3,6 +3,7 @@ const { api, formatTime, imgName, wxLogin, payApi, alertTip, useTime, changeTime
Page
({
data
:
{
price
:
'30.0'
,
restDay
:
''
,
payType
:
'rent'
,
//deposit rent
success
:
true
,
//
orderNumber
:
''
,
...
...
@@ -15,7 +16,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
options
)
this
.
setData
({
endRentTime
:
options
.
serverEndDate
,
restDay
:
options
.
day
,
})
},
//判断是否未支付定单或者押金 个租
getRentRecord
()
{
...
...
pages/pay/pay.wxml
View file @
2ce1960b
<view class="con">
<view class="battery-tip">
<text>该电池的物联网服务剩余</text>
<text>
33
</text>
<text>
{{restDay}}
</text>
<text>天</text>
</view>
<view class="time-body">
<view class="bar"></view>
<view class="time">截止到
2020-12-12
</view>
<view class="time">截止到
{{endRentTime}}
</view>
<view class="bar"></view>
</view>
<text class="tip">
...
...
pages/register2/register2.js
View file @
2ce1960b
...
...
@@ -242,24 +242,7 @@ Page({
logAfter
(
res
)
{
wx
.
setStorageSync
(
'user'
,
res
.
data
)
//有车
this
.
getCarList
()
.
then
(
hasCar
=>
{
if
(
hasCar
)
{
//有使用的车辆 跳到用车
wx
.
switchTab
({
url
:
'/pages/user_index/user_index'
,
})
return
}
else
{
//没车绑定车辆
wx
.
redirectTo
({
url
:
'/pages/device_bind/device_bind'
,
})
}
})
.
catch
(
err
=>
{
alertTip
(
err
.
toString
())
})
wx
.
navigateBack
()
},
loginBycode
()
{
let
body
=
{
...
...
pages/user_device_list/user_device_list.js
View file @
2ce1960b
...
...
@@ -176,14 +176,11 @@ Page({
})
},
onPullDownRefresh
()
{
this
.
getCarList
()
},
changeCar
(
vcuNo
)
{
confirmTip
(
`确定切换设备为
${
vcuNo
}
`
,
()
=>
{
api
.
post
(
'device/changeDevice'
,
{
vcuNo
})
vcuNo
})
.
then
(
res
=>
{
const
user
=
wx
.
getStorageSync
(
'user'
)
user
.
userMapp
.
nowVcuNo
=
vcuNo
...
...
@@ -201,6 +198,10 @@ Page({
})
})
},
onPullDownRefresh
()
{
this
.
getCarList
()
},
unbindCar
(
vcuNo
)
{
let
that
=
this
wx
.
showModal
({
...
...
pages/user_index/defaultAvator.png
0 → 100644
View file @
2ce1960b
8.13 KB
pages/user_index/user_index.js
View file @
2ce1960b
This diff is collapsed.
Click to expand it.
pages/user_index/user_index.wxml
View file @
2ce1960b
...
...
@@ -5,77 +5,83 @@
<canvas class="cvs progress_canvas" canvas-id="canvasProgress"> </canvas>
<view class="progress_text">
<view class="iv ab it">
<text wx:if="{{
hasBattery}}">5.0
V</text>
<text wx:if="{{
auth&&hasBattery}}">{{bmsVolt}}
V</text>
<text>电压</text>
</view>
<view class="ia ab it">
<text wx:if="{{
hasBattery}}">1.0
A</text>
<text wx:if="{{
auth&&hasBattery}}">{{bmsCurrent}}
A</text>
<text>电流</text>
</view>
<view class="is ab it">
<text wx:if="{{
hasBattery}}">充电中
</text>
<text wx:if="{{
auth&&hasBattery}}">{{bmsState}}
</text>
<text>状态</text>
</view>
<view class="ix ab it">
<text wx:if="{{
hasBattery}}">1
次</text>
<text wx:if="{{
auth&&hasBattery}}">{{bmsCycles}}
次</text>
<text>电池循环</text>
</view>
<view class="ic ab">
<view class="power-content">
<text wx:if="{{hasBattery}}">剩余电量</text>
<view wx:if="{{!hasBattery}}" class="no-battery">您还未绑定电池</view>
<view wx:if="{{hasBattery}}">
65
<text>%</text>
</view>
<block wx:if="{{!auth}}">
<view class="no-battery">您还未登录哦</view>
</block>
<block wx:else>
<text wx:if="{{hasBattery}}">剩余电量</text>
<view wx:if="{{!hasBattery}}" class="no-battery">您还未绑定电池</view>
<view wx:if="{{hasBattery}}">
{{bmsSoc}}
<text>%</text>
</view>
</block>
</view>
<view class="sep-bar"></view>
<view class="bms-no" wx:if="{{
hasBattery}}">ABCDEF1234567890
</view>
<view class="bms-no" wx:if="{{
auth&&hasBattery}}">{{gprsImei}}
</view>
</view>
</view>
</view>
<view class="pg" wx:if="{{hasBattery}}">
<view class="pg" wx:if="{{
auth&&
hasBattery}}">
<view class="vip-box abtn" catchtap="showBuying">
<view>物联网卡服务截止到
2020-12-12
</view>
<view>物联网卡服务截止到
{{serverEndDate}}
</view>
<view class="v-t2">
<view>
<text>剩余</text>
<text class="day">
33
</text>
<text class="day">
{{batteryDeatil.restDay}}
</text>
<text>天</text>
</view>
<text>VIP续费</text>
</view>
</view>
</view>
<view class="pg"
wx:if="{{
hasBattery}}">
<map class="map" id='carMap' scale='13' markers='{{
ui.locMap.markers}}' show-location longitude='{{ui.locMap.longitude}}' latitude='{{ui.
locMap.latitude}}'>
<view class="pg"
wx:if="{{auth&&
hasBattery}}">
<map class="map" id='carMap' scale='13' markers='{{
locMap.markers}}' show-location longitude='{{locMap.longitude}}' latitude='{{
locMap.latitude}}'>
<cover-view class="cover" bindtap="seeMap">
<cover-view class="c-top">
<cover-view>GPS
|||||
</cover-view>
<cover-view>GSM
|||||
</cover-view>
<cover-view>GPS
{{gpsSnr}}
</cover-view>
<cover-view>GSM
{{batteryDeatil.gsmSnr}}
</cover-view>
</cover-view>
<cover-view class="c-bottom">
<cover-view>
浙江省杭州市余杭区
</cover-view>
<cover-view>
2020-10-22 12:22:33
</cover-view>
<cover-view>
{{batteryDeatil.address}}
</cover-view>
<cover-view>
{{updateTime}}
</cover-view>
</cover-view>
</cover-view>
</map>
</view>
<view class="pg" wx:if="{{hasBattery}}">
<view class="pg" wx:if="{{
auth&&
hasBattery}}">
<view class="battery-box abtn" bindtap="toHeath">
<view class="b-left">
<text>电池健康度</text>
<text>良好的电池使用习惯可以延长电池寿命</text>
</view>
<view class="b-right">
<text>
80
</text>
<text>
{{batteryDeatil.health}}
</text>
<text>分</text>
</view>
</view>
</view>
<view wx:if="{{!hasBattery}}" class="bind-btn">
<view class="btn" catchtap="bindBattery">立即扫码绑定</view>
<view wx:if="{{!auth&&hasBattery}}" class="bind-btn">
<view wx:if="{{!auth}}" catchtap="reLogin">立即登录</view>
<view class="btn" catchtap="bindBattery" wx:else>立即扫码绑定</view>
</view>
<i-modal visible="{{ lockAction }}" title="{{targetStatus===0?'关锁中。。':'开锁中。。'}}" show-ok="{{false}}" show-cancel="{{false}}">
<view style='padding:0 10rpx;'>
...
...
@@ -86,10 +92,26 @@
<cover-view class="my-cover {{myModel?'my-model':''}}" style="top:{{navHeight}}px" bindtap="showMy">
<cover-view class="my-body" catchtap="nullfunc">
<cover-view class="my-avator">
<cover-image class="avator" src="{{user.avatarUrl}}"></cover-image>
<block wx:if="{{user.avatarUrl}}">
<cover-image class="avator" src="{{user.avatarUrl||'./defaultAvator.png'}}"></cover-image>
</block>
<block wx:else>
<open-data class="avator" type="userAvatarUrl"></open-data>
</block>
<cover-view class="my-right">
<cover-view class="nickname">{{user.nickname}}</cover-view>
<cover-view catchtap="bindBattery" class="bind-btn abtn">绑定电池</cover-view>
<block wx:if="{{auth}}">
<block wx:if="{{user.nickname}}">
<cover-view class="nickname">{{user.nickname}}</cover-view>
</block>
<block wx:else>
<open-data class="nickname" type="userNickName"></open-data>
</block>
<cover-view catchtap="bindBattery" class="bind-btn abtn">绑定电池</cover-view>
</block>
<block wx:else>
<cover-view class="nickname" bindtap="reLogin">点击登录</cover-view>
</block>
</cover-view>
</cover-view>
<!-- <cover-view catchtap="bindBattery" class="bind-btn2"></cover-view> -->
...
...
@@ -99,14 +121,10 @@
</cover-view>
<cover-view>绑定电池</cover-view>
</cover-view> -->
<cover-view class="battery-list">
<cover-view class="battery-item">
<cover-view class="battery-no">ABCDEF1234567890</cover-view>
<cover-view>33%</cover-view>
</cover-view>
<cover-view class="battery-item">
<cover-view class="battery-no">ABCDEF1234567890</cover-view>
<cover-view>33%</cover-view>
<cover-view class="battery-list" wx:if="{{batteryList.length}}">
<cover-view class="battery-item" wx:for="{{batteryList}}" wx:key="{{item.id}}" bindtap="changeCar" data-id="{{item.id}}" data-deviceNo="{{item.deviceNo}}">
<cover-view class="battery-no">{{item.gprsImei}}</cover-view>
<cover-view>{{item.bmsSoc||'0'}}%</cover-view>
</cover-view>
</cover-view>
...
...
pages/user_index/user_index.wxss
View file @
2ce1960b
...
...
@@ -41,7 +41,7 @@ page {
justify-content: center;
align-items: center;
color: #fff;
padding-top: 200rpx;
/* padding-top: 200rpx; */
}
.bind-btn >view{
padding: 4px 20px;
...
...
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