11
This commit is contained in:
parent
9e54529535
commit
a87979d20f
|
@ -93,9 +93,12 @@
|
|||
<view class="price">
|
||||
日租¥<span>{{item.price}}</span>
|
||||
</view>
|
||||
<view class="btn" @click="" @click="toOrdder(storeInfo,item)">
|
||||
<view class="btn" @click="" @click="toOrdder(storeInfo,item)" :style="{ background: item.rentalCar < 1 ? '#ccc' : ''}">
|
||||
立即租
|
||||
</view>
|
||||
<!-- <view class="red1" :style="{ color: item.rentalCar < 1 ? '#ccc' : 'inherit', whiteSpace: 'nowrap' }">
|
||||
<span>{{ item.rentalCar }}</span>辆
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -196,10 +199,19 @@
|
|||
},
|
||||
methods: {
|
||||
toOrdder(item,items){
|
||||
if(items.rentalCar>0){
|
||||
console.log(items,'toOrdder');
|
||||
uni.navigateTo({
|
||||
url:'/page_user/ordder?storeId='+item.storeId+'&modelId='+items.modelId
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '改车型已没货,请查看其他车型',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
mapFun() {
|
||||
console.log('点击了');
|
||||
|
|
|
@ -222,7 +222,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="lines"></view>
|
||||
<view class="car" v-if="item.models[1]">
|
||||
<view class="car" v-if="item.models[1]" style="padding-left: 20rpx;">
|
||||
<view class="imgs">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ugqn6cdklXtHgERyLHMq"
|
||||
mode=""></image>
|
||||
|
@ -289,7 +289,7 @@
|
|||
</view>
|
||||
<view class="right">
|
||||
日租¥ <span>{{item.price}}</span>
|
||||
<view class="btn" @click="toOrdder(choseStore,item)">
|
||||
<view class="btn" @click="toOrdder(choseStore,item)" :style="{ background: item.rentalCar < 1 ? '#ccc' : ''}">
|
||||
立即租
|
||||
</view>
|
||||
</view>
|
||||
|
@ -476,9 +476,19 @@
|
|||
methods: {
|
||||
toOrdder(item,items){
|
||||
console.log(items,'toOrdder');
|
||||
|
||||
if(items.rentalCar>0){
|
||||
console.log(items,'toOrdder');
|
||||
uni.navigateTo({
|
||||
url:'/page_user/ordder?storeId='+item.storeId+'&modelId='+items.modelId
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '改车型已没货,请查看其他车型',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
},
|
||||
toStore(item){
|
||||
console.log(item,'itemitemitem');
|
||||
|
@ -700,6 +710,7 @@
|
|||
chooseData(item, index) {
|
||||
this.dataInfo = item
|
||||
this.dataIndex = index
|
||||
this.showdata=false
|
||||
},
|
||||
closeData() {
|
||||
this.showdata = false
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
</view>
|
||||
<view class="txt"
|
||||
style="width: 100%;display: flex;flex-wrap: nowrap;justify-content: space-between;">
|
||||
2024年09月04日 16:00 <view
|
||||
{{time}} <view
|
||||
style="color:#808080 ;margin-left: 80rpx;font-size: 28rpx;display: flex;align-items: center;"
|
||||
@click="time1=true">
|
||||
更改时间 <image src="https://lxnapi.ccttiot.com/bike/img/static/uqQXXl6pKLlJDYAFrxFI"
|
||||
|
@ -355,6 +355,7 @@
|
|||
我知道了
|
||||
</view>
|
||||
</view>
|
||||
<u-mask :show="showmx" :z-index='100' @click="showmx=false"/>
|
||||
<view class="sub_box">
|
||||
<view class="detail" v-if="showmx">
|
||||
|
||||
|
@ -472,41 +473,9 @@
|
|||
}
|
||||
|
||||
console.log(e, 'eee');
|
||||
},
|
||||
onShow() {
|
||||
// this.getToken()
|
||||
let that = this
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: function(lb) {
|
||||
|
||||
that.gps.latitude = lb.latitude;
|
||||
that.gps.longitude = lb.longitude;
|
||||
that.getKm()
|
||||
},
|
||||
fail: function(error) {
|
||||
uni.showToast({
|
||||
title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
// that.getmarks()
|
||||
// 在这里处理获取位置信息失败的情况
|
||||
}
|
||||
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('.getcar').boundingClientRect(data => {
|
||||
|
||||
this.height = data.height + 45
|
||||
console.log('ips_box height:', this.height);
|
||||
}).exec();
|
||||
}, 300);
|
||||
this.calculateDistance(0);
|
||||
this.getmodelInfo()
|
||||
this.getstoreInfo()
|
||||
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = now.getMonth() + 1; // 月份从0开始,因此加1
|
||||
|
@ -543,6 +512,41 @@
|
|||
`${year}年${nextMonth < 10 ? '0' : ''}${nextMonth}月${nextDay < 10 ? '0' : ''}${nextDay}日 ${hour < 10 ? '0' : ''}${hour}:${minute < 10 ? '0' : ''}${minute}`;
|
||||
// 初始化 pickertime 为当天的默认日期
|
||||
this.pickertime = this.startDate;
|
||||
let that = this
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
success: function(lb) {
|
||||
|
||||
that.gps.latitude = lb.latitude;
|
||||
that.gps.longitude = lb.longitude;
|
||||
that.getKm()
|
||||
},
|
||||
fail: function(error) {
|
||||
uni.showToast({
|
||||
title: '未获取到定位信息,请点击设置勾选允许位置信息,即可使用全部功能',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
// that.getmarks()
|
||||
// 在这里处理获取位置信息失败的情况
|
||||
}
|
||||
|
||||
})
|
||||
this.$nextTick(() => {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
query.select('.getcar').boundingClientRect(data => {
|
||||
|
||||
this.height = data.height + 45
|
||||
console.log('ips_box height:', this.height);
|
||||
}).exec();
|
||||
}, 300);
|
||||
},
|
||||
onShow() {
|
||||
// this.getToken()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log('startDate:', this.startDate);
|
||||
console.log('time:', this.time);
|
||||
|
@ -1153,7 +1157,7 @@
|
|||
|
||||
.sub_box {
|
||||
position: fixed;
|
||||
|
||||
z-index: 110;
|
||||
bottom: 0;
|
||||
|
||||
.detail {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<view class="fixed">
|
||||
<u-navbar :custom-back='back' title=" " :border-bottom="false" :background="background" title-color='#fff' title-size='36'
|
||||
height='45' back-icon-color='#000'></u-navbar>
|
||||
<u-navbar :custom-back='back' title=" " :border-bottom="false" :background="background" title-color='#fff'
|
||||
title-size='36' height='45' back-icon-color='#000'></u-navbar>
|
||||
</view>
|
||||
<view class="backimg">
|
||||
|
||||
|
@ -59,6 +59,9 @@
|
|||
<view class="type">
|
||||
还车方式
|
||||
</view>
|
||||
<view class="txt" v-if="orderInfo.returnMethod==null">
|
||||
请选择还车方式
|
||||
</view>
|
||||
<view class="txt" v-if="orderInfo.returnMethod==1">
|
||||
自行前往门店还车
|
||||
</view>
|
||||
|
@ -66,14 +69,20 @@
|
|||
上门取车
|
||||
</view>
|
||||
</view>
|
||||
<view class="li" @click="handleClick" v-if="choosetype==2">
|
||||
<view class="li" v-if="choosetype==2">
|
||||
<view style="width: 130rpx;color: #3D3D3D;font-size: 28rpx;font-weight: 600;margin-left: 8rpx;">
|
||||
取车地址
|
||||
</view>
|
||||
<input type="text" v-model="address" placeholder="请输入您的详细地址或点击右侧进行定位" class="input"
|
||||
placeholder-style="color:#C7CDD3" @click="handleInputClick" />
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ubBrE0P90fPYvhvbdzHy" mode="">
|
||||
placeholder-style="color:#C7CDD3" @click="handleInputClick" @input="cheekaddress()" />
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ubBrE0P90fPYvhvbdzHy" mode="" @click="getMapLocation">
|
||||
</image>
|
||||
|
||||
</view>
|
||||
<view class="li" style="align-items: center;justify-content: center;" @click="method2" v-if="choosetype==2">
|
||||
<view class="txt" style="color: #0D75E5;">
|
||||
保存并使用
|
||||
</view>
|
||||
</view>
|
||||
<view class="info_box">
|
||||
<view class="car_info">
|
||||
|
@ -258,10 +267,13 @@
|
|||
</view> -->
|
||||
</view>
|
||||
<view class="btn_li2" v-if="orderInfo.status==4">
|
||||
<view class="btn3" @click="showBack=true" v-if="!orderInfo.returnMethod">
|
||||
去还车
|
||||
</view>
|
||||
<view class="btn3" @click="getStoreList()" v-if="orderInfo.returnMethod==1">
|
||||
去还车
|
||||
</view>
|
||||
<view class="btn3" @click="subback()" v-if="orderInfo.returnMethod==2">
|
||||
<view class="btn3" v-if="orderInfo.returnMethod==2">
|
||||
确认上门
|
||||
</view>
|
||||
<view class="btn3" @click="topage(0)">
|
||||
|
@ -271,7 +283,8 @@
|
|||
续租
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn_li3" v-if="orderInfo.status==8||orderInfo.status==5||orderInfo.status==6">
|
||||
<view class="btn_li3"
|
||||
v-if="orderInfo.status==8||orderInfo.status==5||orderInfo.status==6||orderInfo.status==7">
|
||||
<view class="btn3" style="width: 1rpx;"></view>
|
||||
<view class="btn5" @click="tosubOrder()">
|
||||
重新下单
|
||||
|
@ -284,7 +297,8 @@
|
|||
<u-mask :show="showaddress" :z-index='100' duration='0' />
|
||||
<view class="address_box" v-if="showaddress">
|
||||
<view class="close">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uBhLz9V8ZDw6PfEfQHL9" mode="" @click="showaddress=false"></image>
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/uBhLz9V8ZDw6PfEfQHL9" mode=""
|
||||
@click="showaddress=false"></image>
|
||||
</view>
|
||||
<view class="tit5">
|
||||
支持多店还车
|
||||
|
@ -340,6 +354,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<u-mask :show="showsub" :z-index='100' duration='0' @click="closeSub()" />
|
||||
|
||||
<view class="sub_car" v-if="showsub">
|
||||
<view class="tit3">
|
||||
确认用车
|
||||
|
@ -374,11 +389,18 @@
|
|||
</view>
|
||||
</view>
|
||||
<u-select v-model="showList" :list="list" title='选择换车方式' @confirm="confirm"></u-select>
|
||||
<u-mask :show="showBack" :z-index='100' duration='0' @click="showBack=false" />
|
||||
<view class="backtip" v-if="showBack">
|
||||
<image src="https://lxnapi.ccttiot.com/bike/img/static/ubcBvAyCGMtKxPyKgg9w" mode=""></image>
|
||||
<view class="qsBtn" @click="showBack=false">
|
||||
我知道了
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
let timerId;
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -411,7 +433,8 @@
|
|||
deviceInfo: {},
|
||||
storeList: [],
|
||||
addchoose: -1,
|
||||
chooseBackInfo: {}
|
||||
chooseBackInfo: {},
|
||||
showBack: false
|
||||
|
||||
}
|
||||
},
|
||||
|
@ -423,11 +446,13 @@
|
|||
if (pages.length > 1) {
|
||||
const previousPage = pages[pages.length - 2]; // 获取上一个页面
|
||||
console.log('上一个页面路径:', previousPage.route); // 打印上一个页面的路径
|
||||
|
||||
console.log('上一个页面参数:', previousPage.options); // 打印上一个页面的参数
|
||||
}
|
||||
this.getOrderInfo()
|
||||
},
|
||||
onShow() {
|
||||
this.getOrderInfo()
|
||||
|
||||
},
|
||||
methods: {
|
||||
closeSub() {
|
||||
|
@ -667,15 +692,37 @@
|
|||
handleClick() {
|
||||
if (!this.address) {
|
||||
this.getMapLocation();
|
||||
// this.$u.get('app/getDeviceBySn?sn=' + this.sn).then((res) => {
|
||||
// console.log(res, 'rererer');
|
||||
// if (res.code === 200) {
|
||||
// // console.log(this.areaId,);
|
||||
// this.deviceInfo = res.data
|
||||
// this.showsub = true
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
handleInputClick(event) {
|
||||
if (!this.address) {
|
||||
// 阻止输入框默认行为,避免在 address 为空时进行输入
|
||||
event.stopPropagation();
|
||||
// event.stopPropagation();
|
||||
this.getMapLocation();
|
||||
}
|
||||
},
|
||||
// cheekaddress(){
|
||||
// clearTimeout(timerId);
|
||||
// // 设置一个新的定时器,在滑动停止后 500ms 执行 getmarks 方法
|
||||
// timerId = setTimeout(() => {
|
||||
// if(this.address!='')
|
||||
// }, 700);
|
||||
|
||||
// },
|
||||
getMapLocation() {
|
||||
uni.chooseLocation({
|
||||
success: (res) => {
|
||||
|
@ -750,12 +797,69 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
|
||||
method2() {
|
||||
if (!this.addlon) {
|
||||
uni.showToast({
|
||||
title: '请选择地址',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.address) {
|
||||
uni.showToast({
|
||||
title: '请输入地址',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
orderNo: this.orderInfo.orderNo,
|
||||
returnMethod: 2,
|
||||
returnLon: this.addlon,
|
||||
returnLat: this.addlat,
|
||||
returnAddress: this.address
|
||||
}
|
||||
this.$u.put('appVerify/returnAddress', data).then((res) => {
|
||||
console.log(res, 'rererer');
|
||||
if (res.code === 200) {
|
||||
// console.log(this.areaId,);
|
||||
this.getOrderInfo()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
method1() {
|
||||
let data = {
|
||||
orderNo: this.orderInfo.orderNo,
|
||||
returnMethod: 1
|
||||
}
|
||||
this.$u.put('appVerify/returnAddress', data).then((res) => {
|
||||
console.log(res, 'rererer');
|
||||
if (res.code === 200) {
|
||||
// console.log(this.areaId,);
|
||||
this.getOrderInfo()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
console.log(e);
|
||||
if(e.value==1){
|
||||
if (e[0].value == 1) {
|
||||
this.orderInfo.returnMethod = 1
|
||||
this.choosetype = 1
|
||||
this.method1()
|
||||
} else {
|
||||
this.orderInfo.returnMethod = 2
|
||||
this.choosetype = 2
|
||||
|
@ -1072,6 +1176,37 @@
|
|||
.page {
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
.backtip {
|
||||
position: fixed;
|
||||
top: 450rpx;
|
||||
left: 110rpx;
|
||||
z-index: 110;
|
||||
width: 532rpx;
|
||||
height: 580rpx;
|
||||
|
||||
image {
|
||||
|
||||
width: 532rpx;
|
||||
height: 580rpx;
|
||||
}
|
||||
|
||||
.qsBtn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
left: 118rpx;
|
||||
bottom: 62rpx;
|
||||
width: 292rpx;
|
||||
height: 68rpx;
|
||||
background: #4C97E7;
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.address_box {
|
||||
z-index: 110;
|
||||
position: fixed;
|
||||
|
@ -1672,7 +1807,11 @@
|
|||
padding: 20rpx 10rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
|
||||
.txt{
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #0D75E5;
|
||||
}
|
||||
.input {
|
||||
width: 480rpx;
|
||||
}
|
||||
|
|
|
@ -354,6 +354,7 @@
|
|||
// index,index
|
||||
// }
|
||||
// uni.setStorageSync('data', item);
|
||||
this.showdata=false
|
||||
this.dataInfo = item
|
||||
this.dataIndex = index
|
||||
},
|
||||
|
|
|
@ -392,7 +392,7 @@
|
|||
|
||||
|
||||
}
|
||||
this.$u.post("/appCodeLogin", data).then((res) => {
|
||||
this.$u.post("/app/appCodeLogin", data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 登录成功后的操作
|
||||
wx.setStorageSync('token', res.token);
|
||||
|
@ -451,7 +451,7 @@
|
|||
return;
|
||||
}
|
||||
this.isCodeButtonDisabled = true;
|
||||
this.$u.get("/appCaptcha?type=1&phone=" + this.phone).then((res) => {
|
||||
this.$u.get("/app/appCaptcha?type=1&phone=" + this.phone).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.uuid = res.uuid
|
||||
this.startCountdown();
|
||||
|
@ -484,7 +484,7 @@
|
|||
return;
|
||||
}
|
||||
this.isCodeButtonDisabled2 = true;
|
||||
this.$u.get("/appCaptcha?type=1&phone=" + this.phone2).then((res) => {
|
||||
this.$u.get("/app/appCaptcha?type=1&phone=" + this.phone2).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.uuid = res.uuid
|
||||
this.startCountdown2();
|
||||
|
@ -553,7 +553,7 @@
|
|||
uuid: this.uuid,
|
||||
openid:this.openCode
|
||||
}
|
||||
this.$u.post("/appCodeLogin", data).then((res) => {
|
||||
this.$u.post("/app/appCodeLogin", data).then((res) => {
|
||||
if (res.code == 200) {
|
||||
// 登录成功后的操作
|
||||
wx.setStorageSync('token', res.token);
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="info_li">
|
||||
<view class="txt" v-if="item.returnMethod==1">取车方式:自行前往门店</view>
|
||||
<view class="txt" v-if="item.returnMethod==2">取车方式:自行前往门店</view>
|
||||
<view class="txt" v-if="item.returnMethod==3">取车方式:自行前往门店</view>
|
||||
<view class="txt" v-if="item.deliveryMethod==1">取车方式:自行前往门店</view>
|
||||
<view class="txt" v-if="item.deliveryMethod==2">取车方式:免费送车上门</view>
|
||||
<view class="txt" v-if="item.deliveryMethod==3">取车方式:收费送车上门</view>
|
||||
</view>
|
||||
<view class="info_li">
|
||||
<view class="txt">还车时间:{{item.expiryTime}}</view>
|
||||
|
@ -48,7 +48,8 @@
|
|||
</view>
|
||||
|
||||
<view class="info_li">
|
||||
<view class="txt">用户地址:福鼎市太姥山镇秦屿大道2号</view>
|
||||
<view class="txt" v-if="item.deliveryMethod!=1||item.returnMethod==2" style="width: 80%;">用户地址:{{item.pickupLoc}}</view>
|
||||
<view class="txt" v-else > </view>
|
||||
<view class="txt2">{{item.payFee}}元</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
|
|
Loading…
Reference in New Issue
Block a user