郭宇琦 2 өдөр өмнө
parent
commit
37cffa2ad8

+ 15 - 15
locale/en.json

@@ -64,7 +64,7 @@
 	"日租": "Daily",
 	"周租": "Weekly",
 	"租车时长": "Rent duration",
-	"天": "Day",
+	"天": " Day",
 	"优惠券": "Coupon",
 	"折": "Discount",
 	"骑行保障服务": "Riding protection",
@@ -229,8 +229,8 @@
 	"营业中": "Open",
 	"已休息": "Resting",
 	"直线距您": " ",
-	"千米": "km",
-	"米": "m",
+	"千米": " km",
+	"米": " m",
 	"导航": "Nav",
 	"格口详情": "Box Detail",
 	"电柜编号:": "Cabinet ID:",
@@ -324,7 +324,7 @@
 	"重新签名": "Resign",
 	"上报小程序账号信息": "Report mini-program account information",
 	"您当前没有手写签名,是否要进行填写": "You do not have a handwritten signature, do you want to fill it?",
-	"续航": "Range",
+	"续航": "Range ",
 	"骑行里程": "Ride Distance",
 	"骑行时长": "Ride Time",
 	"最大速度": "Max Speed",
@@ -430,7 +430,7 @@
 	"蓝牙配对成功": "Bluetooth Pairing Successful",
 	"请先连接蓝牙": "Please Connect Bluetooth First",
 	"用车人管理": "User Management",
-	"个家庭账号": "Family Accounts",
+	"个家庭账号": " Family Accounts",
 	"设备信息": "Device Info",
 	"软件版本": "Current Version",
 	"用户车辆列表": "User Vehicle List",
@@ -540,10 +540,10 @@
 	"骑行次数": "Ride Count",
 	"累计功率": "Total Power",
 	"减少排放量": "Emissions Reduction",
-	"总": "total",
-	"年": "year",
-	"月": "month",
-	"周": "week",
+	"总": "total ",
+	"年": " year",
+	"月": " month",
+	"周": " week",
 	"请输入绑定的新手机号": "Please enter the new phone number to bind",
 	"请输入验证码": "Please enter the verification code",
 	"秒后再次获取": "Get again after seconds",
@@ -622,7 +622,7 @@
 	"订单金额": "Order Amount",
 	"付款金额": "Payment Amount",
 	"租车购车": "Rent/Sell",
-	"请于": "By",
+	"请于": "By ",
 	"到门店取车": "Pick up at the store",
 	"请上传车辆图片激活车辆": "Please upload vehicle picture to activate vehicle",
 	"待门店确认": "Pending Store Confirm",
@@ -648,7 +648,7 @@
 	"订单结束后随时退": "Return anytime after order ends",
 	"自行去门店取还": "Pickup Store",
 	"未知地址": "Unknown Address",
-	"重量": "Weight",
+	"重量": "Weight ",
 	"换电信息": "Battery Swap Information",
 	"共": "Total",
 	"本单可享": "This order includes",
@@ -711,7 +711,7 @@
 	"有保险的时候": "When insured",
 	"为免押": "For deposit-free",
 	"为总金额": "For total amount",
-	"押金": "Deposit",
+	"押金": " Deposit",
 	"时": "Hour",
 	"无保险": "No Insurance",
 	"金额": "Amount",
@@ -746,7 +746,7 @@
 	"选择取车时间": "Select Pickup Time",
 	"共计": "Total",
 	"车辆押金": "Vehicle Deposit",
-	"需要支付": "Amount to Pay",
+	"需要支付": "Amount to Pay ",
 	"元押金,诺无车损、违章及逾期,还车后可退": "Deposit, refundable upon return if no damage, violations, or overdue.",
 	"前往门店取还": "Pickup/Return Shop",
 	"门店距您": " ",
@@ -756,8 +756,8 @@
 	"支付金额": "Payment Amount",
 	"导航到店": "Navigate to Store",
 	"租车订单已提交": "Rental Order Submitted",
