This commit is contained in:
tx 2024-10-31 17:47:13 +08:00
parent a87979d20f
commit 3ec55768d0
5 changed files with 149 additions and 56 deletions

View File

@ -102,7 +102,7 @@
取车地点 取车地点
</view> </view>
<view class="type"> <view class="type">
距最近店铺727m 距最近店铺 {{returnKm(shopList[0])}}
</view> </view>
</view> </view>
<view class="bot"> <view class="bot">
@ -162,7 +162,7 @@
</map> </map>
<view class="bot_cont"> <view class="bot_cont">
<view class="fresh"> <view class="fresh" @click="getshopList">
<image src="https://lxnapi.ccttiot.com/bike/img/static/u3HPoZMHrFlRW1vAwLDT" mode=""></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/u3HPoZMHrFlRW1vAwLDT" mode=""></image>
</view> </view>
<view class="mini_store" v-if="shownormal==false"> <view class="mini_store" v-if="shownormal==false">
@ -667,18 +667,24 @@
}); });
}, },
getshopList() { getshopList() {
let that=this
uni.getLocation({
type: 'gcj02',
success: function(lb) {
let data = { let data = {
// phoneLon:this.gps.latitude, // phoneLon:this.gps.latitude,
phoneLon: 120.257144, phoneLon: lb.longitude,
// phoneLat:this.gps.longitude, // phoneLat:this.gps.longitude,
phoneLat: 27.105719, phoneLat: lb.latitude,
isFreeCar: true isFreeCar: true
} }
this.$u.post(`app/getStoreListByLocation`, data).then((res) => { that.$u.post(`app/getStoreListByLocation`, data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.shopList = res.data; that.shopList = res.data;
this.shopList.forEach(item => { that.shopList.forEach(item => {
this.markers.push({ that.markers.push({
id: parseFloat(item.storeId), id: parseFloat(item.storeId),
latitude: parseFloat(item.lat), latitude: parseFloat(item.lat),
longitude: parseFloat(item.lng), longitude: parseFloat(item.lng),
@ -706,6 +712,20 @@
}); });
} }
}); });
},
fail: function(error) {
uni.showToast({
title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能',
icon: 'none',
duration: 2000
});
// that.getmarks()
//
}
})
}, },
chooseData(item, index) { chooseData(item, index) {
this.dataInfo = item this.dataInfo = item

View File

@ -97,7 +97,7 @@
</view> </view>
<input type="text" v-model="address" placeholder="请输入您的详细地址或点击右侧进行定位" class="input" <input type="text" v-model="address" placeholder="请输入您的详细地址或点击右侧进行定位" class="input"
placeholder-style="color:#C7CDD3" @click="handleInputClick" /> placeholder-style="color:#C7CDD3" @click="handleInputClick" />
<image src="https://lxnapi.ccttiot.com/bike/img/static/ubBrE0P90fPYvhvbdzHy" mode=""> <image src="https://lxnapi.ccttiot.com/bike/img/static/ubBrE0P90fPYvhvbdzHy" mode="" @click.stop="getMapLocation()">
</image> </image>
</view> </view>
</view> </view>

View File

@ -55,7 +55,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="getType" v-if="orderInfo.status==4" @click="changeBack()"> <view class="getType" v-if="orderInfo.status==4">
<view class="type"> <view class="type">
还车方式 还车方式
</view> </view>
@ -73,7 +73,7 @@
<view style="width: 130rpx;color: #3D3D3D;font-size: 28rpx;font-weight: 600;margin-left: 8rpx;"> <view style="width: 130rpx;color: #3D3D3D;font-size: 28rpx;font-weight: 600;margin-left: 8rpx;">
取车地址 取车地址
</view> </view>
<input type="text" v-model="address" placeholder="请输入您的详细地址或点击右侧进行定位" class="input" <input type="text" v-model="orderInfo.returnAddress" placeholder="请输入您的详细地址或点击右侧进行定位" class="input"
placeholder-style="color:#C7CDD3" @click="handleInputClick" @input="cheekaddress()" /> placeholder-style="color:#C7CDD3" @click="handleInputClick" @input="cheekaddress()" />
<image src="https://lxnapi.ccttiot.com/bike/img/static/ubBrE0P90fPYvhvbdzHy" mode="" @click="getMapLocation"> <image src="https://lxnapi.ccttiot.com/bike/img/static/ubBrE0P90fPYvhvbdzHy" mode="" @click="getMapLocation">
</image> </image>
@ -180,6 +180,9 @@
<view class="text" v-if="tabindex==0"> <view class="text" v-if="tabindex==0">
请在{{orderInfo.pickupTime}}前取车超出时间将无法保证 车辆库存 请在{{orderInfo.pickupTime}}前取车超出时间将无法保证 车辆库存
</view> </view>
<view class="text" v-if="tabindex==2">
超出租车时间,{{timetype(orderInfo.rule.outUnit)}}收费{{orderInfo.rule.outPrice}}
</view>
<view class="tabble" v-if="tabindex==1"> <view class="tabble" v-if="tabindex==1">
<view class="tabble_top"> <view class="tabble_top">
<view class="tabbl_left"> <view class="tabbl_left">
@ -273,7 +276,7 @@
<view class="btn3" @click="getStoreList()" v-if="orderInfo.returnMethod==1"> <view class="btn3" @click="getStoreList()" v-if="orderInfo.returnMethod==1">
去还车 去还车
</view> </view>
<view class="btn3" v-if="orderInfo.returnMethod==2"> <view class="btn3" v-if="orderInfo.returnMethod==2" @click="subBack2()">
确认上门 确认上门
</view> </view>
<view class="btn3" @click="topage(0)"> <view class="btn3" @click="topage(0)">
@ -527,7 +530,8 @@
type: 'gcj02', type: 'gcj02',
success: (lb) => { success: (lb) => {
let data = { let data = {
returnType: this.orderInfo.returnMethod, returnType: 1,
returnMethod:this.orderInfo.returnMethod,
returnStoreId: this.chooseBackInfo.storeId, returnStoreId: this.chooseBackInfo.storeId,
orderNo: this.orderInfo.orderNo, orderNo: this.orderInfo.orderNo,
returnLon: lb.longitude, returnLon: lb.longitude,
@ -559,6 +563,55 @@
} }
}); });
}, },
subBack2() {
if (!this.orderInfo.returnAddress) {
uni.showToast({
title: '请输入或选择还车地址',
icon: 'none',
duration: 1000
});
return
}
uni.showLoading({
title: '加载中'
});
uni.getLocation({
type: 'gcj02',
success: (lb) => {
let data = {
returnType: 1,
returnMethod:this.orderInfo.returnMethod,
orderNo: this.orderInfo.orderNo,
};
this.$u.post(`/appVerify/returnVehicle`, data).then((res) => {
uni.hideLoading();
if (res.code == 200) {
uni.redirectTo({
url: '/pages/my'
})
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
fail: (error) => {
uni.hideLoading();
uni.showToast({
title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能',
icon: 'none',
duration: 2000
});
//
}
});
},
chooseBack(item, index) { chooseBack(item, index) {
this.addchoose = index this.addchoose = index
this.chooseBackInfo = item this.chooseBackInfo = item
@ -960,8 +1013,11 @@
}) })
}, },
orderCancel() { orderCancel() {
uni.showLoading({
title:'加载中...'
})
this.$u.post(`appVerify/orderCancel?orderNo=` + this.orderInfo.orderNo).then((res) => { this.$u.post(`appVerify/orderCancel?orderNo=` + this.orderInfo.orderNo).then((res) => {
uni.hideLoading()
if (res.code == 200) { if (res.code == 200) {
this.getOrderInfo() this.getOrderInfo()
@ -1115,6 +1171,11 @@
if (this.orderInfo.status == 0) { if (this.orderInfo.status == 0) {
this.startCountdown(this.orderInfo.autoCancelTime); this.startCountdown(this.orderInfo.autoCancelTime);
} }
if(this.orderInfo.returnMethod==2){
this.choosetype=2
}else{
this.choosetype=1
}
} else { } else {
uni.showToast({ uni.showToast({

View File

@ -26,7 +26,7 @@
取车地点 取车地点
</view> </view>
<view class="type"> <view class="type">
距最近店铺727m 距最近店铺 {{returnKm(shopList[0])}}
</view> </view>
</view> </view>
<view class="bot"> <view class="bot">
@ -78,7 +78,7 @@
</view> </view>
<view class="type_box"> <view class="type_box">
<view class="type"> <view class="type">
{{item.distance}}m {{returnKm(item)}}
</view> </view>
<view class="address"> <view class="address">
{{item.simpleAddress}} {{item.simpleAddress}}
@ -235,6 +235,15 @@
}, },
methods: { methods: {
returnKm(item) {
let distance = item.distance
if (distance < 1000) {
return `${distance.toFixed(0)}m`; // 1000'm'
} else {
return `${(distance / 1000).toFixed(1)}km`; // 1000
}
},
getsn(){ getsn(){
if(this.userInfo.userId){ if(this.userInfo.userId){
let data = { let data = {

View File

@ -13,7 +13,7 @@
待支付 待支付
</view> </view>
<view class="tap_cont" :class="status==3?'act1':''" @click="changeidx(3)"> <view class="tap_cont" :class="status==3?'act1':''" @click="changeidx(3)">
完成 结束
</view> </view>
</view> </view>
@ -48,7 +48,7 @@
</view> </view>
<view class="info_li"> <view class="info_li">
<view class="txt" v-if="item.deliveryMethod!=1||item.returnMethod==2" style="width: 80%;">用户地址{{item.pickupLoc}}</view> <view class="txt" v-if="item.deliveryMethod!=1||item.returnMethod==2" style="width: 80%;">用户地址{{item.returnAddress}}</view>
<view class="txt" v-else > </view> <view class="txt" v-else > </view>
<view class="txt2">{{item.payFee}}</view> <view class="txt2">{{item.payFee}}</view>
</view> </view>
@ -142,11 +142,14 @@
} }
}, },
todetail(item){ todetail(item){
if(item.status!=5&&item.status!=6){ // if(item.status!=5&&item.status!=6){
// uni.navigateTo({
// url:'/page_user/user_order?orderNo='+item.orderNo
// })
// }
uni.navigateTo({ uni.navigateTo({
url:'/page_user/user_order?orderNo='+item.orderNo url:'/page_user/user_order?orderNo='+item.orderNo
}) })
}
}, },
typeReturn(num) { typeReturn(num) {
@ -173,7 +176,7 @@
result.text = '已取消'; result.text = '已取消';
result.color = '#ccc'; // result.color = '#ccc'; //
} else if (num == 7) { } else if (num == 7) {
result.text = '已完成'; result.text = '待审核';
result.color = '#3D3D3D'; // result.color = '#3D3D3D'; //
} else if (num == 8) { } else if (num == 8) {
result.text = '已结束'; result.text = '已结束';