This commit is contained in:
hantao 2025-07-16 19:44:46 +08:00
parent 0734a5c818
commit 610a06519b
5 changed files with 20 additions and 20 deletions

View File

@ -79,8 +79,8 @@
<!-- 车辆类型标签 --> <!-- 车辆类型标签 -->
<view class="car-type-badge"> <view class="car-type-badge">
<text wx:if="{{item.car_type == 1}}" class="badge-new">新车</text> <text wx:if="{{item.car_type == 1}}" class="badge-new">新车</text>
<text wx:elif="{{item.car_type == 2}}" class="badge-rent">租车</text> <text wx:elif="{{item.car_type == 3}}" class="badge-rent">租车</text>
<text wx:elif="{{item.car_type == 3}}" class="badge-used">二手车</text> <text wx:elif="{{item.car_type == 2}}" class="badge-used">二手车</text>
</view> </view>
<image class="car-image" src="{{item.cover_image[0]}}" mode="aspectFill" /> <image class="car-image" src="{{item.cover_image[0]}}" mode="aspectFill" />
@ -95,13 +95,13 @@
</view> </view>
<!-- 租车价格显示 --> <!-- 租车价格显示 -->
<view wx:elif="{{item.car_type == 2}}" class="car-price"> <view wx:elif="{{item.car_type == 3}}" class="car-price">
<text class="price-rent">¥{{item.price}}/天</text> <text class="price-rent">¥{{item.price}}/天</text>
<text wx:if="{{item.re_price}}" class="price-monthly">月租 ¥{{item.re_price}}</text> <text wx:if="{{item.re_price}}" class="price-monthly">月租 ¥{{item.re_price}}</text>
</view> </view>
<!-- 二手车价格显示 --> <!-- 二手车价格显示 -->
<view wx:elif="{{item.car_type == 3}}" class="car-price"> <view wx:elif="{{item.car_type == 2}}" class="car-price">
<text class="price-used">¥{{item.price}}万</text> <text class="price-used">¥{{item.price}}万</text>
<text wx:if="{{item.re_price}}" class="price-original">新车价 ¥{{item.re_price}}万</text> <text wx:if="{{item.re_price}}" class="price-original">新车价 ¥{{item.re_price}}万</text>
</view> </view>
@ -118,7 +118,7 @@
</block> </block>
<!-- 租车特性 --> <!-- 租车特性 -->
<block wx:elif="{{item.car_type == 2}}"> <block wx:elif="{{item.car_type == 3}}">
<van-tag wx:for="{{item.attr}}" wx:key="index" wx:for-item="opt" type="success" size="mini"> <van-tag wx:for="{{item.attr}}" wx:key="index" wx:for-item="opt" type="success" size="mini">
{{opt}} {{opt}}
</van-tag> </van-tag>
@ -127,7 +127,7 @@
</block> </block>
<!-- 二手车特性 --> <!-- 二手车特性 -->
<block wx:elif="{{item.car_type == 3}}"> <block wx:elif="{{item.car_type == 2}}">
<van-tag wx:for="{{item.attr}}" wx:key="index" wx:for-item="opt" type="warning" size="mini"> <van-tag wx:for="{{item.attr}}" wx:key="index" wx:for-item="opt" type="warning" size="mini">
{{opt}} {{opt}}
</van-tag> </van-tag>
@ -143,10 +143,10 @@
<text wx:if="{{item.car_type == 1 && item.dealer_name}}" class="dealer-info">{{item.dealer_name}}</text> <text wx:if="{{item.car_type == 1 && item.dealer_name}}" class="dealer-info">{{item.dealer_name}}</text>
<!-- 租车额外信息 --> <!-- 租车额外信息 -->
<text wx:elif="{{item.car_type == 2 && item.pickup_location}}" class="pickup-info">取车点:{{item.pickup_location}}</text> <text wx:elif="{{item.car_type == 3 && item.pickup_location}}" class="pickup-info">取车点:{{item.pickup_location}}</text>
<!-- 二手车额外信息 --> <!-- 二手车额外信息 -->
<view wx:elif="{{item.car_type == 3}}" class="used-car-info"> <view wx:elif="{{item.car_type == 2}}" class="used-car-info">
<text wx:if="{{item.first_license_date}}" class="license-date">首次上牌:{{item.first_license_date}}</text> <text wx:if="{{item.first_license_date}}" class="license-date">首次上牌:{{item.first_license_date}}</text>
<text wx:if="{{item.warranty_remain}}" class="warranty-info">质保剩余:{{item.warranty_remain}}</text> <text wx:if="{{item.warranty_remain}}" class="warranty-info">质保剩余:{{item.warranty_remain}}</text>
</view> </view>

