小鹿
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
|
||||
loadingText: '努力加载中~',
|
||||
loadingTime: 10000,
|
||||
// 设置自定义头部content-type
|
||||
// 设置自定义头部content-type
|
||||
header: {
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -644,7 +644,8 @@
|
|||
kefulist: [],
|
||||
respData:{},
|
||||
instructions:'',
|
||||
duoirder:''
|
||||
duoirder:'',
|
||||
zaixianflag:false
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
|
@ -718,6 +719,8 @@
|
|||
uni.hideLoading()
|
||||
this.modelId = option.modelId
|
||||
this.chesn = option.sn
|
||||
this.sn = option.sn
|
||||
this.getzaixian() //判断是否在线
|
||||
this.getQiniuToken()
|
||||
this.gettaocan()
|
||||
this.getcheliang()
|
||||
|
|
@ -805,6 +808,7 @@
|
|||
this.mac = res.data.mac
|
||||
this.areaNeedCheckVideo = res.data.areaNeedCheckVideo
|
||||
this.modelId = res.data.modelId
|
||||
this.getzaixian() //判断是否在线
|
||||
this.getcheliang()
|
||||
this.getQiniuToken()
|
||||
this.gettaocan()
|
||||
|
|
@ -837,6 +841,34 @@
|
|||
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
|
|
@ -1258,6 +1290,21 @@
|
|||
},
|
||||
// 点击进行支付
|
||||
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){
|
||||
xBlufi.initXBlufi(1)
|
||||
xBlufi.notifyStartDiscoverBle({
|
||||
|
|
|
|||
|
|
@ -50,19 +50,6 @@
|
|||
</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 class="ipt_box">
|
||||
|
|
|
|||
|
|
@ -1886,12 +1886,12 @@
|
|||
duration:5000
|
||||
})
|
||||
}else if(err.errMsg == 'openBluetoothAdapter:fail:not available'){
|
||||
uni.showToast({
|
||||
title: '请检查手机蓝牙是否打开',
|
||||
icon: 'none',
|
||||
duration:5000
|
||||
})
|
||||
}
|
||||
uni.showToast({
|
||||
title: '请检查手机蓝牙是否打开',
|
||||
icon: 'none',
|
||||
duration:5000
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -1944,12 +1944,12 @@
|
|||
duration:5000
|
||||
})
|
||||
}else if(err.errMsg == 'openBluetoothAdapter:fail:not available'){
|
||||
uni.showToast({
|
||||
title: '请检查手机蓝牙是否打开',
|
||||
icon: 'none',
|
||||
duration:5000
|
||||
})
|
||||
}
|
||||
uni.showToast({
|
||||
title: '请检查手机蓝牙是否打开',
|
||||
icon: 'none',
|
||||
duration:5000
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -2682,7 +2682,7 @@
|
|||
orderId: that.orderobj.orderId,
|
||||
lat: that.lslat,
|
||||
lon: that.lslon,
|
||||
requiredIot: true,
|
||||
requiredIot: false,
|
||||
macList:that.scdevlist,
|
||||
bltRemark:that.bltRemark
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user