瀏覽代碼

Merge branch 'gyq_test' of http://git.bms16.com/liuwei/zx_flk_app into gyq_test

郭宇琦 2 天之前
父節點
當前提交
678d6ec0e5
共有 6 個文件被更改,包括 27 次插入12 次删除
  1. 3 3
      locale/en.json
  2. 3 3
      output3.json
  3. 16 1
      pages/carDetail/carDetail.vue
  4. 1 1
      pages/my/my.scss
  5. 2 2
      pages/package/package.vue
  6. 2 2
      pages/service/components/leaseType/leaseType.vue

+ 3 - 3
locale/en.json

@@ -280,7 +280,7 @@
 	"开机": "Slide to Turn On",
 	"开启车辆": "Start Vehicle",
 	"关机": "Shutdown",
-	"您确认": "Are you sure?",
+	"您确认": "Are you sure? ",
 	"吗": "?",
 	"处理修改之后的数据": "Process modified data",
 	"输入注册账号的密码即可解绑": "Enter the registration account password to unbind",
@@ -295,7 +295,7 @@
 	"当前选择": "CurSel",
 	"租赁设备": "Leased Device",
 	"绑定设备": "Bind Device",
-	"是否确定": "Are you sure?",
+	"是否确定": "Are you sure? ",
 	"清空当前设备蓝牙相关": "Clear current device Bluetooth data",
 	"切换成功!": "Switch successful!",
 	"由于": "Due to",
@@ -795,7 +795,7 @@
 	"车辆类型": "Vehicle Type",
 	"租借类型": "Rental Type",
 	"地图控件": "Map Control",
-	"请输入搜索内容": "Please enter search content",
+	"请输入搜索内容": "Enter search content",
 	"清空": "Clear",
 	"搜索": "Search",
 	"门店": "Shop",

+ 3 - 3
output3.json

@@ -280,7 +280,7 @@
   "开机": "Slide to Turn On",
   "开启车辆": "Start Vehicle",
   "关机": "Shutdown",
-  "您确认": "Are you sure?",
+  "您确认": "Are you sure? ",
   "吗": "?",
   "处理修改之后的数据": "Process modified data",
   "输入注册账号的密码即可解绑": "Enter the registration account password to unbind",
@@ -295,7 +295,7 @@
   "当前选择": "Current Selection",
   "租赁设备": "Leased Device",
   "绑定设备": "Bind Device",
-  "是否确定": "Are you sure?",
+  "是否确定": "Are you sure? ",
   "清空当前设备蓝牙相关": "Clear current device Bluetooth data",
   "切换成功!": "Switch successful!",
   "由于": "Due to",
@@ -794,7 +794,7 @@
   "车辆类型": "Vehicle Type",
   "租借类型": "Rental Type",
   "地图控件": "Map Control",
-  "请输入搜索内容": "Please enter search content",
+  "请输入搜索内容": "Enter search content",
   "清空": "Clear",
   "搜索": "Search",
   "门店": "Pickup Store",

+ 16 - 1
pages/carDetail/carDetail.vue

@@ -160,7 +160,22 @@
 						
 						// me.tapSelectType(resp.data.data.rental_setting[0])
 						resp.data.data.distance = common.formatDistance(Number(resp.data.data.distance))
-						resp.data.data.desc = this.$htmlData(resp.data.data.desc)
+						
+						
+						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"');
+						});
+						
+						
+						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)

+ 1 - 1
pages/my/my.scss

@@ -1,7 +1,7 @@
 
 @import "@/libs/css/layout.scss";
 .container-view {
-    padding: 36rpx 32rpx 264rpx;
+    padding: 36rpx 32rpx 0rpx;
     box-sizing: border-box;
     .user-switch-row {
         display: flex;

+ 2 - 2
pages/package/package.vue

@@ -47,6 +47,7 @@
 							style="color: #9FA7B7;">/{{item.total_day}}{{ $t('天') }}</text>
 					</view>
 				</view>
+				<!-- 套餐类型 1 天卡 2 次卡 3 天次卡 -->
 				<view v-if="item.package_type == 1" class="package-item">
 					<view class="item-title">{{ $t('免费换电数') }}</view>
 					<!-- <view style="color: #060809;" class="item-info">{{item.last_num}}{{ $t('次') }}</view> -->
@@ -58,8 +59,7 @@
 				</view>
 				<view v-if="item.package_type == 3" class="package-item">
 					<view class="item-title">{{ $t('免费换电数') }}</view>
-					<!-- <view style="color: #060809;" class="item-info">{{item.last_num}}{{ $t('次') }}/{{item.total_num}}{{ $t('次') }}</view> -->
-					<view style="color: #060809;" class="item-info">{{item.total_day}}{{ $t('天') }}/{{item.last_num}}{{ $t('次') }}</view>
+					<view style="color: #060809;" class="item-info">{{item.last_num}}/{{item.num}}{{ $t('次') }}</view>
 				</view>
 			</view>
 		</view>

+ 2 - 2
pages/service/components/leaseType/leaseType.vue

@@ -39,8 +39,8 @@
 		        </scroll-view>
 				
 				<view class="options-wrap">
-		            <view class="btn cancle" @click="closeLeaseType">取消</view>
-		            <view class="btn confirm" @click="chooseLeaseType">确定</view>
+		            <view class="btn cancle" @click="closeLeaseType">{{$t('取消')}}</view>
+		            <view class="btn confirm" @click="chooseLeaseType">{{$t('确定')}}</view>
 		        </view>
 				<view style="height: 170rpx;"></view>
 		    </view>