hookehuyr

fix: 修复车辆详情跳转链接并调整模拟数据范围

修复认证车源页面中车辆点击跳转至错误详情页的问题,将链接更正为productDetail页面
调整myCar页面中模拟数据的价格和里程范围,使其更符合实际场景
优化SearchPopup组件中收藏按钮的样式和布局
<!--
* @Date: 2025-01-20 00:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-04 16:10:26
* @LastEditTime: 2025-07-06 18:08:56
* @FilePath: /jgdl/src/components/SearchPopup.vue
* @Description: 搜索弹窗组件
-->
......@@ -65,7 +65,7 @@
<view class="relative p-2">
<image :src="scooter.imageUrl" :alt="scooter.name" mode="aspectFill"
class="w-full h-36 object-cover rounded-lg" />
<view class="absolute top-4 right-3 w-7 h-7 rounded-full bg-white bg-opacity-90" @tap.stop="() => toggleFavorite(scooter.id)" style="padding-top: 12rpx; padding-left: 10rpx;">
<view class="absolute top-4 right-3 w-7 h-7 rounded-full bg-white bg-opacity-80 flex items-center justify-center" @tap.stop="() => toggleFavorite(scooter.id)">
<Heart1 v-if="!favoriteIds.includes(scooter.id)" size="22" :color="'#9ca3af'" />
<HeartFill v-else size="22" :color="'#ef4444'" />
</view>
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-04 11:38:24
* @LastEditTime: 2025-07-06 18:13:43
* @FilePath: /jgdl/src/pages/authCar/index.vue
* @Description: 认证车源
-->
......@@ -198,9 +198,8 @@ const handleAuth = () => {
* 处理车辆点击
*/
const onCarClick = (car) => {
// TODO: 跳转到车辆详情页
// Taro.navigateTo({ url: `/pages/carDetail/index?id=${car.id}` })
showToast(`查看${car.name}详情`, 'success')
// 跳转到车辆详情页
Taro.navigateTo({ url: `/pages/productDetail/index?id=${car.id}` })
}
/**
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-04 14:49:37
* @LastEditTime: 2025-07-06 18:11:44
* @FilePath: /jgdl/src/pages/myCar/index.vue
* @Description: 文件描述
-->
......@@ -285,10 +285,10 @@ const generateMockCarData = (page = 1, size = 10) => {
const model = models[Math.floor(Math.random() * models.length)]
const condition = conditions[Math.floor(Math.random() * conditions.length)]
const image = images[Math.floor(Math.random() * images.length)]
const price = Math.floor(Math.random() * 200000) + 50000
const price = Math.floor(Math.random() * 20000) + 500
const marketPrice = Math.floor(price * 1.2)
const year = 2018 + Math.floor(Math.random() * 6)
const mileage = Math.floor(Math.random() * 100000) + 10000
const mileage = Math.floor(Math.random() * 1000) + 100
list.push({
id: `car_${index + 1}`,
......