学员端小程序
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.
 
 
 

47 lines
876 B

<template>
<view class="pageBgImg ">
<topNavbar title="我的评价"></topNavbar>
<view class="pad">
<view class="card" v-for="(item,index) in list" :key="index">
<commentItem :item="item"/>
</view>
</view>
</view>
</template>
<script>
import { getUsersCommentById } from '@/config/api.js'
export default {
data() {
return {
params: {
userId: '', pageNo: 1,pageSize: 20
},
total: 20,
list: []
}
},
onLoad() {
this.getUsersCommentByIdFn()
this.params.userId = this.userId
},
methods: {
async getUsersCommentByIdFn() {
const {data: res} = await getUsersCommentById(this.params)
this.params.pageNo ++
this.list.push(...res.list)
this.total = res.total
}
}
}
</script>
<style lang="scss" scoped>
.card {
width: 100%;
padding: 24rpx 28rpx;
margin-bottom: 20rpx;
}
</style>