111
This commit is contained in:
parent
a87979d20f
commit
3ec55768d0
|
@ -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,45 +667,65 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getshopList() {
|
getshopList() {
|
||||||
let data = {
|
let that=this
|
||||||
// phoneLon:this.gps.latitude,
|
uni.getLocation({
|
||||||
phoneLon: 120.257144,
|
type: 'gcj02',
|
||||||
// phoneLat:this.gps.longitude,
|
success: function(lb) {
|
||||||
phoneLat: 27.105719,
|
|
||||||
isFreeCar: true
|
|
||||||
}
|
let data = {
|
||||||
this.$u.post(`app/getStoreListByLocation`, data).then((res) => {
|
// phoneLon:this.gps.latitude,
|
||||||
if (res.code == 200) {
|
phoneLon: lb.longitude,
|
||||||
this.shopList = res.data;
|
// phoneLat:this.gps.longitude,
|
||||||
this.shopList.forEach(item => {
|
phoneLat: lb.latitude,
|
||||||
this.markers.push({
|
isFreeCar: true
|
||||||
id: parseFloat(item.storeId),
|
}
|
||||||
latitude: parseFloat(item.lat),
|
that.$u.post(`app/getStoreListByLocation`, data).then((res) => {
|
||||||
longitude: parseFloat(item.lng),
|
if (res.code == 200) {
|
||||||
width: 5,
|
that.shopList = res.data;
|
||||||
height: 5,
|
that.shopList.forEach(item => {
|
||||||
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/uzNZFrhZypy1CdYMHlhi',
|
that.markers.push({
|
||||||
label: {
|
id: parseFloat(item.storeId),
|
||||||
content: '¥69 起', // 修改为你想要显示的文字内容
|
latitude: parseFloat(item.lat),
|
||||||
color: '#fff', // 文字颜色
|
longitude: parseFloat(item.lng),
|
||||||
fontSize: 12, // 文字大小
|
width: 5,
|
||||||
borderRadius: 16, // 圆角
|
height: 5,
|
||||||
bgColor: '#4297F3', // 背景颜色
|
iconPath: 'https://lxnapi.ccttiot.com/bike/img/static/uzNZFrhZypy1CdYMHlhi',
|
||||||
padding: 2, // 内边距
|
label: {
|
||||||
borderWidth: 2, // 边框宽度
|
content: '¥69 起', // 修改为你想要显示的文字内容
|
||||||
borderColor: '#FFFFFF', // 边框颜色
|
color: '#fff', // 文字颜色
|
||||||
display: 'ALWAYS', // 一直显示
|
fontSize: 12, // 文字大小
|
||||||
},
|
borderRadius: 16, // 圆角
|
||||||
});
|
bgColor: '#4297F3', // 背景颜色
|
||||||
})
|
padding: 2, // 内边距
|
||||||
} else {
|
borderWidth: 2, // 边框宽度
|
||||||
|
borderColor: '#FFFFFF', // 边框颜色
|
||||||
|
display: 'ALWAYS', // 一直显示
|
||||||
|
},
|
||||||
|
});
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: function(error) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
|
// that.getmarks()
|
||||||
|
// 在这里处理获取位置信息失败的情况
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
chooseData(item, index) {
|
chooseData(item, index) {
|
||||||
this.dataInfo = item
|
this.dataInfo = item
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
19
pages/my.vue
19
pages/my.vue
|
@ -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({
|
// uni.navigateTo({
|
||||||
url:'/page_user/user_order?orderNo='+item.orderNo
|
// url:'/page_user/user_order?orderNo='+item.orderNo
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
uni.navigateTo({
|
||||||
|
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 = '已结束';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user