Vue3 前端补充:秒杀和商品 API 类型定义及首页更新
- 添加 flashsale/product API 接口模块 - 添加 flashsale/product TypeScript 类型定义 - 更新首页组件
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
<p class="text-gray-600">五种数据类型应用,毫秒级响应</p>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<el-icon :size="40" class="text-orange-500 mb-4"><Speedometer /></el-icon>
|
||||
<el-icon :size="40" class="text-orange-500 mb-4"><Odometer /></el-icon>
|
||||
<h3 class="text-lg font-semibold mb-2">接口限流</h3>
|
||||
<p class="text-gray-600">多种限流策略,防止恶意刷单</p>
|
||||
</div>
|
||||
@@ -133,11 +133,12 @@ import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import FlashSaleCard from '@/components/business/FlashSaleCard.vue'
|
||||
import ProductCard from '@/components/business/ProductCard.vue'
|
||||
import { flashsaleApi } from '@/api/modules/flashsale'
|
||||
import { productApi } from '@/api/modules/product'
|
||||
import flashsaleApi from '@/api/flashsale'
|
||||
import productApi from '@/api/product'
|
||||
import { useCartStore } from '@/stores/cart'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import type { FlashSale, Product } from '@/types/api'
|
||||
import type { FlashSale } from '@/types/flashsale'
|
||||
import type { Product } from '@/types/product'
|
||||
|
||||
const router = useRouter()
|
||||
const cartStore = useCartStore()
|
||||
@@ -170,7 +171,7 @@ const banners = [
|
||||
buttonText: '查看商品',
|
||||
link: '/products',
|
||||
bgColor: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)',
|
||||
icon: 'Speedometer'
|
||||
icon: 'Odometer'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user