-	"到": "To",
-	"取车": "Pick Up",
+	"到": " To ",
+	"取车": " Pick Up",
 	"订单详情": "Order Details",
 	"选择预约订单时间": "Select Reservation Time",
 	"单价": "Unit Price",

+ 108 - 96
pages/carDetail/carDetail.vue

@@ -1,41 +1,45 @@
 <template>
 	<view>
-	<view class="car-detail-main">
-		<Navigation :scroll='scrollTop'></Navigation>
-		<view class="store-img-view">
-			<swiper v-if="car_detail.model_images && car_detail.model_images.length!=0" class="swiper" :indicator-dots="true" :autoplay="true" :interval="2000"
-				indicator-color="rgba(0, 0, 0, 0.3)" indicator-active-color="#000000" :duration="1000" circular>
-				<swiper-item class="swiper-item" v-for="(item,index) in car_detail.model_images" :key="index">
-					<image style="width: 100%;height: 100%;" class="swiper-item-img" :src="item" mode="aspectFit"></image>
-				</swiper-item>
-			</swiper>
-			<image v-else class="bg-img" src="https://qiniu.bms16.com/FhRnr7rADHHsOFfpWO4duD15SgIt" mode="aspectFit">
-			</image>
-		</view>
-		
-		<view class="car-detail-model">
-			<view class="car-detail-name">{{car_detail.car_model_name}}</view>
-			<view class="car-detail-price">
-				<allPrice :amount="Number(price)" />
+		<view class="car-detail-main">
+			<Navigation :scroll='scrollTop'></Navigation>
+			<view class="store-img-view">
+				<swiper v-if="car_detail.model_images && car_detail.model_images.length!=0" class="swiper"
+					:indicator-dots="true" :autoplay="true" :interval="2000" indicator-color="rgba(0, 0, 0, 0.3)"
+					indicator-active-color="#000000" :duration="1000" circular>
+					<swiper-item class="swiper-item" v-for="(item,index) in car_detail.model_images" :key="index">
+						<image style="width: 100%;height: 100%;" class="swiper-item-img" :src="item" mode="aspectFit">
+						</image>
+					</swiper-item>
+				</swiper>
+				<image v-else class="bg-img" src="https://qiniu.bms16.com/FhRnr7rADHHsOFfpWO4duD15SgIt"
+					mode="aspectFit">
+				</image>
 			</view>
-			<view style="flex-wrap: wrap;justify-content: flex-start;" class="flex-row car-detail-time">
-				<view v-for="(item,index) in car_detail.rental_setting" :key="index" @click="tapSelectType(item)"
-					:class="['time-unit',selectType==item.hire_duration_unit? 'time-unit-i':'']">
-					<text v-if="item.hire_duration_unit==1">{{ $t('日租') }}</text>
-					<text v-if="item.hire_duration_unit==2">{{ $t('月租') }}</text>
-					<text v-if="item.hire_duration_unit==3">{{ $t('年租') }}</text>
-					<text v-if="item.hire_duration_unit==4">{{ $t('时租') }}</text>
-					<text v-if="item.hire_duration_unit==5">{{ $t('分租') }}</text>
-					<text v-if="item.hire_duration_unit==6">{{ $t('周租') }}</text>
-					<text v-if="item.hire_duration_unit==7">{{ $t('季租') }}</text>
+
+			<view class="car-detail-model">
+				<view class="car-detail-name">{{car_detail.car_model_name}}</view>
+				<view class="car-detail-price">
+					<allPrice :amount="Number(price)" />
 				</view>
