From fc9bd6378d3bfbde6d5c71535757a3d44de8d8ff Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期四, 20 七月 2023 15:18:06 +0800 Subject: [PATCH] Merge branch 'feature/1.1.4开发' into develop --- uniapp/pages/active/tmsearch.vue | 44 +++++++++++++++++++++++--------------------- 1 files changed, 23 insertions(+), 21 deletions(-) diff --git a/uniapp/pages/active/tmsearch.vue b/uniapp/pages/active/tmsearch.vue index 765f6e1..c6445a1 100644 --- a/uniapp/pages/active/tmsearch.vue +++ b/uniapp/pages/active/tmsearch.vue @@ -1,5 +1,5 @@ <template> - <view class="pddsearch-wrapper wrapperLayer borderBox" style="background: #fff;"> + <view class="pddsearch-wrapper wrapperLayer borderBox"> <view class="topbarbox"></view> <view class="fixed-container colCen"> <view class="topbarbox"></view> @@ -62,10 +62,10 @@ </scroll-view> </view> <!--浜岀骇鎼滅储--> - <view class="scrangeList-container rowCen" :class="scrollTop>fiexdtop?'tofixed':''" :style="'top:'+(scrollTop>fiexdtop?fiexdHeight:'0')+'px;'"> + <view class="scrangeList-container rowCen" :class="scrollTop>fiexdtop?'tofixed':''" > <scroll-view class="scrollview-content" scroll-x scroll-with-animation="true"> <block v-for="(items,index) in secrendSearch" :key="index"> - <view class="rangeItem" :class="nowsec==items.id?'rangeItem-active':''" @tap="changeSeRange(items.id)"> + <view class="rangeItem" style="font-size: 13px;margin-right: 30rpx; color: #8b8686;" :class="nowsec==items.id?'rangeItem-active':''" @tap="changeSeRange(items.id)"> <view class="boxcontent colCenCen"> <view class="nameBox"> {{items.name}} @@ -76,12 +76,12 @@ </block> </scroll-view> </view> - <colGoodsImg :popBannerSList="popBannerSList"></colGoodsImg> + <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)"> + <view class="goods-items borderBox" v-for="(items,index) in goodsList" :key='index' @click="goDetail(items)"> <!-- <colGoodsImg :popBannerSList="popBannerSList"></colGoodsImg> --> - <colGoodsImg v-if="index==0" :popBannerSList="popBannerSList"></colGoodsImg> + <colGoodsImg v-if="index==0&&popBannerSList&&popBannerSList.length>0" :popBannerSList="popBannerSList"></colGoodsImg> <colGoods v-else :items="items"></colGoods> </view> <aLoadMore :status="loadstatus" mode="loading3" :showTitle='true' color="#999999"></aLoadMore> @@ -161,11 +161,9 @@ }, mounted() { uni.createSelectorQuery().in(this).select('.fixed-container').boundingClientRect(data => { - console.log(data.top); this.fiexdHeight = data.height }).exec(); uni.createSelectorQuery().in(this).select('.rangeList-container').boundingClientRect(data => { - console.log(data.top); this.fiexdtop = data.top - this.fiexdHeight }).exec(); }, @@ -173,7 +171,6 @@ getNav() { var that = this; this.$u.api.getTopCalss({ctype:1,parentId:0}).then(e => { - console.log(e); if(e.code != 0)return that.$alert(e.msg) e.data.list.unshift({cid:"-1",cname:"澶╃尗瓒呭競",ctype:"1"}); e.data.list.unshift({cid:"0",cname:"鍏ㄩ儴",ctype:"1"}); @@ -195,7 +192,6 @@ tchaoshi:tchaoshi, secrend_search:this.nowsec }).then(e => { - console.log(e); if (e.code != 0) return that.$alert(e.msg) var res = e.data; uni.stopPullDownRefresh(); @@ -210,25 +206,27 @@ that.loadstatus = 'loading' that.pageCurrent ++ } - if(!that.isinsert&&res&&res.length>0) + /* if(!that.isinsert&&res&&res.length>0) { that.goodsList.unshift(res[0]); that.isinsert=true; - } + } */ that.goodsList = that.goodsList.concat(res) - console.log(that.goodsList); }).catch(function(err) {}) }, getPageImg() { - var that=this; + var that=this; this.$u.api.getBanner({ - type: '11,12' + type: '11,16' }).then(e => { - console.log(e) if (e.code == 1) return that.$alert(e.msg); var res = e.data.info; - this.popBannerSList=res.popBannerSList; + this.popBannerSList=res.tmImg; + if(res.tmImg&&res.tmImg.length>0) + { + that.goodsList.unshift(res[0]); + } }).catch(function(err) { console.log(err) }) @@ -251,9 +249,13 @@ }, goDetail(info) { - uni.navigateTo({ - url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) - }) + if(info&&info!=undefined) + { + uni.navigateTo({ + url: '../goods/goodsDetail?info=' + encodeURIComponent(JSON.stringify(info)) + }) + } + }, goback() { @@ -388,7 +390,7 @@ .scrangeList-container { width: 100%; - height: 80rpx; + height: 40rpx; padding-left: 32rpx; z-index: 101; -- Gitblit v1.9.3