From 0edbbfcdf53e61c2b3acf75604f774ed1bf43c75 Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Tue, 19 Nov 2024 00:38:58 +0800 Subject: [PATCH] =?UTF-8?q?Feat(=E9=A6=96=E9=A1=B5)=EF=BC=9A=E6=96=B0?= =?UTF-8?q?=E5=93=81=E4=B8=93=E5=8C=BA=EF=BC=88=E5=AE=8C=E6=88=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/activity.js | 10 +++ pages.json | 7 ++ pages/home/index.vue | 132 +++++++++++++++++++++++++++++++++++- pages/home/newZone.vue | 148 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 295 insertions(+), 2 deletions(-) create mode 100644 pages/home/newZone.vue diff --git a/api/activity.js b/api/activity.js index 949e487..e931e85 100644 --- a/api/activity.js +++ b/api/activity.js @@ -151,3 +151,13 @@ export function getBargainUserList(data) { export function getBargainUserCancel(data) { return request.post("/bargain/user/cancel", data); } + +/** + * 新品专区 + * @param {*} data + * @returns + */ + +export function queryNewZone() { + return request.get("/newGoods"); +} diff --git a/pages.json b/pages.json index 8ef6de9..7288a32 100644 --- a/pages.json +++ b/pages.json @@ -42,6 +42,13 @@ "navigationBarTitleText": "地标好物" } }, + { + "path": "pages/home/newZone", + "style": { + "navigationBarTitleText": "新品专区", + "navigationBarBackgroundColor": "#FFFFFF" + } + }, { "path": "pages/chose-city/chose-city", "style": { diff --git a/pages/home/index.vue b/pages/home/index.vue index 190786e..ce7889f 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -109,12 +109,47 @@ /> - + /> --> + + + + + + + + + + + 点击进入 + + + + + + + + + + + + + {{ item.productTitle }} + + + {{ item.productPrice }} + + + + + + + + @@ -291,6 +326,9 @@ export default { oldUserPopup: {}, // 民宿专题轮播 contentHomestay: [], + // 新品推荐 + newZone: [], + indexVideo: '', // 节日专题 contentFestival: {}, pageKeyId: Object.freeze('appIndex'), @@ -329,6 +367,12 @@ export default { this.scrollTop = e.scrollTop }, methods: { + toKD() { + this.$yrouter.push('/pages/VideoPlayBackList/VideoPlayBackList') + }, + toNewZone() { + this.$yrouter.push('/pages/home/newZone') + }, init() { getShareImage().then(({ data }) => this.shareAppImg = data) sharpBannar().then(res => { @@ -370,6 +414,8 @@ export default { _this.$set(_this, 'oldUserPopup', data.oldUserPopup) _this.$set(_this, 'contentHomestay', data.contentHomestayV2) _this.$set(_this, 'contentFestival', data.contentFestivalV2) + _this.$set(_this, 'newZone', data.newGoods) + _this.indexVideo = data.indexVideo.videoUrl _this.bastLeftList = [] _this.bastRightList = [] _this.lotteryCanDraw = data.lotteryCanDraw @@ -796,5 +842,87 @@ export default { margin: 0 0 0 20rpx; } } +} +.new-zone-wrap{ + width: 336rpx; + height: 480rpx; + background: rgba(240,240,240,0.8); + border-radius: 16rpx; + padding: 10rpx; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: space-between; + .kd{ + width: 100%; + height: 266rpx; + background: #fff; + border-radius: 16rpx; + padding: 10rpx; + box-sizing: border-box; + position: relative; + } + .xpsx{ + width: 100%; + height: 180rpx; + background: #fff; + border-radius: 16rpx; + padding: 10rpx; + box-sizing: border-box; + } +} +.img-wrap{ + height: 27rpx; + width: 140rpx; + image{ + border-radius: 0 !important; + vertical-align: text-top !important + } +} +.tip-img{ + position: absolute; + right: 0; + top: 0; +} +.kd-cover{ + width: 100%; + height: 180rpx; + border-radius: 20rpx; + margin-top: 20rpx; +} +.enter-btn{ + color: #333; + background-color: rgba(255,255,255,0.6); + font-size: 28rpx; + width: fit-content; + padding: 6rpx 20rpx; + border-radius: 100rpx; + position: absolute; + left: 0; + right: 0; + bottom: 40rpx; + margin: auto; +} +.new-zone{ + display: flex; + align-items: center; + justify-content: flex-start; + overflow: scroll; +} +.new-item{ + display: flex; + margin-right: 20rpx; + align-items: center; +} +.goods-info{ + width: 122rpx; + height: 110rpx; + background: rgba(240,240,240,0.8); + border-radius: 0rpx 20rpx 20rpx 0rpx; + box-sizing: border-box; + padding: 10rpx; +} +.price-wrap{ + } \ No newline at end of file diff --git a/pages/home/newZone.vue b/pages/home/newZone.vue new file mode 100644 index 0000000..5b21ffe --- /dev/null +++ b/pages/home/newZone.vue @@ -0,0 +1,148 @@ + + + \ No newline at end of file