hookehuyr

refactor(页面): 更新筛选器默认值和选项

将新车上架页面的筛选器默认值从中文改为'all',并更新相关选项值
在首页添加推荐车源API导入(暂未启用)
<!--
* @Date: 2025-06-28 10:33:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-07 16:02:49
* @LastEditTime: 2025-07-09 16:08:53
* @FilePath: /jgdl/src/pages/index/index.vue
* @Description: 捡个电驴首页
-->
......@@ -167,6 +167,8 @@ import { Clock, Star, RectRight, Check, Search2, Shop, Heart1, HeartFill } from
import TabBar from '@/components/TabBar.vue'
import SearchPopup from '@/components/SearchPopup.vue'
import "./index.less";
// 导入接口
import { getRecommendVehicleAPI } from '@/api/car';
// 响应式数据
const searchValue = ref('')
......@@ -380,8 +382,13 @@ useReady(async () => {
});
})
onMounted(() => {
onMounted(async () => {
console.warn('index mounted')
// 获取推荐车源
// const res = await getRecommendVehicleAPI()
// if (res.code) {
// recommendVehicleList.value = res.data
// }
})
// 分享功能
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-08 10:29:08
* @LastEditTime: 2025-07-10 09:54:21
* @FilePath: /jgdl/src/pages/newCarList/index.vue
* @Description: 最新上架页面
-->
......@@ -126,13 +126,13 @@ const onBlurSearch = () => {
const favoriteIds = ref(['2', '4', '6'])
// Filter states - 使用NutUI Menu组件
const selectedBrand = ref('全部品牌')
const selectedYear = ref('出厂年份')
const selectedSchool = ref('所在学校')
const selectedBrand = ref('all')
const selectedYear = ref('all')
const selectedSchool = ref('all')
// Menu选项数据
const brandOptions = ref([
{ text: '全部品牌', value: '全部品牌' },
{ text: '全部品牌', value: 'all' },
{ text: '雅迪', value: '雅迪' },
{ text: '台铃', value: '台铃' },
{ text: '小鸟', value: '小鸟' },
......@@ -142,7 +142,7 @@ const brandOptions = ref([
])
const yearOptions = ref([
{ text: '出厂年份', value: '出厂年份' },
{ text: '出厂年份', value: 'all' },
{ text: '2024年', value: '2024年' },
{ text: '2023年', value: '2023年' },
{ text: '2022年', value: '2022年' },
......@@ -151,7 +151,7 @@ const yearOptions = ref([
])
const schoolOptions = ref([
{ text: '所在学校', value: '所在学校' },
{ text: '所在学校', value: 'all' },
{ text: '上海理工大学', value: '上海理工大学' },
{ text: '上海复旦大学', value: '上海复旦大学' },
{ text: '上海同济大学', value: '上海同济大学' },
......