+				<view style="flex-wrap: wrap;justify-content: flex-start;" class="flex-row car-detail-time">
+					<view v-for="(item,index) in car_detail.rental_setting" :key="index" @click="tapSelectType(item)"
+						:class="['time-unit',selectType==item.hire_duration_unit? 'time-unit-i':'']">
+						<text v-if="item.hire_duration_unit==1">{{ $t('日租') }}</text>
+						<text v-if="item.hire_duration_unit==2">{{ $t('月租') }}</text>
+						<text v-if="item.hire_duration_unit==3">{{ $t('年租') }}</text>
+						<text v-if="item.hire_duration_unit==4">{{ $t('时租') }}</text>
+						<text v-if="item.hire_duration_unit==5">{{ $t('分租') }}</text>
+						<text v-if="item.hire_duration_unit==6">{{ $t('周租') }}</text>
+						<text v-if="item.hire_duration_unit==7">{{ $t('季租') }}</text>
+					</view>
 
-				<view v-if="car_detail.sell_price != 0" @click="tapSelectType({hire_duration_unit:100,hire_price:car_detail.sell_price})"
-					:data-select_type="100" :data-price="car_detail.sell_price"
-					:class="['time-unit',selectType==100? 'time-unit-i':'']">{{ $t('购买') }}</view>
+					<view v-if="car_detail.sell_price != 0"
+						@click="tapSelectType({hire_duration_unit:100,hire_price:car_detail.sell_price})"
+						:data-select_type="100" :data-price="car_detail.sell_price"
+						:class="['time-unit',selectType==100? 'time-unit-i':'']">{{ $t('购买') }}</view>
+				</view>
 			</view>
-		</view>
-		<!-- <view class="free-num-model">
+			<!-- <view class="free-num-model">
 			<view class="flex-row flex-between">
 				<view class="free-num-view">
 					<img style="width: 40rpx;height: 40rpx;" src="https://qiniu.bms16.com/FtlfBtBE5-TeTI5EdrciX_u8u_Sx" alt="">
@@ -45,54 +49,54 @@
 			</view>
 			<view class="free-num-tip">{{ $t('日租享') }}1{{ $t('次免费换电数,超出后需要单独支付换电费用;') }}</view>
 		</view> -->
-		<useGuidance />
-		<view class="card-car-detail">
-			<view class="step-title-view flex-row align-center">
-				<img style="width: 208rpx;height: 40rpx;" src="https://qiniu.bms16.com/Fms8V0l4bNwGUgWwkdRku4dIx_tt"
-					alt="">
-				<img style="width: 86rpx;height: 80rpx;" src="https://qiniu.bms16.com/FibAaPERzqi6m95EP2jREUKixjUi"
-					alt="">
-				<view class="w-bg flex-row"></view>
-			</view>
-			<view class="step-car-view">
-				<view class="step-img-view"></view>
-				<view class="flex-row flex-between" style="margin-bottom: 24rpx;">
-					<view class="store-name-view">
-						<view>{{car_detail.shop_name}}</view>
-						<view class="address-txt">{{car_detail.address}}</view>
-					</view>
-					<view class="distance-num">{{car_detail.distance}}m</view>
+			<useGuidance />
+			<view class="card-car-detail">
+				<view class="step-title-view flex-row align-center">
+					<img style="width: 208rpx;height: 40rpx;" src="https://qiniu.bms16.com/Fms8V0l4bNwGUgWwkdRku4dIx_tt"
+						alt="">
+					<img style="width: 86rpx;height: 80rpx;" src="https://qiniu.bms16.com/FibAaPERzqi6m95EP2jREUKixjUi"
+						alt="">
+					<view class="w-bg flex-row"></view>
 				</view>
-				<view class="flex-row flex-between align-center">
-					<view class="time-view flex-row alert-center">
-						<img class="time-icon" src="https://qiniu.bms16.com/FlGVpR2fdrD1GfeHfDgt-dUMgkOq" alt="">
-						<text>{{car_detail.work_begin_time + '-' + car_detail.work_end_time}}</text>
-					</view>
-					<view class="phone-or-nav flex-row">
-						<view @tap="tapCallPhone">
-							<img style="width: 84rpx;height: 64rpx;margin-right: 20rpx;"
-								src="https://qiniu.bms16.com/FkZYljvsgGtXUGnQaA0wk_sbjlUC" alt="">
+				<view class="step-car-view">
+					<view class="step-img-view"></view>
+					<view class="flex-row flex-between" style="margin-bottom: 24rpx;">
+						<view class="store-name-view">
+							<view>{{car_detail.shop_name}}</view>
+							<view class="address-txt">{{car_detail.address}}</view>
 						</view>
