feat(我的关注): 新增我的关注页面及功能
添加我的关注页面,包含关注列表展示、取消关注功能及空状态处理 更新app.config.js添加新页面路由 修改个人中心页面的跳转链接
Showing
9 changed files
with
221 additions
and
7 deletions
| 1 | /* | 1 | /* |
| 2 | * @Date: 2025-06-28 10:33:00 | 2 | * @Date: 2025-06-28 10:33:00 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-07-03 09:34:59 | 4 | + * @LastEditTime: 2025-07-03 12:59:10 |
| 5 | * @FilePath: /jgdl/src/app.config.js | 5 | * @FilePath: /jgdl/src/app.config.js |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | */ | 7 | */ |
| ... | @@ -20,6 +20,9 @@ export default { | ... | @@ -20,6 +20,9 @@ export default { |
| 20 | 'pages/goodCarList/index', | 20 | 'pages/goodCarList/index', |
| 21 | 'pages/productDetail/index', | 21 | 'pages/productDetail/index', |
| 22 | 'pages/auth/index', | 22 | 'pages/auth/index', |
| 23 | + 'pages/myFavorites/index', | ||
| 24 | + 'pages/myCar/index', | ||
| 25 | + 'pages/myOrders/index', | ||
| 23 | ], | 26 | ], |
| 24 | subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 | 27 | subpackages: [ // 配置在tabBar中的页面不能分包写到subpackages中去 |
| 25 | { | 28 | { | ... | ... |
src/pages/myCar/index.config.js
0 → 100755
| 1 | +/* | ||
| 2 | + * @Date: 2025-07-03 12:57:44 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2025-07-03 12:58:03 | ||
| 5 | + * @FilePath: /jgdl/src/pages/myCar/index.config.js | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | + */ | ||
| 8 | +export default { | ||
| 9 | + navigationBarTitleText: '我卖的车', | ||
| 10 | + usingComponents: { | ||
| 11 | + }, | ||
| 12 | +} |
src/pages/myCar/index.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2022-09-19 14:11:06 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2025-07-03 12:55:54 | ||
| 5 | + * @FilePath: /jgdl/src/pages/myFavorites/index.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 8 | +<template> | ||
| 9 | + <div class="red">{{ str }}</div> | ||
| 10 | +</template> | ||
| 11 | + | ||
| 12 | +<script setup> | ||
| 13 | +// import '@tarojs/taro/html.css' | ||
| 14 | +import { ref } from "vue"; | ||
| 15 | + | ||
| 16 | +// 定义响应式数据 | ||
| 17 | +const str = ref('Demo页面') | ||
| 18 | +</script> | ||
| 19 | + | ||
| 20 | +<script> | ||
| 21 | +export default { | ||
| 22 | + name: "demoPage", | ||
| 23 | +}; | ||
| 24 | +</script> |
src/pages/myFavorites/index.config.js
0 → 100755
src/pages/myFavorites/index.less
0 → 100644
| 1 | +// 我的关注页面样式 | ||
| 2 | +.favorites-list { | ||
| 3 | + .loading-container { | ||
| 4 | + display: flex; | ||
| 5 | + justify-content: center; | ||
| 6 | + align-items: center; | ||
| 7 | + padding: 32rpx 0; | ||
| 8 | + | ||
| 9 | + .loading-text { | ||
| 10 | + font-size: 28rpx; | ||
| 11 | + color: #999; | ||
| 12 | + } | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + .no-more-container { | ||
| 16 | + display: flex; | ||
| 17 | + justify-content: center; | ||
| 18 | + align-items: center; | ||
| 19 | + padding: 32rpx 0; | ||
| 20 | + | ||
| 21 | + text { | ||
| 22 | + font-size: 24rpx; | ||
| 23 | + color: #ccc; | ||
| 24 | + } | ||
| 25 | + } | ||
| 26 | +} | ||
| 27 | + | ||
| 28 | +// 车辆卡片样式 | ||
| 29 | +.car-item { | ||
| 30 | + background: white; | ||
| 31 | + border-radius: 16rpx; | ||
| 32 | + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); | ||
| 33 | + overflow: hidden; | ||
| 34 | + margin-bottom: 24rpx; | ||
| 35 | + | ||
| 36 | + .car-image { | ||
| 37 | + position: relative; | ||
| 38 | + | ||
| 39 | + .follow-tag { | ||
| 40 | + position: absolute; | ||
| 41 | + top: 8rpx; | ||
| 42 | + right: 8rpx; | ||
| 43 | + background-color: #ef4444; | ||
| 44 | + color: white; | ||
| 45 | + font-size: 20rpx; | ||
| 46 | + padding: 4rpx 8rpx; | ||
| 47 | + border-radius: 8rpx; | ||
| 48 | + z-index: 2; | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + .car-info { | ||
| 53 | + padding: 24rpx; | ||
| 54 | + | ||
| 55 | + .car-name { | ||
| 56 | + font-size: 32rpx; | ||
| 57 | + font-weight: 500; | ||
| 58 | + color: #333; | ||
| 59 | + margin-bottom: 8rpx; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + .car-details { | ||
| 63 | + font-size: 24rpx; | ||
| 64 | + color: #666; | ||
| 65 | + margin-bottom: 16rpx; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + .price-section { | ||
| 69 | + display: flex; | ||
| 70 | + justify-content: space-between; | ||
| 71 | + align-items: center; | ||
| 72 | + | ||
| 73 | + .price-info { | ||
| 74 | + .current-price { | ||
| 75 | + font-size: 32rpx; | ||
| 76 | + font-weight: bold; | ||
| 77 | + color: #ff6b35; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + .original-price { | ||
| 81 | + font-size: 24rpx; | ||
| 82 | + color: #999; | ||
| 83 | + text-decoration: line-through; | ||
| 84 | + margin-left: 16rpx; | ||
| 85 | + } | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + .unfollow-btn { | ||
| 89 | + padding: 12rpx 24rpx; | ||
| 90 | + border: 2rpx solid #ddd; | ||
| 91 | + border-radius: 32rpx; | ||
| 92 | + font-size: 24rpx; | ||
| 93 | + color: #666; | ||
| 94 | + background: white; | ||
| 95 | + | ||
| 96 | + &:active { | ||
| 97 | + background: #f5f5f5; | ||
| 98 | + } | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | +} | ||
| 103 | + | ||
| 104 | +// 空状态样式 | ||
| 105 | +.empty-state { | ||
| 106 | + display: flex; | ||
| 107 | + flex-direction: column; | ||
| 108 | + align-items: center; | ||
| 109 | + justify-content: center; | ||
| 110 | + height: 400rpx; | ||
| 111 | + | ||
| 112 | + .empty-text { | ||
| 113 | + font-size: 28rpx; | ||
| 114 | + color: #999; | ||
| 115 | + } | ||
| 116 | +} | ||
| 117 | + | ||
| 118 | +// 通用样式 | ||
| 119 | +.text-center { | ||
| 120 | + text-align: center; | ||
| 121 | +} | ||
| 122 | + | ||
| 123 | +.py-4 { | ||
| 124 | + padding-top: 32rpx; | ||
| 125 | + padding-bottom: 32rpx; | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +.mb-3 { | ||
| 129 | + margin-bottom: 24rpx; | ||
| 130 | +} | ||
| 131 | + | ||
| 132 | +.space-y-4 > * + * { | ||
| 133 | + margin-top: 32rpx; | ||
| 134 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
src/pages/myFavorites/index.vue
0 → 100644
This diff is collapsed. Click to expand it.
src/pages/myOrders/index.config.js
0 → 100755
| 1 | +/* | ||
| 2 | + * @Date: 2025-07-03 12:57:44 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2025-07-03 12:58:32 | ||
| 5 | + * @FilePath: /jgdl/src/pages/myOrders/index.config.js | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | + */ | ||
| 8 | +export default { | ||
| 9 | + navigationBarTitleText: '订单管理', | ||
| 10 | + usingComponents: { | ||
| 11 | + }, | ||
| 12 | +} |
src/pages/myOrders/index.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2022-09-19 14:11:06 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2025-07-03 12:55:54 | ||
| 5 | + * @FilePath: /jgdl/src/pages/myFavorites/index.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 8 | +<template> | ||
| 9 | + <div class="red">{{ str }}</div> | ||
| 10 | +</template> | ||
| 11 | + | ||
| 12 | +<script setup> | ||
| 13 | +// import '@tarojs/taro/html.css' | ||
| 14 | +import { ref } from "vue"; | ||
| 15 | + | ||
| 16 | +// 定义响应式数据 | ||
| 17 | +const str = ref('Demo页面') | ||
| 18 | +</script> | ||
| 19 | + | ||
| 20 | +<script> | ||
| 21 | +export default { | ||
| 22 | + name: "demoPage", | ||
| 23 | +}; | ||
| 24 | +</script> |
| ... | @@ -46,7 +46,7 @@ | ... | @@ -46,7 +46,7 @@ |
| 46 | <Right size="18" color="#9ca3af" /> | 46 | <Right size="18" color="#9ca3af" /> |
| 47 | </view> | 47 | </view> |
| 48 | 48 | ||
| 49 | - <view class="menu-item" @click="onMySoldVehicles"> | 49 | + <view class="menu-item" @click="onMyCar"> |
| 50 | <Cart size="20" color="#6b7280" /> | 50 | <Cart size="20" color="#6b7280" /> |
| 51 | <text class="menu-text">我卖的车</text> | 51 | <text class="menu-text">我卖的车</text> |
| 52 | <Right size="18" color="#9ca3af" /> | 52 | <Right size="18" color="#9ca3af" /> |
| ... | @@ -112,7 +112,7 @@ const onEditProfile = () => { | ... | @@ -112,7 +112,7 @@ const onEditProfile = () => { |
| 112 | */ | 112 | */ |
| 113 | const onMyFavorites = () => { | 113 | const onMyFavorites = () => { |
| 114 | Taro.navigateTo({ | 114 | Taro.navigateTo({ |
| 115 | - url: '/pages/my-favorites/index' | 115 | + url: '/pages/myFavorites/index' |
| 116 | }) | 116 | }) |
| 117 | } | 117 | } |
| 118 | 118 | ||
| ... | @@ -121,7 +121,7 @@ const onMyFavorites = () => { | ... | @@ -121,7 +121,7 @@ const onMyFavorites = () => { |
| 121 | */ | 121 | */ |
| 122 | const onOrderManagement = () => { | 122 | const onOrderManagement = () => { |
| 123 | Taro.navigateTo({ | 123 | Taro.navigateTo({ |
| 124 | - url: '/pages/order-management/index' | 124 | + url: '/pages/myOrders/index' |
| 125 | }) | 125 | }) |
| 126 | } | 126 | } |
| 127 | 127 | ||
| ... | @@ -137,9 +137,9 @@ const onMessages = () => { | ... | @@ -137,9 +137,9 @@ const onMessages = () => { |
| 137 | /** | 137 | /** |
| 138 | * 我卖的车 | 138 | * 我卖的车 |
| 139 | */ | 139 | */ |
| 140 | -const onMySoldVehicles = () => { | 140 | +const onMyCar = () => { |
| 141 | Taro.navigateTo({ | 141 | Taro.navigateTo({ |
| 142 | - url: '/pages/my-sold-vehicles/index' | 142 | + url: '/pages/myCar/index' |
| 143 | }) | 143 | }) |
| 144 | } | 144 | } |
| 145 | 145 | ||
| ... | @@ -148,7 +148,7 @@ const onMySoldVehicles = () => { | ... | @@ -148,7 +148,7 @@ const onMySoldVehicles = () => { |
| 148 | */ | 148 | */ |
| 149 | const onHelpCenter = () => { | 149 | const onHelpCenter = () => { |
| 150 | Taro.navigateTo({ | 150 | Taro.navigateTo({ |
| 151 | - url: '/pages/help-center/index' | 151 | + url: '/pages/helpCenter/index' |
| 152 | }) | 152 | }) |
| 153 | } | 153 | } |
| 154 | 154 | ... | ... |
-
Please register or login to post a comment