View File

@ -352,27 +352,27 @@
font-weight: 600; font-weight: 600;
} }
/* 租车价格 */ /* 租车价格 */
.car-type-2 .price-rent { .car-type-3 .price-rent {
color: #07c160; color: #07c160;
font-size: 36rpx; font-size: 36rpx;
font-weight: 700; font-weight: 700;
margin-right: 16rpx; margin-right: 16rpx;
} }
.car-type-2 .price-monthly { .car-type-3 .price-monthly {
color: #666; color: #666;
font-size: 24rpx; font-size: 24rpx;
} }
/* 二手车价格 */ /* 二手车价格 */
.car-type-3 .price-used { .car-type-2 .price-used {
color: #ff976a; color: #ff976a;
font-size: 36rpx; font-size: 36rpx;
font-weight: 700; font-weight: 700;
margin-right: 16rpx; margin-right: 16rpx;
} }
.car-type-3 .price-original { .car-type-2 .price-original {
color: #999; color: #999;
font-size: 24rpx; font-size: 24rpx;
} }

View File

@ -28,14 +28,14 @@ Page({
// 跳转到租车页面 // 跳转到租车页面
goToRental: function () { goToRental: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/car_new/car_new?type=' + 2 url: '/pages/car_new/car_new?type=' + 3
}); });
}, },
// 跳转到二手车页面 // 跳转到二手车页面
goToUsedCar: function () { goToUsedCar: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/car_new/car_new?type=' + 3 url: '/pages/car_new/car_new?type=' + 2
}); });
}, },

View File

@ -36,8 +36,8 @@
<view class="car-title">{{carDetail.title}}</view> <view class="car-title">{{carDetail.title}}</view>
<view class="car-type-tag"> <view class="car-type-tag">
<text wx:if="{{carDetail.car_type == 1}}" class="tag-new">新车</text> <text wx:if="{{carDetail.car_type == 1}}" class="tag-new">新车</text>
<text wx:elif="{{carDetail.car_type == 2}}" class="tag-rent">租车</text> <text wx:elif="{{carDetail.car_type == 3}}" class="tag-rent">租车</text>
<text wx:elif="{{carDetail.car_type == 3}}" class="tag-used">二手车</text> <text wx:elif="{{carDetail.car_type == 2}}" class="tag-used">二手车</text>
</view> </view>
<!-- <view class="favorite-btn" bindtap="toggleFavorite"> <!-- <view class="favorite-btn" bindtap="toggleFavorite">
<van-icon name="{{carDetail.is_favorite ? 'star' : 'star-o'}}" size="20px" color="{{carDetail.is_favorite ? '#ff6b6b' : '#999'}}" /> <van-icon name="{{carDetail.is_favorite ? 'star' : 'star-o'}}" size="20px" color="{{carDetail.is_favorite ? '#ff6b6b' : '#999'}}" />
@ -56,7 +56,7 @@
</view> </view>
<!-- 租车价格展示 --> <!-- 租车价格展示 -->
<view wx:elif="{{carDetail.car_type == 2}}" class="price-section price-rent"> <view wx:elif="{{carDetail.car_type == 3}}" class="price-section price-rent">
<view class="price-main"> <view class="price-main">
<text class="current-price">¥{{carDetail.price}}/天</text> <text class="current-price">¥{{carDetail.price}}/天</text>
</view> </view>
@ -64,7 +64,7 @@
</view> </view>
<!-- 二手车价格展示 --> <!-- 二手车价格展示 -->
<view wx:elif="{{carDetail.car_type == 3}}" class="price-section price-used"> <view wx:elif="{{carDetail.car_type == 2}}" class="price-section price-used">
<view class="price-main"> <view class="price-main">
<text class="current-price">¥{{carDetail.price}}万</text> <text class="current-price">¥{{carDetail.price}}万</text>
</view> </view>
@ -97,7 +97,7 @@
</view> </view>
<!-- 车辆属性 --> <!-- 车辆属性 -->
<view class="attributes-card"> <view class="attributes-card" wx:if="{{attributesList.length > 0}}">
<view class="card-title">车辆详情</view> <view class="card-title">车辆详情</view>
<view class="attributes-grid"> <view class="attributes-grid">
<view <view

View File

@ -36,6 +36,6 @@
"tabIndent": "auto", "tabIndent": "auto",
"tabSize": 2 "tabSize": 2
}, },
"appid": "wxfebb5f10af4f59ce", "appid": "wx62337d2f58b2825a",
"simulatorPluginLibVersion": {} "simulatorPluginLibVersion": {}
} }