弹窗
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<scroll-view scroll-y="true" class="scroll">
|
||||
<scroll-view scroll-y="true" class="scroll" lower-threshold="100" @scrolltolower="onScrollToLower" >
|
||||
<uni-card class="content-list" v-for="(item, index) in list">
|
||||
<!-- `````````````````````````` -->
|
||||
<image class="headShot" src="../../static/logo.png" mode="scaleToFill" />
|
||||
@@ -23,11 +23,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from "../../components/request.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: "Hello",
|
||||
Gender: true,
|
||||
page: 0,
|
||||
// 列表数据
|
||||
list: [
|
||||
{
|
||||
@@ -36,112 +38,45 @@ export default {
|
||||
gender: "男",
|
||||
score: 8.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界2",
|
||||
id: "9089",
|
||||
gender: "女",
|
||||
score: 7.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
{
|
||||
title: "极乐世界3",
|
||||
id: "9090",
|
||||
gender: "男",
|
||||
score: 9.8,
|
||||
},
|
||||
],
|
||||
// 列表数据结束
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
// 页面加载时执行
|
||||
mounted() {
|
||||
// 页面加载完成后请求数据
|
||||
this.pkList()
|
||||
},
|
||||
methods: {
|
||||
// 方法定义
|
||||
async pkList(){
|
||||
const res = await request({
|
||||
url: "pk/pkList",
|
||||
method: "GET",
|
||||
data: {
|
||||
status: 0,
|
||||
page: this.page,
|
||||
Size: 10,
|
||||
},
|
||||
userInfo: false,
|
||||
});
|
||||
console.log(res);
|
||||
if (res.code === 200) {
|
||||
this.list.concat(res.data)
|
||||
console.log(this.list)
|
||||
}
|
||||
},
|
||||
onScrollToLower() {
|
||||
this.page++;
|
||||
this.pkList();
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.scroll {
|
||||
height: 100%;
|
||||
height: 90%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user