| | |
| | | <view class="rangeList-container rowCen" :class="scrollTop>fiexdtop?'tofixed':''" :style="'top:'+(scrollTop>fiexdtop?fiexdHeight:'0')+'px;'"> |
| | | <scroll-view class="scrollview-content" scroll-x scroll-with-animation="true"> |
| | | <block v-for="(items,index) in navList" :key="index"> |
| | | <view class="rangeItem" :class="nowCurrent==items.cid?'rangeItem-active':''" @tap="changeRange(items.cid)"> |
| | | <view class="rangeItem" :class="nowCurrent==items.cat_id?'rangeItem-active':''" @tap="changeRange(items.cat_id)"> |
| | | <view class="boxcontent colCenCen"> |
| | | <view class="nameBox"> |
| | | {{items.cname}} |
| | | {{items.cat_name}} |
| | | </view> |
| | | <view class="border"></view> |
| | | </view> |
| | |
| | | methods: { |
| | | getNav() { |
| | | var that = this; |
| | | that.getData(); |
| | | /* this.$u.api.getTopCalss({ctype:3}).then(e => { |
| | | this.$u.api.getHdkCategoryList({type:4}).then(e => { |
| | | console.log(e); |
| | | if(e.code != 0)return that.$alert(e.msg) |
| | | that.navList = e.data.list; |
| | | that.nowCurrent = that.navList[0].cid |
| | | that.nowCurrent = that.navList[0].cat_id |
| | | that.getData() |
| | | }).catch(function (err) { |
| | | }) */ |
| | | }) |
| | | }, |
| | | getData() { |
| | | var that = this; |
| | | console.log(this.nowCurrent); |
| | | this.$u.api.goodsSearch({ |
| | | type: 'dy', |
| | | pageId: this.pageCurrent, |
| | | pageSize: 10, |
| | | sort: 0, |
| | | catid:this.nowCurrent, |
| | | //owner: this.selfsupport ? 'g' : '', |
| | | //selectCoupon: this.selectCoupon == true ? 1 : 0 |
| | | }).then(e => { |
| | |
| | | var res = e.data; |
| | | uni.stopPullDownRefresh(); |
| | | var res = e.data.list; |
| | | console.log(res); |
| | | |
| | | if (res.length < 10) { |
| | | that.pageCurrent ++ |
| | | that.canloadmore = false |
| | |
| | | |
| | | .goods-items { |
| | | width: 336rpx; |
| | | height: 526rpx; |
| | | height: 546rpx; |
| | | margin-bottom: 20rpx; |
| | | |
| | | .items-container { |