小鹿骑行
This commit is contained in:
parent
b465d27040
commit
2350478404
|
@ -1,7 +1,7 @@
|
|||
const install = (Vue, vm) => {
|
||||
uni.setStorageSync('deptId', 100);
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
// baseUrl: 'http://192.168.160.197:4101', //键辉本地
|
||||
// baseUrl: 'http://192.168.2.89:4101', //键辉本地
|
||||
// baseUrl: 'http://192.168.0.102:4101', //景森本地
|
||||
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上
|
||||
// baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上
|
||||
|
|
|
@ -484,6 +484,7 @@
|
|||
huiyuanlist:[],
|
||||
huiyuanobj:{},
|
||||
zfflag:true,
|
||||
jieliuflag:true
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
|
@ -911,113 +912,119 @@
|
|||
},
|
||||
// 点击进行支付
|
||||
btnzhifu() {
|
||||
if(this.bikeobj.onlineStatus == 0){
|
||||
if(this.ver_dataflag == 3){
|
||||
this.getlyzf()
|
||||
}else{
|
||||
uni.showLoading({
|
||||
title: '车辆连接中...',
|
||||
mask: true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
if(this.ver_dataflag == 3){
|
||||
uni.hideLoading()
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '连接失败,是否重新连接?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.btnzhifu()
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},10000)
|
||||
}
|
||||
}else{
|
||||
if (this.bikeobj.areaAuthentication == true) { //判断是否需要实名认证
|
||||
this.$u.get("/getInfo").then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.user.isReal == false) { //未实名需要去实名才能进行下单
|
||||
if(this.jieliuflag == true){
|
||||
this.jieliuflag = false
|
||||
if(this.bikeobj.onlineStatus == 0){
|
||||
if(this.ver_dataflag == 3){
|
||||
this.getlyzf()
|
||||
}else{
|
||||
uni.showLoading({
|
||||
title: '车辆连接中...',
|
||||
mask: true
|
||||
})
|
||||
setTimeout(()=>{
|
||||
if(this.ver_dataflag == 3){
|
||||
uni.hideLoading()
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您当前还未实名认证,是否前去实名认证?',
|
||||
content: '连接失败,是否重新连接?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/page_user/shiming'
|
||||
})
|
||||
that.btnzhifu()
|
||||
} else if (res.cancel) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
if (this.checked == false) {
|
||||
let that = this
|
||||
}
|
||||
},10000)
|
||||
}
|
||||
}else{
|
||||
if (this.bikeobj.areaAuthentication == true) { //判断是否需要实名认证
|
||||
this.$u.get("/getInfo").then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.user.isReal == false) { //未实名需要去实名才能进行下单
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您是否已经阅读完,并且同意此《电动车租赁协议》?',
|
||||
content: '您当前还未实名认证,是否前去实名认证?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.checked = true
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
uni.navigateTo({
|
||||
url: '/page_user/shiming'
|
||||
})
|
||||
that.getzf()
|
||||
uni.hideLoading()
|
||||
} else if (res.cancel) {
|
||||
console.log('取消') // 用户点击取消
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
}else{
|
||||
if (this.checked == false) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您是否已经阅读完,并且同意此《电动车租赁协议》?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.checked = true
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
that.getzf()
|
||||
uni.hideLoading()
|
||||
} else if (res.cancel) {
|
||||
console.log('取消') // 用户点击取消
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
this.getzf()
|
||||
}
|
||||
}
|
||||
}else if(res.code == 401){
|
||||
this.logoflag = true
|
||||
}
|
||||
})
|
||||
} else if (this.checked == false) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您是否已经阅读完,并且同意此《电动车租赁协议》?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.checked = true
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
this.getzf()
|
||||
that.getzf()
|
||||
} else if (res.cancel) {
|
||||
console.log('取消') // 用户点击取消
|
||||
}
|
||||
}
|
||||
}else if(res.code == 401){
|
||||
this.logoflag = true
|
||||
}
|
||||
})
|
||||
} else if (this.checked == false) {
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您是否已经阅读完,并且同意此《电动车租赁协议》?',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.checked = true
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
that.getzf()
|
||||
} else if (res.cancel) {
|
||||
console.log('取消') // 用户点击取消
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
this.getzf()
|
||||
})
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
this.getzf()
|
||||
}
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},5000)
|
||||
}
|
||||
},
|
||||
// 蓝牙支付
|
||||
|
|
|
@ -478,7 +478,6 @@
|
|||
const power = device.remainingPower
|
||||
return power >= minPower && power <= maxPower
|
||||
})
|
||||
|
||||
// 重置状态数组
|
||||
this.status0 = []
|
||||
this.status1 = []
|
||||
|
@ -488,7 +487,6 @@
|
|||
this.status8 = []
|
||||
this.status9 = []
|
||||
this.status6 = []
|
||||
|
||||
// 重新分类设备
|
||||
this.listData.forEach(item => {
|
||||
if (item.status == 0) {
|
||||
|
@ -509,7 +507,6 @@
|
|||
this.status9.push(item)
|
||||
}
|
||||
})
|
||||
|
||||
// 更新地图标记
|
||||
this.markers = []
|
||||
this.markstause()
|
||||
|
@ -533,7 +530,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
getArea() {
|
||||
let id = this.areaId
|
||||
this.$u.get(`/bst/area/${id}`).then((res) => { //查询停车列表
|
||||
|
@ -679,9 +675,7 @@
|
|||
width: 30,
|
||||
height: 34,
|
||||
// joinCluster: true,
|
||||
iconPath: item.onlineStatus == 0 ?
|
||||
'https://lxnapi.ccttiot.com/bike/img/static/uG13E7BpUFF44wVYC9no' :
|
||||
'https://lxnapi.ccttiot.com/bike/img/static/uHQIdWCTmtUztl49wBKU',
|
||||
iconPath: item.onlineStatus == 0 ? 'https://lxnapi.ccttiot.com/bike/img/static/uG13E7BpUFF44wVYC9no' : 'https://lxnapi.ccttiot.com/bike/img/static/uHQIdWCTmtUztl49wBKU',
|
||||
callout: {
|
||||
content: '' + parseInt(item.remainingPower) + '%', // 修改为你想要显示的文字内容
|
||||
color: '#2679D1', // 修改为文字颜色
|
||||
|
@ -702,9 +696,7 @@
|
|||
width: 30,
|
||||
height: 34,
|
||||
// joinCluster: true,
|
||||
iconPath: item.onlineStatus == 0 ?
|
||||
'https://lxnapi.ccttiot.com/bike/img/static/uRod2zf3t9dAOYafWoWt' :
|
||||
'https://lxnapi.ccttiot.com/bike/img/static/uZpXq3TBtM5gVgJJeImY',
|
||||
iconPath: item.onlineStatus == 0 ? 'https://lxnapi.ccttiot.com/bike/img/static/uRod2zf3t9dAOYafWoWt' : 'https://lxnapi.ccttiot.com/bike/img/static/uZpXq3TBtM5gVgJJeImY',
|
||||
callout: {
|
||||
content: '' + parseInt(item.remainingPower) + '%', // 修改为你想要显示的文字内容
|
||||
color: '#2679D1', // 修改为文字颜色
|
||||
|
@ -794,13 +786,11 @@
|
|||
this.status8 = []
|
||||
this.status9 = []
|
||||
this.status6 = []
|
||||
|
||||
// 如果已经有数据,直接使用本地筛选
|
||||
if (this.allDeviceData.length > 0) {
|
||||
this.filterDevicesByPowerRange()
|
||||
return
|
||||
}
|
||||
|
||||
if (this.statusidx != 7 && this.statusidx != 20 && this.statusidx != 10) {
|
||||
this.$u.get(`/bst/device/all?areaId=${this.areaId}&status=${this.statusidx}&powerRange=${this.rangeValue[0] + ',' + this.rangeValue[1]}&refresh=true`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
|
@ -915,7 +905,7 @@
|
|||
},
|
||||
// 计算两点间的距离
|
||||
calculateDistance(lat1, lon1, lat2, lon2) {
|
||||
const p = 0.017453292519943295; // Math.PI / 180
|
||||
const p = 0.017453292519943295 // Math.PI / 180
|
||||
const c = Math.cos;
|
||||
const a = 0.5 - c((lat2 - lat1) * p) / 2 +
|
||||
c(lat1 * p) * c(lat2 * p) *
|
||||
|
@ -948,7 +938,7 @@
|
|||
} else if (row.type == 3) {
|
||||
type3Data.push(row)
|
||||
}
|
||||
console.log(row,'121212');
|
||||
console.log(row,'121212')
|
||||
newMarkers.push({
|
||||
id: row.id,
|
||||
latitude: row.latitude,
|
||||
|
@ -967,7 +957,7 @@
|
|||
},
|
||||
isParking: true
|
||||
})
|
||||
console.log(newMarkers,'newMarkersnewMarkersnewMarkers');
|
||||
console.log(newMarkers,'newMarkersnewMarkersnewMarkers')
|
||||
})
|
||||
this.$set(this, 'markers', [...this.markers, ...newMarkers])
|
||||
const validBoundaries1 = type1Data.map(row => row.boundaryStr).filter(boundary =>
|
||||
|
@ -985,7 +975,7 @@
|
|||
}
|
||||
}).catch(error => {
|
||||
console.error("22222", error)
|
||||
});
|
||||
})
|
||||
},
|
||||
convertBoundaryToPolyline(boundary) {
|
||||
if (!boundary) return null
|
||||
|
@ -1032,33 +1022,27 @@
|
|||
background: #FFFFFF80;
|
||||
border-radius: 0 40rpx 40rpx 0;
|
||||
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.3);
|
||||
|
||||
.scrollable-content::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.scrollable-content {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
.divce_li:last-child {
|
||||
border-bottom: 1rpx solid #fff;
|
||||
}
|
||||
|
||||
.divce_li {
|
||||
padding: 10rpx 0;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #D8D8D8;
|
||||
|
||||
.left_img {
|
||||
image {
|
||||
width: 44rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right_cont {
|
||||
margin-left: 20rpx;
|
||||
display: flex;
|
||||
|
@ -1066,29 +1050,23 @@
|
|||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
|
||||
.right_top {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
.right_top_left {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
margin-right: 6rpx;
|
||||
width: 12rpx;
|
||||
height: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.right_top_right {}
|
||||
}
|
||||
|
||||
.right_bot {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
@ -1100,23 +1078,18 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.decice_cont {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
padding: 10rpx 28rpx;
|
||||
|
||||
.cont:nth-child(5n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.cont {
|
||||
margin-top: 8rpx;
|
||||
margin-right: 9rpx;
|
||||
// display: flex;
|
||||
width: 130rpx;
|
||||
|
||||
.text {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
@ -1125,7 +1098,6 @@
|
|||
line-height: 38rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
|
||||
.act1 {
|
||||
color: #4C97E7;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
<cover-image class="img" src="https://lxnapi.ccttiot.com/bike/img/static/uRiYQZQEb3l2LsltEsyW"
|
||||
mode=""></cover-image>
|
||||
</cover-view>
|
||||
<cover-view class="park" style="bottom: 240rpx;width: 70rpx;height: 70rpx;right: 40rpx;" @click="btnsjyc">
|
||||
<cover-image class="img" src="https://api.ccttiot.com/smartmeter/img/static/uBluMsnJyV5Judyx7SYx"
|
||||
mode=""></cover-image>
|
||||
</cover-view>
|
||||
<!-- <cover-view class="track" @click="toTrack">
|
||||
<cover-image class="img" src="https://lxnapi.ccttiot.com/bike/img/static/ufaAAtlirJYs1QwJF25P"
|
||||
mode=""></cover-image>
|
||||
|
@ -434,7 +438,10 @@
|
|||
deviceid: '',
|
||||
devicename: '',
|
||||
devicesarr: [],
|
||||
findDeviceTimer: null
|
||||
findDeviceTimer: null,
|
||||
jieliuflag:true,
|
||||
|
||||
isMarkerVisible: true
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
|
@ -458,6 +465,24 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 点击隐藏手机定位
|
||||
btnsjyc() {
|
||||
this.isMarkerVisible = !this.isMarkerVisible;
|
||||
this.markers = this.markers.map(item => {
|
||||
if(item.id === 0.1) {
|
||||
return {
|
||||
...item,
|
||||
alpha: this.isMarkerVisible ? 1 : 0, // 0为完全透明,1为完全不透明
|
||||
callout: {
|
||||
...item.callout,
|
||||
display: this.isMarkerVisible ? 'ALWAYS' : 'NONE'
|
||||
}
|
||||
}
|
||||
}
|
||||
return item;
|
||||
});
|
||||
this.$forceUpdate(); // 强制更新视图
|
||||
},
|
||||
// 点击跳转到订单详情
|
||||
btndd(){
|
||||
uni.navigateTo({
|
||||
|
@ -565,57 +590,63 @@
|
|||
},
|
||||
// 连接蓝牙
|
||||
lanya(num) {
|
||||
if(num == 0){
|
||||
uni.showLoading({
|
||||
title: '连接中...', // 提示文字
|
||||
mask: true // 是否显示透明遮罩层(防止触摸穿透)
|
||||
})
|
||||
this.getlanya()
|
||||
}else if (num == 1) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11open@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else if (num == 2) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11close@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else if (num == 3) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else if(num == 4){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11play1@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11hpen@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
if(this.jieliuflag == true){
|
||||
this.jieliuflag = false
|
||||
if(num == 0){
|
||||
uni.showLoading({
|
||||
title: '连接中...', // 提示文字
|
||||
mask: true // 是否显示透明遮罩层(防止触摸穿透)
|
||||
})
|
||||
this.getlanya()
|
||||
}else if (num == 1) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11open@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else if (num == 2) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11close@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else if (num == 3) {
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11reboot@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else if(num == 4){
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11play1@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}else{
|
||||
xBlufi.notifySendCustomData({
|
||||
customData: "11hpen@"
|
||||
})
|
||||
uni.showToast({
|
||||
title: '发送成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},1000)
|
||||
}
|
||||
},
|
||||
getlanya() {
|
||||
|
@ -834,11 +865,17 @@
|
|||
this.showbtntip = false
|
||||
},
|
||||
checkbtn(num) {
|
||||
if (this.deviceInfos.status == 3 || this.deviceInfos.status == 2 || this.deviceInfos.status == 4) {
|
||||
this.showbtntip = true
|
||||
this.btnnum = num
|
||||
} else {
|
||||
this.btn(num)
|
||||
if(this.jieliuflag = true){
|
||||
this.jieliuflag = false
|
||||
if (this.deviceInfos.status == 3 || this.deviceInfos.status == 2 || this.deviceInfos.status == 4) {
|
||||
this.showbtntip = true
|
||||
this.btnnum = num
|
||||
} else {
|
||||
this.btn(num)
|
||||
}
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},3000)
|
||||
}
|
||||
},
|
||||
putvehicle() {
|
||||
|
@ -888,247 +925,316 @@
|
|||
this.showvehicle = false
|
||||
},
|
||||
btn(num) {
|
||||
this.showbtntip = false
|
||||
let data = [this.sn]
|
||||
if (num == 0) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
console.log('点击了....1')
|
||||
this.$u.put('/bst/device/iot/unlock?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else if(res.code == 20001){
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '正在尝试使用蓝牙控制,蓝牙连接需尽可能靠近车辆!',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.lanya(0)
|
||||
} else if (res.cancel) {
|
||||
|
||||
if(this.jieliuflag == true){
|
||||
this.jieliuflag = false
|
||||
this.showbtntip = false
|
||||
let data = [this.sn]
|
||||
if (num == 0) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
console.log('点击了....1')
|
||||
this.$u.put('/bst/device/iot/unlock?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else if(res.code == 20001){
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '正在尝试使用蓝牙控制,蓝牙连接需尽可能靠近车辆!',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.lanya(0)
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (num == 1) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
console.log('点击了....2')
|
||||
this.$u.put('/bst/device/iot/lock?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
}else if(res.code == 20001){
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '正在尝试使用蓝牙控制,蓝牙连接需尽可能靠近车辆!',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.lanya(0)
|
||||
} else if (res.cancel) {
|
||||
|
||||
})
|
||||
}else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 1) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
console.log('点击了....2')
|
||||
this.$u.put('/bst/device/iot/lock?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}else if(res.code == 20001){
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
let that = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '正在尝试使用蓝牙控制,蓝牙连接需尽可能靠近车辆!',
|
||||
showCancel: true,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
that.lanya(0)
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (num == 2) {
|
||||
uni.showLoading({
|
||||
title: 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/disable', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '解禁成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
this.deviceInfo()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (num == 3) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/enable', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
uni.showToast({
|
||||
title: '解禁成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
this.deviceInfo()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
} else if (num == 4) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/iot/ring?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
} else if (num == 5) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/in', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '回仓成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
this.deviceInfo()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (num == 6) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/out', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '出仓成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (num == 7) {
|
||||
this.showvehicle = true
|
||||
} else if (num == 8) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/iot/reboot?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (num == 9) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/iot/unlockSeat?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
} else if (num == 10) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/iot/refresh?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}else{
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 2) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/disable', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '解禁成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
this.deviceInfo()
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 3) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/enable', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
||||
uni.showToast({
|
||||
title: '解禁成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
this.deviceInfo()
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 4) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/iot/ring?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 5) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/in', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '回仓成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
this.deviceInfo()
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 6) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/out', data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '出仓成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 7) {
|
||||
this.showvehicle = true
|
||||
} else if (num == 8) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/iot/reboot?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 9) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/iot/unlockSeat?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
} else if (num == 10) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
})
|
||||
this.$u.put('/bst/device/iot/refresh?id=' + this.sn).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.deviceInfo()
|
||||
uni.showToast({
|
||||
title: '操作成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
setTimeout(()=>{
|
||||
this.jieliuflag = true
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
btnyc() {
|
||||
|
@ -1160,6 +1266,23 @@
|
|||
this.getModelList()
|
||||
this.latitude = this.deviceInfos.latitude
|
||||
this.longitude = this.deviceInfos.longitude
|
||||
this.markers.push({
|
||||
id: 0.1,
|
||||
latitude: this.deviceInfos.mobileLat,
|
||||
longitude: this.deviceInfos.mobileLon,
|
||||
width: 40,
|
||||
height: 47,
|
||||
iconPath: 'https://api.ccttiot.com/smartmeter/img/static/uvMzjOvKi58e8VAAS8t6',
|
||||
callout: {
|
||||
content: '手机定位', // 修改为你想要显示的文字内容
|
||||
color: '#ffffff', // 修改为文字颜色
|
||||
fontSize: 10, // 修改为文字大小
|
||||
borderRadius: 10, // 修改为气泡圆角大小
|
||||
bgColor: '#000000', // 修改为气泡背景颜色
|
||||
padding: 2, // 修改为气泡内边距
|
||||
display: 'ALWAYS', // 修改为气泡的显示策略
|
||||
}
|
||||
})
|
||||
if (this.deviceInfos.status == 0) {
|
||||
this.markers.push({
|
||||
id: parseFloat(this.deviceInfos.sn),
|
||||
|
|
|
@ -132,13 +132,11 @@
|
|||
<view class="yingshouprice" style="border: 0;">
|
||||
折扣:<span>{{orderxqobj.vipDiscountValue == null ? '--' : orderxqobj.vipDiscountValue + '折'}}</span>
|
||||
</view>
|
||||
<view class="yingshouprice" style="border: 0;">
|
||||
<!-- <view class="yingshouprice" style="border: 0;">
|
||||
骑行费优惠:<span>¥{{orderxqobj.ridingDiscount == null ? '0.00' : orderxqobj.ridingDiscount}}</span>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="xingchengxx" style="padding-bottom: 30rpx;box-sizing: border-box;">
|
||||
<view class="name">
|
||||
行程信息
|
||||
|
@ -1016,27 +1014,6 @@
|
|||
},
|
||||
unpass() {
|
||||
this.huancheflag = true
|
||||
// let data = {
|
||||
// id: this.orderxqobj.id,
|
||||
// pass: pass
|
||||
// }
|
||||
// this.$u.put('/bst/order/verify', data).then((res) => {
|
||||
// if (res.code === 200) {
|
||||
// uni.showToast({
|
||||
// title: '操作成功',
|
||||
// icon: 'success',
|
||||
// duration: 2000
|
||||
// })
|
||||
// this.deviceInfo()
|
||||
// this.getorderxq()
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
},
|
||||
parsePictures(pictureString) {
|
||||
console.log(pictureString, '45454545454');
|
||||
|
|
|
@ -861,11 +861,11 @@
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" >
|
||||
page{
|
||||
background-color: #F7FAFE;
|
||||
}
|
||||
.map {
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #F7FAFE;
|
||||
}
|
||||
.map {
|
||||
position: relative;
|
||||
width: 750rpx;
|
||||
height: 752rpx;
|
||||
|
@ -912,7 +912,7 @@ page{
|
|||
-webkit-box-shadow: 0 0 20rpx #7C7C7C;
|
||||
-moz-box-shadow: 0 0 20rpx #7C7C7C;
|
||||
}
|
||||
.kefutc{
|
||||
.kefutc{
|
||||
animation: fadeIn 0.5s ease-in-out forwards;
|
||||
position: fixed;
|
||||
top: 660rpx;
|
||||
|
@ -983,7 +983,7 @@ page{
|
|||
background-color: rgba(0,0,0,0.3);
|
||||
z-index: 9;
|
||||
}
|
||||
.page{
|
||||
.page{
|
||||
width: 750rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
|
|
|
@ -346,10 +346,19 @@
|
|||
})
|
||||
that.getorderdevice()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请前往车辆详情连接车辆操作',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.switchTab({
|
||||
url:'/pages/myorder/returned/index'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -393,10 +402,19 @@
|
|||
})
|
||||
that.getorderdevice()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请前往车辆详情连接车辆操作',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.switchTab({
|
||||
url:'/pages/myorder/returned/index'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
@ -499,10 +517,19 @@
|
|||
that.orderflag = false
|
||||
},1000)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '设备离线,请前往车辆详情连接车辆操作',
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.switchTab({
|
||||
url:'/pages/myorder/returned/index'
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user