新增意见反馈、帮助中心
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||
|
||||
import { selectByUserId } from '@/api/me/me.js';
|
||||
|
||||
@@ -36,6 +36,10 @@ const typeList = ref([
|
||||
type: 1,
|
||||
label: '我的追剧'
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
label: '我的喜欢'
|
||||
},
|
||||
{
|
||||
type: 3,
|
||||
label: '最近观看'
|
||||
@@ -57,15 +61,29 @@ async function selectByUserIdAjax() {
|
||||
limit: listData.size,
|
||||
classify: type.value
|
||||
});
|
||||
listData.list = res.records;
|
||||
if (listData.page == 1) {
|
||||
listData.list = res.records;
|
||||
} else {
|
||||
listData.list.push(...res.records);
|
||||
}
|
||||
if (res.currPage >= res.totalPage) {
|
||||
listData.status = 'nomore';
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
// 监听下拉结束
|
||||
onPullDownRefresh(() => {
|
||||
listData.page = 1;
|
||||
listData.status = 'loading';
|
||||
selectByUserIdAjax();
|
||||
});
|
||||
|
||||
onReachBottom(() => {
|
||||
listData.page++;
|
||||
selectByUserIdAjax();
|
||||
|
||||
Reference in New Issue
Block a user