小鹿骑行

This commit is contained in:
吴鹏 2026-01-17 17:33:26 +08:00
parent ac65dc4046
commit accf5cf1a9
9 changed files with 1031 additions and 135 deletions

View File

@ -1,7 +1,7 @@
const install = (Vue, vm) => {
uni.setStorageSync('deptId', 100);
Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://192.168.1.3:4101', //键辉本地
// baseUrl: 'http://192.168.1.8:4101', //键辉本地
// baseUrl: 'http://192.168.2.221:4101', //景森本地
baseUrl: 'https://ele.ccttiot.com/prod-api', //线上 小鹿appid wx8a05cf95418a6859 小兔骑骑appidwx38f96c87621a87ab 遇福兴https://fu.chuantewulian.cn wxcb1d6a5d9dca8bbe
// baseUrl: 'https://cc.ccttiot.com/prod-api', //叉车线上

View File

@ -919,7 +919,7 @@
uni.switchTab({
url: '/pages/index/index?orderid=' + this.bstId
})
}else if(res.code == 20001){
}else if(res.code == 20001 || res.code == 20002 || res.code == 20003){
this.wenbentxtflag = true
this.wenbentxt = '蓝牙开锁中...'
let that = this
@ -1455,7 +1455,7 @@
})
}, 2000)
}) //
}else if(res.code == 20001){
}else if(res.code == 20001 || res.code == 20002 || res.code == 20003){
this.wenbentxtflag = true
this.wenbentxt = '蓝牙开锁中...'
let that = this

View File

@ -587,6 +587,14 @@
delete data.startRule;
} else {
// 使startRule
if(this.timeoutPrice == '' || this.timeoutPrice == 0){
uni.showToast({
title: '超出价不能为空或者0元',
icon: 'none',
duration: 5000
})
return
}
data.startRule = {
timeoutTime: this.timeoutTime,
startingPrice: this.startingPrice,

View File

@ -1424,7 +1424,7 @@
duration: 3000
})
this.jieliuflag = true
}else if(res.code == 20001){
}else if(res.code == 20001 || res.code == 20002 || res.code == 20003){
uni.showLoading({
title: '蓝牙关锁中...',
mask: true
@ -1617,7 +1617,7 @@
duration: 2000
})
this.jieliuflag = true
} else if (res.code == 20001) {
} else if (res.code == 20001 || res.code == 20002 || res.code == 20003) {
uni.showLoading({
title: '响铃中...',
mask: true
@ -1865,7 +1865,7 @@
duration: 2000
})
this.jieliuflag = true
}else if(res.code == 20001){
}else if(res.code == 20001 || res.code == 20002 || res.code == 20003){
this.jieliuflag = true
uni.showLoading({
title: '重启中...',

View File

@ -261,6 +261,7 @@
<view class="btn btn-primary" v-if="orderxqobj.status == 'RIDE_WAIT_PAY'" @click="btngaijia">改价</view>
<view class="btn btn-primary" v-if="orderxqobj.status == 'RIDE_WAIT_PAY'" @click="btnyajin">押金抵扣</view>
<view class="btn btn-outline" v-if="orderxqobj.priceChanged == true" @click="btnjilu">改价记录</view>
<view class="btn btn-primary" @click="btnhuanbike" v-if="orderxqobj.status=='PROCESSING'">辅助换车</view>
<view class="btn btn-primary" @click="btnfuzhu" v-if="orderxqobj.status=='PROCESSING'">辅助还车</view>
</view>
</view>
@ -504,7 +505,7 @@
</view>
</view>
</view>
<view style="background-color: rgba(0, 0, 0, .5);width: 100%;height: 100vh;position: fixed;top: 0;left: 0;"
<view style="background-color: rgba(0, 0, 0, .5);width: 100%;height: 100vh;position: fixed;top: 0;left: 0;z-index: 999;"
v-if="zengsongflag"></view>
<!-- 押金抵扣弹窗 -->
@ -527,6 +528,100 @@
</view>
<view style="background-color: rgba(0, 0, 0, .5);width: 100%;height: 100vh;position: fixed;top: 0;left: 0;"
v-if="yajinyajin"></view>
<!-- 辅助换车弹窗 -->
<view class="change-bike-modal" v-if="showChangeBike">
<view class="modal-header">
<view class="modal-title">辅助换车</view>
<view class="modal-close" @click="closeChangeBike">×</view>
</view>
<view class="modal-content">
<!-- 目标设备信息 -->
<view class="form-section">
<view class="form-item">
<view class="form-label">
<text class="label-text">设备SN</text>
</view>
<view class="input-with-scan">
<view class="scan-icon" @click="scanDeviceSn">
<u-icon name="scan" color="#4C97E7" size="32"></u-icon>
</view>
<input
class="form-input-with-icon"
type="text"
v-model="selectedDeviceSn"
placeholder="请输入设备SN或点击左侧扫码"
/>
</view>
</view>
</view>
<!-- 换车原因 -->
<view class="form-section">
<view class="section-title">换车原因<text class="required">*</text></view>
<picker
mode="selector"
:range="reasonOptions"
range-key="label"
:value="reasonIndex"
@change="onReasonChange"
>
<view class="picker-item">
<text :class="['picker-text', !changeReason && 'placeholder']">
{{ changeReason ? (changeReason === 'LOW_POWER' ? '电量不足' : '车辆损坏') : '请选择换车原因' }}
</text>
<u-icon name="arrow-right" color="#C0C4CC" size="18"></u-icon>
</view>
</picker>
</view>
<!-- 故障信息仅当选择车辆损坏时显示 -->
<view class="form-section" v-if="changeReason === 'DEVICE_FAULT'">
<view class="form-item">
<view class="form-label">
<text class="label-text">故障原因</text>
<text class="label-tip">可选</text>
</view>
<textarea
class="form-textarea"
v-model="faultDetail"
placeholder="请输入故障原因描述"
maxlength="200"
:auto-height="true"
></textarea>
</view>
<view class="form-item">
<view class="form-label">
<text class="label-text">故障图片</text>
<text class="label-tip">可选</text>
</view>
<view class="upload-container">
<view class="upload-preview" v-if="faultPicture">
<image
class="preview-image"
:src="faultPicture"
mode="aspectFill"
@click="previewFaultImage"
></image>
<view class="delete-btn" @click="deleteFaultImage">
<u-icon name="close" color="#fff" size="14"></u-icon>
</view>
</view>
<view class="upload-btn" v-else @click="uploadFaultImage">
<u-icon name="camera" color="#4C97E7" size="32"></u-icon>
<text class="upload-text">上传图片</text>
</view>
</view>
</view>
</view>
</view>
<view class="modal-footer">
<view class="footer-btn cancel-btn" @click="closeChangeBike">取消</view>
<view class="footer-btn confirm-btn" @click="confirmChangeBike">确定换车</view>
</view>
</view>
<view style="background-color: rgba(0, 0, 0, .5);width: 100%;height: 100vh;position: fixed;top: 0;left: 0;z-index: 999;"
v-if="showChangeBike"></view>
</view>
</template>
@ -626,7 +721,21 @@
price:0,
youhuiobj:{},
kstime:'',
endtime:''
endtime:'',
//
showChangeBike: false,
changeDeviceList: [],
selectedDeviceId: '',
selectedDeviceSn: '',
changeReason: '', // LOW_POWER DEVICE_FAULT
faultDetail: '',
faultPicture: '',
reasonOptions: [
{ label: '电量不足', value: 'LOW_POWER' },
{ label: '车辆损坏', value: 'DEVICE_FAULT' }
],
reasonIndex: -1,
qiniuToken: '' // token
}
},
onLoad(e) {
@ -1074,10 +1183,16 @@
mask: true
})
let data = {
orderId: this.orid,
requiredIot: false
}
this.$u.put(`/bst/order/finishDevice`, data).then(res =>{
if(res.code == 200){
let datas = {
orderId: this.orid,
needDispatchFee: flag
}
this.$u.put(`/bst/order/end`, data).then(res => {
this.$u.put(`/bst/order/end`, datas).then(res => {
if (res.code == 200) {
uni.showToast({
title: '辅助还车成功',
@ -1099,6 +1214,314 @@
})
}
})
}else{
uni.showToast({
title: '错误' + res.msg,
icon: 'none',
duration: 2000
})
}
})
},
//
btnhuanbike() {
//
uni.showModal({
title: '提示',
content: '确定要进行辅助换车操作吗?',
confirmText: '确定',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
//
this.doChangeBike()
}
//
}
})
},
//
doChangeBike() {
// 1.
uni.showLoading({
title: '锁车中...',
mask: true
})
let data = {
orderId:this.orid,
requiredIot:false
}
this.$u.put('/bst/order/finishDevice',data).then((res) => {
if(res.code == 200){
//
uni.hideLoading()
// token
this.getQiniuToken()
// 2.
this.showChangeBike = true
}else{
uni.showToast({
title: '错误' + res.msg,
icon: 'none',
duration: 5000
})
}
}).catch((err) => {
// 使
uni.hideLoading()
// token
this.getQiniuToken()
this.showChangeBike = true
})
},
// token
getQiniuToken() {
this.$u.get('/common/qiniuToken').then((res) => {
if (res.code == 200) {
this.qiniuToken = res.data
}
}).catch((err) => {
console.log('获取七牛云token失败', err)
})
},
//
uploadFaultImage() {
if (!this.qiniuToken) {
uni.showToast({
title: '上传token获取失败请重试',
icon: 'none',
duration: 2000
})
this.getQiniuToken()
return
}
let _this = this
let math = 'static/' + _this.$u.guid(20)
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success(res) {
const tempFilePaths = res.tempFilePaths[0]
// 5MB
uni.getFileInfo({
filePath: tempFilePaths,
success(fileInfo) {
if (fileInfo.size > 5 * 1024 * 1024) {
uni.showToast({
title: '图片大小不能超过5MB',
icon: 'none',
duration: 2000
})
return
}
//
uni.showLoading({
title: '图片上传中...',
mask: true
})
//
wx.uploadFile({
url: 'https://up-z2.qiniup.com',
name: 'file',
filePath: tempFilePaths,
formData: {
token: _this.qiniuToken,
key: 'bike/img/' + math
},
success: function(res) {
uni.hideLoading()
try {
let str = JSON.parse(res.data)
_this.faultPicture = 'https://api.ccttiot.com/' + str.key
uni.showToast({
title: '上传成功',
icon: 'success',
duration: 1500
})
} catch (e) {
uni.showToast({
title: '上传失败,请重试',
icon: 'none',
duration: 2000
})
}
},
fail: function(err) {
uni.hideLoading()
uni.showToast({
title: '上传失败,请重试',
icon: 'none',
duration: 2000
})
}
})
}
})
},
fail(err) {
uni.showToast({
title: '未授权访问相册权限,请授权后使用',
icon: 'none',
duration: 2000
})
}
})
},
//
previewFaultImage() {
if (this.faultPicture) {
uni.previewImage({
current: this.faultPicture,
urls: [this.faultPicture]
})
}
},
//
deleteFaultImage() {
uni.showModal({
title: '提示',
content: '确定要删除这张图片吗?',
success: (res) => {
if (res.confirm) {
this.faultPicture = ''
}
}
})
},
// SN
scanDeviceSn() {
uni.scanCode({
onlyFromCamera: true,
scanType: ['qrCode'],
success: (res) => {
console.log('扫码结果:', res)
// SN
function getQueryParam(url, paramName) {
let regex = new RegExp(`[?&]${paramName}=([^&]*)`)
let results = regex.exec(url)
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null
}
let sceneValue = res.result
let decodedValue = decodeURIComponent(sceneValue)
let sn = getQueryParam(decodedValue, 's') || getQueryParam(decodedValue, 'sn')
// 使
if (!sn) {
sn = res.result
}
if (sn) {
this.selectedDeviceSn = sn
uni.showToast({
title: '扫码成功',
icon: 'success',
duration: 1500
})
} else {
uni.showToast({
title: '未识别到设备SN',
icon: 'none',
duration: 2000
})
}
},
fail: (err) => {
console.error('扫码失败:', err)
uni.showToast({
title: '扫码失败,请重试',
icon: 'none',
duration: 2000
})
}
})
},
//
closeChangeBike() {
this.showChangeBike = false
this.selectedDeviceSn = ''
this.changeReason = ''
this.faultDetail = ''
this.faultPicture = ''
this.reasonIndex = -1
},
//
onReasonChange(e) {
const index = e.detail.value
this.reasonIndex = index
this.changeReason = this.reasonOptions[index].value
},
//
confirmChangeBike() {
//
if (!this.changeReason) {
uni.showToast({
title: '请选择换车原因',
icon: 'none',
duration: 2000
})
return
}
if (!this.selectedDeviceSn) {
uni.showToast({
title: '请输入目标设备SN',
icon: 'none',
duration: 2000
})
return
}
// 3.
uni.showLoading({
title: '换车中...',
mask: true
})
let data = {
orderId: this.orid,
reason: this.changeReason,
deviceSn: this.selectedDeviceSn
}
//
if (this.changeReason === 'DEVICE_FAULT') {
if (this.faultDetail) {
data.faultDetail = this.faultDetail
}
if (this.faultPicture) {
data.faultPicture = this.faultPicture
}
}
this.$u.put('/bst/order/changeDevice', data).then((res) => {
uni.hideLoading()
if (res.code === 200) {
uni.showToast({
title: '换车成功',
icon: 'success',
duration: 2000
})
//
this.closeChangeBike()
// 4.
setTimeout(() => {
this.getorderxq()
}, 1500)
} else {
uni.showToast({
title: res.msg || '换车失败',
icon: 'none',
duration: 2000
})
}
}).catch((err) => {
uni.hideLoading()
uni.showToast({
title: '换车失败',
icon: 'none',
duration: 2000
})
})
},
//
btnfuzhu() {
@ -3075,7 +3498,7 @@
z-index: 200;
padding: 40rpx;
box-sizing: border-box;
z-index: 1000;
.tops { font-size: 36rpx; font-weight: 600; text-align: center; margin-bottom: 40rpx; }
input {
width: 100%;
@ -3093,6 +3516,20 @@
margin-bottom: 20rpx;
font-size: 28rpx;
input { width: 200rpx; margin-bottom: 0; }
picker {
flex: 1;
.picker-view {
width: 200rpx;
height: 80rpx;
line-height: 80rpx;
background: #F5F7FA;
border-radius: 10rpx;
padding: 0 20rpx;
text-align: right;
font-size: 28rpx;
color: #333;
}
}
}
.anniu {
@ -3112,6 +3549,292 @@
}
}
/* 换车弹窗样式 */
.change-bike-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 680rpx;
max-height: 90vh;
background: #FFFFFF;
border-radius: 24rpx;
z-index: 1000;
box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.12);
overflow: hidden;
display: flex;
flex-direction: column;
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 40rpx;
border-bottom: 1rpx solid #F0F2F5;
.modal-title {
font-size: 36rpx;
font-weight: 600;
color: #333;
}
.modal-close {
width: 48rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;
font-size: 48rpx;
color: #909399;
border-radius: 50%;
transition: all 0.3s;
&:active {
background: #F5F7FA;
color: #606266;
}
}
}
.modal-content {
flex: 1;
padding: 40rpx;
overflow-y: auto;
.form-section {
margin-bottom: 40rpx;
&:last-child {
margin-bottom: 0;
}
.section-title {
font-size: 30rpx;
font-weight: 600;
color: #333;
margin-bottom: 24rpx;
display: flex;
align-items: center;
.required {
color: #FF4444;
margin-left: 4rpx;
}
}
.form-item {
margin-bottom: 32rpx;
&:last-child {
margin-bottom: 0;
}
.form-label {
display: flex;
align-items: center;
margin-bottom: 16rpx;
.label-text {
font-size: 28rpx;
color: #333;
font-weight: 500;
}
.label-tip {
font-size: 24rpx;
color: #909399;
margin-left: 8rpx;
}
}
.form-input {
width: 100%;
height: 88rpx;
background: #F5F7FA;
border-radius: 12rpx;
padding: 0 24rpx;
font-size: 28rpx;
color: #333;
box-sizing: border-box;
&::placeholder {
color: #C0C4CC;
}
}
.input-with-scan {
display: flex;
align-items: center;
background: #F5F7FA;
border-radius: 12rpx;
padding: 0 20rpx;
box-sizing: border-box;
.scan-icon {
width: 48rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 12rpx;
border-radius: 8rpx;
transition: all 0.3s;
&:active {
background: rgba(76, 151, 231, 0.1);
}
}
.form-input-with-icon {
flex: 1;
height: 88rpx;
font-size: 28rpx;
color: #333;
border: none;
background: transparent;
&::placeholder {
color: #C0C4CC;
}
}
}
.form-textarea {
width: 100%;
min-height: 160rpx;
background: #F5F7FA;
border-radius: 12rpx;
padding: 20rpx 24rpx;
font-size: 28rpx;
color: #333;
box-sizing: border-box;
line-height: 1.6;
&::placeholder {
color: #C0C4CC;
}
}
.picker-item {
display: flex;
justify-content: space-between;
align-items: center;
height: 88rpx;
background: #F5F7FA;
border-radius: 12rpx;
padding: 0 24rpx;
.picker-text {
font-size: 28rpx;
color: #333;
&.placeholder {
color: #C0C4CC;
}
}
}
.upload-container {
.upload-preview {
position: relative;
width: 200rpx;
height: 200rpx;
border-radius: 12rpx;
overflow: hidden;
.preview-image {
width: 100%;
height: 100%;
}
.delete-btn {
position: absolute;
top: 8rpx;
right: 8rpx;
width: 40rpx;
height: 40rpx;
background: rgba(0, 0, 0, 0.6);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
}
.upload-btn {
width: 200rpx;
height: 200rpx;
background: #F5F7FA;
border: 2rpx dashed #C0C4CC;
border-radius: 12rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: all 0.3s;
&:active {
background: #EBEDF0;
border-color: #4C97E7;
}
.upload-text {
margin-top: 12rpx;
font-size: 24rpx;
color: #4C97E7;
}
}
}
}
.form-divider {
text-align: center;
color: #909399;
font-size: 24rpx;
margin: 16rpx 0;
}
}
}
.modal-footer {
display: flex;
padding: 24rpx 40rpx 40rpx;
gap: 24rpx;
border-top: 1rpx solid #F0F2F5;
.footer-btn {
flex: 1;
height: 88rpx;
line-height: 88rpx;
text-align: center;
border-radius: 44rpx;
font-size: 32rpx;
font-weight: 500;
transition: all 0.3s;
&.cancel-btn {
background: #F5F7FA;
color: #666;
&:active {
background: #EBEDF0;
}
}
&.confirm-btn {
background: linear-gradient(90deg, #4C97E7 0%, #3A7EDB 100%);
color: #fff;
box-shadow: 0 4rpx 12rpx rgba(58, 126, 219, 0.3);
&:active {
transform: scale(0.98);
box-shadow: 0 2rpx 8rpx rgba(58, 126, 219, 0.2);
}
}
}
}
}
.maskone, .mask {
position: fixed;
top: 0; left: 0;

View File

@ -162,12 +162,20 @@
console.log(this.flag,'222222222222222');
if(this.flag == true){
console.log('121212121121121212121212121212121212121');
let finishData = {
orderId: this.orderId,
lon: this.lon,
lat: this.lat,
requiredIot: true,
macList:this.scdevlist,
}
this.$u.put(`/app/order/finishDevice`, finishData).then(res => {
if(res.code == 200){
let data = {
orderId:this.orderId,
picture:this.videoUrl,
lon:this.lon,
lat:this.lat,
requiredIot: true,
macList:this.scdevlist
}
this.$u.put(`/app/order/end`,data).then(res =>{
@ -201,15 +209,80 @@
}
})
}else{
xBlufi.notifySendCustomData({
customData: "11closesub300@"
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
}else{
console.log('54654654654654624654654564654654asdasdasd5as4d65as4d65as4d56as4d56as4d56asd4a65s');
let finishData = {
orderId: this.orderId,
lon: this.lon,
lat: this.lat,
requiredIot: true,
macList:this.scdevlist,
}
this.$u.put(`/app/order/finishDevice`, finishData).then(res => {
if(res.code == 200){
console.log('55987897857894878787878');
let data = {
orderId:this.orderId,
picture:this.videoUrl,
lon:this.lon,
lat:this.lat,
macList:this.scdevlist
}
this.$u.put(`/app/order/end`,data).then(res =>{
if (res.code == 200) {
this.fjflag = false
uni.hideLoading()
uni.showToast({
title: '还车成功',
icon: 'success',
duration: 2000
})
setTimeout(()=>{
uni.redirectTo({
url:'/page_user/yongche/orderxq?id=' + this.orderId
})
},1000)
}else if(res.msg == null) {
uni.hideLoading()
uni.showToast({
title: '未知错误',
icon: 'none',
duration: 2000
})
} else {
uni.hideLoading()
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
}else if(res.code == 20001 || res.code == 20002 || res.code == 20003){
xBlufi.notifySendCustomData({
customData: "11closesub300@"
})
let finishData = {
orderId: this.orderId,
lon: this.lon,
lat: this.lat,
requiredIot: false,
macList:this.scdevlist,
}
this.$u.put(`/app/order/finishDevice`, finishData).then(res =>{
if(res.code == 200){
let data = {
orderId:this.orderId,
picture:this.videoUrl,
lon:this.lon,
lat:this.lat,
macList:this.scdevlist
}
this.$u.put(`/app/order/end`,data).then(res =>{
@ -236,8 +309,7 @@
url:'/page_user/yongche/orderxq?id=' + this.orderId
})
},1000)
},2000)
},1000)
}else if(res.msg == null) {
uni.hideLoading()
uni.showToast({
@ -254,6 +326,22 @@
})
}
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
})
}
})
}
},

View File

@ -169,6 +169,10 @@
</view>
</view>
</view>
<!-- 押金退还提示 -->
<view class="deposit-tip" v-if="shouldShowDepositTip">
<text class="tip-text">押金将在订单结束后6小时内退还</text>
</view>
</view>
<view class="qixing">
<view class="top">
@ -339,6 +343,16 @@
channelobj:{}
}
},
computed: {
// 退
shouldShowDepositTip() {
// FINISHED
const isOrderFinished = this.info.status === 'FINISHED';
// 退autoRefunded false
const isNotRefunded = this.info.autoRefunded === false || this.info.autoRefunded === null || this.info.autoRefunded === undefined;
return isOrderFinished && isNotRefunded;
}
},
onLoad(option) {
this.id = option.id
console.log(option,this.id,'020202020');
@ -1075,7 +1089,17 @@
box-sizing: border-box;
border-bottom: 1px dashed #D8D8D8;
}
.deposit-tip{
padding: 24rpx 0;
box-sizing: border-box;
.tip-text{
display: block;
color: #FF9500;
font-size: 26rpx;
text-align: center;
line-height: 1.5;
}
}
}
.jiaoyi{
width: 702rpx;

View File

@ -745,7 +745,7 @@
icon: 'success',
duration: 2000
})
} else if (res.code == 20001) {
} else if (res.code == 20001 || res.code == 20002 || res.code == 20003) {
this.wenbentxt = '蓝牙响铃中...'
let that = this
const findDevice = () => {
@ -1118,7 +1118,7 @@
icon: 'success',
duration: 2000
})
} else if (res.code == 20001) {
} else if (res.code == 20001 || res.code == 20002 || res.code == 20003) {
uni.hideLoading()
if (that.ver_dataflag != 3) {
uni.showLoading({
@ -1698,14 +1698,22 @@
that.wenbentxtflag = true
let data = {
orderId: that.orderobj.orderId,
picture: that.imgs,
lon: that.lngsc,
lat: that.latsc,
requiredIot: true,
macList:that.scdevlist,
}
that.$u.put(`/app/order/finishDevice`, data).then(res =>{
if(res.code == 200){
let datas = {
orderId: that.orderobj.orderId,
picture: that.imgs,
lon: that.lngsc,
lat: that.latsc,
macList:that.scdevlist,
bltRemark:that.bltRemark
}
that.$u.put(`/app/order/end`, data).then(res => {
that.$u.put(`/app/order/end`, datas).then(res => {
if (res.code == 200) {
that.cheflag = true
that.fjflag = false
@ -1721,7 +1729,15 @@
url: '/page_user/yongche/orderxq?id=' +that.orderobj.orderId
})
}, 1000)
} else if (res.code == 20001) {
} else{
uni.showToast({
title: '错误' + res.msg,
icon: 'none',
duration: 5000
})
}
})
}else if (res.code == 20001 || res.code == 20002 || res.code == 20003) {
if (that.ver_dataflag == 3) {
that.wenbentxt = '蓝牙还车中...'
xBlufi.notifySendCustomData({
@ -1733,6 +1749,16 @@
})
}, 2000)
that.fjflag = false
//
let finishData = {
orderId: that.orderobj.orderId,
lon: that.lon,
lat: that.lat,
requiredIot: false,
macList:that.scdevlist,
}
that.$u.put(`/app/order/finishDevice`, finishData).then(finishRes => {
//
let data = {
orderId: that.orderobj.orderId,
picture: that.imgs,
@ -1778,6 +1804,16 @@
})
}
})
}).catch(err => {
that.wenbentxt = ''
that.wenbentxtflag = false
that.orderflag = true
uni.showToast({
title: '锁车失败: ' + (err.msg || '未知错误'),
icon: 'none',
duration: 5000
})
})
} else {
that.wenbentxt = '蓝牙还车中...'
const findDevice = () => {
@ -1799,6 +1835,16 @@
setTimeout(() => {
if (that.ver_dataflag == 3) {
that.fjflag = false
//
let finishData = {
orderId: that.orderobj.orderId,
lon: that.lon,
lat: that.lat,
requiredIot: false,
macList:that.scdevlist,
}
that.$u.put(`/app/order/finishDevice`, finishData).then(finishRes => {
//
let data = {
orderId: that.orderobj.orderId,
picture: that.imgs,
@ -1852,6 +1898,16 @@
})
}
})
}).catch(err => {
that.wenbentxt = ''
that.wenbentxtflag = false
that.orderflag = true
uni.showToast({
title: '锁车失败: ' + (err.msg || '未知错误'),
icon: 'none',
duration: 5000
})
})
} else {
that.ver_dataflag = 1
that.shibainum = 0
@ -1978,6 +2034,7 @@
})
}
})
} else if (res.cancel) {
that.wenbentxtflag = false
that.wenbentxt = ''
@ -2072,7 +2129,6 @@
}
}
findDevice()
let that = this
that.wenbentxt = '车辆锁车中...'
that.wenbentxtflag = true
@ -2084,7 +2140,7 @@
macList:that.scdevlist,
bltRemark:that.bltRemark
}
that.$u.put(`/app/order/closeDevice`,data).then((res) => {
that.$u.put(`/app/order/finishDevice`,data).then((res) => {
if (res.code == 200) {
that.wenbentxt = ''
that.wenbentxtflag = false
@ -2099,7 +2155,7 @@
url: '/page_user/huanbike?sn=' + that.orderobj.deviceSn +'&orderid=' + that.orderobj.orderId + '&deviceid=' + that.deviceid + '&devicename=' + that.devicename + '&macList=' + this.scdevlist
})
}, 1000)
} else if (res.code == 20001) {
} else if (res.code == 20001 || res.code == 20002 || res.code == 20003) {
if (that.ver_dataflag == 3) {
uni.getLocation({
type: 'gcj02', //
@ -2344,9 +2400,9 @@
that.wenbentxt = ''
that.wenbentxtflag = false
uni.showToast({
title: res.msg,
title: '错误.' + res.msg,
icon: 'none',
duration: 2000
duration: 5000
})
}
})
@ -2465,7 +2521,7 @@
duration: 2000
})
that.orderobj.deviceLockStatus = 1
} else if (res.code == 20001) {
} else if (res.code == 20001 || res.code == 20002 || res.code == 20003) {
that.wenbentxt = '蓝牙解锁中...'
const findDevice = () => {
that.ver_dataflag = 2
@ -2624,7 +2680,7 @@
duration: 2000
})
that.orderobj.deviceLockStatus = 0
} else if (res.code == 20001) {
} else if (res.code == 20001 || res.code == 20002 || res.code == 20003) {
that.wenbentxt = '蓝牙临时锁车中...'
const findDevice = () => {
that.ver_dataflag = 2

View File

@ -19,17 +19,16 @@
bgc: {
backgroundColor: "",
},
};
}
},
methods: {},
};
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.wuche {
width: 100%;
text-align: center;
@ -45,7 +44,6 @@
color: #929292;
margin-top: 20rpx;
}
.fujin {
width: 256rpx;
height: 90rpx;
@ -59,7 +57,6 @@
margin: 20rpx auto;
}
}
.bj {
width: 100%;
height: 100vh;