AbroadEvaluate.vue
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<template>
<div class="abroad_evaluate">
<div class="rate" @click="handleEvaluate">
<div>
<van-rate v-model="evaluationData.evaluationScore" color="#FFCC00" :size="16" readonly />
<span>{{ evaluationData.evaluationScore }}</span>
</div>
<span
>共{{ evaluationData.evaluationCount }}个客户评价
<van-icon name="arrow" />
</span>
</div>
</div>
</template>
<script>
export default {
props: ['courseId'],
data() {
return {
evaluationData: '', //评价
}
},
mounted() {
this.getEvaluationSummary()
},
methods: {
// 获取评价
getEvaluationSummary() {
this.yxAxios.get(`${this.yanxueUrl}/api/StudiesWap/Evaluation/Summary?courseId=${this.courseId}`).then((res) => {
if (res.data.data) {
this.evaluationData = res.data.data
}
})
},
// 点击评价进入评价详情页
handleEvaluate() {
this.$router.push({ name: 'ServiceAbroadEvaluate', query: { courseId: this.courseId } })
},
},
}
</script>