Merge branch 'main' of http://49.235.147.88:3000/zhangkai/dyqc_hdapp
This commit is contained in:
commit
6711ff4abe
@ -18,7 +18,7 @@
|
|||||||
<view class="tab_all">
|
<view class="tab_all">
|
||||||
<scroll-view class="tabs" scroll-y="true" :style="{'height':scrollHeightbt}">
|
<scroll-view class="tabs" scroll-y="true" :style="{'height':scrollHeightbt}">
|
||||||
<view v-for="(tab, index) in list" :key="index"
|
<view v-for="(tab, index) in list" :key="index"
|
||||||
:class="['tab-item', { active: current === index }, { 'bottomBorder': (current-1) === index }]"
|
:class="['tab-item', { active: current === index }, { bottomBorder: (current-1) === index }]"
|
||||||
@click="handleClick(index, tab.id)">
|
@click="handleClick(index, tab.id)">
|
||||||
<span>{{ tab.name }}</span>
|
<span>{{ tab.name }}</span>
|
||||||
</view>
|
</view>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 热门活动 -->
|
<!-- 热门活动 -->
|
||||||
<view class="hot flex flex-column">
|
<scroll-view class="hot flex flex-column" scroll-y="true" @scrolltolower="onScrolltolower">
|
||||||
<view class="content flex align-items flex-column">
|
<view class="content flex align-items flex-column">
|
||||||
<view class="flex flex-column w-100 bbb" v-for="(item, index) in hotList" :key="index"
|
<view class="flex flex-column w-100 bbb" v-for="(item, index) in hotList" :key="index"
|
||||||
@click="detail(item.id)">
|
@click="detail(item.id)">
|
||||||
@ -107,7 +107,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore v-else style="margin-bottom: 60rpx;" :status="loadStatus" />
|
<u-loadmore v-else style="margin-bottom: 60rpx;" :status="loadStatus" />
|
||||||
</view>
|
</scroll-view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -199,6 +199,12 @@
|
|||||||
}, 2000)
|
}, 2000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onScrolltolower(){
|
||||||
|
if (this.hotList.length < this.count) {
|
||||||
|
this.page+=1;
|
||||||
|
this.getHotList();
|
||||||
|
}
|
||||||
|
},
|
||||||
onheight() {
|
onheight() {
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
success: res => {
|
success: res => {
|
||||||
|
@ -349,8 +349,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onScrolltolower(){
|
onScrolltolower(){
|
||||||
this.page+=1;
|
if (this.hotList.length < this.count) {
|
||||||
this.getHotList();
|
this.page+=1;
|
||||||
|
this.getHotList();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onS(){
|
onS(){
|
||||||
this.homrS=true;
|
this.homrS=true;
|
||||||
@ -719,13 +721,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
this.count = res.data.list.total
|
this.count = res.data.list.total;
|
||||||
|
this.hotList = [...this.hotList, ...res.data.list.data];
|
||||||
if (this.hotList.length >= res.data.list.total) {
|
if (this.hotList.length >= res.data.list.total) {
|
||||||
this.loadStatus = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
} else {
|
} else {
|
||||||
this.loadStatus = 'loading';
|
this.loadStatus = 'loading';
|
||||||
}
|
}
|
||||||
this.hotList = [...this.hotList, ...res.data.list.data];
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
@ -755,12 +757,13 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
this.count = res.data.count;
|
this.count = res.data.count;
|
||||||
|
this.hotList = [...this.hotList, ...res.data.list.data];
|
||||||
if (this.hotList.length >= res.data.count) {
|
if (this.hotList.length >= res.data.count) {
|
||||||
this.loadStatus = 'nomore';
|
this.loadStatus = 'nomore';
|
||||||
} else {
|
} else {
|
||||||
this.loadStatus = 'loading';
|
this.loadStatus = 'loading';
|
||||||
}
|
}
|
||||||
this.hotList = [...this.hotList, ...res.data.list.data];
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user