11
This commit is contained in:
parent
19800d7b47
commit
eff15b47dc
|
@ -41,7 +41,9 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios" : {},
|
"ios" : {
|
||||||
|
"dSYMs" : false
|
||||||
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {}
|
"sdkConfigs" : {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,11 @@
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/u1G7wy5BEuNOY8QVyZcF" mode=""></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/u1G7wy5BEuNOY8QVyZcF" mode=""></image>
|
||||||
<view class="scroll-container" ref="scrollContainer">
|
<view class="scroll-container" ref="scrollContainer">
|
||||||
<text class="scroll-text" ref="scrollText"
|
<text class="scroll-text" ref="scrollText"
|
||||||
:style="{ animation: `scroll-text ${duration}s linear infinite` }">{{ cleanedText() }}</text>
|
:style="{ animation: `scroll-text ${duration}s linear infinite` }">{{ cleanedText()
|
||||||
|
}}</text>
|
||||||
<text class="scroll-text" ref="scrollTextClone"
|
<text class="scroll-text" ref="scrollTextClone"
|
||||||
:style="{ animation: `scroll-text ${duration}s linear infinite` }">{{ cleanedText() }}</text>
|
:style="{ animation: `scroll-text ${duration}s linear infinite` }">{{ cleanedText()
|
||||||
|
}}</text>
|
||||||
<!-- Duplicate the text for seamless scrolling -->
|
<!-- Duplicate the text for seamless scrolling -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -189,8 +191,8 @@
|
||||||
起步价
|
起步价
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
{{item.ridingRuleJson.startingPrice}}元(含{{item.ridingRuleJson.startingTime}}<span
|
{{ item.ridingRuleJson.startingPrice }}元(含{{ item.ridingRuleJson.startingTime
|
||||||
v-if="item.rentalUnit=='minutes'">分钟</span><span
|
}}<span v-if="item.rentalUnit == 'minutes'">分钟</span><span
|
||||||
v-if="item.rentalUnit == 'hours'">小时</span><span
|
v-if="item.rentalUnit == 'hours'">小时</span><span
|
||||||
v-if="item.rentalUnit == 'day'">天</span>)
|
v-if="item.rentalUnit == 'day'">天</span>)
|
||||||
</view>
|
</view>
|
||||||
|
@ -200,8 +202,8 @@
|
||||||
超出费
|
超出费
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
{{item.ridingRuleJson.timeoutPrice}}元/{{ item.ridingRuleJson.timeoutTime}}<span
|
{{ item.ridingRuleJson.timeoutPrice }}元/{{ item.ridingRuleJson.timeoutTime
|
||||||
v-if="item.rentalUnit=='minutes'">分钟</span><span
|
}}<span v-if="item.rentalUnit == 'minutes'">分钟</span><span
|
||||||
v-if="item.rentalUnit == 'hours'">小时</span><span
|
v-if="item.rentalUnit == 'hours'">小时</span><span
|
||||||
v-if="item.rentalUnit == 'day'">天</span>
|
v-if="item.rentalUnit == 'day'">天</span>
|
||||||
</view>
|
</view>
|
||||||
|
@ -222,7 +224,8 @@
|
||||||
:key="indexs" style="margin-top: 10rpx;" v-if="indexs < 2">
|
:key="indexs" style="margin-top: 10rpx;" v-if="indexs < 2">
|
||||||
|
|
||||||
<view class="left " style="font-size: 28rpx;">
|
<view class="left " style="font-size: 28rpx;">
|
||||||
{{items.start}}-{{items.end}}<span v-if="item.rentalUnit=='minutes'">分钟</span>
|
{{ items.start }}-{{ items.end }}<span
|
||||||
|
v-if="item.rentalUnit == 'minutes'">分钟</span>
|
||||||
<span v-if="item.rentalUnit == 'hours'">小时</span>
|
<span v-if="item.rentalUnit == 'hours'">小时</span>
|
||||||
<span v-if="item.rentalUnit == 'day'">天</span>,
|
<span v-if="item.rentalUnit == 'day'">天</span>,
|
||||||
每{{ items.eachUnit }}<span v-if="item.rentalUnit == 'minutes'">分钟</span>
|
每{{ items.eachUnit }}<span v-if="item.rentalUnit == 'minutes'">分钟</span>
|
||||||
|
@ -257,7 +260,8 @@
|
||||||
<view class="btn" @click="taploadmask(1)" v-if="type == 1 && freList.length > 0">
|
<view class="btn" @click="taploadmask(1)" v-if="type == 1 && freList.length > 0">
|
||||||
确认开锁
|
确认开锁
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" v-if="type==1&&freList.length<1" style="background-color: #ccc;color: #fff;">
|
<view class="btn" v-if="type == 1 && freList.length < 1"
|
||||||
|
style="background-color: #ccc;color: #fff;">
|
||||||
确认开锁
|
确认开锁
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="sub3()" v-if="type == 2">
|
<view class="btn" @click="sub3()" v-if="type == 2">
|
||||||
|
@ -420,8 +424,10 @@
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="cont" @click="topage(10)">
|
<view class="cont" @click="topage(10)">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uG1iB3C69uNIr9Zx7qH6" mode="" v-if='gps.deptId==100'></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uG1iB3C69uNIr9Zx7qH6" mode=""
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uDMXuZiiktkF0EWBrZv3" mode="" v-else style="width:59.46rpx;height: 49.87rpx;"></image>
|
v-if='gps.deptId == 100'></image>
|
||||||
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uDMXuZiiktkF0EWBrZv3" mode="" v-else
|
||||||
|
style="width:59.46rpx;height: 49.87rpx;"></image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
我的订单
|
我的订单
|
||||||
</view>
|
</view>
|
||||||
|
@ -435,29 +441,37 @@
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="cont" @click="topage(3)">
|
<view class="cont" @click="topage(3)">
|
||||||
|
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ucR0pDCg1vDshatphlUb" mode="" v-if='gps.deptId==100'></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/ucR0pDCg1vDshatphlUb" mode=""
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uRRKE06XlWBjxhjBuGbE" mode="" v-else style="width:47.95rpx;height: 49.87rpx;"></image>
|
v-if='gps.deptId == 100'></image>
|
||||||
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uRRKE06XlWBjxhjBuGbE" mode="" v-else
|
||||||
|
style="width:47.95rpx;height: 49.87rpx;"></image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
用车指南
|
用车指南
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cont" @click="topage(4)">
|
<view class="cont" @click="topage(4)">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ugCygoi3DXNWTLbC9vJ4" mode="" v-if='gps.deptId==100'></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/ugCygoi3DXNWTLbC9vJ4" mode=""
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJKpyTyOreEB4sjweicx" mode="" v-else style="width:49.87rpx;height: 47.95rpx;"></image>
|
v-if='gps.deptId == 100'></image>
|
||||||
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJKpyTyOreEB4sjweicx" mode="" v-else
|
||||||
|
style="width:49.87rpx;height: 47.95rpx;"></image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
编号开锁
|
编号开锁
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cont" @click="topage(5)">
|
<view class="cont" @click="topage(5)">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uiUTdm3iNOnfP17OCLHu" mode="" v-if='gps.deptId==100'> </image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uiUTdm3iNOnfP17OCLHu" mode=""
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uKL0SOlyjVNJoF5EUSiV" mode="" v-else style="width:46.04rpx;height: 34.53rpx;"></image>
|
v-if='gps.deptId == 100'> </image>
|
||||||
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uKL0SOlyjVNJoF5EUSiV" mode="" v-else
|
||||||
|
style="width:46.04rpx;height: 34.53rpx;"></image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
故障上报
|
故障上报
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cont" @click="topage(9)">
|
<view class="cont" @click="topage(9)">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uLHRXFuIPhMy0EDgPdVr" mode="" v-if='gps.deptId==100'></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uLHRXFuIPhMy0EDgPdVr" mode=""
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uUsAb1dSN92FkJmlT40Q" mode="" v-else style="width: 30.69rpx;height: 44.12rpx;"></image>
|
v-if='gps.deptId == 100'></image>
|
||||||
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/uUsAb1dSN92FkJmlT40Q" mode="" v-else
|
||||||
|
style="width: 30.69rpx;height: 44.12rpx;"></image>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
客户服务
|
客户服务
|
||||||
</view>
|
</view>
|
||||||
|
@ -726,7 +740,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 不允许停车点外还车 -->
|
<!-- 不允许停车点外还车 -->
|
||||||
<view class="maskpage1" v-if="maskepage==1" style="display: flex; justify-content: center;flex-wrap: wrap;">
|
<view class="maskpage1" v-if="maskepage == 1"
|
||||||
|
style="display: flex; justify-content: center;flex-wrap: wrap;">
|
||||||
<view class="top_info">
|
<view class="top_info">
|
||||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ufkol3nMNJw4v1kHLFcH" mode=""></image>
|
<image src="https://lxnapi.ccttiot.com/bike/img/static/ufkol3nMNJw4v1kHLFcH" mode=""></image>
|
||||||
<view class="masktxt">
|
<view class="masktxt">
|
||||||
|
@ -757,8 +772,8 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="masktips" style="width: 100%;">
|
<view class="masktips" style="width: 100%;">
|
||||||
未在停车点需支付管理费: <span
|
未在停车点需支付管理费: <span style="color: coral;font-size: 42rpx;font-weight: 600;">{{
|
||||||
style="color: coral;font-size: 42rpx;font-weight: 600;">{{areaInfo.vehicleManagementFee}}</span>元
|
areaInfo.vehicleManagementFee }}</span>元
|
||||||
<!-- ,你可查看最近 停车点 -->
|
<!-- ,你可查看最近 停车点 -->
|
||||||
</view>
|
</view>
|
||||||
<view class="tipsimg">
|
<view class="tipsimg">
|
||||||
|
@ -1416,115 +1431,60 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getArea() {
|
getArea() {
|
||||||
// this.showmap = false
|
// 如果有正在进行的订单,直接返回
|
||||||
// 发送请求获取数据
|
if (this.orderinfo.status) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '您有正在进行的订单,请先完成当前订单',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重置数据
|
||||||
this.areaInfo = {}
|
this.areaInfo = {}
|
||||||
// console.log(this.qParam, 'qParamqParamqParamqParam');
|
|
||||||
this.polyline = []
|
this.polyline = []
|
||||||
// if(this.qParam){
|
|
||||||
|
|
||||||
// }
|
// 处理设备编号
|
||||||
// console.log(this.sn,'this.gps.sn this.gps.sn this.gps.sn ');
|
if (this.orderinfo.sn) {
|
||||||
|
this.gps.sn = this.orderinfo.sn
|
||||||
// console.log(this.qParam,'qParamqParamqParamqParam');
|
}
|
||||||
if (/^\d{7}$/.test(this.qParam)) {
|
if (/^\d{7}$/.test(this.qParam)) {
|
||||||
this.gps.sn = this.qParam
|
this.gps.sn = this.qParam
|
||||||
console.log(this.gps.sn, 'this.gps.sn this.gps.sn this.gps.sn ');
|
|
||||||
}
|
|
||||||
if (this.orderinfo.sn != '') {
|
|
||||||
this.gps.sn = this.orderinfo.sn
|
|
||||||
}
|
}
|
||||||
if (this.deviceInfos.sn) {
|
if (this.deviceInfos.sn) {
|
||||||
this.gps.sn = this.deviceInfos.sn
|
this.gps.sn = this.deviceInfos.sn
|
||||||
}
|
}
|
||||||
if (this.qParam != '' && this.qParam != null) {
|
if (this.qParam != '' && this.qParam != null) {
|
||||||
this.sn = this.getSNFromQRCode(this.qParam);
|
this.sn = this.getSNFromQRCode(this.qParam);
|
||||||
|
|
||||||
if (this.sn != 0 && this.sn != '' && this.sn != null) {
|
if (this.sn != 0 && this.sn != '' && this.sn != null) {
|
||||||
this.gps.sn = this.sn
|
this.gps.sn = this.sn
|
||||||
console.log(this.sn, 'qParamqParamqParamqParam');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$u.get('/app/area/info?', this.gps).then((res) => {
|
|
||||||
// this.showmap = true
|
|
||||||
if (res.code === 200) {
|
|
||||||
|
|
||||||
// 处理接口返回的数据,将边界数据转换为地图组件需要的折线结构
|
|
||||||
const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr)
|
|
||||||
|
|
||||||
// 更新折线数据
|
|
||||||
this.areaInfo = res.data
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let abb = this.cleanedText()
|
this.$u.get('/app/area/info?', this.gps).then((res) => {
|
||||||
console.log(abb.length, 'cleanedTextcleanedTextcleanedText');
|
if (res.code === 200) {
|
||||||
|
const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr)
|
||||||
// 计算滚动时间,基于文本宽度
|
this.areaInfo = res.data
|
||||||
this.duration = abb.length * 0.3; // 50 px/s 的速度
|
|
||||||
}, 200)
|
|
||||||
|
|
||||||
this.polyline.push(polylines)
|
this.polyline.push(polylines)
|
||||||
console.log();
|
|
||||||
// console.log(this.areaInfo, 'areaInfoareaInfo');
|
|
||||||
uni.setStorageSync('areaId', res.data.areaId);
|
uni.setStorageSync('areaId', res.data.areaId);
|
||||||
|
|
||||||
|
// 基础数据获取
|
||||||
this.getinfo()
|
this.getinfo()
|
||||||
this.getmarks()
|
this.getmarks()
|
||||||
// this.getlist()
|
|
||||||
this.getParking()
|
this.getParking()
|
||||||
|
|
||||||
if (uni.getStorageSync('token') && this.islogin) {
|
if (uni.getStorageSync('token') && this.islogin) {
|
||||||
this.getisInOrder()
|
this.getisInOrder()
|
||||||
|
|
||||||
}
|
}
|
||||||
const hasShownPopup = uni.getStorageSync('hasShownPopup');
|
|
||||||
console.log(hasShownPopup, 'hasShownPopup');
|
|
||||||
|
|
||||||
if (hasShownPopup === '' || hasShownPopup === null) {
|
// 处理设备信息
|
||||||
console.log('1111111111');
|
if (this.gps.sn && /^\d{7}$/.test(this.gps.sn) && !this.isqrcode) {
|
||||||
|
if (!this.deviceInfos.sn) {
|
||||||
this.showTips = true;
|
this.deviceInfo(this.qParam ? 1 : 0)
|
||||||
this.startCountdown();
|
|
||||||
uni.setStorageSync('hasShownPopup', true);
|
|
||||||
} else {
|
|
||||||
console.log('222');
|
|
||||||
this.showTips = uni.getStorageSync('hasShownPopup');
|
|
||||||
console.log(this.showTips, 'this.showTips');
|
|
||||||
this.startCountdown();
|
|
||||||
|
|
||||||
}
|
|
||||||
if (this.gps.sn && /^\d{7}$/.test(this.gps.sn)) {
|
|
||||||
setTimeout(() => {
|
|
||||||
if (this.orderinfo.status) {
|
|
||||||
// this.showtcs = true
|
|
||||||
} else {
|
|
||||||
// if(this.showdevice==false&&){
|
|
||||||
// console.log('进入的判断1');
|
|
||||||
// this.deviceInfo(1)
|
|
||||||
// this.qParam = null
|
|
||||||
// }
|
|
||||||
if (this.deviceInfos.sn) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (this.qParam) {
|
|
||||||
console.log('进入的判断2');
|
|
||||||
this.deviceInfo(1)
|
|
||||||
this.qParam = null
|
|
||||||
} else {
|
|
||||||
console.log('进入的判断3');
|
|
||||||
// if(this.de)
|
|
||||||
this.deviceInfo(0)
|
|
||||||
this.qParam = null
|
this.qParam = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}, 200)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
@ -1535,124 +1495,72 @@
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error("Error fetching area data:", error);
|
console.error("Error fetching area data:", error);
|
||||||
});
|
});
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
deviceInfo(num) {
|
deviceInfo(num) {
|
||||||
if (this.sn) {
|
if (!this.sn) return;
|
||||||
|
|
||||||
|
// 检查是否有进行中的订单
|
||||||
|
if (this.orderinfo.status) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '您有正在进行的订单,请先完成当前订单',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
|
this.$u.get('/app/device/info?sn=' + this.sn).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.isqrcode = true
|
this.isqrcode = true
|
||||||
this.deviceInfos = res.data;
|
this.deviceInfos = res.data;
|
||||||
this.getlist(res.data.modelId)
|
this.getlist(res.data.modelId)
|
||||||
uni.setStorageSync('areaId', res.data.areaId);
|
|
||||||
if (!this.orderinfo.sn) {
|
if (!this.orderinfo.sn) {
|
||||||
this.mac = res.data.mac
|
this.mac = res.data.mac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检查区域是否需要切换
|
||||||
|
const areaChanged = this.areaInfo.areaId != res.data.areaId;
|
||||||
|
|
||||||
if (num == 0) {
|
if (num == 0) {
|
||||||
|
if (areaChanged) {
|
||||||
|
// 区域不同,需要切换区域
|
||||||
|
uni.setStorageSync('areaId', res.data.areaId);
|
||||||
|
this.gps.sn = this.sn;
|
||||||
|
this.isqrcode = false; // 重置标志以允许新区域的设备信息获取
|
||||||
|
this.getArea(); // 重新获取区域信息
|
||||||
|
} else {
|
||||||
this.showdevice = true;
|
this.showdevice = true;
|
||||||
this.type = 0;
|
this.type = 0;
|
||||||
if (this.areaInfo.areaId != res.data.areaId) {
|
|
||||||
this.getArea()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if (this.deviceInfos.status == 1) {
|
||||||
if (this.deviceInfos.status == 0) {
|
if (areaChanged) {
|
||||||
|
// 区域不同,需要切换区域
|
||||||
this.$refs.uToast.show({
|
uni.setStorageSync('areaId', res.data.areaId);
|
||||||
title: '车辆未上架,请使用其他车辆',
|
this.gps.sn = this.sn;
|
||||||
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
|
this.isqrcode = false; // 重置标志以允许新区域的设备信息获取
|
||||||
// type: 'warning',
|
this.getArea(); // 重新获取区域信息
|
||||||
// 如果不需要图标,请设置为false
|
|
||||||
duration: 1000*2
|
|
||||||
// icon: false
|
|
||||||
})
|
|
||||||
} else if (this.deviceInfos.status == 2) {
|
|
||||||
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: '车辆预约中,请使用其他车辆',
|
|
||||||
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
|
|
||||||
// type: 'warning',
|
|
||||||
// 如果不需要图标,请设置为false
|
|
||||||
duration: 1000*2
|
|
||||||
// icon: false
|
|
||||||
})
|
|
||||||
} else if (this.deviceInfos.status == 3) {
|
|
||||||
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: '车辆骑行中,请使用其他车辆',
|
|
||||||
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
|
|
||||||
// type: 'warning',
|
|
||||||
// 如果不需要图标,请设置为false
|
|
||||||
duration: 1000*2
|
|
||||||
// icon: false
|
|
||||||
})
|
|
||||||
} else if (this.deviceInfos.status == 4) {
|
|
||||||
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: '车辆临时锁车中,请使用其他车辆',
|
|
||||||
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
|
|
||||||
// type: 'warning',
|
|
||||||
// 如果不需要图标,请设置为false
|
|
||||||
duration: 1000*2
|
|
||||||
// icon: false
|
|
||||||
})
|
|
||||||
} else if (this.deviceInfos.status == 6) {
|
|
||||||
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: '车辆调度中,请使用其他车辆',
|
|
||||||
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
|
|
||||||
// type: 'warning',
|
|
||||||
// 如果不需要图标,请设置为false
|
|
||||||
duration: 1000*2
|
|
||||||
// icon: false
|
|
||||||
})
|
|
||||||
} else if (this.deviceInfos.status == 8) {
|
|
||||||
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: '车辆下线中,请使用其他车辆',
|
|
||||||
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
|
|
||||||
// type: 'warning',
|
|
||||||
// 如果不需要图标,请设置为false
|
|
||||||
duration: 1000*2
|
|
||||||
// icon: false
|
|
||||||
})
|
|
||||||
} else if (this.deviceInfos.status == 9) {
|
|
||||||
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: '车辆已废弃,请使用其他车辆',
|
|
||||||
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
|
|
||||||
// type: 'warning',
|
|
||||||
// 如果不需要图标,请设置为false
|
|
||||||
duration: 1000*2
|
|
||||||
// icon: false
|
|
||||||
})
|
|
||||||
} else if (this.deviceInfos.status == 7) {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '车辆未上线,请使用其他车辆',
|
|
||||||
// icon: 'none',
|
|
||||||
// duration: 4000
|
|
||||||
// });
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: '车辆未上线,请使用其他车辆',
|
|
||||||
// 如果不传此type参数,默认为default,也可以手动写上 type: 'default'
|
|
||||||
// type: 'warning',
|
|
||||||
// 如果不需要图标,请设置为false
|
|
||||||
duration: 1000*2
|
|
||||||
// icon: false
|
|
||||||
})
|
|
||||||
} else if (this.deviceInfos.status == 1) {
|
|
||||||
|
|
||||||
if (this.areaInfo.areaId != res.data.areaId) {
|
|
||||||
this.getArea()
|
|
||||||
}
|
|
||||||
// this.routePlanning(res.data.latitude, res.data.longitude)
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.showdevice = true
|
this.showdevice = true;
|
||||||
this.type = 1;
|
this.type = 1;
|
||||||
this.deviceIndex = 1;
|
this.deviceIndex = 1;
|
||||||
}, 600)
|
}, 600);
|
||||||
|
} else {
|
||||||
|
this.showdevice = true;
|
||||||
|
this.type = 1;
|
||||||
|
this.deviceIndex = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: this.getStatusMessage(this.deviceInfos.status),
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1666,13 +1574,20 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
// 新增辅助方法处理状态消息
|
||||||
}
|
getStatusMessage(status) {
|
||||||
|
const messages = {
|
||||||
|
0: '车辆未上架,请使用其他车辆',
|
||||||
|
2: '车辆预约中,请使用其他车辆',
|
||||||
|
3: '车辆骑行中,请使用其他车辆',
|
||||||
|
4: '车辆临时锁车中,请使用其他车辆',
|
||||||
|
6: '车辆调度中,请使用其他车辆',
|
||||||
|
7: '车辆未上线,请使用其他车辆',
|
||||||
|
8: '车辆下线中,请使用其他车辆',
|
||||||
|
9: '车辆已废弃,请使用其他车辆'
|
||||||
|
};
|
||||||
|
return messages[status] || '车辆状态异常,请使用其他车辆';
|
||||||
},
|
},
|
||||||
|
|
||||||
mapFun() {
|
mapFun() {
|
||||||
|
@ -6204,6 +6119,7 @@
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
// box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
// box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
|
|
||||||
.price_li {
|
.price_li {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -6212,6 +6128,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 60rpx;
|
padding: 0 60rpx;
|
||||||
|
|
||||||
.price_left {
|
.price_left {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
@ -6219,6 +6136,7 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
margin-left: 6rpx;
|
margin-left: 6rpx;
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
|
@ -6226,12 +6144,14 @@
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.price_right {
|
.price_right {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #3D3D3D;
|
color: #3D3D3D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.price_li1 {
|
.price_li1 {
|
||||||
margin-top: 22rpx;
|
margin-top: 22rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -6240,6 +6160,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 60rpx;
|
padding: 0 60rpx;
|
||||||
|
|
||||||
.price_left1 {
|
.price_left1 {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
|
@ -6249,12 +6170,14 @@
|
||||||
color: #8D8A8A;
|
color: #8D8A8A;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.price_right1 {
|
.price_right1 {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #8D8A8A;
|
color: #8D8A8A;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
// height: 88rpx;
|
// height: 88rpx;
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@
|
||||||
success(res) {
|
success(res) {
|
||||||
if (res.code) {
|
if (res.code) {
|
||||||
this.openCode=res.code
|
this.openCode=res.code
|
||||||
console.log(this.openCode,'this.openCodethis.openCode');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1751,6 +1751,8 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user