This commit is contained in:
Sliverber 2024-05-31 17:54:23 +08:00
parent fb18e8fd55
commit 55f3974337
9 changed files with 921 additions and 735 deletions

View File

@ -21,8 +21,9 @@ const install = (Vue, vm) => {
// }); // });
Vue.prototype.$u.http.setConfig({ Vue.prototype.$u.http.setConfig({
// baseUrl: 'http://61.174.243.28:15861', // baseUrl: 'http://61.174.243.28:15861',
baseUrl: 'http://192.168.2.6:8080', // baseUrl: 'http://192.168.2.6:8080',
// baseUrl: 'https://dche.ccttiot.com/prod-api', // baseUrl: 'http://124.221.246.124:2289',
baseUrl: 'https://dche.ccttiot.com/prod-api',
loadingText: '努力加载中~', loadingText: '努力加载中~',
loadingTime: 800, loadingTime: 800,
// 设置自定义头部content-type // 设置自定义头部content-type
@ -128,7 +129,13 @@ const install = (Vue, vm) => {
}) })
} else { }else if(res.code == 501){
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}else {
// console.log("老用户登录",res.data) // console.log("老用户登录",res.data)
uni.redirectTo({ uni.redirectTo({
url:'/pages/login/login' url:'/pages/login/login'

View File

@ -1,13 +1,12 @@
<template> <template>
<view class="page"> <view class="page">
<u-navbar title="查看明细" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' <u-navbar title="费用明细" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36' height='36'></u-navbar>
height='36'></u-navbar>
<view class="tit"> <view class="tit">
<view class="left">电单车</view> <view class="left">电单车</view>
<view class="right">查看计费规则 ></view> <!-- <view class="right">查看计费规则 ></view> -->
</view> </view>
<view class="data"> <view class="data">
2023-12-31 {{info.createTime}}
</view> </view>
<view class="card"> <view class="card">
<view class="card_tit"> <view class="card_tit">
@ -16,35 +15,48 @@
<view class="cont"> <view class="cont">
<view class="cont_box"> <view class="cont_box">
<view class="cont_left"> <view class="cont_left">
起步价15分钟 预约费
</view> </view>
<view class="cont_right"> <view class="cont_right">
2.00 {{info.appointmentFee}}
</view> </view>
</view> </view>
<view class="cont_box" style="margin-top: 20rpx;"> <view class="cont_box" style="margin-top: 20rpx;">
<view class="cont_left"> <view class="cont_left">
时长费16分钟 骑行费
</view> </view>
<view class="cont_right"> <view class="cont_right">
2.00 {{info.ridingFee}}
</view>
</view>
<view class="cont_box" style="margin-top: 20rpx;">
<view class="cont_left">
管理费
</view>
<view class="cont_right">
{{info.manageFee}}
</view>
</view>
<view class="cont_box" style="margin-top: 20rpx;">
<view class="cont_left">
调度费
</view>
<view class="cont_right">
{{info.dispatchFee}}
</view> </view>
</view> </view>
<view class="tip"> <view class="tip">
已骑行30分9秒 已骑行{{ rideDuration }}
</view> </view>
</view> </view>
<view class="price"> <view class="price">
<view class="zhanwei"> <view class="zhanwei"></view>
</view>
<view class="prices"> <view class="prices">
实付 <span style="font-size:48rpx ;">4.00</span> 共计<span style="font-size:48rpx ;">{{info.totalFee}}</span>
</view> </view>
</view> </view>
</view> </view>
<view class="card"> <view class="card" v-if="false">
<view class="card_tit"> <view class="card_tit">
账单信息 账单信息
</view> </view>
@ -57,32 +69,21 @@
2.00 2.00
</view> </view>
</view> </view>
<view class="tip"> <view class="tip">
已骑行30分9秒 已骑行30分9秒
</view> </view>
</view> </view>
<view class="price"> <view class="price">
<view class="zhanwei"> <view class="zhanwei"></view>
</view>
<view class="prices"> <view class="prices">
实付 <span style="font-size:48rpx ;">4.00</span> 实付 <span style="font-size:48rpx ;">4.00</span>
</view> </view>
</view> </view>
<view class="price" style="margin-top: 0;"> <view class="price" style="margin-top: 0;">
<view class="zhanwei"> <view class="zhanwei"></view>
</view>
<view class="showmore"> <view class="showmore">
查看支付方式 查看支付方式
<view class="iconfont icon-xiangxia1"> <view class="iconfont icon-xiangxia1"></view>
</view>
<!-- <view class="iconfont icon-xiangshang1">
</view> -->
</view> </view>
</view> </view>
<view class="info_cont"> <view class="info_cont">
@ -120,150 +121,42 @@
bgc: { bgc: {
backgroundColor: "", backgroundColor: "",
}, },
id: 0,
info: {},
rideDuration: '' //
} }
}, },
methods: { onLoad(e) {
this.id = e.orderId
if(this.id){
this.orderInfo()
}
},
methods: {
orderInfo() {
this.$u.get("/appVerify/order/" + this.id).then((res) => {
if (res.code == 200) {
this.info = res.data
this.calculateRideDuration(); //
}
});
},
calculateRideDuration() {
const createTime = new Date(this.info.createTime);
const returnTime = new Date(this.info.returnTime);
const duration = (returnTime - createTime) / 1000; //
const hours = Math.floor(duration / 3600);
const minutes = Math.floor((duration % 3600) / 60);
const seconds = Math.floor(duration % 60);
if (hours > 0) {
this.rideDuration = `${hours}小时${minutes}${seconds}`;
} else {
this.rideDuration = `${minutes}${seconds}`;
}
}
} }
} }
</script> </script>
<style lang="scss" >
page{
background-color: #F7FAFE;
}
.page{
// width: 750rpx;
width: 750rpx;
// height: 530rpx;
background: linear-gradient( 180deg, #4C97E7 0.1%, rgba(255,255,255,0) 40%), #FFFFFF;
border-radius: 0rpx 0rpx 0rpx 0rpx;
.tit{
margin-left: 86rpx;
margin-right: 86rpx;
margin-top: 30rpx;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
.left{
font-weight: 700;
font-size: 40rpx;
color: #3D3D3D;
}
.right{
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
}
}
.data{
margin-left: 86rpx;
font-weight: 400;
font-size: 24rpx;
color: #808080;
}
.card{
padding:34rpx 44rpx ;
margin: 68rpx auto;
width: 672rpx;
// height: 458rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0,0,0,0.08);
border-radius: 32rpx 32rpx 32rpx 32rpx;
.card_tit{
width: 112rpx;
height: 38rpx;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
background: linear-gradient( 0deg, #B1C3FF 0.1%, rgba(255,255,255,0) 40%), #FFFFFF;
}
.cont{
padding: 32rpx 28rpx;
margin-top: 26rpx;
width: 586rpx;
// height: 228rpx;
background: #F3F3F3;
border-radius: 26rpx 26rpx 26rpx 26rpx;
.cont_box{
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
.cont_left{
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
}
.cont_right{
font-weight: 400;
font-size: 28rpx;
color: #3D3D3D;
}
}
.tip{
margin-top: 32rpx;
font-weight: 400;
font-size: 24rpx;
color: #808080;
}
}
.price{
margin-top: 28rpx;
display: flex;
flex-wrap: nowrap;
.prices{
margin-left: auto;
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
span{
margin-left: 2rpx;
margin-right: 2rpx;
}
}
.showmore{
margin-left: auto;
display: flex;
flex-wrap: nowrap;
align-items: center;
font-weight: 400;
font-size: 20rpx;
color: #3D3D3D;
.icon-xiangshang1{
font-size: 20rpx;
color: #3D3D3D;
}
.icon-xiangxia1{
font-size: 20rpx;
color: #3D3D3D;
}
}
}
.info_cont{
margin-top: 12rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.cont_left{
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
}
.cont_right{
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
}
}
}
}
</style>

View File

@ -261,8 +261,21 @@
onlyFromCamera: true, onlyFromCamera: true,
scanType: ['qrCode'], scanType: ['qrCode'],
success: res => { success: res => {
console.log('扫描结果:', res);
this.sn = res.sn let sn = null;
let queryParams = res.result.split('?')[1];
if (queryParams) {
let params = queryParams.split('&');
params.forEach(param => {
let [key, value] = param.split('=');
if (key === 'sn') {
sn = value;
}
});
}
this.sn = sn
}, },
fail: err => { fail: err => {

View File

@ -3,16 +3,76 @@
<u-navbar title="计费规则" :border-bottom="false" :background="bgc" title-color='#000' title-size='36' <u-navbar title="计费规则" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='36'></u-navbar> height='36'></u-navbar>
<view class="cont" style="margin-top: 50rpx;"> <view class="cont" style="margin-top: 50rpx;">
<view class="tit"> <view class="tit" style="margin-top: 50rpx;">
骑行服务费 骑行服务费
</view> </view>
<view class="card">
<view class="li">
<view class="left">
预约服务费
</view>
<view class="right">
{{areaInfo. appointmentServiceFee}}/10分钟
</view>
</view>
<view class="li" style="margin-top: 38rpx;">
<view class="left">
押金
</view>
<view class="right">
{{areaInfo.vehicleManagementFee}}
</view>
</view>
</view>
<view class="tips" style="margin-top: 10rpx;margin-left: 5rpx;">
<view class="yuan">
</view>
<view class="txt">
预约服务费是在使用预约服务时预约时段内的收费标准
</view>
</view>
<view class="tips" style="margin-top: 10rpx;margin-left: 5rpx">
<view class="yuan"></view>
<view class="txt">
押金是在使用车辆前的收费标准归还设备后可退
</view>
</view>
<view class="tit" style="margin-top: 50rpx;">
免费时长
</view>
<view class="card">
<view class="li">
<view class="left">
免费时长
</view>
<view class="right">
{{freeInfo.freeRideTime}}分钟
</view>
</view>
</view>
<view >
<view v-if="freeInfo.ridingRule==1">
<view class="tit" style="margin-top: 50rpx;">
{{freeInfo.name}}
</view>
<view class="card"> <view class="card">
<view class="li"> <view class="li">
<view class="left"> <view class="left">
起步价 起步价
</view> </view>
<view class="right"> <view class="right">
{{startingPrice}}{{startingHowManyMinutes}}分钟 {{freeInfo.ridingRuleJson.startingPrice}}{{freeInfo.ridingRuleJson.startingTime}}<span
v-if="freeInfo.rentalUnit=='minutes'">分钟</span><span
v-if="freeInfo.rentalUnit=='hours'">小时</span><span
v-if="freeInfo.rentalUnit=='day'"></span>
</view> </view>
</view> </view>
<view class="li" style="margin-top: 38rpx;"> <view class="li" style="margin-top: 38rpx;">
@ -20,11 +80,52 @@
时长费 时长费
</view> </view>
<view class="right"> <view class="right">
{{timeFee}}/{{timeMinutes}}分钟 {{freeInfo.ridingRuleJson.timeoutPrice}}/{{ freeInfo.ridingRuleJson.timeoutTime}}<span
v-if="freeInfo.rentalUnit=='minutes'">分钟</span><span
v-if="freeInfo.rentalUnit=='hours'">小时</span><span
v-if="freeInfo.rentalUnit=='day'"></span>
</view> </view>
</view> </view>
<view class="tip">
超出起步价包含时长后收取 </view>
</view>
<view v-if="freeInfo.ridingRule==2">
<view class="tit" style="margin-top: 50rpx;">
{{freeInfo.name}}
</view>
<view class="card">
<view class="li" style="margin-top: 10rpx;" v-for="(items,index) in freeInfo.ridingRuleJson.rule"
v-if="index!=freeInfo.ridingRuleJson.rule.length-1">
<view class="left" v-if="index==0">
区间计费
</view>
<view class="left" v-if="index!=0">
</view>
<view class="right">
{{items.start}}-{{items.end}}<span v-if="freeInfo.rentalUnit=='minutes'">分钟</span>
<span v-if="freeInfo.rentalUnit=='hours'">小时</span>
<span v-if="freeInfo.rentalUnit=='day'"></span>,
{{items.eachUnit}}<span v-if="freeInfo.rentalUnit=='minutes'">分钟</span>
<span v-if="freeInfo.rentalUnit=='hours'">小时</span>
<span v-if="freeInfo.rentalUnit=='day'"></span>/{{items.fee}}
</view>
</view>
<view class="li" style="margin-top: 10rpx;" v-for="(items,index) in freeInfo.ridingRuleJson.rule"
v-if="index==freeInfo.ridingRuleJson.rule.length-1">
<view class="left">
</view>
<view class="right">
>{{items.start}}<span v-if="freeInfo.rentalUnit=='minutes'">分钟</span>
<span v-if="freeInfo.rentalUnit=='hours'">小时</span>
<span v-if="freeInfo.rentalUnit=='day'"></span>,
{{items.eachUnit}}<span v-if="freeInfo.rentalUnit=='minutes'">分钟</span>
<span v-if="freeInfo.rentalUnit=='hours'">小时</span>
<span v-if="freeInfo.rentalUnit=='day'"></span>/{{items.fee}}
</view>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
@ -32,10 +133,14 @@
</view> </view>
<view class="txt"> <view class="txt">
骑行服务费以开始服务时刻所对应的计费规则为准时长 费不足1个计费周时按1个计费周期计算费用 区间计费是在使用车辆时时不同时段内的收费标准
</view> </view>
</view> </view>
</view>
</view>
<view class="tit" style="margin-top: 50rpx;"> <view class="tit" style="margin-top: 50rpx;">
违规停车管理费 违规停车管理费
@ -46,7 +151,7 @@
调度费非停车点 调度费非停车点
</view> </view>
<view class="right"> <view class="right">
{{dispatchFee}} {{areaInfo. dispatchFee}}
</view> </view>
</view> </view>
<view class="tip" style="width: 440rpx;"> <view class="tip" style="width: 440rpx;">
@ -57,7 +162,7 @@
管理费费 管理费费
</view> </view>
<view class="right"> <view class="right">
{{vehicleManagementFee}} {{areaInfo.vehicleManagementFee}}
</view> </view>
</view> </view>
<view class="tip"> <view class="tip">
@ -85,35 +190,47 @@
bgc: { bgc: {
backgroundColor: "#fff", backgroundColor: "#fff",
}, },
areaInfo:{},
freeInfo:{}
} }
}, },
computed: { computed: {
appointmentServiceFee() {
return this.$store.getters.appointmentServiceFee;
},
dispatchFee() {
return this.$store.getters.dispatchFee;
},
vehicleManagementFee() {
return this.$store.getters.vehicleManagementFee;
},
startingPrice() {
return this.$store.getters.startingPrice;
},
timeFee() {
return this.$store.getters.timeFee;
},
timeMinutes() {
return this.$store.getters.timeMinutes;
},
startingHowManyMinutes() {
return this.$store.getters.startingHowManyMinutes;
},
userId() { userId() {
return this.$store.getters.userId; return this.$store.getters.userId;
}, },
},
onLoad(options) {
try {
if (options.item) {
this.freeInfo = JSON.parse(decodeURIComponent(options.item));
console.log( this.freeInfo,' this.freeInfo');
}
} catch (error) {
console.error('Error parsing item:', error);
}
},
onShow() {
this.getarea()
}, },
methods: { methods: {
getarea() {
let id = uni.getStorageSync('areaId');
this.$u.get("/app/area/"+id).then((res) => {
if (res.code == 200) {
this.areaInfo=res.data
// this.getlist()
} else {
uni.showToast({
title:res.msg,
icon: 'none',
duration: 2000
});
}
});
},
} }
} }
@ -130,6 +247,7 @@ page{
// justify-content: center; // justify-content: center;
.cont{ .cont{
margin: 0 58rpx; margin: 0 58rpx;
padding-bottom: 100rpx;
.tit{ .tit{
margin-left: 32rpx; margin-left: 32rpx;
font-weight: 700; font-weight: 700;

View File

@ -11,7 +11,7 @@
</view> </view>
<view class="tit" <view class="tit"
style="margin-top: 18rpx;font-weight: 700;font-size: 92rpx;color: #3D3D3D;line-height: 72rpx;"><span style="margin-top: 18rpx;font-weight: 700;font-size: 92rpx;color: #3D3D3D;line-height: 72rpx;"><span
style="font-size: 52rpx;"></span>{{deposit}}</view> style="font-size: 52rpx;"></span>{{areaInfo.deposit}}</view>
</view> </view>
<view class="card1"> <view class="card1">
<view class="cont"> <view class="cont">
@ -131,6 +131,7 @@
userinfo: {}, userinfo: {},
orderList:[], orderList:[],
total:0, total:0,
areaInfo:""
} }
@ -141,7 +142,7 @@
// // ... // // ...
// }); // });
this.getinfo() this.getinfo()
this.getarea()
}, },
watch: { watch: {
userId(newValue, oldValue) { userId(newValue, oldValue) {
@ -151,32 +152,28 @@
} }
}, },
computed: { computed: {
appointmentServiceFee() {
return this.$store.getters.appointmentServiceFee;
},
dispatchFee() {
return this.$store.getters.dispatchFee;
},
vehicleManagementFee() {
return this.$store.getters.vehicleManagementFee;
},
startingPrice() {
return this.$store.getters.startingPrice;
},
timeFee() {
return this.$store.getters.timeFee;
},
timeMinutes() {
return this.$store.getters.timeMinutes;
},
deposit() {
return this.$store.getters.deposit;
},
userId() { userId() {
return this.$store.getters.userId; return this.$store.getters.userId;
}, },
}, },
methods: { methods: {
getlist() {
this.$u.get("/appVerify/order/list?type=2&userId="+this.userId).then((res) => {
if (res.code == 200) {
this.orderList=res.rows
this.total=res.total
} else {
uni.showToast({
title:res.msg,
icon: 'none',
duration: 2000
});
}
});
},
tixian(){ tixian(){
this.$u.post("/appVerify/order/withdraw").then((res) => { this.$u.post("/appVerify/order/withdraw").then((res) => {
@ -193,12 +190,12 @@
} }
}); });
}, },
getlist() { getarea() {
this.$u.get("/appVerify/order/list?type=2&userId="+this.userId).then((res) => { let id = uni.getStorageSync('areaId');
this.$u.get("/app/area/"+id).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.orderList=res.rows this.areaInfo=res.data
this.total=res.total
} else { } else {
uni.showToast({ uni.showToast({
title:res.msg, title:res.msg,
@ -228,7 +225,7 @@
userId: this.userId, userId: this.userId,
// ruleId: this.freeInfo.ruleId, // ruleId: this.freeInfo.ruleId,
money: this.deposit, money: this.areaInfo.deposit,
mark: "押金充值", mark: "押金充值",
type: '4' type: '4'

View File

@ -90,7 +90,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="center"> <view class="center" >
<!-- <view class="card" :class="freeListIndex==0?'act1':''" @click="freeListIndex=0" v-if="orderinfo.ruleId==null"> <!-- <view class="card" :class="freeListIndex==0?'act1':''" @click="freeListIndex=0" v-if="orderinfo.ruleId==null">
<image src="https://api.ccttiot.com/smartmeter/img/static/uYg1WNJJH1VK7RdldKE1" mode="" <image src="https://api.ccttiot.com/smartmeter/img/static/uYg1WNJJH1VK7RdldKE1" mode=""
v-if="freeListIndex==0"></image> v-if="freeListIndex==0"></image>
@ -126,15 +126,16 @@
<view class="tit"> <view class="tit">
{{item.name}} {{item.name}}
</view> </view>
<view style="padding: 18rpx;">
<view class="nmtxt"> <view class="nmtxt">
<view class="left"> <view class="left">
起步价 起步价
</view> </view>
<view class="right"> <view class="right">
{{item.ridingRuleJson.startingPrice}}{{item.ridingRuleJson.startingTime}}<span {{item.ridingRuleJson.startingPrice}}({{item.ridingRuleJson.startingTime}}<span
v-if="item.rentalUnit=='minutes'">分钟</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>
</view> </view>
<view class="nmtxt"> <view class="nmtxt">
@ -148,10 +149,10 @@
v-if="item.rentalUnit=='day'"></span> v-if="item.rentalUnit=='day'"></span>
</view> </view>
</view> </view>
<view class="tips" @click.stop='feedetail(item,index+1)'>
查看详情 <view class="iconfont icon-chakanxiangqing"></view>
</view> </view>
<!-- <view class="tips" @click.stop='feedetail(item,index+1)'>
查看详情 <view class="iconfont icon-chakanxiangqing"></view>
</view> -->
</view> </view>
<view v-if="item.ridingRule==2"> <view v-if="item.ridingRule==2">
@ -159,29 +160,24 @@
{{item.name}} {{item.name}}
</view> </view>
<view style="padding: 18rpx;">
<view class="nmtxt text-ellipsis" v-for="(items, indexs) in item.ridingRuleJson.rule" <view class="nmtxt text-ellipsis" v-for="(items, indexs) in item.ridingRuleJson.rule"
:key="indexs" style="margin-top: 10rpx;" v-if="indexs<3"> :key="indexs" style="margin-top: 10rpx;" v-if="indexs<2">
<view class="left"></view> <view class="left"></view>
<view class="right " style="font-size: 20rpx;"> <view class="right " 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>
<span v-if="item.rentalUnit=='hours'">小时</span> <span v-if="item.rentalUnit=='hours'">小时</span>
<span v-if="item.rentalUnit=='day'"></span>/{{items.fee}} <span v-if="item.rentalUnit=='day'"></span>/{{items.fee}}
<span v-if="indexs==1">...</span>
</view>
</view> </view>
</view> </view>
<view class="nmtxt text-ellipsis" style="margin-top: 10rpx;">
<view class="left">
<view class="tips" @click.stop='feedetail(item,index+1)'>
查看详情 <view class="iconfont icon-chakanxiangqing"></view>
</view>
</view>
<view class="right " v-if="item.ridingRuleJson.rule.length>3">
....
</view>
</view>
<!-- <view class="nmtxt"> <!-- <view class="nmtxt">
<view class="left"> <view class="left">
@ -195,7 +191,9 @@
超出起步价包含时长后收取 超出起步价包含时长后收取
</view> --> </view> -->
</view> </view>
<view class="tips_btn" @click.stop='feedetail(item,index+1)'>
查看详情
</view>
</view> </view>
</view> </view>
<view class="bot" style="margin-top: 20rpx;"> <view class="bot" style="margin-top: 20rpx;">
@ -208,13 +206,13 @@
<view class="btn" @click="sub2()" v-if="type==1&&freeListIndex!=0"> <view class="btn" @click="sub2()" v-if="type==1&&freeListIndex!=0">
确认套餐 确认套餐
</view> --> </view> -->
<view class="btn" @click="sub3()" v-if="type==2&&freeListIndex==0&&orderinfo.ruleId==null"> <!-- <view class="btn" @click="sub3()" v-if="type==2&&freeListIndex==0&&orderinfo.ruleId==null">
确认预约 确认预约
</view> </view> -->
<view class="btn" @click="sub5()" v-if="type==2&&orderinfo.ruleId!=null"> <!-- <view class="btn" @click="sub5()" v-if="type==2&&orderinfo.ruleId!=null">
确认预约 确认预约
</view> </view> -->
<view class="btn" @click="sub3()" v-if="type==2&&freeListIndex!=0"> <view class="btn" @click="sub3()" v-if="type==2">
确认预约 确认预约
</view> </view>
</view> </view>
@ -305,7 +303,7 @@
<view class="price"> <view class="price">
{{orderinfo.totalFee}}<span></span> {{orderinfo.totalFee}}<span></span>
</view> </view>
<view class="toinfo"> <view class="toinfo" @click="tofeeDetail()">
查看骑行费明细 > 查看骑行费明细 >
</view> </view>
<view class="btn" @click="topay()" v-if="orderinfo.status==1"> <view class="btn" @click="topay()" v-if="orderinfo.status==1">
@ -318,9 +316,9 @@
</view> </view>
</view> </view>
<view class="botmbox" v-if="showindex==0"> <view class="botmbox" v-if="showindex==0">
<view class="top_btn"> <view class="top_btn" @click="qecodelock()">
<image src="https://api.ccttiot.com/smartmeter/img/static/un6Wi8CefEjy04qzvn67" mode="" <image src="https://api.ccttiot.com/smartmeter/img/static/un6Wi8CefEjy04qzvn67" mode=""
@click="topage(0)"></image> ></image>
扫码开锁 扫码开锁
</view> </view>
@ -361,8 +359,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class="tipss" v-if="showtc" @click="showtcs=true"> <view class="tipss" v-if="orderinfo.status" @click="starTime">
您有正在进行中的套餐 <view class="iconfont icon-xiangyou1"> 您有正在进行中的订单 <view class="iconfont icon-xiangyou1">
</view> </view>
</view> </view>
@ -535,14 +533,14 @@
P点外归还设备将收取调度费 P点外归还设备将收取调度费
</view> </view>
</view> </view>
<view class="cont"> <!-- <view class="cont">
<view class="left"> <view class="left">
支付订单后 支付订单后
</view> </view>
<view class="right" style="color:#3D3D3D ;"> <view class="right" style="color:#3D3D3D ;">
自动退押金 自动退押金
</view> </view>
</view> </view> -->
</view> </view>
<view class="feeCard" v-html='freeInfo.instructions'> <view class="feeCard" v-html='freeInfo.instructions'>
@ -556,7 +554,7 @@
<div class="tit"> <div class="tit">
更多用车服务 更多用车服务
</div> </div>
<div class="contbox"> <div class="contbox" style="width: 100%;">
<view class="cont_li" @click="topage(1)"> <view class="cont_li" @click="topage(1)">
<image src="https://api.ccttiot.com/smartmeter/img/static/uGDkCwxDNH9oFORX2XNU" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uGDkCwxDNH9oFORX2XNU" mode=""></image>
<view class="txt"> <view class="txt">
@ -613,8 +611,8 @@
}, },
showindex: 0, showindex: 0,
show: false, show: false,
latitude: '26.940805', latitude: '',
longitude: '120.356157', longitude: '',
isMap: false, isMap: false,
zoomSize: 16, zoomSize: 16,
markers: [], markers: [],
@ -641,7 +639,7 @@
areaInfo: {}, areaInfo: {},
// feeInfo:{}, // feeInfo:{},
showfeeDetail: false, showfeeDetail: false,
seeDetail:false
// userId:this.$store.getters.userId, // userId:this.$store.getters.userId,
} }
@ -654,18 +652,60 @@
} }
}, },
onLoad(e) { onLoad(e) {
if (e.sn) { console.log(e,'eeeeeeeeeeeeeeeeeee');
this.sn = e.sn if(e.q){
this.deviceInfo() let qParam = e.q;
// 2: URLq
let decodedUrl = decodeURIComponent(qParam);
// 3: 使URL
let sn = null;
let queryParams = decodedUrl.split('?')[1];
if (queryParams) {
let params = queryParams.split('&');
params.forEach(param => {
let [key, value] = param.split('=');
if (key === 'sn') {
sn = value;
}
});
}
this.sn = sn
if(this.sn!=''){
setTimeout(() => { setTimeout(() => {
if(!this.orderinfo.status){
this.deviceInfo()
this.showdevice = true this.showdevice = true
this.deviceIndex = 1 this.deviceIndex = 1
this.type = 1 this.type = 1
}, 2000) }
}, 1000)
}
}
if (e.sn) {
this.sn = e.sn
if(this.sn!=''){
setTimeout(() => {
if(!this.orderinfo.status){
this.deviceInfo()
this.showdevice = true
this.deviceIndex = 1
this.type = 1
}
}, 1000)
}
} }
}, },
onShow() { onShow() {
if(this.seeDetail==false){
if (uni.getStorageSync('token')) { if (uni.getStorageSync('token')) {
this.$store.dispatch('userInfo', this.$u).then(() => { this.$store.dispatch('userInfo', this.$u).then(() => {
@ -678,20 +718,10 @@
let abb = uni.getStorageSync('role') let abb = uni.getStorageSync('role')
} }
// this.eventKey = Math.floor(Math.random() * 100000);
console.log(this.userId); console.log(this.userId);
// setTimeout(() => {
// this.getisInOrder()
// }, 2000)
// this.role()
// this.$store.dispatch('fetchFeeRules', this.$u).then(() => {
// // ...
// });
// this.fetchFeeRules()
let that = this let that = this
uni.getLocation({ uni.getLocation({
@ -700,9 +730,11 @@
that.gps.latitude = lb.latitude; that.gps.latitude = lb.latitude;
that.gps.longitude = lb.longitude; that.gps.longitude = lb.longitude;
that.gps.latitude = '26.940805', // that.gps.latitude = '26.940805',
that.gps.longitude = '120.356157'; // that.gps.longitude = '120.356157';
that.getmarks() that.latitude= lb.latitude
that.longitude= lb.longitude
// that.getmarks()
that.getArea() that.getArea()
// //
@ -718,6 +750,8 @@
} }
}) })
}
}, },
@ -751,9 +785,66 @@
}, },
}, },
methods: { methods: {
//
tofeeDetail(){
uni.navigateTo({
url:'/page_user/ckmx?orderId='+this.orderinfo.orderNo
})
},
//
qecodelock(){
uni.scanCode({
onlyFromCamera: true,
scanType: ['qrCode'],
success: res => {
let sn = null;
let queryParams = res.result.split('?')[1];
if (queryParams) {
let params = queryParams.split('&');
params.forEach(param => {
let [key, value] = param.split('=');
if (key === 'sn') {
sn = value;
}
});
}
this.sn = sn
if(this.sn!=''){
setTimeout(() => {
if(!this.orderinfo.status){
this.deviceInfo()
this.showdevice = true
this.deviceIndex = 1
this.type = 1
}
}, 1000)
}
},
fail: err => {
console.error('扫描失败:', err);
uni.showToast({
title: '扫描失败',
icon: 'none'
});
}
});
},
feedetail(item, index) { feedetail(item, index) {
this.freeInfo = item this.freeInfo = item
this.showfeeDetail = true this.seeDetail=true
try {
const itemStr = encodeURIComponent(JSON.stringify(item));
uni.navigateTo({
url: `/page_user/jfgz?item=${itemStr}`
});
} catch (error) {
console.error('Error serializing item:', error);
}
// this.showfeeDetail = true
this.freeListIndex = index this.freeListIndex = index
}, },
// //
@ -801,6 +892,7 @@
}, },
// //
sub6() { sub6() {
if(this.orderinfo.ruleId){
let data = { let data = {
userId: this.userId, userId: this.userId,
sn: this.sn, sn: this.sn,
@ -820,6 +912,14 @@
} }
}) })
}else{
uni.showToast({
title: '请选择套餐',
icon: 'none',
duration: 2000
});
}
}, },
// //
unlockdevice() { unlockdevice() {
@ -836,7 +936,7 @@
} }
this.$u.post('/appVerify/device/snSwitch', data).then((res) => { this.$u.post('/appVerify/device/snSwitch', data).then((res) => {
if (res.code === 200) { if (res.code == 200) {
this.getisInOrder() this.getisInOrder()
} else { } else {
uni.showToast({ uni.showToast({
@ -863,7 +963,11 @@
if (res.code === 200) { if (res.code === 200) {
this.getisInOrder() this.getisInOrder()
} else { } else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
} }
}) })
} }
@ -891,6 +995,7 @@
}) })
}, },
starTime() { starTime() {
this.seeDetail=false
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => { this.$u.get('/app/device/info?sn=' + this.orderinfo.sn).then((res) => {
@ -1047,7 +1152,7 @@
} else if (this.orderinfo.status == 1) { } else if (this.orderinfo.status == 1) {
// //
// this.topay() // this.topay()
const createTimeTimestamp = new Date(this.orderinfo.appointmentstartingTime).getTime(); const createTimeTimestamp = new Date(this.orderinfo.appointmentStartTime).getTime();
// //
@ -1362,6 +1467,7 @@
}); });
}, },
sub5() { sub5() {
if( this.orderinfo.ruleId){
this.$u.post('/appVerify/device/appointment?userId=' + this.userId + '&sn=' + this.sn + '&ruleId=' + this this.$u.post('/appVerify/device/appointment?userId=' + this.userId + '&sn=' + this.sn + '&ruleId=' + this
.orderinfo.ruleId + '&type=2' + '&orderNo=' + this.orderinfo.orderNo).then((res) => { .orderinfo.ruleId + '&type=2' + '&orderNo=' + this.orderinfo.orderNo).then((res) => {
if (res.code === 200) { if (res.code === 200) {
@ -1382,10 +1488,18 @@
}); });
} }
}) })
}else{
uni.showToast({
title: '请选择套餐',
icon: 'none',
duration: 2000
});
}
}, },
// //
sub1() { sub1() {
if(this.freeInfo.ruleId){
let data = { let data = {
userId: this.userId, userId: this.userId,
sn: this.sn, sn: this.sn,
@ -1397,8 +1511,10 @@
} }
this.$u.post('/appVerify/device/snSwitch', data).then((res) => { this.$u.post('/appVerify/device/snSwitch', data).then((res) => {
this.seeDetail=false
if (res.code === 200) { if (res.code === 200) {
this.getisInOrder() this.getisInOrder()
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -1407,9 +1523,18 @@
}); });
} }
}) })
}else{
uni.showToast({
title: '请选择套餐',
icon: 'none',
duration: 2000
});
}
}, },
// //
sub2() { sub2() {
if(this.freeInfo.ruleId){
let data = { let data = {
userId: this.userId, userId: this.userId,
sn: this.sn, sn: this.sn,
@ -1458,9 +1583,18 @@
}); });
} }
}) })
}else{
uni.showToast({
title: '请选择套餐',
icon: 'none',
duration: 2000
});
}
}, },
// //
sub3() { sub3() {
if(this.freeInfo.ruleId){
let data = { let data = {
userId: this.userId, userId: this.userId,
sn: this.sn, sn: this.sn,
@ -1474,6 +1608,7 @@
} }
this.$u.post('/appVerify/device/appointment?userId=' + this.userId + '&sn=' + this.sn + '&ruleId=' + this this.$u.post('/appVerify/device/appointment?userId=' + this.userId + '&sn=' + this.sn + '&ruleId=' + this
.freeInfo.ruleId).then((res) => { .freeInfo.ruleId).then((res) => {
this.seeDetail=false
if (res.code === 200) { if (res.code === 200) {
uni.showLoading({ uni.showLoading({
title: '预约中...' title: '预约中...'
@ -1492,9 +1627,19 @@
}); });
} }
}) })
}else{
uni.showToast({
title: '请选择套餐',
icon: 'none',
duration: 2000
});
}
}, },
// //
sub4() { sub4() {
if(this.freeInfo.ruleId){
let data = { let data = {
userId: this.userId, userId: this.userId,
sn: this.sn, sn: this.sn,
@ -1545,8 +1690,17 @@
}); });
} }
}) })
}else{
uni.showToast({
title: '请选择套餐',
icon: 'none',
duration: 2000
});
}
}, },
getisInOrder() { getisInOrder() {
if(this.userId){
this.$u.post('/app/user/isInOrder?userId=' + this.userId, ).then((res) => { this.$u.post('/app/user/isInOrder?userId=' + this.userId, ).then((res) => {
if (res.code === 200) { if (res.code === 200) {
// this.freList=res.rows // this.freList=res.rows
@ -1562,6 +1716,8 @@
} }
}) })
}
}, },
changefree(item, index) { changefree(item, index) {
this.freeInfo = item this.freeInfo = item
@ -1697,7 +1853,11 @@
// // // //
// }, // },
getmarks() { getmarks() {
this.$u.get(`/app/vehicleLocalization`, this.gps).then((res) => {
let data = {
areaId: this.areaInfo.areaId
}
this.$u.get(`/app/allVehicleByArea`, data).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.listData = res.data; this.listData = res.data;
// const markers = data.map(item => { // const markers = data.map(item => {
@ -1745,9 +1905,14 @@
this.polyline.push(polylines) this.polyline.push(polylines)
// console.log(this.areaInfo, 'areaInfoareaInfo'); // console.log(this.areaInfo, 'areaInfoareaInfo');
uni.setStorageSync('areaId', res.data.areaId); uni.setStorageSync('areaId', res.data.areaId);
this.getmarks()
this.getlist() this.getlist()
this.getParking() this.getParking()
if (uni.getStorageSync('token')) {
this.getisInOrder() this.getisInOrder()
}
// console.log(this.polyline); // console.log(this.polyline);
} else { } else {
uni.showToast({ uni.showToast({
@ -1971,7 +2136,7 @@
.map { .map {
width: 750rpx; width: 750rpx;
height: 80vh; height: 84vh;
} }
.botmbox2 { .botmbox2 {
@ -2245,24 +2410,21 @@
} }
.center { .center {
width: 750rpx; width: 100%;
display: flex; display: flex;
// flex-wrap: nowrap; flex-wrap: nowrap;
padding: 0 32rpx; overflow-x: auto; //
height: 228rpx;
overflow-x: auto;
/* 添加水平滚动条 */
margin-bottom: 200rpx; margin-bottom: 200rpx;
white-space: nowrap; //
.card { .card {
width: 500rpx !important; //
height: 288rpx;
margin-right: 20rpx; margin-right: 20rpx;
position: relative; position: relative;
padding: 16rpx 24rpx;
width: 500rpx !important;
height: 228rpx;
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: 16rpx 16rpx 16rpx 16rpx; border-radius: 16rpx;
border: 2rpx solid #fff; border: 2rpx solid #fff;
image { image {
@ -2273,76 +2435,51 @@
height: 50rpx; height: 50rpx;
} }
.tit { .tips_btn {
display: flex; display: flex;
flex-wrap: nowrap;
align-items: center; align-items: center;
width: 100%; justify-content: center;
position: absolute;
bottom: 0;
width: 350rpx;
height: 70rpx;
background: #4C97E7;
border-radius: 0rpx 0rpx 16rpx 16rpx;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 28rpx;
color: #3D3D3D; color: #FFFFFF;
} }
.tips { .tit {
padding: 18rpx 0 0 18rpx;
width: 350rpx;
display: flex; display: flex;
flex-wrap: nowrap;
align-items: center; align-items: center;
margin-left: auto; font-weight: 500;
font-size: 30rpx; font-size: 36rpx;
color: #3D3D3D; color: #3D3D3D;
.icon-chakanxiangqing {
font-size: 30rpx;
color: #3D3D3D;
font-weight: 600;
}
} }
.nmtxt { .nmtxt {
width: 100%; width: 100%;
margin-top: 22rpx; margin-top: 22rpx;
display: flex; display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between; justify-content: space-between;
align-items: center;
.left { .left {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
.tips {
display: flex;
flex-wrap: nowrap;
align-items: center;
margin-left: auto;
font-size: 30rpx;
color: #3D3D3D;
.icon-chakanxiangqing {
font-size: 30rpx;
color: #3D3D3D;
font-weight: 600;
}
}
} }
.right { .right {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 28rpx;
color: #3D3D3D; color: #3D3D3D;
} }
// .text-ellipsis {
// display: -webkit-box;
// -webkit-line-clamp: 3;
// -webkit-box-orient: vertical;
// overflow: hidden;
// text-overflow: ellipsis;
// word-break: break-all;
// // height: 72rpx; /* Adjust the height based on font size and line height */
// }
.red { .red {
font-weight: 400; font-weight: 400;
font-size: 36rpx; font-size: 36rpx;
@ -2356,6 +2493,20 @@
font-size: 20rpx; font-size: 20rpx;
color: #808080; color: #808080;
} }
.tips {
display: flex;
align-items: center;
margin-left: auto;
font-size: 30rpx;
color: #3D3D3D;
.icon-chakanxiangqing {
font-size: 30rpx;
color: #3D3D3D;
font-weight: 600;
}
}
} }
.act1 { .act1 {
@ -2363,6 +2514,7 @@
} }
} }
.bot { .bot {
display: flex; display: flex;
align-items: center; align-items: center;
@ -2757,7 +2909,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: 16rpx 16rpx 16rpx 16rpx; border-radius: 16rpx 16rpx 16rpx 16rpx;
margin-right: 12rpx; margin-right: 10rpx;
image { image {
margin-top: 18rpx; margin-top: 18rpx;

View File

@ -80,6 +80,12 @@
// uni.switchTab({ // uni.switchTab({
// url: '/pages/index/index' // url: '/pages/index/index'
// }) // })
}else{
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
} }
}); });

View File

@ -24,7 +24,7 @@
<view class="text"> <view class="text">
押金 押金
</view> </view>
<view class="tip" v-if="info.bindDeviceNum==null"> <view class="tip" v-if="info.balance==null">
未充值 未充值
</view> </view>
</view> </view>
@ -68,7 +68,7 @@
</view> </view>
</view> </view>
<view class="card_li" style="border-bottom:2rpx solid #fff ;" @click="topage(5)"> <!-- <view class="card_li" style="border-bottom:2rpx solid #fff ;" @click="topage(5)">
<view class="card_left"> <view class="card_left">
<image src="https://api.ccttiot.com/smartmeter/img/static/uJFhEFoioikjCQqqWW3c" mode=""></image> <image src="https://api.ccttiot.com/smartmeter/img/static/uJFhEFoioikjCQqqWW3c" mode=""></image>
<view class="text"> <view class="text">
@ -79,7 +79,7 @@
<view class="iconfont icon-xiangyou1" > <view class="iconfont icon-xiangyou1" >
</view> </view>
</view> </view> -->
<view class="card_li" @click="topage(8)" v-if="info.role==3||info.role==2"> <view class="card_li" @click="topage(8)" v-if="info.role==3||info.role==2">
<view class="card_left"> <view class="card_left">
<image src="https://lxnapi.ccttiot.com/bike/img/static/unIGXFEhvTgtXVcfPH33" mode=""></image> <image src="https://lxnapi.ccttiot.com/bike/img/static/unIGXFEhvTgtXVcfPH33" mode=""></image>

View File

@ -49,7 +49,7 @@
车辆编号<span>{{orderInfo.device.areaName}}</span> 车辆编号<span>{{orderInfo.device.areaName}}</span>
</view> --> </view> -->
<view class="half_infoli"> <view class="half_infoli">
运营区域<span>{{orderInfo.device.areaName}}</span> 运营区域<span>{{orderInfo.area}}</span>
</view> </view>
</view> </view>
</view> </view>
@ -139,7 +139,7 @@
</view> </view>
<view class="lines"></view> <view class="lines"></view>
<view class="cont" v-if="orderInfo.etRefund!=''"> <view class="cont" v-if="orderInfo.etRefund">
<view class="info_li"> <view class="info_li">
@ -183,8 +183,8 @@
bgc: { bgc: {
backgroundColor: "#F7FAFE", backgroundColor: "#F7FAFE",
}, },
latitude: 39.916527, latitude: 0,
longitude: 116.397128, longitude: 0,
isMap: false, isMap: false,
zoomSize: 15, zoomSize: 15,
markers: [], markers: [],
@ -355,8 +355,8 @@
// 线 // 线
this.orderInfo=res.data this.orderInfo=res.data
this.loading=true this.loading=true
this.latitude= parseFloat(this.orderInfo.device.latitude) this.latitude= parseFloat(this.orderInfo.latitude)
this.longitude= parseFloat(this.orderInfo.device.longitude ) this.longitude= parseFloat(this.orderInfo.longitude )
this.polyline[0].points = JSON.parse(res.data.tripRouteStr).map(coord => ({ this.polyline[0].points = JSON.parse(res.data.tripRouteStr).map(coord => ({
latitude: coord[1], latitude: coord[1],
longitude: coord[0] longitude: coord[0]