-						<view @tap="navAddress">
-							<img style="width: 112rpx;height: 64rpx;"
-								src="https://qiniu.bms16.com/Fts38M35doVjK09GfOza5qD-wwkK" alt="">
+						<view class="distance-num">{{car_detail.distance}}m</view>
+					</view>
+					<view class="flex-row flex-between align-center">
+						<view class="time-view flex-row alert-center">
+							<img class="time-icon" src="https://qiniu.bms16.com/FlGVpR2fdrD1GfeHfDgt-dUMgkOq" alt="">
+							<text>{{car_detail.work_begin_time + '-' + car_detail.work_end_time}}</text>
 						</view>
+						<view class="phone-or-nav flex-row">
+							<view @tap="tapCallPhone">
+								<img style="width: 84rpx;height: 64rpx;margin-right: 20rpx;"
+									src="https://qiniu.bms16.com/FkZYljvsgGtXUGnQaA0wk_sbjlUC" alt="">
+							</view>
+							<view @tap="navAddress">
+								<img style="width: 112rpx;height: 64rpx;"
+									src="https://qiniu.bms16.com/Fts38M35doVjK09GfOza5qD-wwkK" alt="">
+							</view>
 
+						</view>
 					</view>
 				</view>
 			</view>
+			<view class="nodes">
+				<rich-text v-if="car_detail.model_desc" :nodes="car_detail.model_desc"></rich-text>
+			</view>
+			<view style="height: 150rpx;"></view>
+			<view class="use-car-view flex-row">
+				<view @tap="useCarBtn" class="use-car-btn">{{ $t('我要用车') }}</view>
+			</view>
+			<carPlan v-if="showCarPlan" @changeSelectType="changeSelectType" @closeShowMore="closeShowMore"
+				:params="params" :selectType="selectType" />
 		</view>
-		<view class="nodes">
-			<rich-text v-if="car_detail.model_desc" :nodes="car_detail.model_desc"></rich-text>
-		</view>
-		<view style="height: 150rpx;"></view>
-		<view class="use-car-view flex-row">
-			<view @tap="useCarBtn" class="use-car-btn">{{ $t('我要用车') }}</view>
-		</view>
-		<carPlan v-if="showCarPlan" @changeSelectType="changeSelectType" @closeShowMore="closeShowMore" :params="params"
-			:selectType="selectType" />
 	</view>
-</view>
 </template>
 <script module="tools" lang="wxs" src="@/pages/common/wxs/tools.wxs"></script>
 <script module="tools" lang="sjs" src="@/pages/common/wxs/tools.sjs"></script>
