学员端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
719 B

<template>
<view class="main">
<comments :list="list"></comments>
</view>
</template>
<script>
import comments from '../comments/comments.vue'
import { getSchoolListComment } from '@/config/api.js'
export default {
components: { comments },
data() {
return {
params: {
pageNo: 1,
pageSize: 20,
schoolId: '',
},
total: 20,
list: []
}
},
onLoad(options) {
this.params.schoolId = options.id
this.getSchoolListCommentFn()
},
methods: {
async getSchoolListCommentFn() {
const {data: res} = await getSchoolListComment(this.params)
this.params.pageNo ++
this.list.push(...res.list)
this.total = res.total
}
}
}
</script>
<style>
</style>