小鹿骑行
This commit is contained in:
parent
c06f62d1eb
commit
0eaacca95a
|
@ -115,11 +115,11 @@
|
|||
<view class="">
|
||||
<view class="">
|
||||
起步价格:{{'¥' + item.startRule.startingPrice}}(含{{item.startRule.startingTime}} <text
|
||||
v-if="item.rentalUnit == 'hours'">小时</text><text v-else>分钟</text> )
|
||||
v-if="item.rentalUnit == 'hours'">小时</text><text v-if="item.rentalUnit == 'minutes'">分钟</text><text v-if="item.rentalUnit == 'day'">天</text> )
|
||||
</view>
|
||||
<view class="">
|
||||
超出价格:{{'¥' + item.startRule.timeoutPrice}}(每{{item.startRule.timeoutTime}} <text
|
||||
v-if="item.rentalUnit == 'hours'">小时</text><text v-else>分钟</text>)
|
||||
v-if="item.rentalUnit == 'hours'">小时</text><text v-if="item.rentalUnit == 'minutes'">分钟</text><text v-if="item.rentalUnit == 'day'">天</text>)
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -693,42 +693,12 @@
|
|||
this.bikeobj = res.data
|
||||
console.log(res.data,'020202');
|
||||
this.$u.put(`/app/user/bindArea?areaId=${res.data.areaId}`).then(resp =>{})
|
||||
// if (res.data.onlineStatus == 0) {
|
||||
// wx.openBluetoothAdapter({
|
||||
// success: function(res) {
|
||||
// console.log('蓝牙适配器初始化成功')
|
||||
// xBlufi.initXBlufi(1)
|
||||
// xBlufi.notifyStartDiscoverBle({
|
||||
// 'isStart': true
|
||||
// })
|
||||
// xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||
// },
|
||||
// fail: function(err) {
|
||||
// console.error('蓝牙适配器初始化失败,可能是因为没有权限', err)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$u.get(`/app/device/availableDetail?sn=${this.chesn}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.bikeobj = res.data
|
||||
// if (res.data.onlineStatus == 0) {
|
||||
// wx.openBluetoothAdapter({
|
||||
// success: function(res) {
|
||||
// console.log('蓝牙适配器初始化成功')
|
||||
// xBlufi.initXBlufi(1)
|
||||
// xBlufi.notifyStartDiscoverBle({
|
||||
// 'isStart': true
|
||||
// })
|
||||
// xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent)
|
||||
// },
|
||||
// fail: function(err) {
|
||||
// console.error('蓝牙适配器初始化失败,可能是因为没有权限', err)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -918,7 +888,7 @@
|
|||
.mingxitc {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 180rpx;
|
||||
bottom: 150rpx;
|
||||
width: 750rpx;
|
||||
max-height: 912rpx;
|
||||
overflow: scroll;
|
||||
|
@ -975,7 +945,7 @@
|
|||
|
||||
.zhifu {
|
||||
width: 750rpx;
|
||||
height: 238rpx;
|
||||
height: 240rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
|
|
|
@ -172,7 +172,10 @@
|
|||
name: '按小时',
|
||||
disabled: false
|
||||
},
|
||||
|
||||
{
|
||||
name: '按天',
|
||||
disabled: false
|
||||
},
|
||||
],
|
||||
startingPrice: "",
|
||||
startingTime: '',
|
||||
|
@ -264,8 +267,10 @@
|
|||
radioGroupChange(e) {
|
||||
if (e == '按分钟') {
|
||||
this.data.rentalUnit = 'minutes'
|
||||
} else {
|
||||
} else if(e == '按小时'){
|
||||
this.data.rentalUnit = 'hours'
|
||||
}else {
|
||||
this.data.rentalUnit = 'day'
|
||||
}
|
||||
},
|
||||
sub() {
|
||||
|
@ -391,7 +396,7 @@
|
|||
|
||||
.u-radio-group {
|
||||
display: flex;
|
||||
gap: 40rpx;
|
||||
// gap: 40rpx;
|
||||
|
||||
.u-radio {
|
||||
font-size: 28rpx;
|
||||
|
|
|
@ -62,6 +62,28 @@
|
|||
开启短信通知,短信费用0.1元/条,从余额中扣除
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_li">
|
||||
<view class="tops">
|
||||
<view class="card_left">
|
||||
寻车范围
|
||||
</view>
|
||||
<view class="card_right">
|
||||
<u-switch v-model="form.requiredRingRadius"></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tops" style="margin-top: 20rpx;" v-if="form.requiredRingRadius == true">
|
||||
<view class="card_left">
|
||||
允许寻车范围
|
||||
</view>
|
||||
<view class="card_right">
|
||||
<input type="number" v-model="form.ringRadius" placeholder=" " class="input"
|
||||
placeholder-style="color:#C7CDD3" style="width: 100rpx;">米
|
||||
</view>
|
||||
</view>
|
||||
<view class="tips" style="margin-top: 10rpx;">
|
||||
开启后,用户需在车辆指定范围才允许响铃寻车(防止恶意响铃)
|
||||
</view>
|
||||
</view>
|
||||
<view class="card_li">
|
||||
<view class="tops">
|
||||
<view class="card_left">
|
||||
|
|
|
@ -17,14 +17,9 @@
|
|||
<view class="new_infocard">
|
||||
<view class="topsn">
|
||||
<view class="lt">
|
||||
SN:{{deviceInfos.sn}}
|
||||
<view class="lypic" style="background-color: #28c445;" v-if="ver_dataflag == 3 && deviceInfos.onlineStatus == 0">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uqUiYiMtGTjkPNgmCjvP" mode=""></image>
|
||||
</view>
|
||||
<view class="lypic" v-if="ver_dataflag == 1 && deviceInfos.onlineStatus == 0">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uqUiYiMtGTjkPNgmCjvP" mode=""></image>
|
||||
</view>
|
||||
车牌号:{{deviceInfos.vehicleNum == null ? '--' : deviceInfos.vehicleNum}}
|
||||
</view>
|
||||
|
||||
<view class="rt">
|
||||
<view class="stutas">
|
||||
<span style="background-color: #979797;" v-if="deviceInfos.status == 0">仓库中</span>
|
||||
|
@ -44,11 +39,45 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="display: flex;justify-content: space-between;">
|
||||
<view class="cent">
|
||||
<view class="lypic" v-if="ver_dataflag == 3 && deviceInfos.onlineStatus == 0">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uLw46jus4X9fposAvVD7" mode=""></image> 已连接
|
||||
</view>
|
||||
<view class="lypic" v-if="ver_dataflag == 1 && deviceInfos.onlineStatus == 0">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uCdHjNaNfD9aikVg9Cuk" mode=""></image> 未连接
|
||||
</view>
|
||||
|
||||
<view class="lypic" v-if="deviceInfos.music == 0">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uDORYeTuc2EQ1lSI2dbe" mode=""></image> 静音
|
||||
</view>
|
||||
<view class="lypic" v-if="deviceInfos.music == 1">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u8ii1aiUgREfYyMVIjpO" mode=""></image> 语音
|
||||
</view>
|
||||
<view class="lypic" v-if="deviceInfos.music == 2">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uP7BOVsjvWaGItgHtoKV" mode=""></image> 彩铃
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bikesn">
|
||||
<view class="">
|
||||
SN:{{deviceInfos.sn == null ? '--' : deviceInfos.sn}}
|
||||
</view>
|
||||
<view class="">
|
||||
MAC:{{deviceInfos.mac == null ? '--' : deviceInfos.mac}}
|
||||
</view>
|
||||
<view class="">
|
||||
车型:{{deviceInfos.modelName == null ? '--' : deviceInfos.modelName}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="bikexx">
|
||||
<view class="dianliang">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ucFiREWFvUepgFX0LR1h" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 0 && deviceInfos.remainingPower < 20 " src="https://api.ccttiot.com/smartmeter/img/static/u8M9KmIfHXpmeifTwCzj" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 20 && deviceInfos.remainingPower < 50 " src="https://api.ccttiot.com/smartmeter/img/static/u2gp2pE9kPGwaJ4MKUxE" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 50 && deviceInfos.remainingPower < 80 " src="https://api.ccttiot.com/smartmeter/img/static/umm5Ruc5vhNSjeacslwX" mode=""></image>
|
||||
<image v-if="deviceInfos.remainingPower >= 80 && deviceInfos.remainingPower <= 100 " src="https://api.ccttiot.com/smartmeter/img/static/uo75cOfYZiQoxZQAI3FH" mode=""></image>
|
||||
<view class="dl">
|
||||
电量:<span>{{deviceInfos.remainingPower == null ? '--' : deviceInfos.remainingPower}}%</span>
|
||||
电量:<span>{{deviceInfos.remainingPower == null ? '--' : deviceInfos.remainingPower.toFixed(2)}}%</span>
|
||||
</view>
|
||||
<view class="dy">
|
||||
电压:<span>{{deviceInfos.voltage == null ? '--' : deviceInfos.voltage.toFixed(2)}}V</span>
|
||||
|
@ -58,15 +87,15 @@
|
|||
<view class="">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uBueutMzheLZWktEFWVR" mode=""></image> 续航 {{deviceInfos.remainEndurance == null ? '--' : deviceInfos.remainEndurance}}km
|
||||
</view>
|
||||
<view class="" style="margin-top: 20rpx;">
|
||||
<!-- <view class="" style="margin-top: 20rpx;">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/ur7Q7YC9AOkkTpvaLEUU" mode=""></image> 车型 {{deviceInfos.modelName}}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="ewm">
|
||||
<view class="" @click="generateQrcode()">
|
||||
<!-- <view class="" @click="generateQrcode()">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uiCssXpb4SpuFAQYOp2A" mode=""></image> 二维码
|
||||
</view>
|
||||
<view class="" style="margin-top: 14rpx;" @click="toTrack">
|
||||
</view> -->
|
||||
<view class="" @click="toTrack">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uJtMZ16iR2q8agQ4iLm3" mode=""></image> 轨迹
|
||||
</view>
|
||||
<view class="" style="margin-top: 14rpx;" @click="btndaohang">
|
||||
|
@ -141,11 +170,17 @@
|
|||
</view>
|
||||
修改车型
|
||||
</view>
|
||||
<view class="dangeanniu" @click="yunyingflag = true">
|
||||
<view class="pic">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uZuY3hgJBtCwnSnWTIC3" mode=""></image>
|
||||
</view>
|
||||
划拨
|
||||
</view>
|
||||
<view class="dangeanniu" v-if="Number(deviceInfos.softwareVersion) > 6000" @click="btnjingyin">
|
||||
<view class="pic">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uUJGVRpPIRC34vF7240K" mode=""></image>
|
||||
</view>
|
||||
{{jytxt}}
|
||||
声音
|
||||
</view>
|
||||
<view class="dangeanniu" @click="btn(10)">
|
||||
<view class="pic">
|
||||
|
@ -153,6 +188,12 @@
|
|||
</view>
|
||||
定位更新
|
||||
</view>
|
||||
<view class="dangeanniu" @click="generateQrcode()">
|
||||
<view class="pic">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uQdKTkDuXlwaZT5WFL2l" mode=""></image>
|
||||
</view>
|
||||
二维码
|
||||
</view>
|
||||
<!-- 蓝牙控制 -->
|
||||
<view class="dangeanniu" @click="lanya(1)" v-if="ver_dataflag == 3 && deviceInfos.onlineStatus == 0">
|
||||
<view class="pic">
|
||||
|
@ -179,41 +220,26 @@
|
|||
蓝牙响铃
|
||||
</view>
|
||||
</view>
|
||||
<view class="bikejcxx">
|
||||
<view class="wai">
|
||||
<view class="lt">
|
||||
MAC:<span>{{deviceInfos.mac}}</span>
|
||||
</view>
|
||||
<view class="lt">
|
||||
网络状态:<span v-if="deviceInfos.onlineStatus==0">离线</span><span v-if="deviceInfos.onlineStatus==1">在线</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wai">
|
||||
<view class="lt">
|
||||
车牌号:<span>{{deviceInfos.vehicleNum == null ? '--' : deviceInfos.vehicleNum}}</span>
|
||||
</view>
|
||||
<view class="lt">
|
||||
续航里程:<span>{{deviceInfos.remainEndurance == null ? '--' : deviceInfos.remainEndurance}}km</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wai">
|
||||
<view class="lt">
|
||||
运营区域:<span>{{deviceInfos.areaName}}</span>
|
||||
</view>
|
||||
<view class="lt">
|
||||
4G信号/GPS:<span>{{deviceInfos.signalStrength == null ? '--' : deviceInfos.signalStrength}}/{{deviceInfos.satellites == null ? '--' : deviceInfos.satellites}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zuche">
|
||||
<view class="one">
|
||||
最近租车人:<image src="https://api.ccttiot.com/smartmeter/img/static/uCa86z0tr5WHiymtRJYt" mode=""></image> <span @click="btntel">{{deviceInfos.lastUserPhone == null ? '--' : deviceInfos.lastUserPhone}}</span>
|
||||
</view>
|
||||
<!-- <view class="">
|
||||
最后定位坐标:<span>{{deviceInfos.latitude}},{{deviceInfos.longitude}}</span>
|
||||
</view> -->
|
||||
<view class="">
|
||||
最后定位时间:<span>{{deviceInfos.lastTime == null ? '--' : deviceInfos.lastTime}}</span>
|
||||
运营区域:<span>{{deviceInfos.areaName == null ? '--' : deviceInfos.areaName}}</span>
|
||||
</view>
|
||||
<view class="one">
|
||||
最后租车客户: <span @click="btntel" style="color: #4C97E7;"><image src="https://api.ccttiot.com/smartmeter/img/static/uCa86z0tr5WHiymtRJYt" mode=""></image>{{deviceInfos.lastUserPhone == null ? '--' : deviceInfos.lastUserPhone}}</span>
|
||||
</view>
|
||||
<view class="one" style="display: flex;justify-content: space-between;align-items: center;">
|
||||
最后定位时间:
|
||||
<view class="one" style="margin-bottom: 0;">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uesvOKQAO4eIFWSTIuQD" mode=""></image> {{deviceInfos.satellites == null ? '--' : deviceInfos.satellites}}
|
||||
</view>
|
||||
<span>{{deviceInfos.lastLocationTime == null ? '--' : deviceInfos.lastLocationTime}}</span>
|
||||
</view>
|
||||
<view class="one" style="display: flex;justify-content: space-between;align-items: center;">
|
||||
最后在线时间:
|
||||
<view class="one" style="margin-bottom: 0;">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/u5ouYhbxDvAVM6pImusK" mode=""></image> {{deviceInfos.signalStrength == null ? '--' : deviceInfos.signalStrength}}
|
||||
</view>
|
||||
<span>{{deviceInfos.lastOnlineTime == null ? '--' : deviceInfos.lastOnlineTime}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -275,7 +301,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<u-select v-model="showModelList" :list="ModelList" title='修改车型' @confirm="confirm"></u-select>
|
||||
|
||||
<u-select v-model="yunyingflag" :list="yunyingList" title='修改运营区' @confirm="yunyingconfirm"></u-select>
|
||||
<u-select v-model="shengyin" :list="shengyinlist" title='修改声音' @confirm="shengyinaniu"></u-select>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -289,6 +315,7 @@
|
|||
return {
|
||||
shengyin:false,
|
||||
shengyinlist:[{label:'静音',value:0},{label:'语音',value:1},{label:'彩铃',value:2}],
|
||||
|
||||
devicesList: [],
|
||||
searching: false,
|
||||
texts: '正在扫描蓝牙设备...',
|
||||
|
@ -350,6 +377,8 @@
|
|||
deptId: null,
|
||||
showModelList: false,
|
||||
ModelList: [],
|
||||
yunyingflag: false,
|
||||
yunyingList: [],
|
||||
jytxt: '',
|
||||
|
||||
ver_dataflag: 1,
|
||||
|
@ -366,6 +395,7 @@
|
|||
this.deptId = uni.getStorageSync('deptId');
|
||||
},
|
||||
onShow() {
|
||||
this.getyunying()
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
'isStart': true
|
||||
})
|
||||
|
@ -383,6 +413,17 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 请求自己所有运营区
|
||||
getyunying(){
|
||||
this.$u.get(`/bst/area/list?pageNum=1&pageSize=999`).then(res =>{
|
||||
if(res.code == 200){
|
||||
this.yunyingList = res.rows.map(item => ({
|
||||
value: item.id,
|
||||
label: item.name
|
||||
}))
|
||||
}
|
||||
})
|
||||
},
|
||||
// 点击拨打最近租车人电话
|
||||
btntel(){
|
||||
uni.makePhoneCall({
|
||||
|
@ -397,9 +438,10 @@
|
|||
},
|
||||
// 选择彩铃
|
||||
shengyinaniu(e){
|
||||
this.$u.put(`/bst/device/iot/music?sn=${this.sn}&music=${e[0].value}`).then(res => {
|
||||
this.$u.put(`/bst/device/iot/music?id=${this.sn}&music=${e[0].value}`).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.jytxt = e[0].label
|
||||
this.deviceInfos.music = e[0].value
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
|
@ -526,6 +568,32 @@
|
|||
console.log('diaoyongle')
|
||||
this.showModelList = true
|
||||
},
|
||||
// 修改运营区
|
||||
yunyingconfirm(e){
|
||||
let areaId = e[0].value
|
||||
let data = {
|
||||
ids: [this.sn],
|
||||
areaId: areaId
|
||||
}
|
||||
this.$u.put('/bst/device/transfer', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.showModelList = false
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 修改车型
|
||||
confirm(e) {
|
||||
let modelId = e[0].value
|
||||
let data = {
|
||||
|
@ -1308,13 +1376,15 @@
|
|||
}
|
||||
span{
|
||||
font-size: 28rpx;
|
||||
color: #4C97E7;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
view{
|
||||
font-size: 28rpx;
|
||||
color: #808080;
|
||||
margin-bottom: 26rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
span{
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
@ -1355,9 +1425,9 @@
|
|||
margin: auto;
|
||||
margin-bottom: 14rpx;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-top: 28rpx;
|
||||
width: 42rpx;
|
||||
height: 42rpx;
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1386,22 +1456,48 @@
|
|||
.xuhang{
|
||||
view{
|
||||
width: 284rpx;
|
||||
height: 70rpx;
|
||||
height: 102rpx;
|
||||
background: #F1F1F1;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
font-size: 30rpx;
|
||||
color: #3D3D3D;
|
||||
padding-left: 18rpx;
|
||||
box-sizing: border-box;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
margin-right: 14rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bikesn{
|
||||
font-size: 24rpx;
|
||||
color: #7C7C7C;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1rpx solid #D8D8D8;
|
||||
padding-bottom: 26rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.cent{
|
||||
display: flex;
|
||||
|
||||
.lypic{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
margin-right: 22rpx;
|
||||
image{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bikexx{
|
||||
margin-top: 26rpx;
|
||||
display: flex;
|
||||
|
@ -1411,11 +1507,17 @@
|
|||
box-sizing: border-box;
|
||||
.dianliang{
|
||||
position: relative;
|
||||
background: linear-gradient(to right, #c0dfff, #fff);
|
||||
border-radius: 10rpx;
|
||||
.dl{
|
||||
margin-top: 66rpx;
|
||||
margin-top: 10rpx;
|
||||
padding-left: 52rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.dy{
|
||||
margin-top: 2rpx;
|
||||
padding-left: 52rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
view{
|
||||
padding-left: 14rpx;
|
||||
|
@ -1428,38 +1530,26 @@
|
|||
}
|
||||
image{
|
||||
position: absolute;
|
||||
width: 222rpx;
|
||||
height: 160rpx;
|
||||
z-index: -1;
|
||||
width: 22rpx;
|
||||
height: 48rpx;
|
||||
left: 20rpx;
|
||||
top: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.topsn{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1rpx solid #D8D8D8;
|
||||
padding-bottom: 26rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
.lt{
|
||||
font-weight: 600;
|
||||
font-size: 32rpx;
|
||||
font-size: 30rpx;
|
||||
color: #3D3D3D;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.lypic{
|
||||
background-color: #ccc;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-left: 10rpx;
|
||||
text-align: center;
|
||||
padding-top: 8rpx;
|
||||
border-radius: 6rpx;
|
||||
box-sizing: border-box;
|
||||
image{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.rt{
|
||||
display: flex;
|
||||
|
|
|
@ -74,11 +74,11 @@
|
|||
时间范围
|
||||
</view>
|
||||
<view class="inptime">
|
||||
<view class="" @click="oneshow = true">
|
||||
<view class="" @click="showTimePicker('start')">
|
||||
{{kstime}}
|
||||
</view>
|
||||
--
|
||||
<view class="" @click="twoshow = true">
|
||||
<view class="" @click="showTimePicker('end')">
|
||||
{{jstime}}
|
||||
</view>
|
||||
</view>
|
||||
|
@ -523,6 +523,13 @@
|
|||
// 点击切换tab
|
||||
btntab(num){
|
||||
this.index = num
|
||||
},
|
||||
showTimePicker(type) {
|
||||
if(type === 'start') {
|
||||
this.oneshow = true
|
||||
} else {
|
||||
this.twoshow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,8 @@
|
|||
let data = {
|
||||
orderId:this.orderId,
|
||||
lon:this.lon,
|
||||
lat:this.lat
|
||||
lat:this.lat,
|
||||
checkLocation:true
|
||||
}
|
||||
this.$u.post(`/app/order/calcFee`,data).then(res =>{
|
||||
if(res.code == 200){
|
||||
|
|
|
@ -271,7 +271,8 @@ export default {
|
|||
// 计算订单费用
|
||||
getfeiyong(){
|
||||
let data = {
|
||||
orderId:this.orderid
|
||||
orderId:this.orderid,
|
||||
checkLocation:true
|
||||
}
|
||||
this.$u.post(`/app/order/calcFee`,data).then(res =>{
|
||||
if(res.code == 200){
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar title="订单详情" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' height='45' back-icon-color='#000'></u-navbar>
|
||||
|
||||
<view class="jiaoyi">
|
||||
<view class="pic">
|
||||
<image src="https://api.ccttiot.com/smartmeter/img/static/uiXte3LpSV30jyvTUR2R" mode=""></image>
|
||||
|
@ -102,6 +101,14 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="xuxian" style="border: 0;">
|
||||
<view class="one" v-if="info.status == 'PROCESSING'">
|
||||
<view class="qian">
|
||||
预估金额
|
||||
</view>
|
||||
<view class="shen">
|
||||
<span style="color: #E7612E;font-size: 40rpx;">{{yugumoney}}</span>元
|
||||
</view>
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="qian">
|
||||
实付金额
|
||||
|
@ -129,9 +136,12 @@
|
|||
<view class="qian">
|
||||
骑行距离
|
||||
</view>
|
||||
<view class="shen">
|
||||
<view class="shen" v-if="info.status != 'PROCESSING'">
|
||||
{{info.distance > 1000 ? (info.distance / 1000).toFixed(2) + 'km' : info.distance.toFixed(2) + 'm'}}
|
||||
</view>
|
||||
<view class="shen" v-else>
|
||||
订单结束后展示
|
||||
</view>
|
||||
</view>
|
||||
<view class="one">
|
||||
<view class="qian">
|
||||
|
@ -203,13 +213,27 @@
|
|||
rideDuration: '' ,// 新增属性用于存储骑行时间
|
||||
kefulist:[],
|
||||
kefuflag:false,
|
||||
yugumoney:''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.id
|
||||
this.orderInfo()
|
||||
this.getyugu()
|
||||
},
|
||||
methods: {
|
||||
// 请求预估金额
|
||||
getyugu() {
|
||||
let data = {
|
||||
orderId:this.id,
|
||||
checkLocation:false
|
||||
}
|
||||
this.$u.post(`/app/order/calcFee`,data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.yugumoney = res.data.ridingFee
|
||||
}
|
||||
})
|
||||
},
|
||||
// 请求订单详情
|
||||
orderInfo() {
|
||||
this.$u.get("/app/order/mineDetail?id=" + this.id).then((res) => {
|
||||
|
@ -221,22 +245,33 @@
|
|||
},
|
||||
// 计算骑行时间
|
||||
calculateRideDuration() {
|
||||
const createTime = new Date(this.info.startTime)
|
||||
let returnTime = ''
|
||||
if(this.info.endTime == null){
|
||||
returnTime = new Date()
|
||||
}else{
|
||||
returnTime = new Date(this.info.endTime)
|
||||
}
|
||||
console.log(returnTime,'0202020');
|
||||
const duration = (returnTime - createTime) / 1000// 时间差,单位秒
|
||||
const hours = Math.floor(duration / 3600)
|
||||
const minutes = Math.floor((duration % 3600) / 60)
|
||||
const seconds = Math.floor(duration % 60)
|
||||
if (hours > 0) {
|
||||
this.rideDuration = `${hours}小时${minutes}分${seconds}秒`
|
||||
} else {
|
||||
this.rideDuration = `${minutes}分${seconds}秒`
|
||||
if(this.info.startTime != null){
|
||||
const createTime = new Date(this.info.startTime)
|
||||
let returnTime = ''
|
||||
if(this.info.status === 'PROCESSING'){
|
||||
// 进行中订单,计算到当前时间
|
||||
returnTime = new Date()
|
||||
const duration = (returnTime - createTime) / 1000 // 时间差,单位秒
|
||||
const hours = Math.floor(duration / 3600)
|
||||
const minutes = Math.floor((duration % 3600) / 60)
|
||||
if (hours > 0) {
|
||||
this.rideDuration = `${hours}小时${minutes}分`
|
||||
} else {
|
||||
this.rideDuration = `${minutes}分`
|
||||
}
|
||||
} else if(this.info.endTime != null){
|
||||
// 非进行中订单,计算到结束时间
|
||||
returnTime = new Date(this.info.endTime)
|
||||
const duration = (returnTime - createTime) / 1000 // 时间差,单位秒
|
||||
const hours = Math.floor(duration / 3600)
|
||||
const minutes = Math.floor((duration % 3600) / 60)
|
||||
const seconds = Math.floor(duration % 60)
|
||||
if (hours > 0) {
|
||||
this.rideDuration = `${hours}小时${minutes}分${seconds}秒`
|
||||
} else {
|
||||
this.rideDuration = `${minutes}分${seconds}秒`
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 点击拨打平台客服电话
|
||||
|
|
13
pages/my.vue
13
pages/my.vue
|
@ -228,15 +228,15 @@
|
|||
}
|
||||
},
|
||||
selectItem(item) {
|
||||
this.confirm(item);
|
||||
this.show = false;
|
||||
this.searchKey = ''; // 选择后清空搜索框
|
||||
this.displayList = this.list; // 重置显示列表
|
||||
this.confirm(item)
|
||||
this.show = false
|
||||
this.searchKey = '' // 选择后清空搜索框
|
||||
this.displayList = this.list // 重置显示列表
|
||||
},
|
||||
// 选择好运营区
|
||||
confirm(e) {
|
||||
console.log(e,e[0].value);
|
||||
uni.setStorageSync('adminAreaid', e[0].value);
|
||||
console.log(e,e[0].value)
|
||||
uni.setStorageSync('adminAreaid', e[0].value)
|
||||
uni.navigateTo({
|
||||
url: `/page_shanghu/guanli/admin_worke?id=${e[0].value}`
|
||||
})
|
||||
|
@ -245,6 +245,7 @@
|
|||
getareaList() {
|
||||
this.$u.get("/getInfo").then(res =>{
|
||||
if(res.code == 200){
|
||||
this.logoflag = false
|
||||
this.user = res.user
|
||||
this.adminflag = res.user.admin
|
||||
if(res.roles != null || res.roles.length > 0){
|
||||
|
|
|
@ -93,10 +93,16 @@
|
|||
<view class="">
|
||||
<text>开始时间:</text> {{item.startTime == null ? '--' : item.startTime}}
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" v-if="item.status == 'PROCESSING'">
|
||||
<text>已骑行:</text> {{computeTimeDiff(item.startTime)}}
|
||||
</view>
|
||||
<view class="" v-if="item.status != 'PROCESSING'">
|
||||
<text>时长:</text> {{computedList(item.duration)}}
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="" v-if="item.status == 'PROCESSING'">
|
||||
<text>距离:</text> 订单结束后展示
|
||||
</view>
|
||||
<view class="" v-if="item.status != 'PROCESSING'">
|
||||
<text>距离:</text> {{item.distance > 1000 ? (item.distance / 1000).toFixed(2) + 'km' : item.distance.toFixed(2) + 'm'}}
|
||||
</view>
|
||||
<view class="" v-if="item.status == 'WAIT_VERIFY'">
|
||||
|
@ -174,6 +180,22 @@
|
|||
if (showSeconds) parts.push(`${s}秒`)
|
||||
return parts.join("") || "0钟"
|
||||
},
|
||||
// 计算开始时间到现在的时间差
|
||||
computeTimeDiff(startTime) {
|
||||
if (!startTime) return '--';
|
||||
const start = new Date(startTime);
|
||||
const now = new Date();
|
||||
const diff = Math.floor((now - start) / 1000); // 转换为秒
|
||||
|
||||
const hours = Math.floor(diff / 3600);
|
||||
const minutes = Math.floor((diff % 3600) / 60);
|
||||
|
||||
let result = '';
|
||||
if (hours > 0) result += `${hours}时`;
|
||||
if (minutes > 0 || hours > 0) result += `${minutes}分`;
|
||||
|
||||
return result || '0分';
|
||||
},
|
||||
// 请求订单列表
|
||||
getlist(){
|
||||
this.$u.get(`/app/order/mineList?pageNum=${this.pageNum}&pageSize=10&suitType=${this.activeindex}&status=${this.status}&isAsc=desc&orderByColumn=createTime`).then((res) => {
|
||||
|
@ -210,6 +232,7 @@
|
|||
url:'/page_fenbao/orderxq'
|
||||
})
|
||||
},
|
||||
|
||||
// 滚动骑行订单到底部分页请求
|
||||
handqixing() {
|
||||
if(this.total > this.qixinglist.length){
|
||||
|
|
|
@ -489,9 +489,7 @@
|
|||
},
|
||||
// 点击鸣笛寻车
|
||||
btnfm() {
|
||||
// xBlufi.notifySendCustomData({
|
||||
// customData: "11play1@"
|
||||
// })
|
||||
|
||||
this.$u.put(`/app/device/iot/ring?id=${this.deivceobj.deviceId}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
|
@ -572,7 +570,8 @@
|
|||
let data = {
|
||||
orderId: this.deivceobj.orderId,
|
||||
lon: this.lat,
|
||||
lat: this.lon
|
||||
lat: this.lon,
|
||||
checkLocation:true
|
||||
}
|
||||
this.$u.post(`/app/order/calcFee`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -1142,9 +1141,6 @@
|
|||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #437fec;
|
||||
// border-bottom: 1px solid #437fec;
|
||||
// padding-bottom: 4rpx;
|
||||
// box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ck {
|
||||
|
@ -1298,7 +1294,7 @@
|
|||
}
|
||||
|
||||
.bj {
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
|
|
|
@ -274,13 +274,26 @@
|
|||
|
||||
count: 0,
|
||||
timer: null,
|
||||
user:{}
|
||||
user:{},
|
||||
xllat:'',
|
||||
xllng:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
console.log(res,'1212121');
|
||||
this.xllat = res.latitude
|
||||
this.xllng = res.longitude
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('获取位置失败:', err)
|
||||
}
|
||||
})
|
||||
this.getAone()
|
||||
this.covers = []
|
||||
this.sockedata = ''
|
||||
|
@ -494,7 +507,8 @@
|
|||
let data = {
|
||||
orderId: this.orderobj.orderId,
|
||||
lon: this.latsc,
|
||||
lat: this.lonsc
|
||||
lat: this.lonsc,
|
||||
checkLocation:true
|
||||
}
|
||||
this.$u.post(`/app/order/calcFee`, data).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
@ -627,7 +641,7 @@
|
|||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('取消'); // 用户点击取消
|
||||
console.log('取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -669,7 +683,7 @@
|
|||
}
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('取消'); // 用户点击取消
|
||||
console.log('取消')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -700,7 +714,7 @@
|
|||
this.orderAreaId = ''
|
||||
this.orderflag = false
|
||||
this.newMarkers = ''
|
||||
console.log(this.covers);
|
||||
console.log(this.covers)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -719,7 +733,7 @@
|
|||
} else if (id.slice(-1) == 2) {
|
||||
console.log('车辆')
|
||||
if (this.orderAreaId == '') {
|
||||
this.covers.filter(item => {
|
||||
this.covers.filter(item => {
|
||||
if (item.id == id) {
|
||||
item.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/uCBNaRAdk9kcgQgrom2G'
|
||||
this.taocanflag = true
|
||||
|
@ -783,7 +797,7 @@
|
|||
},
|
||||
// 点击响铃寻车
|
||||
btnxlxc() {
|
||||
this.$u.put(`/app/device/iot/ring?id=${this.cheobj.id}`).then((res) => {
|
||||
this.$u.put(`/app/device/iot/ring?id=${this.cheobj.id}&lat=${this.xllat}&lon=${this.xllng}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
|
@ -906,7 +920,6 @@
|
|||
this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/upX2lLilhrRi4tttdHlo'
|
||||
} else if (this.rtindex == 2) {
|
||||
this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/uX0FBv86yDIR5tIqjoe2'
|
||||
// this.iconPath = 'https://api.ccttiot.com/smartmeter/img/static/uX0FBv86yDIR5tIqjoe2'
|
||||
this.$u.get(`/app/device/listNearBy?radius=10000¢er=${this.jingweidu}&areaId=${this.user.areaId == undefined ? null : this.user.areaId}`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.covers = []
|
||||
|
@ -931,7 +944,7 @@
|
|||
height: 40,
|
||||
iconPath: this.iconPath,
|
||||
callout: {
|
||||
content: '' + item.vehicleNum, // 修改为你想要显示的文字内容
|
||||
content: item.vehicleNum == null ? item.sn : '' + item.vehicleNum, // 修改为你想要显示的文字内容
|
||||
color: '#0D75E5', // 修改为文字颜色
|
||||
fontSize: 10, // 修改为文字大小
|
||||
borderRadius: 10, // 修改为气泡圆角大小
|
||||
|
|
Loading…
Reference in New Issue
Block a user