@@ -110,7 +114,7 @@
 	export default {
 		data() {
 			return {
-				shop_type:0,
+				shop_type: 0,
 				recommend_id: '',
 				car_detail: {},
 				showCarPlan: false,
@@ -133,8 +137,8 @@
 			if (options.shop_type) {
 				this.shop_type = options.shop_type
 				const d = {
-					hire_duration_unit:options.shop_type,
-					hire_price:Number(options.hire_price)
+					hire_duration_unit: options.shop_type,
+					hire_price: Number(options.hire_price)
 				}
 				this.tapSelectType(d)
 			}
@@ -157,39 +161,49 @@
 				}, (resp) => {
 					if (resp.data.code === 200) {
 						// resp.data.data.desc = resp.data.data.desc.replaceAll('/<img\b/gi, '$& style="1"'')
-						
+
 						// me.tapSelectType(resp.data.data.rental_setting[0])
 						resp.data.data.distance = common.formatDistance(Number(resp.data.data.distance))
-						
-						
+
+
 						const imgRegex = /<img([^>]*)>/gi;
-						
+
 						// 替换函数,设置 width="100%" 和 height="auto"
 						const updatedRichText = resp.data.data.model_desc.replace(imgRegex, (match) => {
-						  // 使用正则表达式移除已有的 width 和 height 属性
-						  const cleanedMatch = match.replace(/(width|height)="[^"]*"/gi, '');
-						  
-						  // 添加新的 width="100%" 和 height="auto"
-						  return cleanedMatch.replace('<img', '<img width="100%" height="auto"');
+							// 使用正则表达式移除已有的 width 和 height 属性
+							const cleanedMatch = match.replace(/(width|height)="[^"]*"/gi, '');
+
+							// 添加新的 width="100%" 和 height="auto"
+							return cleanedMatch.replace('<img', '<img width="100%" height="auto"');
 						});
-						
-						
+
+
 						resp.data.data.model_desc = updatedRichText
-						
+
 						me.setData({
 							car_detail: resp.data.data,
 							// price: ((resp.data.data.rental_setting[0]?.hire_price || 0) / 100).toFixed(2)
 						})
-						if(!me.shop_type){
-							resp.data.data.rental_setting.map((item,index)=>{
-								if(index === 0){
+						let rental_setting = []
+						resp.data.data.rental_setting.map((item, index) => {
+							if (index === 0) {
+								if (!me.shop_type) {
 									me.tapSelectType({
-										hire_duration_unit:item.hire_duration_unit,
-										hire_price:Number(item.hire_price),
+										hire_duration_unit: item.hire_duration_unit,
+										hire_price: Number(item.hire_price),
 									})
 								}
+							}
+							LEASE_TYPE_ARR.map(items => {
+								if (items.value == item.hire_duration_unit) {
+									item.sort = items.sort
+									rental_setting.push(item)
+								}
 							})
-						}
+						})
+						resp.data.data.rental_setting = rental_setting.sort((x, y) => {
+							return x.sort - y.sort
+						})
 					} else {
 						common.simpleToast(resp.data.msg);
 					}
@@ -200,9 +214,6 @@
 					hire_duration_unit,
 					hire_price
 				} = e
-				console.log(66666666)
-				console.log(hire_price)
-				console.log(hire_duration_unit)
 				this.setData({
 					selectType: hire_duration_unit,
 					price: (hire_price / 100).toFixed(2)
@@ -277,7 +288,8 @@
 </script>
 <style>
 	@import './carDetail.css';
-	.nodes{
+
+	.nodes {
 		color: #333;
 		font-size: 28rpx;
 		padding: 34rpx 32rpx 32rpx;

+ 1 - 1
pages/index/components/unleasedPages/unleasedPages.vue

@@ -9,7 +9,7 @@
 		<!-- #endif -->
 
 
-		<view v-if="!isShow">
+		<view v-if="isShow">
 			<view style="margin: 0 50rpx 0rpx;height: 420rpx;">
 				<u-swiper v-if="img_list.length!=0" :list="img_list" @change="tapSwiper" :autoplay="false" mode="none"
 					:height="420" bgColor="transparent" class="custom-swiper">

+ 8 - 2
pages/orderStatus/orderStatus.vue

@@ -186,7 +186,7 @@
 			<!-- </view> -->
 		</view>
 
-		<view v-if="(orderInfo.hire_begin_time!=0&&orderInfo.hire_end_time!=0)||orderInfo.order_type!=3" class="return-info">
+		<view v-if="(orderInfo.hire_begin_time!=0&&orderInfo.hire_end_time!=0)||orderInfo.order_type!=3 ||orderInfo.order_status!=5||orderInfo.order_status!=6" class="return-info">
 			<view class="return-top flex-row flex-between">
 				<view>{{ $t('取还时间') }}</view>
 				<view>
@@ -254,6 +254,9 @@
 					<view class="grow_1" v-if="(orderInfo.order_status == 5||orderInfo.order_status == 6||orderInfo.order_status == 7||orderInfo.order_status == 8||orderInfo.order_status == 9)">
 						<view  @tap="callStorePhone" class="link-phone-btn">{{$t('联系门店')}}</view>
 					</view>	
+					<view class="grow_1" v-if="orderInfo.order_type == 3">
+						<view  @tap="callStorePhone" class="link-phone-btn">{{$t('联系门店')}}</view>
+					</view>	
 			</view>
 		</block>
 		<!-- <view class="payment-info flex-row flex-between">
@@ -602,7 +605,10 @@
 					if (resp.data.code === 200) {
 						me.orderInfo = resp.data.data.order_info
 						me.orderInfo.model_images = me.orderInfo.model_images.split(',')[0]
-						me.getAddressName(this.orderInfo.latitude,this.orderInfo.longitude)
+						if(!me.orderInfo.address){
+							me.getAddressName(me.orderInfo.latitude,me.orderInfo.longitude)
+						}
+						
 						// 
 						if (resp.data.data.order_info.model_id) {
 							me.loadCarInfo(resp.data.data.order_info.model_id)

+ 5 - 1
pages/powerSetting/powerSetting.vue

@@ -2,7 +2,7 @@
 		<view class="power-setting-main">
 			<navBar :name="$t('权限设置')" bgColor="transparent"></navBar>
 			<view class="flex-row power-setting-head">
-				<image class="head-img" :src="form.headimg"></image>
+				<image class="head-img" :src="form.headimg || defaultHeadImg"></image>
 				<view class="head-name">{{form.nickname}}</view>
 				<text class="head-email">{{form.email}}</text>
 			</view>
@@ -53,12 +53,16 @@
 <script>
 	var config = require('../../common/config_gyq.js');
 	var http = require('../../common/request.js');
+	import {
+		defaultHeadImg
+	} from '@/common/constant'
 	import {
 		msg
 	} from '../../utils/util.js';
 	export default {
 		data() {
 			return {
+				defaultHeadImg,
 				isSet:"",
 				target_user_id:0,
 				form: {

+ 5 - 1
pages/userManagement/userManagement.vue

@@ -9,7 +9,7 @@
 			<view class="user-card-text">{{ $t('家人、朋友长期共用车辆,授权账户可以使用感应解锁,寻车定位,查看设置等功能;') }}</view>
 			<!-- <view v-for="(item,index) in userList" :key="index"> -->
 			<view @click="srcFn(`/pages/powerSetting/powerSetting?id=${item.target_user_id}`)" v-for="(item,index) of list" :key="index" class="user-list flex-row align-center">
-				<image class="user-heard-img" :src="item.headimg" mode="aspectFill"></image>
+				<image class="user-heard-img" :src="item.headimg || defaultHeadImg" mode="aspectFill"></image>
 				<view class="user-name-view">
 					<view class="user-name">{{item.nickname}}</view>
 					<view class="user-email">{{item.email}}</view>
@@ -27,9 +27,13 @@
 <script>
 	var config = require('../../common/config_gyq.js');
 	var http = require('../../common/request.js');
+	import {
+		defaultHeadImg
+	} from '@/common/constant'
 	export default {
 		data() {
 			return {
+				defaultHeadImg,
 				list:[],
 				car_info:{}
 			};

+ 2 - 1
utils/util.js

@@ -2,7 +2,8 @@ import dayjs from 'dayjs'
 import duration from 'dayjs/plugin/duration'
 dayjs.extend(duration);
 const systemInfo = uni.getSystemInfoSync();
-const Language = (systemInfo.language == 'zh-CN' || systemInfo.language == 'zh_CN') ? 'zh' : 'en' // 'zh' | 'en'
+// const Language = (systemInfo.language == 'zh-CN' || systemInfo.language == 'zh_CN') ? 'zh' : 'en' // 'zh' | 'en'
+const Language = 'en' // 'zh' | 'en'
 const formatTime = (date) => {
 	const year = date.getFullYear();
 	const month = date.getMonth() + 1;