From fee11c59ab6c14449bb0441df1e390efe4453074 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期三, 21 六月 2023 13:55:38 +0800 Subject: [PATCH] no message --- /dev/null | 192 -------------------------------------- uniapp/pages/active/colGoodsImg.vue | 40 ++++++++ uniapp/pages/active/tmsearch.vue | 30 +++++- 3 files changed, 65 insertions(+), 197 deletions(-) diff --git a/uniapp/components/colGoodsImg.vue b/uniapp/components/colGoodsImg.vue deleted file mode 100644 index 238232d..0000000 --- a/uniapp/components/colGoodsImg.vue +++ /dev/null @@ -1,192 +0,0 @@ -<template> - <view class="items-container borderBox colCen"> - <view class="image-container defIcon"> - <image style="border-radius: 8rpx 8rpx 0px 0px;" :src="items.mainPic" mode="aspectFill"></image> - </view> - <view class="goodsInfo colCenBet borderBox"> - <view class="topgoodsname-box colCen"> - <view class="goodsName-box rowCen"> - <view class="typeIcon-content defIcon"> - <image :src="items.labelImg" mode="heightFix"></image> - </view> - <view style="white-space: inherit;" class="goodsText"> - {{items.dtitle}} - </view> - </view> - - </view> - <view class="goodsPrice-goodSale colCen borderBox"> - <view class="couponInfo-bar rowCen"> - <view class="couponbox rowCenCen" v-if="items.couponPrice>0 || items.faction=='w'"> - <view> - {{items.faction=='w' ?(items.discount+'鎶�'):items.couponPrice+'鍏冨埜'}} - </view> - </view> - <view class="backPrice rowCenCen"> - <view>杩攞{items.fanli}}鍏�</view> - </view> - </view> - - <view class="card-bottom-info rowCenBet"> - <view class="goods-price rowEnd"> - <view class="font"> - 鍒稿悗 - </view> - <view class="rmb"> - 锟� - </view> - <view class="price"> - {{items.actualPrice}} - </view> - </view> - <view class="saleNum-box" v-if="items.monthSales!=''"> - 宸插敭{{items.monthSales}} - </view> - </view> - - <view class="shopname">{{items.shopName}}</view> - </view> - </view> - </view> -</template> - -<script> - export default { - props: { - items: Object - }, - data() { - return { - - } - } - } -</script> - -<style lang="scss"> - .shopname{ - font-size: 11px; - display: flex; - align-items: flex-start; - width: 100%; - color: #999999; - margin: 2px 0; - - } - .items-container { - width: 346rpx; - height: 100%; - overflow: hidden; - border-radius: 8rpx; - background-color: #FFFFFF; - - .image-container { - width: 100%; - height: 336rpx; - } - - .goodsInfo { - width: 100%; - height: 190rpx; - margin-top: 10rpx; - padding: 0 10rpx 10rpx 10rpx; - - .topgoodsname-box { - width: 100%; - - .goodsName-box { - width: 100%; - position: relative; - - .typeIcon-content { - width: 60rpx; - height: 24rpx; - position: absolute; - top: 6rpx; - } - - .goodsText { - flex: 1; - font-size: 26rpx; - line-height: 34rpx; - font-weight: 500; - text-indent: 2.5em; - color: #333333; - text-overflow: -o-ellipsis-lastline; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - line-clamp: 2; - -webkit-box-orient: vertical; - } - } - } - - .goodsPrice-goodSale { - width: 100%; - - .couponInfo-bar { - width: 100%; - margin: 5rpx 0; - - .couponbox { - height: 30rpx; - background: linear-gradient(255deg, #FF437E, #FF7755); - border-radius: 5rpx; - font-size: 24rpx; - font-weight: 500; - color: #FFFFFF; - margin-right: 10rpx; - padding: 0 10rpx; - } - - .backPrice { - padding: 0 10rpx; - height: 30rpx; - background: linear-gradient(-90deg, #7619EC, #A429F3); - border-radius: 5rpx; - font-size: 24rpx; - font-weight: 500; - color: #FFFFFF; - } - } - - .card-bottom-info { - width: 100%; - margin-top: 15rpx; - - .goods-price { - line-height: 34rpx; - - .font { - font-size: 24rpx; - font-weight: 500; - color: #999999; - } - - .rmb { - font-weight: 500; - font-size: 24rpx; - color: #FF4242; - line-height: 34rpx; - } - - .price { - color: #FF4242; - font-weight: bold; - font-size: 28rpx; - line-height: 34rpx; - } - } - - .saleNum-box { - font-size: 24rpx; - font-weight: 500; - color: #999999; - } - } - } - } - } -</style> diff --git a/uniapp/pages/active/colGoodsImg.vue b/uniapp/pages/active/colGoodsImg.vue new file mode 100644 index 0000000..fc86f08 --- /dev/null +++ b/uniapp/pages/active/colGoodsImg.vue @@ -0,0 +1,40 @@ +<template> + <view class="items-container borderBox colCen"> + <swiper class="swiper-box" :autoplay="true" :interval="3000" :duration="300" :indicator-active-color="'#fff'" :indicator-dots="true" circular> + <swiper-item v-for="(items,index) in popBannerSList" :key='index'> + <view class="swiper-item defIcon" @click="goUrl(items)"> + <image :src="items.image" mode="aspectFit"></image> + </view> + </swiper-item> + </swiper> + </view> +</template> + +<script> + export default { + props: { + popBannerSList: Array + }, + data() { + return { + + } + } + } +</script> + +<style> + .items-container { + width: 346rpx; + height: 100%; + .swiper-box { + width: 100%; + height: 100%; + + .swiper-item { + width: 100%; + height: 100%; + } + } + } +</style> \ No newline at end of file diff --git a/uniapp/pages/active/tmsearch.vue b/uniapp/pages/active/tmsearch.vue index 54873d2..b35d96a 100644 --- a/uniapp/pages/active/tmsearch.vue +++ b/uniapp/pages/active/tmsearch.vue @@ -79,8 +79,12 @@ <view class="goodsList-container colCen borderBox"> <view class="goods-content rowStaBet"> - <view class="goods-items borderBox colCen" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> - <colGoods :items="items"></colGoods> + <view class="goods-items borderBox colCen"> + <colGoodsImg :popBannerSList="popBannerSList"></colGoodsImg> + <view v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> + <colGoods :items="items"></colGoods> + </view> + </view> <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore> </view> @@ -90,18 +94,19 @@ </template> <script> - import colGoods from '../../components/colGoodsImg.vue' + import colGoods from '../../components/colGoods.vue' + import colGoodsImg from '../../components/colGoodsImg.vue' export default { components:{ colGoods }, data() { return { + popBannerSList:[], pageTop: 0, nowCurrent: 0, scrollTop: 0, navList: [], - fiexdHeight: '', fiexdtop: '', goodsList: [], @@ -142,7 +147,9 @@ } }, onLoad() { - this.getNav() + this.getNav(); + this.getPageImg(); + }, onPageScroll(e) { this.scrollTop = e.scrollTop @@ -206,6 +213,19 @@ that.goodsList = that.goodsList.concat(res) }).catch(function(err) {}) }, + getPageImg() + { + this.$u.api.getBanner({ + type: '12' + }).then(e => { + console.log(e) + if (e.code == 1) return that.$alert(e.msg); + var res = e.data.info; + this.popBannerSList=res.popBannerSList; + }).catch(function(err) { + console.log(err) + }) + }, changeRange(id) { this.pageCurrent = 1 this.canloadmore = false -- Gitblit v1.9.3