修复一些问题,个人账号功能完善,注册功能完善,收藏,购物车功能完善,初版基本完成,投入测试

This commit is contained in:
xiaowang
2026-03-03 17:50:10 +08:00
parent b301e37468
commit b0470b8f86
23 changed files with 804 additions and 129 deletions
+51 -13
View File
@@ -24,23 +24,22 @@
class="cart-item"
:body-style="{ padding: '16px' }"
hoverable
@click="handleProductClick(item)"
>
<div class="item-content">
<!-- 复选框 -->
<a-checkbox v-model:checked="item.selected" @change="handleSelectChange" />
<!-- 商品图片 -->
<div class="item-image" v-if="item.productImage">
<div class="item-image" v-if="item.productImage" @click="handleProductClick(item)" style="cursor: pointer;">
<img :src="item.productImage" :alt="item.productTitle" />
</div>
<div class="item-image" v-else :style="{ backgroundColor: getRandomColor() }">
<div class="item-image" v-else :style="{ backgroundColor: getRandomColor(), cursor: 'pointer' }" @click="handleProductClick(item)">
<span>{{ item.productTitle[0] }}</span>
</div>
<!-- 商品详情 -->
<div class="item-details">
<h3 class="item-name">{{ item.productTitle }}</h3>
<h3 class="item-name" @click="handleProductClick(item)" style="cursor: pointer;">{{ item.productTitle }}</h3>
<p class="item-price">¥{{ item.price.toFixed(2) }}</p>
<!-- 数量控制和删除按钮 -->
@@ -744,36 +743,66 @@ onMounted(() => {
.coupon-card {
border-radius: 12px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
border: 1px solid #f0f0f0;
transition: all 0.3s ease;
}
.coupon-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
transform: translateY(-2px);
}
.coupon-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
padding: 18px 20px;
cursor: pointer;
background: linear-gradient(135deg, #f6f9ff 0%, #ffffff 100%);
border-bottom: 1px solid #e6f7ff;
}
.coupon-header:hover {
background-color: #f5f5f5;
background: linear-gradient(135deg, #e6f7ff 0%, #f6f9ff 100%);
}
.coupon-title {
font-size: 15px;
font-size: 16px;
font-weight: 600;
color: #333;
display: flex;
align-items: center;
gap: 8px;
}
.coupon-title::before {
content: "🎁";
font-size: 18px;
}
.coupon-value {
font-size: 14px;
font-size: 13px;
font-weight: 500;
color: #1890ff;
display: flex;
align-items: center;
gap: 4px;
gap: 6px;
padding: 6px 12px;
background: rgba(24, 144, 255, 0.1);
border-radius: 20px;
transition: all 0.3s ease;
box-shadow: 0 1px 3px rgba(24, 144, 255, 0.2);
}
.coupon-value:hover {
background: rgba(24, 144, 255, 0.2);
transform: scale(1.05);
box-shadow: 0 2px 6px rgba(24, 144, 255, 0.3);
}
.coupon-discount {
padding: 12px 16px;
padding: 14px 20px;
background-color: #f0f9ff;
border-top: 1px solid #e6f7ff;
display: flex;
@@ -783,13 +812,22 @@ onMounted(() => {
.discount-label {
font-size: 14px;
color: #333;
color: #666;
display: flex;
align-items: center;
gap: 6px;
}
.discount-label::before {
content: "💰";
font-size: 14px;
}
.discount-amount {
font-size: 16px;
font-weight: 600;
font-size: 18px;
font-weight: 700;
color: #1890ff;
text-shadow: 0 1px 2px rgba(24, 144, 255, 0.3);
}
.discount {