小鹿
This commit is contained in:
parent
da818eb65d
commit
bd16e1bb2e
|
|
@ -8,7 +8,7 @@ const install = (Vue, vm) => {
|
||||||
// baseUrl:'https://ysd.chuantewulian.cn/prod-api', //嵛山岛线上api 嵛山岛appid:wx4d178f8c80348214
|
// baseUrl:'https://ysd.chuantewulian.cn/prod-api', //嵛山岛线上api 嵛山岛appid:wx4d178f8c80348214
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 10000,
|
loadingTime: 10000,
|
||||||
// 设置自定义头部content-type
|
// 设置自定义头部content-type
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/json;charset=UTF-8',
|
'content-type': 'application/json;charset=UTF-8',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -644,7 +644,8 @@
|
||||||
kefulist: [],
|
kefulist: [],
|
||||||
respData:{},
|
respData:{},
|
||||||
instructions:'',
|
instructions:'',
|
||||||
duoirder:''
|
duoirder:'',
|
||||||
|
zaixianflag:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
|
@ -718,6 +719,8 @@
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.modelId = option.modelId
|
this.modelId = option.modelId
|
||||||
this.chesn = option.sn
|
this.chesn = option.sn
|
||||||
|
this.sn = option.sn
|
||||||
|
this.getzaixian() //判断是否在线
|
||||||
this.getQiniuToken()
|
this.getQiniuToken()
|
||||||
this.gettaocan()
|
this.gettaocan()
|
||||||
this.getcheliang()
|
this.getcheliang()
|
||||||
|
|
@ -805,6 +808,7 @@
|
||||||
this.mac = res.data.mac
|
this.mac = res.data.mac
|
||||||
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
||||||
this.modelId = res.data.modelId
|
this.modelId = res.data.modelId
|
||||||
|
this.getzaixian() //判断是否在线
|
||||||
this.getcheliang()
|
this.getcheliang()
|
||||||
this.getQiniuToken()
|
this.getQiniuToken()
|
||||||
this.gettaocan()
|
this.gettaocan()
|
||||||
|
|
@ -837,6 +841,34 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 判断车辆是否在线
|
||||||
|
getzaixian(){
|
||||||
|
this.$u.put(`/app/device/iot/uploadData?sn=${this.sn}`).then(res =>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.zaixianflag = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let that = this
|
||||||
|
const findDevice = () =>{
|
||||||
|
const matchedDevice = that.devicesarr.find(device => {
|
||||||
|
return device.name.slice(-12) == that.mac.slice(-12)
|
||||||
|
})
|
||||||
|
if (matchedDevice) {
|
||||||
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
'isStart': false
|
||||||
|
})
|
||||||
|
that.zaixianflag = true
|
||||||
|
} else {
|
||||||
|
if(that.shibainum < 3){
|
||||||
|
that.shibainum++
|
||||||
|
that.findDeviceTimer = setTimeout(findDevice.bind(that), 1000) // 使用 bind 保持 this 上下文
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
findDevice()
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 点击跳转到最近还车点
|
// 点击跳转到最近还车点
|
||||||
btntcd() {
|
btntcd() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
@ -1258,6 +1290,21 @@
|
||||||
},
|
},
|
||||||
// 点击进行支付
|
// 点击进行支付
|
||||||
btnzhifu() {
|
btnzhifu() {
|
||||||
|
if(this.zaixianflag == false){
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '当前车辆不可用',
|
||||||
|
showCancel: true,
|
||||||
|
success: function(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
|
||||||
|
} else if (res.cancel) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if(this.jiance == true){
|
if(this.jiance == true){
|
||||||
xBlufi.initXBlufi(1)
|
xBlufi.initXBlufi(1)
|
||||||
xBlufi.notifyStartDiscoverBle({
|
xBlufi.notifyStartDiscoverBle({
|
||||||
|
|
|
||||||
|
|
@ -50,19 +50,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view v-if="txlist.length == 0" class="wutx" style="width: 100%;margin-top: 30rpx;text-align: center;">
|
|
||||||
<view class="" style="font-size: 32rpx;">
|
|
||||||
当前暂无提现方式
|
|
||||||
</view>
|
|
||||||
<view class="addtj" @click="btnadd">
|
|
||||||
去添加
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-else class="wutx" style="width: 100%;margin-top: 30rpx;text-align: center;">
|
|
||||||
<view class="addtj" @click="btnadd">
|
|
||||||
添加更多收款方式
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="ipt_box">
|
<view class="ipt_box">
|
||||||
|
|
|
||||||
|
|
@ -1886,12 +1886,12 @@
|
||||||
duration:5000
|
duration:5000
|
||||||
})
|
})
|
||||||
}else if(err.errMsg == 'openBluetoothAdapter:fail:not available'){
|
}else if(err.errMsg == 'openBluetoothAdapter:fail:not available'){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请检查手机蓝牙是否打开',
|
title: '请检查手机蓝牙是否打开',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration:5000
|
duration:5000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -1944,12 +1944,12 @@
|
||||||
duration:5000
|
duration:5000
|
||||||
})
|
})
|
||||||
}else if(err.errMsg == 'openBluetoothAdapter:fail:not available'){
|
}else if(err.errMsg == 'openBluetoothAdapter:fail:not available'){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请检查手机蓝牙是否打开',
|
title: '请检查手机蓝牙是否打开',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration:5000
|
duration:5000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -2682,7 +2682,7 @@
|
||||||
orderId: that.orderobj.orderId,
|
orderId: that.orderobj.orderId,
|
||||||
lat: that.lslat,
|
lat: that.lslat,
|
||||||
lon: that.lslon,
|
lon: that.lslon,
|
||||||
requiredIot: true,
|
requiredIot: false,
|
||||||
macList:that.scdevlist,
|
macList:that.scdevlist,
|
||||||
bltRemark:that.bltRemark
|
bltRemark:that.bltRemark
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user