This commit is contained in:
tx 2024-09-30 18:02:38 +08:00
parent bf0a2d0e98
commit 9d6d0bb764
13 changed files with 3028 additions and 560 deletions

View File

@ -36,7 +36,7 @@ const install = (Vue, vm) => {
// 所以哪怕您重新登录修改了Storage下一次的请求将会是最新值
const token = uni.getStorageSync('token');
// const token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ0ZDljYzBlLThjZjEtNGFkOC05OGFjLThlNThjMWIxYjQ3OSJ9.v-aMkp9t7Z_QfjfsZy6d_1Ng76hPYa0A--SWScMJY9to7UlNv9IxHQnTJylLKdYKGrr8fRZ47Bu12UPm1DgMQg"
// const token = "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjNlMjMyMGNiLTRiOTktNDhiNS1iOGFhLWZlNGU4ZTFhZTQ3OCJ9.6qeOWeY1w9a4B2uTwFT-Fg-4t0llrSkFklzxg3oRgj7EbNEI1o1uHsdlHB3cxXeS95dQOQyh9sKlAei-T-9gDQ"
// console.log("我是token", token)
config.header.Authorization = token;

View File

@ -9,7 +9,7 @@
<view class="ipt">
<view class="left">
<view class="txt1">
{{addressInfo}}
{{addressInfo}}
</view>
<view class="txt">
|{{time}} 取车|
@ -32,7 +32,8 @@
</view>
<view class="words" style="white-space: nowrap;">
{{cityList[0].cityName}}
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode=""></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode="">
</image>
</view>
</view>
<view class="area" @click="getMapLocation()" style="white-space: nowrap;">
@ -48,8 +49,9 @@
<view class="txt3">
{{addressInfo}}
</view>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode=""></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode="">
</image>
</view>
</view>
<view class="dingw" style="white-space: nowrap;" @click="getaddress()">
@ -63,17 +65,19 @@
取车时间
</view>
<view class="words" @click="time1=true">
{{time}}
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode=""></image>
{{time}}
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode="">
</image>
</view>
</view>
<view class="time_li">
<view class="txt">
选择租车周期
</view>
<view class="words" @click="showdata=true">
<view class="words" @click="showdata=true">
{{dataInfo.dictLabel}}
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode=""></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode="">
</image>
</view>
</view>
</view>
@ -89,6 +93,8 @@
</view>
<!-- <image class="kefu" src="https://lxnapi.ccttiot.com/bike/img/static/u8osHvZfHL7u3lbveVXx" mode=""></image> -->
<view class="car_card">
<view class="card_top">
@ -127,12 +133,14 @@
<view class="choosedata" v-if="showdata">
<view class="tit">
请选择租车周期
<image src="https://lxnapi.ccttiot.com/bike/img/static/uLzTHCbE6TTRPYj6rv8X" mode="" @click="closeData()"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uLzTHCbE6TTRPYj6rv8X" mode=""
@click="closeData()"></image>
</view>
<view class="li" v-for="(item,index) in dataList" :key="index" :class="index == dataIndex? 'act':''" @click="chooseData(item,index)">
<view class="li" v-for="(item,index) in dataList" :key="index" :class="index == dataIndex? 'act':''"
@click="chooseData(item,index)">
{{item.dictLabel}}
</view>
</view>
</view>
@ -151,7 +159,7 @@
showchoose: false,
CouponLists: [],
hight: 0,
showkf:false,
showkf: false,
cityList: [],
dataList: [],
gps: {},
@ -170,10 +178,10 @@
startTime: '',
pickertime: '',
time: '',
showdata:false,
dataIndex:0,
dataInfo:{},
shopList:[]
showdata: false,
dataIndex: 0,
dataInfo: {},
shopList: []
}
},
onLoad() {
@ -185,7 +193,7 @@
uni.getLocation({
type: 'gcj02',
success: function(lb) {
that.gps.latitude = lb.latitude;
that.gps.longitude = lb.longitude;
that.getCity()
@ -201,19 +209,19 @@
// that.getmarks()
//
}
})
// startDatepickertime
const now = new Date();
const month = now.getMonth() + 1; // 01
const day = now.getDate();
// MM-DD
this.startDate = `${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`;
this.time = `${month < 10 ? '0' : ''}${month}${day < 10 ? '0' : ''}${day}`;
// pickertime
this.pickertime = this.startDate;
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select('.ips_box').boundingClientRect(data => {
@ -224,15 +232,15 @@
});
},
methods: {
getshopList(){
let data={
getshopList() {
let data = {
// phoneLon:this.gps.latitude,
phoneLon:120.257144,
phoneLon: 120.257144,
// phoneLat:this.gps.longitude,
phoneLat:27.105719,
isFreeCar:true
phoneLat: 27.105719,
isFreeCar: true
}
this.$u.post(`app/getStoreListByLocation`,data).then((res) => {
this.$u.post(`app/getStoreListByLocation`, data).then((res) => {
if (res.code == 200) {
this.shopList = res.data;
} else {
@ -244,34 +252,34 @@
}
});
},
chooseData(item,index){
this.dataInfo=item
this.dataIndex=index
chooseData(item, index) {
this.dataInfo = item
this.dataIndex = index
},
closeData(){
this.showdata=false
closeData() {
this.showdata = false
},
confirm1(selectedDate) {
//
//
const selectedMonth = parseInt(selectedDate.month, 10);
const selectedDay = parseInt(selectedDate.day, 10);
//
const now = new Date();
const currentMonth = now.getMonth() + 1;
const currentDay = now.getDate();
//
if (selectedMonth < currentMonth || (selectedMonth === currentMonth && selectedDay < currentDay)) {
// pickertime
const now = new Date();
const month = now.getMonth() + 1; // 01
const day = now.getDate();
// MM-DD
this.time = `${month < 10 ? '0' : ''}${month}${day < 10 ? '0' : ''}${day}`;
uni.showToast({
title: '选择的日期不能小于当前日期',
@ -283,7 +291,7 @@
this.time = `${selectedDate.month}${selectedDate.day}`;
}
},
getaddress() {
this.$u.get(`app/getAddress?lon=` + this.gps.longitude + '&lat=' + this.gps.latitude).then((res) => {
if (res.code == 200) {
@ -301,10 +309,10 @@
this.$u.get(`app/getCity?lon=` + this.gps.longitude + '&lat=' + this.gps.latitude).then((res) => {
if (res.code == 200) {
this.cityInfo = res.data;
// cityList cityInfo cityName cityId
const index = this.cityList.findIndex(city => city.cityName === this.cityInfo.cityName);
if (index !== -1) {
this.cityIndex = index
console.log('City found at index:', index);
@ -312,7 +320,7 @@
} else {
console.log('City not found in the list');
}
} else {
uni.showToast({
title: res.msg,
@ -323,26 +331,26 @@
});
},
showCity() {
},
getdata() {
this.$u.get("/app/getDictData?dictType=rl_rental_period").then((res) => {
if (res.code == 200) {
this.dataList = res.data
this.dataInfo=this.dataList[0]
this.dataInfo = this.dataList[0]
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
getcityList() {
this.$u.get("app/city/list").then((res) => {
if (res.code == 200) {
this.cityList = res.data
@ -352,17 +360,19 @@
icon: 'none',
duration: 2000
});
}
});
},
tosele() {
uni.navigateTo({
url: '/page_user/carSelection'
})
},
}
}
</script>
@ -405,7 +415,7 @@
}
}
.li {
margin-bottom: 24rpx;
@ -422,14 +432,16 @@
font-size: 36rpx;
color: #3D3D3D;
}
.act {
background: #DCEDFF;
border: 2rpx solid #4297F3;
}
}
.ips_box {
padding: 22rpx 38rpx;
width: 750rpx;
@ -456,7 +468,8 @@
font-size: 24rpx;
color: #6F6F6F;
}
.txt1{
.txt1 {
font-weight: 400;
font-size: 24rpx;
color: #6F6F6F;
@ -483,6 +496,7 @@
}
}
.car_card {
margin: 0 auto;
margin-top: 16rpx;
@ -777,7 +791,7 @@
flex-wrap: nowrap;
align-items: center;
margin-top: 6rpx;
.txt3 {
font-weight: 600;
font-size: 32rpx;
@ -791,7 +805,7 @@
text-overflow: ellipsis;
/* 超出部分显示省略号 */
}
image {
width: 40rpx;
height: 22rpx;

View File

@ -9,30 +9,40 @@
<view class="store_info">
<view class="left">
<view class="store_tit">
云行租车汇丰公寓
{{storeInfo.name}}
</view>
<view class="address">
天目山路148号
</view>
<view class="time">
营业时间 | 06:00 - 23:00
营业时间 | {{storeInfo.businessTimeStart}} - {{storeInfo.businessTimeEnd}}
</view>
<view class="type_li">
<view class="type1">
3辆可租
{{storeInfo.rentalCar ? storeInfo.rentalCar : 0}} 辆可租
</view>
<view class="type2">
<view class="type2" v-if="agentInfo.isFreeCar">
免费送取车
</view>
</view>
</view>
<view class="right">
<image class="img1" src="https://lxnapi.ccttiot.com/bike/img/static/uG86Af90zSFQz9rZwgKb" mode=""></image>
<image class="img2" src="https://lxnapi.ccttiot.com/bike/img/static/uetWl3PLcTTOM3GYN6EW" mode=""></image>
<view class="img_box" style="margin-left: -29rpx;" @click="mapFun()">
<image class="img1" src="https://lxnapi.ccttiot.com/bike/img/static/uG86Af90zSFQz9rZwgKb" mode=""></image>
<view class="txt1">
{{kmInfo}}
</view>
</view>
<view class="img_box" style="margin-left: 44rpx;" @click="showkf=true">
<image class="img2" src="https://lxnapi.ccttiot.com/bike/img/static/uetWl3PLcTTOM3GYN6EW" mode="" ></image>
<view class="txt1">
电话
</view>
</view>
</view>
</view>
<view class="ips_box">
<view class="ips_box" v-if="false">
<view class="ipt">
<view class="left">
<view class="txt">
@ -57,14 +67,14 @@
</view>
</view>
</view>
<view class="car_card">
<view class="car_card" v-for="(item,index) in storeInfo.models" :key="index">
<view class="car_img">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uelru5qMK9hwbWMd2gQb" mode=""></image>
<image :src="item.picture" mode=""></image>
</view>
<view class="car_info">
<view class="info_top">
<view class="txt">
全新车网红泡泡50KM...
{{item.model}}
</view>
<view class="red1">
剩余
@ -72,15 +82,16 @@
</view>
<view class="info_cont">
<view class="txt">
手机开关锁 | 定位防盗
{{item.modelsType}}
<!-- 手机开关锁 | 定位防盗 -->
</view>
<view class="red1">
<span>9</span>
<view class="red1" style="white-space: nowrap;">
<span>{{item.rentalCar}}</span>
</view>
</view>
<view class="info_bot">
<view class="price">
日租<span>9</span>
日租<span>{{item.price}}</span>
</view>
<view class="btn">
立即租
@ -92,14 +103,14 @@
没有更多了哦
</view>
<u-mask :show="showkf" :z-index='100' />
<view class="kfbox">
<view class="kfbox" v-if="showkf">
<view class="tit">
请选择您要联系的客服
</view>
<view class="words">
我们根据选择为您提供服务
</view>
<view class="phone_box">
<view class="phone_box" @click="callPhone(agentInfo.phone)">
<view class="img">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uwiRmed6Kz4OUJh00HBD" mode=""></image>
</view>
@ -108,24 +119,24 @@
官方客服
</view>
<view class="phone">
000-260-1559
{{agentInfo.phone}}
</view>
</view>
</view>
<view class="phone_box">
<view class="phone_box" @click="callPhone(storeInfo.serverPhone)">
<view class="img">
<image src="https://lxnapi.ccttiot.com/bike/img/static/unsZOLTPuYrpQKF8MpFt" mode=""></image>
</view>
<view class="info">
<view class="name">
官方客服
门店客服
</view>
<view class="phone">
000-260-1559
{{storeInfo.serverPhone}}
</view>
</view>
</view>
<image class="close" src="https://lxnapi.ccttiot.com/bike/img/static/ulwJylk0JSmOdmU3FnnG" mode=""></image>
<image class="close" src="https://lxnapi.ccttiot.com/bike/img/static/ulwJylk0JSmOdmU3FnnG" mode="" @click="showkf=false"></image>
</view>
</view>
</template>
@ -139,11 +150,16 @@
},
statusBarHeight:0,
navBarHeight:0,
showkf:true
showkf:false,
storeId:'',
storeInfo:{},
agentInfo:{},
gps:{},
kmInfo:''
}
},
onLoad() {
onLoad(e) {
//
this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
@ -157,10 +173,167 @@
// #endif
this.storeId=e.storeId
this.getStoreInfo()
},
onShow() {
},
computed: {
// getType() {
// return (item) => {
// let data = {
// modelId: item.modelId
// };
// this.$u.get(`app/getFunctionListByModelId?`, data).then((res) => {
// if (res.code == 200) {
// return res.data;
// }
// return '';
// });
// };
// }
},
methods: {
mapFun() {
console.log('点击了');
uni.openLocation({
latitude: this.storeInfo.lat,
// - /
longitude: this.storeInfo.lng,
// - /
// name: "",
address: this.storeInfo.simpleAddress
});
},
getkm(){
let data = {
lon: this.gps.longitude,
lat: this.gps.latitude,
storeId: this.storeInfo.storeId
};
this.$u.get(`app/computeDistance?`, data).then((res) => {
if (res.code == 200) {
let distance = res.data; //
// 10001000
if (distance < 1000) {
this.kmInfo = `${distance.toFixed(0)}m`; // 1000'm'
} else {
this.kmInfo = `${(distance / 1000).toFixed(1)}km`; // 1000
}
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
callPhone(phone){
uni.makePhoneCall({
phoneNumber:phone
})
setTimeout(()=>{
this.showkf=false
},500)
},
getAgent(){
let data={
agentId:this.storeInfo.agentId
}
this.$u.get(`app/getAgentByAgentId?`,data).then((res) => {
if (res.code == 200) {
this.agentInfo = res.data;
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
getType(item) {
let data = {
modelId: item.modelId
};
return this.$u.get(`app/getFunctionListByModelId?`, data).then((res) => {
if (res.code == 200) {
// function '|'
return res.data.slice(0, 2).map(func => func.function).join(' | ');
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
return ''; //
}
}).catch(err => {
console.error('Request failed:', err);
return ''; //
});
},
async updateModelsType() {
for (let index = 0; index < this.storeInfo.models.length; index++) {
const item = this.storeInfo.models[index];
// getType
const modelsType = await this.getType(item);
//
this.$set(this.storeInfo.models, index, {
...item,
modelsType // modelsType
});
}
console.log( this.storeInfo,'aaa');
},
getStoreInfo(){
let data={
storeId:this.storeId
}
this.$u.get(`app/getStore?`,data).then((res) => {
if (res.code == 200) {
this.storeInfo = res.data;
this.updateModelsType(); // storeInfo
this.getAgent()
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()
//
}
})
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
}
}
}
</script>
@ -239,6 +412,7 @@
color: #3D3D3D;
}
}
.tip{
margin-top: 30rpx;
width: 100;
@ -419,16 +593,30 @@
background-size: cover;
/* 背景图片等比缩放以覆盖整个容器 */
background-position: center;
.img1{
margin-left: -29rpx;
width: 58rpx;
height: 58rpx;
}
.img2{
margin-left: 54rpx;
width: 58rpx;
height: 58rpx;
.img_box{
width: 80rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
.img1{
width: 58rpx;
height: 58rpx;
}
.img2{
width: 58rpx;
height: 58rpx;
}
.txt1{
text-align: center;
width: 80rpx;
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
}
}
}
.left{
.store_tit{

329
page_user/idcard_test.vue Normal file
View File

@ -0,0 +1,329 @@
<template>
<view class="page">
<view class="fixed">
<u-navbar title="认证" :border-bottom="false" :background="bgc" title-color='#fff' title-size='36'
height='45' back-icon-color='#fff'></u-navbar>
</view>
<view class="backimg">
</view>
<view class="iptsbox">
<view class="top_tip">
请输入您的有效身份信息
</view>
<view class="li">
<view class="left">
姓名
</view>
<input type="text" v-model="name" placeholder="请填写姓名" placeholder-style='' />
</view>
<view class="li">
<view class="left">
身份证号
</view>
<input type="text" v-model="idnum" placeholder="请填写身份证号" placeholder-style='' />
</view>
</view>
<view class="btn_box">
<view class="btn" @click="test">
完成
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: " ",
},
name: '',
idnum: null,
istrue:false
}
},
watch: {
idnum(newVal) {
// 15 18
const regex = /^\d{17}(\d|X|x)$/;
this.istrue = regex.test(newVal);
}
},
computed: {
userId() {
return this.$store.getters.userId;
},
},
onLoad() {
this.getinfo()
},
methods: {
getinfo() {
uni.showLoading({
title:'加载中'
})
this.$u.get("/getInfo").then((res) => {
if (res.code == 200) {
uni.hideLoading()
this.$store.commit('SET_USERID', res.user.userId);
this.userinfo = res.user
} else {
setTimeout(()=>{
this.getinfo()
},2000)
}
});
},
validateName(name) {
const nameRegex = /^[\u4e00-\u9fa5·]{2,20}$/;
return nameRegex.test(name);
},
validateIdnum(idnum) {
const idnumRegex =
/^(^[1-9]\d{7}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$)$/;
return idnumRegex.test(idnum);
},
test() {
if (!this.validateName(this.name)) {
uni.showToast({
title: '请输入有效的中文姓名',
icon: 'none',
duration: 2000
});
return;
}
if (!this.validateIdnum(this.idnum)) {
uni.showToast({
title: '请输入有效的身份证号',
icon: 'none',
duration: 2000
});
return;
}
let data = {
realName: this.name,
idCard: this.idnum,
userId: this.userId,
};
this.$u.get('/appVerify/user/authentication?', data).then((res) => {
if (res.code === 200) {
if(res.data.isok){
uni.redirectTo({
url:"/pages/index/index"
})
}else{
uni.showToast({
title: '身份信息与姓名不符',
icon: 'none',
duration: 2000
});
}
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
}
}
</script>
<style lang="scss">
.page {
width: 750rpx;
.btn_box{
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
width: 750rpx;
height: 174rpx;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
border-radius: 0rpx 0rpx 0rpx 0rpx;
.btn{
display: flex;
align-items: center;
justify-content: center;
width: 682rpx;
height: 84rpx;
background: #4297F3;
border-radius: 42rpx 42rpx 42rpx 42rpx;
font-weight: 600;
font-size: 36rpx;
color: #FFFFFF;
}
}
.iptsbox{
margin: 0 auto;
margin-top: -234rpx;
width: 676rpx;
padding-bottom: 54rpx;
// height: 574rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.top_tip{
display: flex;
align-items: center;
padding-left: 38rpx;
width: 676rpx;
height: 118rpx;
background: #EFEFEF;
border-radius: 20rpx 20rpx 0rpx 0rpx;
font-weight: 600;
font-size: 36rpx;
color: #3D3D3D;
}
.li{
padding-left: 40rpx;
margin: 0 auto;
margin-top: 46rpx;
display: flex;
align-items: center;
width: 624rpx;
height: 92rpx;
background: #EFEFEF;
border-radius: 46rpx 46rpx 46rpx 46rpx;
.left{
width: 130rpx;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
}
input {
margin-left: 44rpx;
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
.input-placeholder {
font-weight: 400;
font-size: 24rpx;
color: #C7C7C7;
}
}
}
}
.tit{
margin: 20rpx auto;
width: 608rpx;
height: 76rpx;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 600;
font-size: 28rpx;
color: #3D3D3D;
}
.backimg {
// position: fixed;
width: 750rpx;
height: 696rpx;
z-index: -10;
background-image: url('https://lxnapi.ccttiot.com/bike/img/static/uNA5HihiOsxz8vpYxbda');
background-size: cover;
/* 背景图片等比缩放以覆盖整个容器 */
background-position: center;
}
.fixed {
z-index: 999;
position: fixed;
top: 0;
}
.tips {
text-align: center;
margin: 10rpx auto;
width: 610rpx;
font-weight: 500;
font-size: 28rpx;
color: #3D3D3D;
}
.imgbox{
width: 100%;
display: flex;
align-items: center;justify-content: center;
.img{
margin: 10rpx auto;
width: 428rpx;
height: 292.32rpx;
}
}
.btn {
display: flex;
align-items: center;
justify-content: center;
margin: 10rpx auto;
width: 610rpx;
height: 90rpx;
background: #979797;
border-radius: 16rpx;
font-weight: 500;
font-size: 40rpx;
color: #FFFFFF;
}
.act1{
background: #4C97E7;
}
.ipt_box {
margin: 0 auto;
margin-top: -234rpx;
width: 610rpx;
background: #FFFFFF;
box-shadow: 0rpx 10rpx 64rpx 0rpx rgba(0, 0, 0, 0.08);
border-radius: 12rpx;
background: #FFFFFF;
.line {
margin-top: 34rpx;
margin-bottom: 34rpx;
width: 586rpx;
height: 2rpx;
background: #F3F3F3;
}
.li {
display: flex;
align-items: center;
.left {
width: 96rpx;
font-weight: 400;
font-size: 24rpx;
color: #979797;
}
input {
margin-left: 44rpx;
font-weight: 400;
font-size: 24rpx;
color: #3D3D3D;
.input-placeholder {
font-weight: 400;
font-size: 24rpx;
color: #C7C7C7;
}
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

32
page_user/tips.vue Normal file
View File

@ -0,0 +1,32 @@
<template>
<view class="page">
<u-navbar title="温馨提示 " :border-bottom="false" :background="background" title-color='#000' title-size='36'
height='45' back-icon-color='#000'></u-navbar>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uCCHcZsflexApimAoHRS" mode=""></image>
</view>
</template>
<script>
export default {
data() {
return {
background: {
backgroundColor: "#fff",
},
}
},
methods: {
}
}
</script>
<style lang="scss">
.page{
image{
width: 750rpx;
height: 1994rpx;
}
}
</style>

View File

@ -8,20 +8,20 @@
</view>
<view class="tit">
请于9月4日前到店取车
{{typeReturn(orderInfo.status)}}
</view>
<view class="tips">
超出时间将无法保证车辆库存
<view class="tips" v-if="orderInfo.status==0">
剩余支付时间{{countdown}}
</view>
<view class="order_code">
<view class="order_code" v-if="orderInfo.status==8">
<view class="tits" style="color: #3D3D3D;font-weight: 600;font-size: 32rpx;">
已还车
</view>
<view class="tits">
押金将退还原支付账户
押金将退还原支付账户
</view>
<view class="tits">
还车时间09月05日周四16:00
还车时间09月05日周四16:00
</view>
</view>
<view class="store_car">
@ -29,10 +29,10 @@
<view class="type">
租车门店
</view>
云行租车汇丰公寓
{{storeInfo.name}}
</view>
<view class="address">
天目山路148号
{{storeInfo.simpleAddress}}
</view>
<view class="time">
营业时间09:00-21:00
@ -42,7 +42,7 @@
<image src="https://lxnapi.ccttiot.com/bike/img/static/umkJCfPac4Mrzni8aoda" mode=""></image>
联系门店
</view>
<view class="store_btn">
<view class="store_btn" @click="mapFun">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uolYZ4dLvxxI2n2WzZ4J" mode=""></image>
导航到店
</view>
@ -52,22 +52,25 @@
<view class="type">
还取方式
</view>
<view class="txt">
<view class="txt" v-if="orderInfo.returnMethod==1">
自行前往门店还车
</view>
<view class="txt" v-if="orderInfo.returnMethod==2">
上门取车
</view>
</view>
<view class="info_box">
<view class="car_info">
<image src="https://lxnapi.ccttiot.com/bike/img/static/ucOJVTe4wsXSKAH181k9" mode=""></image>
<image :src="modelInfo.picture" mode=""></image>
<view class="right_info">
<view class="tits">
全新车网红泡泡50KM续航
{{modelInfo.model}}
</view>
<view class="txt">
套餐日租 108/
套餐{{orderInfo.rentalPeriodText}}
</view>
<view class="txt">
租赁周期1
租赁周期{{orderInfo.num}}{{timetype(orderInfo.rentalUnit)}}
</view>
</view>
</view>
@ -75,8 +78,8 @@
<view class="text">
租车时间
</view>
<view class="time">
1天09/04 16:00-09/05 16:00)
<view class="time" v-if="orderInfo.pickupTime">
{{orderInfo.num}}{{timetype(orderInfo.rentalUnit)}}{{returnTime(orderInfo.pickupTime)}}-{{returnTime(orderInfo.expiryTime)}})
</view>
</view>
<view class="info_li">
@ -84,17 +87,17 @@
租金
</view>
<view class="price">
<span>108×1</span>
108
<!-- <span>108×1</span> -->
{{orderInfo.price}}
</view>
</view>
<view class="info_li">
<view class="text">
基础服务保障
车辆派送费
</view>
<view class="price">
108
{{orderInfo.deliveryFee}}
</view>
</view>
<view class="info_li">
@ -102,8 +105,8 @@
押金
</view>
<view class="price">
<span>108×1</span>
108
<!-- <span>108×1</span> -->
{{orderInfo.deposit}}
</view>
</view>
<view class="line">
@ -115,7 +118,7 @@
</view>
<view class="price" style="font-size: 40rpx;">
<span style="font-size: 28rpx;">实付款</span>
108
{{orderInfo.payFee}}
</view>
</view>
<view class="info_li" style="margin-top: 16rpx;">
@ -128,14 +131,50 @@
</view>
<view class="tab_box">
<view class="choose_tab">
<view class="tab_li" v-for="item in 4" :key="item">
<view class="tab_li" @click="tabindex=0">
取车须知
<view class="tab_line"></view>
<view class="tab_line" v-if="tabindex==0"></view>
<view class="tab_line" v-else style="background: #fff;"></view>
</view>
<view class="tab_li" @click="tabindex=1">
取消规则
<view class="tab_line" v-if="tabindex==1"></view>
<view class="tab_line" v-else style="background: #fff;"></view>
</view>
<view class="tab_li" @click="tabindex=2">
超时规则
<view class="tab_line" v-if="tabindex==2"></view>
<view class="tab_line" v-else style="background: #fff;"></view>
</view>
<view class="tab_li" @click="tabindex=3">
还车规则
<view class="tab_line" v-if="tabindex==3"></view>
<view class="tab_line" v-else style="background: #fff;"></view>
</view>
</view>
<view class="text">
请在2024-09-04 16:00前取车超出时间将无法保证 车辆库存
<view class="text" v-if="tabindex==0">
请在{{orderInfo.pickupTime}}前取车超出时间将无法保证 车辆库存
</view>
<view class="tabble" v-if="tabindex==1">
<view class="tabble_top">
<view class="tabbl_left">
取消时间
</view>
<view class="tabble_right">
扣费标准
</view>
</view>
<view class="tabble_cont" v-for="(item,index) in agentInfo.cancelRuleList" :key="index">
<view class="tabbl_left">
{{item.instructions}}
</view>
<view class="tabble_right">
{{backDedu(item.deductPercent)}}
</view>
</view>
</view>
<image src="https://lxnapi.ccttiot.com/bike/img/static/ucMwistLU09PNS4YqXgr" mode="" v-if="tabindex==3" style="width: 698rpx;height: 1142rpx;margin-left: -28rpx;"></image>
</view>
<view class="order_code">
<view class="tits">
@ -143,14 +182,22 @@
</view>
<view class="code_li">
<view class="code">
ZDVNJK24968791234168549864412
{{orderInfo.orderNo}}
</view>
<view class="btn">
<view class="btn" @click="copy(orderInfo.orderNo)">
复制
</view>
</view>
</view>
<view class="bot_btn" v-if="false">
<view class="bot_btn">
<view class="btn_li" v-if="orderInfo.status==0">
<view class="txt2" @click="orderCancel">
取消订单
</view>
<view class="btn">
确认支付
</view>
</view>
<view class="btn_li" v-if="false">
<view class="txt2">
取消订单
@ -170,14 +217,14 @@
续租
</view>
</view>
<view class="btn_li3">
<view class="btn_li3" v-if="orderInfo.status==8||orderInfo.status==5||orderInfo.status==6">
<view class="btn3" style="width: 1rpx;"></view>
<view class="btn5">
<view class="btn5" @click="tosubOrder()">
重新下单
</view>
</view>
</view>
<u-mask :show="showaddress" :z-index='100' duration='0' />
<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=""></image>
@ -188,9 +235,9 @@
<view class="tip">
还车可选择以下任意一家门店
</view>
<view class="card_box">
<view class="card" v-for=" item in 3" :key="item">
<view class="chose_img">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uwsRz4zY4kaKnkYt3EFS" mode=""></image>
@ -201,7 +248,7 @@
</view>
<view class="card_txt">
<image src="https://lxnapi.ccttiot.com/bike/img/static/utT79qEWjVeXaZXTihtW" mode=""></image>
<view class="words">
营业时间09:00-21:00
</view>
@ -210,18 +257,20 @@
</view>
</view>
<view class="card_txt">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uBa17CwWo6fhf1csWoko" mode=""></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uBa17CwWo6fhf1csWoko" mode=""></image>
<view class="words">
人民南路110号通过街地铁站C口步行120
</view>
</view>
<view class="store_btn_li">
<view class="store_btn">
<image src="https://lxnapi.ccttiot.com/bike/img/static/umkJCfPac4Mrzni8aoda" mode=""></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/umkJCfPac4Mrzni8aoda" mode="">
</image>
联系门店
</view>
<view class="store_btn">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uolYZ4dLvxxI2n2WzZ4J" mode=""></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uolYZ4dLvxxI2n2WzZ4J" mode="">
</image>
导航到店
</view>
</view>
@ -249,10 +298,11 @@
车辆编号21358941
</view>
<view class="txt3">
<image src="https://lxnapi.ccttiot.com/bike/img/static/uDlsHeWoSBa8Sj4dAhYx" mode=""></image> 90% <span style="margin-left: 40rpx;">可骑行35km</span>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uDlsHeWoSBa8Sj4dAhYx" mode=""></image>
90% <span style="margin-left: 40rpx;">可骑行35km</span>
</view>
</view>
</view>
<view class="btn_li">
<view class="btn1">
@ -263,7 +313,7 @@
</view>
</view>
</view>
</view>
</template>
@ -272,15 +322,254 @@
data() {
return {
showsub: false,
showaddress:false
showaddress: false,
orderNo: '',
orderInfo: {},
countdown: '',
countdownTimer: null,
storeInfo: {},
modelInfo: {},
tabindex:0,
agentInfo:{}
}
},
onLoad(e) {
if (e.orderNo) {
this.orderNo = e.orderNo
}
},
onShow() {
this.getOrderInfo()
},
methods: {
copy(orderNo) {
uni.setClipboardData({
data: orderNo,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'success',
duration: 2000
});
},
fail: () => {
uni.showToast({
title: '复制失败',
icon: 'none',
duration: 2000
});
}
});
},
tosubOrder(){
uni.navigateTo({
url:'/page_user/ordder?storeId='+this.orderInfo.storeId+'&modelId='+this.orderInfo.modelId
})
},
orderCancel(){
this.$u.post(`appVerify/orderCancel?orderNo=`+this.orderInfo.orderNo).then((res) => {
if (res.code == 200) {
this.getOrderInfo()
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
returnTime(time) {
// Date
let date = new Date(time.replace(/-/g, "/"));
// 0 1
let month = (date.getMonth() + 1).toString().padStart(2, "0");
//
let day = date.getDate().toString().padStart(2, "0");
//
let hours = date.getHours().toString().padStart(2, "0");
//
let minutes = date.getMinutes().toString().padStart(2, "0");
//
return `${month}/${day} ${hours}:${minutes}`;
},
timetype(time) {
if (time == 'hour') {
return '小时'
} else if (time == 'day') {
return '天'
} else if (time == 'week') {
return '周'
} else if (time == 'month') {
return '月'
} else if (time == 'quarter') {
return '季度'
} else if (time == 'year') {
return '年'
}
},
typeReturn(num) {
if (num == 0) {
return '待支付'
} else if (num == 1) {
return '待取车'
} else if (num == 2) {
return '待送车'
} else if (num == 3) {
return '送车中'
} else if (num == 4) {
return '进行中'
} else if (num == 5) {
return '超时取消'
} else if (num == 6) {
return '已取消'
} else if (num == 1) {
return '已结束'
}
},
mapFun() {
console.log('点击了');
uni.openLocation({
latitude: this.storeInfo.lat,
// - /
longitude: this.storeInfo.lng,
// - /
// name: "",
address: this.storeInfo.simpleAddress
});
},
getstoreInfo() {
let data = {
storeId: this.orderInfo.storeId
}
this.$u.get(`app/getStore?`, data).then((res) => {
if (res.code == 200) {
this.storeInfo = res.data
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
getmodelInfo() {
let data = {
modelId: this.orderInfo.modelId
}
this.$u.get(`app/getModelById?`, data).then((res) => {
if (res.code == 200) {
this.modelInfo = res.data
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
getAgent() {
let data = {
agentId: this.orderInfo.agentId
}
this.$u.get(`app/getAgentByAgentId?`, data).then((res) => {
if (res.code == 200) {
this.agentInfo = res.data;
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
backDedu(info) {
if (info == 0) {
return '免费取消'
} else {
return '扣费' + info * 100 + '%'
}
},
getOrderInfo() {
let data = {
orderNo: this.orderNo
};
this.$u.get(`appVerify/orderInfo?`, data).then((res) => {
if (res.code === 200) {
this.orderInfo = res.data;
this.getstoreInfo()
this.getmodelInfo()
this.getAgent()
//
if (this.orderInfo.status == 0) {
this.startCountdown(this.orderInfo.autoCancelTime);
}
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
startCountdown(autoCancelTime) {
//
if (this.countdownTimer) {
clearInterval(this.countdownTimer);
}
//
let cancelTime = new Date(autoCancelTime.replace(/-/g, "/")).getTime();
//
this.countdownTimer = setInterval(() => {
let currentTime = new Date().getTime();
//
let diff = cancelTime - currentTime;
// "00:00"
if (diff <= 0) {
clearInterval(this.countdownTimer);
this.countdown = "00:00";
return;
}
//
let hours = Math.floor(diff / (1000 * 60 * 60));
let minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
let seconds = Math.floor((diff % (1000 * 60)) / 1000);
//
if (hours > 0) {
this.countdown = `${hours}小时 ${minutes}分钟 ${seconds}`;
} else {
this.countdown = `${minutes}分钟 ${seconds}`;
}
}, 1000);
},
}
}
</script>
<style lang="scss">
page {
background-color: #F7F7F7;
@ -288,7 +577,8 @@
.page {
padding-bottom: 200rpx;
.address_box{
.address_box {
z-index: 110;
position: fixed;
bottom: 0;
@ -296,18 +586,21 @@
width: 750rpx;
border-radius: 30rpx 30rpx 0 0;
background: #FFFFFF;
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0,0,0,0.3);
.close{
box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
.close {
position: absolute;
top: 56rpx;
right: 50rpx;
width: 33.99rpx;
height: 33.99rpx;
}
.card_box::-webkit-scrollbar {
display: none;
}
.btn{
.btn {
display: flex;
align-items: center;
justify-content: center;
@ -320,61 +613,72 @@
font-size: 40rpx;
color: #FFFFFF;
}
.card_box{
.card_box {
margin-top: 36rpx;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
max-height: 740rpx;
overflow-y: auto; /* 允许上下滚动 */
overflow-x: hidden; /* 禁止左右滚动 */
.card{
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
max-height: 740rpx;
overflow-y: auto;
/* 允许上下滚动 */
overflow-x: hidden;
/* 禁止左右滚动 */
.card {
margin-top: 22rpx;
position: relative;
padding: 30rpx 24rpx 0 24rpx;
width: 656rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0,0,0,0.2);
box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(0, 0, 0, 0.2);
border-radius: 30rpx;
.chose_img{
.chose_img {
position: absolute;
right: 0;
top: 0;
width: 66rpx;
height: 68rpx;
}
.card_tit{
.card_tit {
font-weight: 600;
font-size: 40rpx;
color: #3D3D3D;
}
.card_txt{
.card_txt {
margin-top: 8rpx;
width: 100%;
display: inline-flex;
// align-items: center;
image{
image {
margin-top: 6rpx;
margin-right: 8rpx;
width: 28rpx;
height: 28rpx;
}
.words{
.words {
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
}
.km{
.km {
margin-left: auto;
font-weight: 400;
font-size: 32rpx;
color: #4297F3;
}
}
.store_btn_li {
display: flex;
flex-wrap: nowrap;
@ -383,18 +687,18 @@
border-top: 1rpx solid #D8D8D8;
width: 696rpx;
height: 102rpx;
.store_btn:first-child {
border-right: 1rpx solid #D8D8D8;
}
.store_btn {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
height: 102rpx;
image {
font-weight: 400;
font-size: 28rpx;
@ -403,19 +707,21 @@
width: 40rpx;
height: 40rpx;
}
}
}
}
}
.tit5{
.tit5 {
width: 100%;
text-align: center;
font-weight: 600;
font-size: 44rpx;
color: #3D3D3D;
}
.tip{
.tip {
margin-top: 18rpx;
width: 100%;
text-align: center;
@ -424,6 +730,7 @@
color: #3D3D3D;
}
}
.sub_car {
position: fixed;
padding: 56rpx 60rpx;
@ -433,13 +740,15 @@
width: 650rpx;
background: #ffffff;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.btn_li{
.btn_li {
margin-top: 40rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.btn1{
.btn1 {
display: flex;
align-items: center;
justify-content: center;
@ -451,7 +760,8 @@
font-size: 36rpx;
color: #3D3D3D;
}
.btn2{
.btn2 {
display: flex;
align-items: center;
justify-content: center;
@ -464,6 +774,7 @@
color: #FFFFFF;
}
}
.tit3 {
width: 100%;
text-align: center;
@ -499,6 +810,7 @@
.txt3 {
margin-top: 6rpx;
image {
width: 32rpx;
height: 32rpx;
@ -508,7 +820,7 @@
}
}
}
.bot_btn {
display: flex;
align-items: center;
@ -520,9 +832,11 @@
position: fixed;
bottom: 0;
padding: 0 50rpx;
.btn_li3{
.btn_li3 {
width: 100%;
.btn5{
.btn5 {
margin-left: auto;
display: flex;
align-items: center;
@ -536,12 +850,14 @@
color: #FFFFFF;
}
}
.btn_li2{
.btn_li2 {
width: 100%;
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
.btn3{
.btn3 {
padding: 10rpx 54rpx;
border-radius: 42rpx 42rpx 42rpx 42rpx;
border: 2rpx solid #4297F3;
@ -549,7 +865,8 @@
font-size: 36rpx;
color: #4297F3;
}
.btn4{
.btn4 {
padding: 10rpx 54rpx;
border-radius: 42rpx 42rpx 42rpx 42rpx;
background: #4297F3;
@ -558,6 +875,7 @@
color: #FFFFFF;
}
}
.btn_li {
width: 100%;
display: flex;
@ -627,7 +945,92 @@
padding: 20rpx 28rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.tabble {
margin-top: 20rpx;
display: flex;
flex-wrap: wrap;
.tabble_top {
width: 100%;
display: flex;
flex-wrap: nowrap;
.tabbl_left {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
height: 93rpx;
background: #D8D8D8;
border-radius: 30rpx 0 0 0;
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
border-right: 1rpx solid #fff;
border-bottom: 1rpx solid #fff;
}
.tabble_right {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
height: 93rpx;
background: #D8D8D8;
border-radius: 0 30rpx 0 0;
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
border-bottom: 1rpx solid #fff;
}
}
.tabble_cont:last-child {
.tabbl_left {
border-radius: 0 0 0 30rpx;
}
.tabble_right {
border-radius: 0 0 30rpx 0;
}
}
.tabble_cont {
width: 100%;
display: flex;
flex-wrap: nowrap;
.tabbl_left {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
height: 93rpx;
background: #EFEFEF;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
border-right: 1rpx solid #fff;
border-bottom: 1rpx solid #fff;
}
.tabble_right {
display: flex;
align-items: center;
justify-content: center;
width: 50%;
height: 93rpx;
background: #EFEFEF;
font-weight: 400;
font-size: 32rpx;
color: #3D3D3D;
border-bottom: 1rpx solid #fff;
}
}
}
.text {
margin-top: 30rpx;
padding: 0 22rpx;

104
page_user/word.vue Normal file
View File

@ -0,0 +1,104 @@
<template>
<view class="page">
<u-navbar :title="wordinfo.title" :border-bottom="false" :background="bgc" title-color='#000' title-size='36'
height='45'></u-navbar>
<view class="cont" v-html="content"></view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
info: {},
userinfo: {},
areaInfo: {},
content: '',
title: '',
wordinfo:{}
}
},
onLoad(options) {
if (options.id ) {
// title content
let id =options.id
this.getword(id)
// this.content = this.replaceImgWithImage(this.content);
// this.insertPhoneNumberAndDate()
// console.log(this.content, 'this.contentthis.contentthis.contentthis.content');
}
},
methods: {
getword(id) {
this.$u.get(`/app/article/`+id).then((res) => {
if (res.code === 200) {
this.wordinfo=res.data
this.content = this.replaceImgWithImage(this.wordinfo.content);
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
getagree() {
let id = uni.getStorageSync('areaId');
this.$u.get(`/app/article/list?areaId=${id}&tag=agreement`).then((res) => {
if (res.code === 200) {
this.info = res.rows[0];
this.content = this.replaceImgWithImage(this.info.content);
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
replaceImgWithImage(content) {
// &nbsp; \u00A0
content = content.replace(/&nbsp;/g, '\u00A0');
// <img>
content = content.replace(/<img([^>]*)>/g, (match, group1) => {
//
let cleanedGroup = group1.replace(/\s*\/$/, '');
return `<img style="width: 85vw ; height: auto;" ${cleanedGroup} />`;
});
return content;
}
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.page {
width: 750rpx;
padding-bottom: 100rpx;
.cont {
margin-top: 34rpx ;
margin: 0 auto;
width: 634rpx;
}
}
</style>

View File

@ -30,15 +30,14 @@
"navigationStyle": "custom"
}
}
],
"subPackages": [{
"root": "page_user", // A
"pages": [
{
"pages": [{
"path": "upload",
"style": {
"navigationBarTitleText": "上传",
@ -47,82 +46,91 @@
}
},
{
"path" : "carSelection",
"style" :
{
"path": "carSelection",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "carStore",
"style" :
{
"path": "carStore",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "mapSele",
"style" :
{
"path": "mapSele",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "idTest",
"style" :
{
"path": "idTest",
"style": {
"navigationBarTitleText": "上传",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "ordder",
"style" :
{
"path": "ordder",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "user_order",
"style" :
{
"path": "user_order",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "carInfo",
"style" :
{
"path": "carInfo",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "renewCar",
"style" :
{
"path": "renewCar",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path" : "StoreManagement",
"style" :
{
"navigationBarTitleText" : ""
"path": "word",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "tips",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "idcard_test",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
@ -130,7 +138,7 @@
// ... A
]
}
],
// "tabBar": {
// "custom": true,

View File

@ -1,6 +1,6 @@
<template>
<view class="page">
<view class="backimg"></view>
<view class="backimg" @click="toTips()"></view>
<view class="choose_card">
<view class="check">
<view class="txt1">
@ -48,7 +48,7 @@
取车时间
</view>
<view class="words" @click="time1=true">
{{time}}
{{time}}
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode=""></image>
</view>
</view>
@ -56,7 +56,7 @@
<view class="txt">
选择租车周期
</view>
<view class="words" @click="showdata=true">
<view class="words" @click="showdata=true">
{{dataInfo.dictLabel}}
<image src="https://lxnapi.ccttiot.com/bike/img/static/uJkuBFsHACP6tnUo5nYm" mode=""></image>
</view>
@ -67,10 +67,10 @@
</view>
<image class="kefu" src="https://lxnapi.ccttiot.com/bike/img/static/u8osHvZfHL7u3lbveVXx" mode=""></image>
</view>
<view class="car_card" v-for="(item,index) in shopList" :key="index">
<view class="car_card" v-for="(item,index) in shopList" :key="index" @click="toStore(item)">
<view class="card_top">
<view class="tit">
{{item.name}}
{{item.name}}
</view>
<view class="txt">
{{item.rentalCar}}辆可租 <view class="iconfont icon-xiangyou1"> </view>
@ -104,12 +104,14 @@
<view class="choosedata" v-if="showdata">
<view class="tit">
请选择租车周期
<image src="https://lxnapi.ccttiot.com/bike/img/static/uLzTHCbE6TTRPYj6rv8X" mode="" @click="closeData()"></image>
<image src="https://lxnapi.ccttiot.com/bike/img/static/uLzTHCbE6TTRPYj6rv8X" mode=""
@click="closeData()"></image>
</view>
<view class="li" v-for="(item,index) in dataList" :key="index" :class="index == dataIndex? 'act':''" @click="chooseData(item,index)">
<view class="li" v-for="(item,index) in dataList" :key="index" :class="index == dataIndex? 'act':''"
@click="chooseData(item,index)">
{{item.dictLabel}}
</view>
</view>
<tab-bar :indexs='0' style=""></tab-bar>
</view>
@ -140,10 +142,10 @@
startTime: '',
pickertime: '',
time: '',
showdata:false,
dataIndex:0,
dataInfo:{},
shopList:[]
showdata: false,
dataIndex: 0,
dataInfo: {},
shopList: []
}
},
@ -187,21 +189,31 @@
this.time = `${month < 10 ? '0' : ''}${month}${day < 10 ? '0' : ''}${day}`;
// pickertime
this.pickertime = this.startDate;
},
watch: {
},
methods: {
getshopList(){
let data={
toTips(){
uni.navigateTo({
url:'/page_user/tips'
})
},
toStore(item) {
uni.navigateTo({
url: '/page_user/carStore?storeId=' + item.storeId
})
},
getshopList() {
let data = {
// phoneLon:this.gps.latitude,
phoneLon:120.257144,
phoneLon: 120.257144,
// phoneLat:this.gps.longitude,
phoneLat:27.105719,
isFreeCar:true
phoneLat: 27.105719,
isFreeCar: true
}
this.$u.post(`app/getStoreListByLocation`,data).then((res) => {
this.$u.post(`app/getStoreListByLocation`, data).then((res) => {
if (res.code == 200) {
this.shopList = res.data;
} else {
@ -213,12 +225,12 @@
}
});
},
chooseData(item,index){
this.dataInfo=item
this.dataIndex=index
chooseData(item, index) {
this.dataInfo = item
this.dataIndex = index
},
closeData(){
this.showdata=false
closeData() {
this.showdata = false
},
confirm1(selectedDate) {
//
@ -238,9 +250,9 @@
const now = new Date();
const month = now.getMonth() + 1; // 01
const day = now.getDate();
// MM-DD
this.time = `${month < 10 ? '0' : ''}${month}${day < 10 ? '0' : ''}${day}`;
uni.showToast({
title: '选择的日期不能小于当前日期',
@ -299,7 +311,7 @@
this.$u.get("/app/getDictData?dictType=rl_rental_period").then((res) => {
if (res.code == 200) {
this.dataList = res.data
this.dataInfo=this.dataList[0]
this.dataInfo = this.dataList[0]
} else {
uni.showToast({
title: res.msg,
@ -330,8 +342,8 @@
url: '/page_user/carSelection'
})
},
getMapLocation() {
uni.chooseLocation({
success: (res) => {
@ -358,8 +370,8 @@
if (data
.authSetting[
'scope.userLocation'
] === true
) {
] === true
) {
uni.showToast({
title: "授权成功",
icon: "success",
@ -369,12 +381,12 @@
uni.chooseLocation({
success: (
res
) => {
) => {
console
.log(
"详细地址",
res
);
);
// this.getRegionFn(res);
}
})
@ -416,6 +428,7 @@
.page {
width: 100%;
padding-bottom: 200rpx;
.choosedata {
padding: 46rpx 37rpx;
position: fixed;
@ -425,7 +438,7 @@
background: #FFFFFF;
border-radius: 20rpx 20rpx 0 0;
z-index: 101;
.tit {
margin-bottom: 54rpx;
position: relative;
@ -434,7 +447,7 @@
font-weight: 600;
font-size: 40rpx;
color: #3D3D3D;
image {
position: absolute;
right: 36rpx;
@ -442,9 +455,9 @@
height: 52rpx;
}
}
.li {
margin-bottom: 24rpx;
display: flex;
@ -460,16 +473,16 @@
font-size: 36rpx;
color: #3D3D3D;
}
.act {
background: #DCEDFF;
border: 2rpx solid #4297F3;
}
}
.car_card {
margin: 0 auto;
margin-top: 16rpx;

View File

@ -428,6 +428,7 @@
const phoneRegex = /^1[3-9]\d{9}$/;
return phoneRegex.test(phone);
},
getcode() {
if (this.isCodeButtonDisabled) return;
if (!this.phone) {
@ -608,9 +609,9 @@
};
wxLoginAsync()
.then(async (data) => {
let areaId = uni.getStorageSync('areaId');
this.$u.post("/wxlogin?mobileCode=" + data.mobileCode + '&jsCode=' + data.jscode +
'&areaId=' + areaId).then((res) => {
this.$u.post("/wxlogin?mobileCode=" + data.mobileCode + '&jsCode=' + data.jscode
).then((res) => {
@ -619,7 +620,7 @@
if (res.code == 200) {
console.log(res, 'resres');
wx.setStorageSync('token', res.token);
// that.ceshi()
that.ceshi()
// uni.switchTab({
// url: '/pages/index/index'
// })
@ -638,11 +639,18 @@
});
},
async ceshi() {
this.$u.get("/getAppInfo").then((res) => {
this.$u.get("/getInfo").then((res) => {
console.log('进入跳转');
uni.navigateTo({
url: '/pages/index/index'
})
if(res.data.user.isAuthentication){
uni.navigateTo({
url: '/pages/index/index'
})
}else{
uni.navigateTo({
url:"/page_user/idcard_test"
})
}
});
},
}

View File

@ -3,26 +3,60 @@
<u-navbar :is-back="false" title="订单管理" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' height='45'></u-navbar>
<view class="tap">
<view class="tap_cont " :class="curtitidx==0?'act1':''" @click="changeidx(0)">
<view class="tap_cont " :class="status==0?'act1':''" @click="changeidx(0)">
全部
</view>
<view class="tap_cont" :class="curtitidx==1?'act1':''" @click="changeidx(1)">
<view class="tap_cont" :class="status==1?'act1':''" @click="changeidx(1)">
进行中
</view>
<view class="tap_cont" :class="curtitidx==2?'act1':''" @click="changeidx(2)">
<view class="tap_cont" :class="status==2?'act1':''" @click="changeidx(2)">
待支付
</view>
<view class="tap_cont" :class="curtitidx==3?'act1':''" @click="changeidx(3)">
<view class="tap_cont" :class="status==3?'act1':''" @click="changeidx(3)">
已完成
</view>
<view class="tap_cont" :class="curtitidx==4?'act1':''" @click="changeidx(4)" v-if="areainfo.returnVerify==01">
待审核
</view>
</view>
<u-mask :show="show" :z-index='100' />
<view class="warp_box">
<view class="card" v-for="(item,index) in list" :key="index" @click="todetail(item)">
<view class="btn_box" v-if="item.status==4">
<view class="btn1">续租</view>
<view class="btn2">还车</view>
</view>
<view class="info_li">
<view class="txt">取车时间{{item.pickupTime}}</view>
<view class="txt3" :style="{ color: typeReturn(item.status).color }">
{{ typeReturn(item.status).text }}
</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>
<view class="info_li">
<view class="txt">还车时间{{item.expiryTime}}</view>
<!-- <view class="txt3" style="color: #4297F3;">待取车</view> -->
</view>
<view class="info_li" v-if="item.returnMethod">
<view class="txt" v-if="item.returnMethod==1">还车方式自行前往门店</view>
<view class="txt" v-if="item.returnMethod==2">还车方式上门取车</view>
</view>
<view class="info_li">
<view class="txt">用户地址福鼎市太姥山镇秦屿大道2号</view>
<view class="txt2">{{item.totalFee}}</view>
</view>
<view class="line"></view>
<view class="info_li">
<view class="txt">门店{{item.storeName}}</view>
</view>
<view class="info_li">
<view class="txt">车型{{item.model}}</view>
</view>
</view>
<view class="warp_box" v-if="fasle">
<swiper class="swiper" :style="{ height: swiperHeight + 'rpx' }" :current='curtitidx' @change="swiperchange" style="padding-bottom: 50rpx;" next-margin='0rpx'>
<swiper-item>
<view class="swiper-item">
@ -33,7 +67,7 @@
</view>
<view class="info_li">
<view class="txt">还车时间2024-09-11 13:56</view>
<view class="txt3" style="color: #4297F3;">待取车</view>
<view class="txt3" style="color: #4297F3;"></view>
</view>
<view class="info_li">
<view class="txt">还车方式自行前往门店</view>
@ -99,15 +133,15 @@
searchKeyword: '',
curtitidx: 0,
status: 0,
swiperHeight: 400,
list:[]
}
},
onShow() {
this.getList()
},
watch: {
curtitidx(newValue, oldValue) {
@ -153,6 +187,69 @@
}
},
methods: {
todetail(item){
if(item.status!=5&&item.status!=6){
uni.navigateTo({
url:'/page_user/user_order?orderNo='+item.orderNo
})
}
},
typeReturn(num) {
let result = {
text: '',
color: '#4297F3' //
};
if (num == 0) {
result.text = '待支付';
result.color = '#F14C4C'; //
} else if (num == 1) {
result.text = '待取车';
} else if (num == 2) {
result.text = '待送车';
} else if (num == 3) {
result.text = '送车中';
} else if (num == 4) {
result.text = '进行中';
} else if (num == 5) {
result.text = '超时取消';
result.color = '#ccc'; //
} else if (num == 6) {
result.text = '已取消';
result.color = '#ccc'; //
} else if (num == 7) {
result.text = '已完成';
result.color = '#3D3D3D'; //
} else if (num == 8) {
result.text = '已结束';
}
return result;
},
getList(){
let status=''
if(this.status==0){
status=''
}else if(this.status==1){
status='4'
}else if(this.status==2){
status='0'
}else if(this.status==3){
status='8'
}
this.$u.get(`/appVerify/myOrderList?status=`+status).then((res) => {
if (res.code === 200) {
this.list=res.data
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
});
},
async swiperchange(e) {
// this.curtitidx = e.detail.current
// console.log( this.curtitidx,'eee');
@ -174,6 +271,8 @@
// }
},
async changeidx(idx) {
this.status=idx
this.getList()
// this.pageNum=1
// this.allList=[]
// this.ingList=[]
@ -233,7 +332,85 @@
.page {
width: 750rpx;
.card {
position: relative;
margin: 0 auto;
margin-top: 20rpx;
width: 714rpx;
padding: 32rpx 24rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.line{
margin-top: 26rpx;
width: 100%;
height: 1rpx;
background: #D8D8D8;
}
.txt {
font-weight: 400;
font-size: 26rpx;
color: #3D3D3D;
}
.info_li:first-child {
margin-top: 0;
}
.btn_box{
display: flex;
flex-wrap: nowrap;
position: absolute;
right: 26rpx;
bottom: 54rpx;
.btn1{
display: flex;
align-items: center;
justify-content: center;
width: 106rpx;
height: 52rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #4297F3;
font-weight: 400;
font-size: 26rpx;
color: #4297F3;
}
.btn2{
margin-left: 28rpx;
display: flex;
align-items: center;
justify-content: center;
width: 106rpx;
height: 52rpx;
background: #4297F3;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #4297F3;
font-weight: 400;
font-size: 26rpx;
color: #FFFFFF;
}
}
.info_li {
margin-top: 18rpx;
width: 100%;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.txt1 {
font-weight: 400;
font-size: 30rpx;
color: #6F6F6F;
}
.txt2 {
font-weight: 600;
font-size: 32rpx;
color: #3D3D3D;
}
}
}
.warp_box {
.swiper {
.swiper-item {