From 9473018662e37964234cc28dc449f221b1fde3c1 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Wed, 25 Jun 2025 17:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E6=84=9F=E5=95=86=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/CommonFunction.js | 6 +- subPackages/haveFeeling/shopDetail.vue | 112 +++++++++++++++++++++++-- 2 files changed, 110 insertions(+), 8 deletions(-) diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index 82d7e86..a311e0b 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -87,11 +87,11 @@ Vue.prototype.IsCode = code => { // 图片显示判断 Vue.prototype.showImg = img => { if (!img) return; - let timeStamp = new Date().getTime() + if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) { - return img+"?timestamp="+timeStamp; + return img; } else { - return Vue.prototype.NEWAPIURL + img +"?timestamp="+timeStamp; + return Vue.prototype.NEWAPIURL + img ; } } diff --git a/subPackages/haveFeeling/shopDetail.vue b/subPackages/haveFeeling/shopDetail.vue index 8f8886c..3fca732 100644 --- a/subPackages/haveFeeling/shopDetail.vue +++ b/subPackages/haveFeeling/shopDetail.vue @@ -2,17 +2,41 @@ - + + + + + + + {{item.goods.title}} + + ¥{{item.goods.money/100}} + + + + + + + + + + @@ -25,13 +49,16 @@ components: {CustomTabBar,headerVue}, data() { return { - topBanner: [] + topBanner: [], + list: [], + swiperIndex: 0, } }, onLoad() { }, onReady() { + this.getProduct() this.getList() }, @@ -39,6 +66,10 @@ }, methods: { + swiperChange(e) { + this.swiperIndex = e.detail.current + }, + viewDetail(item) { if (item.url) { uni.navigateTo({ @@ -51,6 +82,16 @@ }) }, + getProduct () { + this.Post({ + tag_id: 45, + offset: 0, + limit: 3, + },'/api/tag/getGoodsByTagId').then(res => { + this.list = res.data; + }) + }, + getList() { // 大轮播 this.Post({ @@ -110,14 +151,34 @@ .bg { min-height: 100vh; background: #FFFFFF; + padding-bottom: 200rpx; } .banner-content{ width: 100%; height: 496.4rpx; + position: relative; .top-banner { width: 100%; height: 100%; } + .dot-container{ + position: absolute; + bottom: 43rpx; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + left: 0; + .dot-line{ + width: 52rpx; + height: 4rpx; + margin: 0 8rpx; + background: RGBA(189, 170, 173, 0.8); + &.active{ + background: RGBA(255, 255, 255, 0.8); + } + } + } } .head-img{ @@ -127,7 +188,48 @@ display: block; } .product-content{ - padding: 0 26rpx; + padding: 63rpx 26rpx 0; + .product{ + padding: 36rpx 0 0; + display: flex; + flex-wrap: nowrap; + justify-content: space-between; + .item{ + width: 214.69rpx; + } + .item-img{ + width: 214.69rpx; + height: 286.33rpx; + } + .content{ + height: 80rpx; + padding: 0rpx 4rpx; + font-weight: 400; + font-size: 24rpx; + color: #000000; + } + .bottom{ + display: flex; + padding-top: 13rpx; + justify-content: space-between; + align-items: center; + } + .buy-cart{ + width: 28rpx; + height: 24rpx; + } + } + } + + .img-container{ + width: 100%; + image{ + display: block; + width: 100%; + height: 314rpx; + border-radius: 40rpx; + margin-bottom: 20rpx; + } }