hookehuyr

style(ui): 统一样式并优化车辆卡片布局

- 将px单位转换为rpx以适配不同屏幕
- 调整状态标签位置至车辆信息区域
- 简化按钮样式并移除冗余形状属性
- 更新弹窗标题为更友好的提示文本
- 增加价格字体大小以提升可读性
1 .my-car-page { 1 .my-car-page {
2 min-height: 100vh; 2 min-height: 100vh;
3 background-color: #f5f5f5; 3 background-color: #f5f5f5;
4 - padding-bottom: 120px; 4 + padding-bottom: 240rpx;
5 } 5 }
6 .loading-container { 6 .loading-container {
7 display: flex; 7 display: flex;
...@@ -32,51 +32,48 @@ ...@@ -32,51 +32,48 @@
32 flex-direction: column; 32 flex-direction: column;
33 align-items: center; 33 align-items: center;
34 justify-content: center; 34 justify-content: center;
35 - padding: 100px 40px; 35 + padding: 200rpx 80rpx;
36 text-align: center; 36 text-align: center;
37 } 37 }
38 38
39 .empty-image { 39 .empty-image {
40 - width: 200px; 40 + width: 400rpx;
41 - height: 150px; 41 + height: 300rpx;
42 - margin-bottom: 30px; 42 + margin-bottom: 60rpx;
43 opacity: 0.6; 43 opacity: 0.6;
44 } 44 }
45 45
46 .empty-text { 46 .empty-text {
47 - font-size: 32px; 47 + font-size: 32rpx;
48 color: #999; 48 color: #999;
49 - margin-bottom: 40px; 49 + margin-bottom: 80rpx;
50 } 50 }
51 51
52 /* 车辆卡片样式 */ 52 /* 车辆卡片样式 */
53 .car-card { 53 .car-card {
54 background: white; 54 background: white;
55 - border-radius: 16px; 55 + border-radius: 32rpx;
56 - margin-bottom: 20px; 56 + margin-bottom: 40rpx;
57 - padding: 20px; 57 + padding: 40rpx;
58 - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 58 + box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
59 position: relative; 59 position: relative;
60 } 60 }
61 61
62 /* 状态标识 */ 62 /* 状态标识 */
63 .status-badges { 63 .status-badges {
64 - position: absolute;
65 - top: 20px;
66 - right: 20px;
67 - z-index: 2;
68 display: flex; 64 display: flex;
69 - flex-direction: column; 65 + gap: 16rpx;
70 - gap: 8px; 66 + margin-top: 16rpx;
67 + margin-bottom: 24rpx;
71 } 68 }
72 69
73 .status-badge { 70 .status-badge {
74 display: flex; 71 display: flex;
75 align-items: center; 72 align-items: center;
76 - gap: 4px; 73 + gap: 8rpx;
77 - padding: 4px 8px; 74 + padding: 8rpx 16rpx;
78 - border-radius: 12px; 75 + border-radius: 24rpx;
79 - font-size: 22px; 76 + font-size: 22rpx;
80 color: white; 77 color: white;
81 78
82 &.verified { 79 &.verified {
...@@ -89,15 +86,15 @@ ...@@ -89,15 +86,15 @@
89 } 86 }
90 87
91 .status-icon { 88 .status-icon {
92 - width: 16px; 89 + width: 32rpx;
93 - height: 16px; 90 + height: 32rpx;
94 } 91 }
95 92
96 /* 车辆图片 */ 93 /* 车辆图片 */
97 .car-image-container { 94 .car-image-container {
98 width: 100%; 95 width: 100%;
99 - height: 150px; 96 + height: 300rpx;
100 - border-radius: 12px; 97 + border-radius: 24rpx;
101 overflow: hidden; 98 overflow: hidden;
102 } 99 }
103 100
...@@ -109,11 +106,11 @@ ...@@ -109,11 +106,11 @@
109 106
110 /* 车辆信息 */ 107 /* 车辆信息 */
111 .car-info { 108 .car-info {
112 - padding-left: 12px; 109 + padding-left: 24rpx;
113 } 110 }
114 111
115 .car-title { 112 .car-title {
116 - font-size: 36px; 113 + font-size: 36rpx;
117 font-weight: bold; 114 font-weight: bold;
118 color: #333; 115 color: #333;
119 margin-bottom: 0.5rem; 116 margin-bottom: 0.5rem;
...@@ -121,39 +118,39 @@ ...@@ -121,39 +118,39 @@
121 118
122 .car-details { 119 .car-details {
123 display: flex; 120 display: flex;
124 - gap: 16px; 121 + gap: 32rpx;
125 - margin-bottom: 12px; 122 + margin-bottom: 24rpx;
126 } 123 }
127 124
128 .detail-item { 125 .detail-item {
129 - font-size: 26px; 126 + font-size: 26rpx;
130 color: #666; 127 color: #666;
131 - padding: 4px 12px; 128 + padding: 8rpx 24rpx;
132 background: #f3f4f6; 129 background: #f3f4f6;
133 - border-radius: 8px; 130 + border-radius: 16rpx;
134 } 131 }
135 132
136 .car-description { 133 .car-description {
137 - font-size: 28px; 134 + font-size: 28rpx;
138 color: #666; 135 color: #666;
139 line-height: 1.5; 136 line-height: 1.5;
140 - margin-bottom: 16px; 137 + margin-bottom: 32rpx;
141 } 138 }
142 139
143 .price-section { 140 .price-section {
144 display: flex; 141 display: flex;
145 align-items: baseline; 142 align-items: baseline;
146 - gap: 16px; 143 + gap: 32rpx;
147 } 144 }
148 145
149 .current-price { 146 .current-price {
150 - font-size: 40px; 147 + font-size: 40rpx;
151 font-weight: bold; 148 font-weight: bold;
152 color: #f97316; 149 color: #f97316;
153 } 150 }
154 151
155 .market-price { 152 .market-price {
156 - font-size: 24px; 153 + font-size: 24rpx;
157 color: #999; 154 color: #999;
158 text-decoration: line-through; 155 text-decoration: line-through;
159 } 156 }
...@@ -161,7 +158,7 @@ ...@@ -161,7 +158,7 @@
161 /* 操作按钮 */ 158 /* 操作按钮 */
162 .action-buttons { 159 .action-buttons {
163 display: flex; 160 display: flex;
164 - gap: 12px; 161 + gap: 24rpx;
165 justify-content: flex-end; 162 justify-content: flex-end;
166 } 163 }
167 164
...@@ -169,68 +166,68 @@ ...@@ -169,68 +166,68 @@
169 .load-more { 166 .load-more {
170 display: flex; 167 display: flex;
171 justify-content: center; 168 justify-content: center;
172 - padding: 40px 0; 169 + padding: 80rpx 0;
173 } 170 }
174 171
175 .loading-text { 172 .loading-text {
176 display: flex; 173 display: flex;
177 align-items: center; 174 align-items: center;
178 - gap: 12px; 175 + gap: 24rpx;
179 - font-size: 28px; 176 + font-size: 28rpx;
180 color: #666; 177 color: #666;
181 } 178 }
182 179
183 /* 没有更多数据 */ 180 /* 没有更多数据 */
184 .no-more { 181 .no-more {
185 text-align: center; 182 text-align: center;
186 - padding: 40px 0; 183 + padding: 80rpx 0;
187 - font-size: 28px; 184 + font-size: 28rpx;
188 color: #999; 185 color: #999;
189 } 186 }
190 187
191 /* 响应式适配 */ 188 /* 响应式适配 */
192 -@media (max-width: 750px) { 189 +@media (max-width: 750rpx) {
193 .car-list { 190 .car-list {
194 - padding: 15px; 191 + padding: 30rpx;
195 } 192 }
196 193
197 .car-card { 194 .car-card {
198 - padding: 15px; 195 + padding: 30rpx;
199 - margin-bottom: 15px; 196 + margin-bottom: 30rpx;
200 } 197 }
201 198
202 .car-title { 199 .car-title {
203 - font-size: 32px; 200 + font-size: 32rpx;
204 } 201 }
205 202
206 .detail-item { 203 .detail-item {
207 - font-size: 24px; 204 + font-size: 24rpx;
208 - padding: 3px 10px; 205 + padding: 6rpx 20rpx;
209 } 206 }
210 207
211 .car-description { 208 .car-description {
212 - font-size: 26px; 209 + font-size: 26rpx;
213 } 210 }
214 211
215 .current-price { 212 .current-price {
216 - font-size: 36px; 213 + font-size: 36rpx;
217 } 214 }
218 215
219 .market-price { 216 .market-price {
220 - font-size: 22px; 217 + font-size: 22rpx;
221 } 218 }
222 219
223 .action-buttons { 220 .action-buttons {
224 - gap: 15px; 221 + gap: 30rpx;
225 } 222 }
226 223
227 .status-badge { 224 .status-badge {
228 - font-size: 20px; 225 + font-size: 20rpx;
229 - padding: 3px 6px; 226 + padding: 6rpx 12rpx;
230 } 227 }
231 228
232 .status-icon { 229 .status-icon {
233 - width: 14px; 230 + width: 28rpx;
234 - height: 14px; 231 + height: 28rpx;
235 } 232 }
236 } 233 }
......
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-03 14:32:00 4 + * @LastEditTime: 2025-07-04 14:49:37
5 * @FilePath: /jgdl/src/pages/myCar/index.vue 5 * @FilePath: /jgdl/src/pages/myCar/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -28,16 +28,6 @@ ...@@ -28,16 +28,6 @@
28 <!-- 车辆卡片列表 --> 28 <!-- 车辆卡片列表 -->
29 <view v-else class="space-y-4 ml-4 mr-4 mt-4"> 29 <view v-else class="space-y-4 ml-4 mr-4 mt-4">
30 <view v-for="car in carList" :key="car.id" class="car-card"> 30 <view v-for="car in carList" :key="car.id" class="car-card">
31 - <!-- 状态标识 -->
32 - <view class="status-badges">
33 - <view v-if="car.isAuthenticated" class="status-badge verified">
34 - <text>已认证</text>
35 - </view>
36 - <view v-if="car.isOffline" class="status-badge offline">
37 - <text>已下架</text>
38 - </view>
39 - </view>
40 -
41 <!-- 使用 nut-row 和 nut-col 布局 --> 31 <!-- 使用 nut-row 和 nut-col 布局 -->
42 <nut-row :gutter="10"> 32 <nut-row :gutter="10">
43 <!-- 左侧:车辆图片 --> 33 <!-- 左侧:车辆图片 -->
...@@ -51,11 +41,20 @@ ...@@ -51,11 +41,20 @@
51 <nut-col :span="16"> 41 <nut-col :span="16">
52 <view class="car-info"> 42 <view class="car-info">
53 <view class="car-title">{{ car.brand }} {{ car.model }}</view> 43 <view class="car-title">{{ car.brand }} {{ car.model }}</view>
54 - <view class="car-details"> 44 + <!-- 状态标识 -->
45 + <view class="status-badges">
46 + <view v-if="car.isAuthenticated" class="status-badge verified">
47 + <text>已认证</text>
48 + </view>
49 + <view v-if="car.isOffline" class="status-badge offline">
50 + <text>已下架</text>
51 + </view>
52 + </view>
53 + <!-- <view class="car-details">
55 <text class="detail-item">{{ car.year }}</text> 54 <text class="detail-item">{{ car.year }}</text>
56 <text class="detail-item">{{ car.condition }}</text> 55 <text class="detail-item">{{ car.condition }}</text>
57 <text class="detail-item">{{ car.mileage }}公里</text> 56 <text class="detail-item">{{ car.mileage }}公里</text>
58 - </view> 57 + </view> -->
59 <view class="car-description">{{ car.description }}</view> 58 <view class="car-description">{{ car.description }}</view>
60 <view class="price-section"> 59 <view class="price-section">
61 <view class="current-price">¥{{ car.price }}</view> 60 <view class="current-price">¥{{ car.price }}</view>
...@@ -67,17 +66,15 @@ ...@@ -67,17 +66,15 @@
67 66
68 <!-- 操作按钮 --> 67 <!-- 操作按钮 -->
69 <view class="action-buttons mt-4"> 68 <view class="action-buttons mt-4">
70 - <nut-button size="small" type="default" shape="square" @click="editCar(car.id)">编辑</nut-button> 69 + <nut-button size="small" type="default" @click="editCar(car.id)">编辑</nut-button>
71 <nut-button 70 <nut-button
72 size="small" 71 size="small"
73 - shape="square"
74 :type="car.isOffline ? 'success' : 'warning'" 72 :type="car.isOffline ? 'success' : 'warning'"
75 @click="toggleOffline(car)" 73 @click="toggleOffline(car)"
76 > 74 >
77 {{ car.isOffline ? '上架' : '下架' }} 75 {{ car.isOffline ? '上架' : '下架' }}
78 </nut-button> 76 </nut-button>
79 <nut-button 77 <nut-button
80 - shape="square"
81 v-if="!car.isAuthenticated" 78 v-if="!car.isAuthenticated"
82 size="small" 79 size="small"
83 type="primary" 80 type="primary"
...@@ -104,7 +101,7 @@ ...@@ -104,7 +101,7 @@
104 <!-- 下架确认弹窗 --> 101 <!-- 下架确认弹窗 -->
105 <nut-dialog 102 <nut-dialog
106 v-model:visible="offlineDialogVisible" 103 v-model:visible="offlineDialogVisible"
107 - title="确认操作" 104 + title="温馨提示"
108 :content="offlineDialogContent" 105 :content="offlineDialogContent"
109 @confirm="confirmOffline" 106 @confirm="confirmOffline"
110 @cancel="cancelOffline" 107 @cancel="cancelOffline"
......
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-03 21:32:33 4 + * @LastEditTime: 2025-07-04 14:30:46
5 * @FilePath: /jgdl/src/pages/myFavorites/index.vue 5 * @FilePath: /jgdl/src/pages/myFavorites/index.vue
6 * @Description: 我的关注页面 6 * @Description: 我的关注页面
7 --> 7 -->
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
40 <text class="text-sm text-gray-500 mt-1 block">{{ item.details }}</text> 40 <text class="text-sm text-gray-500 mt-1 block">{{ item.details }}</text>
41 <view class="mt-2 flex justify-between items-center"> 41 <view class="mt-2 flex justify-between items-center">
42 <view> 42 <view>
43 - <text class="text-orange-500 font-bold"> 43 + <text class="text-orange-500 font-bold" style="font-size: 1.2rem;">
44 ¥{{ item.price.toLocaleString() }} 44 ¥{{ item.price.toLocaleString() }}
45 </text> 45 </text>
46 <text class="text-gray-400 text-xs line-through ml-2"> 46 <text class="text-gray-400 text-xs line-through ml-2">
......
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-04 13:58:14 4 + * @LastEditTime: 2025-07-04 14:34:39
5 * @FilePath: /jgdl/src/pages/myOrders/index.vue 5 * @FilePath: /jgdl/src/pages/myOrders/index.vue
6 * @Description: 订单管理页面 6 * @Description: 订单管理页面
7 --> 7 -->
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
81 <view class="order-actions"> 81 <view class="order-actions">
82 <!-- 买车模式:待支付状态 --> 82 <!-- 买车模式:待支付状态 -->
83 <template v-if="viewMode === 'bought' && order.status === 'pending'"> 83 <template v-if="viewMode === 'bought' && order.status === 'pending'">
84 - <nut-button type="primary" size="small" @click="handlePayment(order)"> 84 + <nut-button type="primary" size="small" @click="handlePayment(order)" color="orange">
85 去支付 85 去支付
86 </nut-button> 86 </nut-button>
87 </template> 87 </template>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
91 <nut-button type="default" size="small" @click="viewOrderDetail(order.id)"> 91 <nut-button type="default" size="small" @click="viewOrderDetail(order.id)">
92 查看详情 92 查看详情
93 </nut-button> 93 </nut-button>
94 - <nut-button type="primary" size="small" @click="rateOrder(order.id)" class="ml-2"> 94 + <nut-button type="primary" size="small" @click="rateOrder(order.id)" class="ml-2" color="orange" plain>
95 {{ order.review ? '查看评价' : '评价' }} 95 {{ order.review ? '查看评价' : '评价' }}
96 </nut-button> 96 </nut-button>
97 </template> 97 </template>
......