From 1cd4d15baccb28f2b4c1f630597a5ff88b98ca90 Mon Sep 17 00:00:00 2001 From: szdot Date: Mon, 12 May 2025 02:18:55 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=20=20=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afactor=20=E3=80=90=E5=8E=9F=20=20=E5=9B=A0=E3=80=91?= =?UTF-8?q?=EF=BC=9A1.=E9=A6=96=E9=A1=B5=E6=9C=89=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E6=98=BE=E7=A4=BA=E7=94=A8=E6=88=B7=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E6=B2=A1=E6=9C=89=E6=98=BE=E7=A4=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=93=BE=E6=8E=A52.=E7=AB=99=E9=95=BF=E6=8E=A8=E8=8D=90?= =?UTF-8?q?=E6=A8=A1=E5=9D=973.=E4=BB=8E=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E8=8E=B7=E5=8F=96banner=E5=88=97=E8=A1=A8=20=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=20=E3=80=90=E8=BF=87=20=20=E7=A8=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9A=20=E3=80=90=E5=BD=B1=20=20=E5=93=8D=E3=80=91=EF=BC=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- pages/index/index.vue | 88 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 8 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 3d28e27..4886571 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -8,8 +8,11 @@ - - {{userInfo.tel}} + + {{ userInfo.tel }} + + + 请登录 @@ -28,12 +31,39 @@ --> - - + + - + + + + + + + + + + 站长推荐 + + + + + + + + + + + + + + + + @@ -50,9 +80,6 @@ data() { return { avatarSrc: "", //头像地址 - bannerList: [{ //banner - url: '/static/banner1.png' - }], } }, computed: { @@ -62,8 +89,21 @@ //订单列表 过滤出 已付款的状态订单 orderList() { return this.$store.state.orderList.filter(item => item.main_status === '已付款') + }, + //推荐的商品spu列表 + recommendList() { + return this.$store.state.spuList.filter(item => item.recommend === '1') + }, + //获取首页banner列表 + bannerList() { + return this.$store.state.bannerList + .filter(item => item.type === 'index') + .map(item => ({ + url: item.photo + })) } }, + watch: {}, created() { //检查token 没有则进行无感登录 this.checkUserInfo() @@ -87,4 +127,36 @@ transform: translateX(-50%); top: 494rpx; } + + .recommendBox { + width: 702rpx; + margin-top: 48rpx; + } + + .recommendTit { + height: 90rpx; + } + + .recommendTitBut { + width: 252rpx; + height: 72rpx; + background-color: $uni-color-error; + } + + .recommendTitButTiao { + width: 8rpx; + height: 4rpx; + background-color: $uni-text-color-inverse; + } + + .recommendSwiper { + width: 702rpx; + height: 224rpx; + } + + .recommendSwiper-item { + background-color: $uni-bg-color; + width: 680rpx; + height: 184rpx; + } \ No newline at end of file