| | |
| | | v-if="bottomGoodsList.length>0"> |
| | | <block v-for="(items,index) in bottomGoodsList" :key="index"> |
| | | <view class="goods-items" @click="goDetails(items)"> |
| | | <!-- <colGoodsImg v-if="index==0&&itembannerList&&itembannerList.length>0" :popBannerSList="itembannerList"></colGoodsImg> --> |
| | | <colGoods :items="items"></colGoods> |
| | | </view> |
| | | </block> |
| | |
| | | import slideTop from './slideTop.vue' |
| | | import colGoods from './colGoods.vue' |
| | | import empowerModel from './empowerModel.vue' |
| | | import colGoodsImg from '@/components/colGoodsImg.vue' |
| | | export default { |
| | | props: { |
| | | recomendType: { |
| | |
| | | components: { |
| | | slideTop, |
| | | colGoods, |
| | | empowerModel |
| | | empowerModel, |
| | | colGoodsImg |
| | | }, |
| | | data() { |
| | | return { |
| | | popBannerSList:[], |
| | | fallingList: [], |
| | | pageHeight: '', |
| | | headerColor: '', |
| | |
| | | swpidx: 0, |
| | | canrefresh: true, |
| | | fastenter:[], |
| | | popBannerSList:[], |
| | | itembannerList:[], |
| | | enterTop:[], |
| | | enterDown:[] |
| | | enterDown:[], |
| | | tbbanner:[], |
| | | jdbanner:[], |
| | | dybanner:[], |
| | | pddbanner:[], |
| | | wphbanner:[], |
| | | } |
| | | }, |
| | | watch: { |
| | |
| | | this.getbottomGoodsList(this.bottomType); |
| | | this.getGOODSfalling(); |
| | | this.getRQList(); |
| | | //this.getPageImg(); |
| | | }, |
| | | mounted() { |
| | | this.$emit('scrolltoTop') |
| | |
| | | }, |
| | | onRestore() { |
| | | this.swpidx = 0 |
| | | console.log('下拉被终止'); |
| | | }, |
| | | pagescroll(e) { |
| | | this.$emit('scrollNum', e.detail.scrollTop) |
| | |
| | | that.dyList = e.data.dygoods; |
| | | }).catch(function(err) {}) |
| | | }, |
| | | |
| | | getPageImg() |
| | | { |
| | | var that=this; |
| | | this.$u.api.getBanner({ |
| | | type: '11,16,17,18,19,20' |
| | | }).then(e => { |
| | | if (e.code == 1) return that.$alert(e.msg); |
| | | var res = e.data.info; |
| | | that.tbbanner=res.tmImg; |
| | | that.jdbanner=res.jdImg; |
| | | that.dybanner=res.dyImg; |
| | | that.pddbanner=res.pddImg; |
| | | that.wphbanner=res.wphImg; |
| | | that.changeBanner(that.bottomCurrent); |
| | | }).catch(function(err) { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | changeBanner(type) |
| | | { |
| | | switch(type) |
| | | { |
| | | case 2://京东 |
| | | this.itembannerList=this.jdbanner; |
| | | break; |
| | | case 6://抖音 |
| | | this.itembannerList=this.dybanner; |
| | | break; |
| | | case 3://拼多多 |
| | | this.itembannerList=this.pddbanner; |
| | | break; |
| | | case 4://唯品会 |
| | | this.itembannerList=this.wphbanner; |
| | | break; |
| | | default: |
| | | this.itembannerList=[]; |
| | | break; |
| | | } |
| | | if(this.itembannerList&&this.itembannerList>0) |
| | | { |
| | | that.bottomGoodsList.unshift(this.itembannerList[0]); |
| | | } |
| | | }, |
| | | getbottomGoodsList(type) { |
| | | var that = this; |
| | | this.$u.api.getGoodThing({ |
| | |
| | | if (this.bottomCurrent != idx) { |
| | | this.currentPage = 1; |
| | | this.bottomType = info.type; |
| | | this.changeBanner(info.type); |
| | | this.getbottomGoodsList(this.bottomType); |
| | | this.$nextTick(() => { |
| | | this.$emit('scrolltoview') |