diff --git a/Frontend/src/App.vue b/Frontend/src/App.vue index 73ac5f6f..417febba 100644 --- a/Frontend/src/App.vue +++ b/Frontend/src/App.vue @@ -74,8 +74,6 @@ watch(() => route.path, async () => { // 页面加载时获取购物车数量 loadCartCount() -// 每30秒自动更新一次购物车数量 -setInterval(loadCartCount, 30000) \ No newline at end of file diff --git a/Frontend/src/views/CartView.vue b/Frontend/src/views/CartView.vue index b8e503dc..b588c0e6 100644 --- a/Frontend/src/views/CartView.vue +++ b/Frontend/src/views/CartView.vue @@ -24,23 +24,22 @@ class="cart-item" :body-style="{ padding: '16px' }" hoverable - @click="handleProductClick(item)" >
¥{{ item.price.toFixed(2) }}
@@ -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 { diff --git a/Frontend/src/views/PasswordSettingsView.vue b/Frontend/src/views/PasswordSettingsView.vue index 8e87d10f..98153660 100644 --- a/Frontend/src/views/PasswordSettingsView.vue +++ b/Frontend/src/views/PasswordSettingsView.vue @@ -82,6 +82,13 @@ const formState = reactive({ confirmPassword: '' }) +const validateConfirmPassword = (_, value: string) => { + if (value !== formState.password) { + return Promise.reject(new Error('两次输入的密码不一致')) + } + return Promise.resolve() +} + const formRules = { password: [ { required: true, message: '请输入新密码', trigger: 'blur' }, @@ -94,13 +101,6 @@ const formRules = { ] } -const validateConfirmPassword = (_, value: string) => { - if (value !== formState.password) { - return Promise.reject(new Error('两次输入的密码不一致')) - } - return Promise.resolve() -} - const handleSubmit = async () => { if (!formRef.value) return diff --git a/Frontend/src/views/ProductDetailView.vue b/Frontend/src/views/ProductDetailView.vue index 620507ed..d25f2c8c 100644 --- a/Frontend/src/views/ProductDetailView.vue +++ b/Frontend/src/views/ProductDetailView.vue @@ -69,7 +69,27 @@{{ item.name }}
+{{ item.title || item.name }}