hookehuyr

feat(我的关注): 新增我的关注页面及功能

添加我的关注页面,包含关注列表展示、取消关注功能及空状态处理
更新app.config.js添加新页面路由
修改个人中心页面的跳转链接
/*
* @Date: 2025-06-28 10:33:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-03 09:34:59
* @LastEditTime: 2025-07-03 12:59:10
* @FilePath: /jgdl/src/app.config.js
* @Description: 文件描述
*/
......@@ -20,6 +20,9 @@ export default {
'pages/goodCarList/index',
'pages/productDetail/index',
'pages/auth/index',
'pages/myFavorites/index',
'pages/myCar/index',
'pages/myOrders/index',
],
subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去
{
......
/*
* @Date: 2025-07-03 12:57:44
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-03 12:58:03
* @FilePath: /jgdl/src/pages/myCar/index.config.js
* @Description: 文件描述
*/
export default {
navigationBarTitleText: '我卖的车',
usingComponents: {
},
}
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-03 12:55:54
* @FilePath: /jgdl/src/pages/myFavorites/index.vue
* @Description: 文件描述
-->
<template>
<div class="red">{{ str }}</div>
</template>
<script setup>
// import '@tarojs/taro/html.css'
import { ref } from "vue";
// 定义响应式数据
const str = ref('Demo页面')
</script>
<script>
export default {
name: "demoPage",
};
</script>
export default {
navigationBarTitleText: '我的关注',
usingComponents: {
},
}
// 我的关注页面样式
.favorites-list {
.loading-container {
display: flex;
justify-content: center;
align-items: center;
padding: 32rpx 0;
.loading-text {
font-size: 28rpx;
color: #999;
}
}
.no-more-container {
display: flex;
justify-content: center;
align-items: center;
padding: 32rpx 0;
text {
font-size: 24rpx;
color: #ccc;
}
}
}
// 车辆卡片样式
.car-item {
background: white;
border-radius: 16rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
overflow: hidden;
margin-bottom: 24rpx;
.car-image {
position: relative;
.follow-tag {
position: absolute;
top: 8rpx;
right: 8rpx;
background-color: #ef4444;
color: white;
font-size: 20rpx;
padding: 4rpx 8rpx;
border-radius: 8rpx;
z-index: 2;
}
}
.car-info {
padding: 24rpx;
.car-name {
font-size: 32rpx;
font-weight: 500;
color: #333;
margin-bottom: 8rpx;
}
.car-details {
font-size: 24rpx;
color: #666;
margin-bottom: 16rpx;
}
.price-section {
display: flex;
justify-content: space-between;
align-items: center;
.price-info {
.current-price {
font-size: 32rpx;
font-weight: bold;
color: #ff6b35;
}
.original-price {
font-size: 24rpx;
color: #999;
text-decoration: line-through;
margin-left: 16rpx;
}
}
.unfollow-btn {
padding: 12rpx 24rpx;
border: 2rpx solid #ddd;
border-radius: 32rpx;
font-size: 24rpx;
color: #666;
background: white;
&:active {
background: #f5f5f5;
}
}
}
}
}
// 空状态样式
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 400rpx;
.empty-text {
font-size: 28rpx;
color: #999;
}
}
// 通用样式
.text-center {
text-align: center;
}
.py-4 {
padding-top: 32rpx;
padding-bottom: 32rpx;
}
.mb-3 {
margin-bottom: 24rpx;
}
.space-y-4 > * + * {
margin-top: 32rpx;
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
/*
* @Date: 2025-07-03 12:57:44
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-03 12:58:32
* @FilePath: /jgdl/src/pages/myOrders/index.config.js
* @Description: 文件描述
*/
export default {
navigationBarTitleText: '订单管理',
usingComponents: {
},
}
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-07-03 12:55:54
* @FilePath: /jgdl/src/pages/myFavorites/index.vue
* @Description: 文件描述
-->
<template>
<div class="red">{{ str }}</div>
</template>
<script setup>
// import '@tarojs/taro/html.css'
import { ref } from "vue";
// 定义响应式数据
const str = ref('Demo页面')
</script>
<script>
export default {
name: "demoPage",
};
</script>
......@@ -46,7 +46,7 @@
<Right size="18" color="#9ca3af" />
</view>
<view class="menu-item" @click="onMySoldVehicles">
<view class="menu-item" @click="onMyCar">
<Cart size="20" color="#6b7280" />
<text class="menu-text">我卖的车</text>
<Right size="18" color="#9ca3af" />
......@@ -112,7 +112,7 @@ const onEditProfile = () => {
*/
const onMyFavorites = () => {
Taro.navigateTo({
url: '/pages/my-favorites/index'
url: '/pages/myFavorites/index'
})
}
......@@ -121,7 +121,7 @@ const onMyFavorites = () => {
*/
const onOrderManagement = () => {
Taro.navigateTo({
url: '/pages/order-management/index'
url: '/pages/myOrders/index'
})
}
......@@ -137,9 +137,9 @@ const onMessages = () => {
/**
* 我卖的车
*/
const onMySoldVehicles = () => {
const onMyCar = () => {
Taro.navigateTo({
url: '/pages/my-sold-vehicles/index'
url: '/pages/myCar/index'
})
}
......@@ -148,7 +148,7 @@ const onMySoldVehicles = () => {
*/
const onHelpCenter = () => {
Taro.navigateTo({
url: '/pages/help-center/index'
url: '/pages/helpCenter/index'
})
}
......