75 lines
2.4 KiB
Vue
75 lines
2.4 KiB
Vue
<template>
|
|
<div class="tktjClass">
|
|
<a-row>
|
|
<a-col :span="24"><strong style="font-size: 16px;margin-left: 20px;">最新动态</strong></a-col>
|
|
<a-col :span="24"><p style="width:100%;height:1px;margin:0px auto;padding:0px;background-color:#D5D5D5;overflow:hidden;margin-top: 5px;"></p></a-col>
|
|
<a-col :span="24" style="text-align: center;" v-show="listData.length==0"><strong style="font-size: 16px;margin-left: 20px;margin-top: 10px;">暂无数据</strong></a-col>
|
|
<a-col :span="24" v-show="listData.length>0">
|
|
<div style="height: 330px;overflow-y: auto;">
|
|
<div style="font-size: 16px;margin-left: 20px;margin-top: 10px;" v-for="(item,index) in listData">
|
|
<div v-if="item.type == '1'">
|
|
{{item.username}},听{{item.kkdw}}的课程。
|
|
</div>
|
|
<div v-else-if="item.type == '2'">
|
|
{{item.username}}对{{item.kkdw}} 主讲《{{item.kcmc}}》提交了错误报告。
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="text-align: center;margin-top: 10px;" v-show="pageNo>0">
|
|
<a @click="funMore">更多</a>
|
|
</div>
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" name="kcTingke-zxdt" setup>
|
|
import { ref, reactive, onMounted } from 'vue';
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
enum Api {
|
|
list = '/kcTingke/kcTingke/getHtindexTkmxlist',
|
|
}
|
|
|
|
const list = (params) => defHttp.get({ url: Api.list, params });
|
|
|
|
const queryParam = ref<any>({});
|
|
let listData = ref<any>([]);
|
|
let lslist = ref<any>([]);
|
|
let pageKs = ref<any>(0);
|
|
let pageJs = ref<any>(5);
|
|
let pageNo = ref<any>(1);
|
|
//进入就加载
|
|
onMounted(() => {
|
|
queryParam.value.skrq = '2023-02-19'
|
|
queryParam.value.pageKs = pageKs.value
|
|
queryParam.value.pageJs = pageJs.value
|
|
loadData()
|
|
});
|
|
function funMore(){
|
|
let djy = pageNo.value
|
|
queryParam.value.pageKs = djy*5
|
|
queryParam.value.pageJs = pageJs.value
|
|
console.log(`🚀 ~ file: zxdt.vue:55 ~ funMore ~ queryParam:`, queryParam)
|
|
loadData()
|
|
}
|
|
function loadData(){
|
|
list(queryParam.value).then(res => {
|
|
lslist = res
|
|
console.log(`🚀 ~ file: zxdt.vue:31 ~ list ~ lslist:`, lslist)
|
|
if(lslist.length==5){
|
|
pageNo.value++;
|
|
} else{
|
|
pageNo.value = 0;
|
|
}
|
|
listData.value.push(...lslist)
|
|
console.log(`🚀 ~ file: zxdt.vue:43 ~ list ~ listData:`, listData)
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
</style>
|