Merge branch 'master' of http://git.luyuan.tk/luyuan/beelink into xbx

This commit is contained in:
2020-10-16 19:35:29 +08:00
6 changed files with 129 additions and 71 deletions

View File

@@ -54,7 +54,7 @@
</div>
</div>
<div class="pages">
<a-pagination v-model:current="page" :total="teacherlikedlist.total" :showLessItems="true" />
<a-pagination v-model:current="page" :total="teacherlikedlist.total" :showLessItems="true" @change="pagechange"/>
</div>
</div>
</template>
@@ -162,7 +162,7 @@
</style>
<script lang="ts">
import { getteacherliked } from '@/api';
import { defineComponent, onMounted, ref } from "vue";
import { defineComponent, onMounted, ref, toRaw } from "vue";
export default defineComponent({
name: "Subscriber",
components: {},
@@ -181,6 +181,9 @@ export default defineComponent({
async function search(e:any){
teacherlikedlist.value=await getteacherliked(e)
}
async function pagechange(){
teacherlikedlist.value=await getteacherliked(toRaw(condition.value))
}
return {
page,

View File

@@ -17,12 +17,12 @@
</div>
<div class="sel">
<img src="@/static/images/sousuo.png" alt="" class="icon" />
<input type="text" />
<input type="text" placeholder="请输入想要搜索的直播标题" @keyup.enter="sel()" v-model="input"/>
</div>
</div>
<div class="list" v-if="tabindex == 4">
<VideoItem
v-for="(i, j) in videolist"
v-for="(i, j) in videolist.data"
:key="j"
:videoid="i.videoid"
:img="i.img"
@@ -39,7 +39,7 @@
<div class="list" v-if="tabindex == 0">
<VideoItem
v-for="(i, j) in videolist"
v-for="(i, j) in videolist.data"
:key="j"
:img="i.img"
:title="i.title"
@@ -54,7 +54,7 @@
</div>
<div class="list" v-if="tabindex == 1">
<VideoItem
v-for="(i, j) in videolist"
v-for="(i, j) in videolist.data"
:key="j"
:img="i.img"
:title="i.title"
@@ -69,7 +69,7 @@
</div>
<div class="list" v-if="tabindex == 2">
<VideoItem
v-for="(i, j) in videolist"
v-for="(i, j) in videolist.data"
:key="j"
:img="i.img"
:title="i.title"
@@ -83,7 +83,7 @@
></VideoItem>
</div>
<div class="pages">
<a-pagination v-model:current="page" :total="500" :showLessItems="true" />
<a-pagination v-model:current="page" :total="50" :showLessItems="true" @change="pagechange" />
</div>
</div>
</template>
@@ -215,9 +215,9 @@ export default defineComponent({
statusname: string;
}
const videolist = ref<Array<VideoList>>();
const videolist = ref({})
// const newvideolist = ref<Array<VideoList>>();
const input = ref("")
onMounted(async () => {
@@ -230,11 +230,21 @@ export default defineComponent({
tabindex.value = e;
// console.log(videolist)
}
async function sel(){
console.log(input.value);
videolist.value = await getvideolist({title: input.value,page:page.value});
}
async function pagechange() {
videolist.value = await getvideolist({title: input.value,page:page.value});
}
return {
page,
tabindex,
tabchange,
videolist
videolist,
sel,
input,
pagechange
};
},
});