hookehuyr

fix: 修复车辆认证状态显示和上架逻辑

修复车辆列表中认证状态按钮的显示条件
修正上架/下架车辆的状态描述
更新我要卖车点击事件处理逻辑
1 /* 1 /*
2 * @Date: 2025-07-09 14:58:51 2 * @Date: 2025-07-09 14:58:51
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-07-15 11:55:43 4 + * @LastEditTime: 2025-07-16 15:37:53
5 * @FilePath: /jgdl/src/api/car.js 5 * @FilePath: /jgdl/src/api/car.js
6 * @Description: 车辆相关API接口 6 * @Description: 车辆相关API接口
7 */ 7 */
...@@ -111,7 +111,7 @@ export const getVehicleDetailAPI = (params) => fn(fetch.get(Api.DETAIL_VEHICLE, ...@@ -111,7 +111,7 @@ export const getVehicleDetailAPI = (params) => fn(fetch.get(Api.DETAIL_VEHICLE,
111 /** 111 /**
112 * @description: 下架/上架车辆 112 * @description: 下架/上架车辆
113 * @param id 车辆ID 113 * @param id 车辆ID
114 - * @param status 状态(3=待审核, 7=上架, 9=下架) 114 + * @param status 状态(3=上架, 5=下架)
115 * @returns data[{ id, seller_id, school_id, school_name, title, brand, model, manufacture_year, new_level, range_km, total_mileage_km, max_speed_kmh, battery_capacity_ah, brake_wear_level, tire_wear_level, price, market_price, verification_status, rejection_reason, note, photos, is_favorite }] 115 * @returns data[{ id, seller_id, school_id, school_name, title, brand, model, manufacture_year, new_level, range_km, total_mileage_km, max_speed_kmh, battery_capacity_ah, brake_wear_level, tire_wear_level, price, market_price, verification_status, rejection_reason, note, photos, is_favorite }]
116 */ 116 */
117 117
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-07-16 14:43:34 4 + * @LastEditTime: 2025-07-16 15:44:20
5 * @FilePath: /jgdl/src/pages/myAuthCar/index.vue 5 * @FilePath: /jgdl/src/pages/myAuthCar/index.vue
6 * @Description: 我的认证车页面 6 * @Description: 我的认证车页面
7 --> 7 -->
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
57 </text> 57 </text>
58 </view> 58 </view>
59 <nut-button 59 <nut-button
60 - @click.stop="handleSellClick(item.id)" 60 + v-if="item.review_status === 7"
61 + @click.stop="handleSellClick(item)"
61 size="small" 62 size="small"
62 type="primary" 63 type="primary"
63 color="orange" 64 color="orange"
...@@ -231,11 +232,13 @@ const onItemClick = (item) => { ...@@ -231,11 +232,13 @@ const onItemClick = (item) => {
231 232
232 /** 233 /**
233 * 处理我要卖车点击事件 234 * 处理我要卖车点击事件
234 - * @param {string} carId - 车辆ID 235 + * @param {Object} item - 车辆信息
235 */ 236 */
236 -const handleSellClick = (carId) => { 237 +const handleSellClick = (item) => {
238 + // 翻车的状态为待审核
239 + item.review_status = 1;
237 Taro.navigateTo({ 240 Taro.navigateTo({
238 - url: `/pages/sell/index?id=${carId}&mode=edit&type=auth` 241 + url: `/pages/sell/index?id=${item.id}&mode=edit&type=auth`
239 }) 242 })
240 } 243 }
241 244
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-07-16 15:11:40 4 + * @LastEditTime: 2025-07-16 15:43:55
5 * @FilePath: /jgdl/src/pages/myCar/index.vue 5 * @FilePath: /jgdl/src/pages/myCar/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
82 {{ car.status === 5 ? '上架' : '下架' }} 82 {{ car.status === 5 ? '上架' : '下架' }}
83 </nut-button> 83 </nut-button>
84 <nut-button 84 <nut-button
85 + v-if="car.verification_status === 1"
85 size="small" 86 size="small"
86 type="primary" 87 type="primary"
87 @click="authCar(car.id)" 88 @click="authCar(car.id)"
......