|
...
|
...
|
@@ -4,39 +4,115 @@ |
|
|
|
<image class="rateMe-1-bg" src="@/static/imagesV2/icon67.png" mode="widthFix"></image>
|
|
|
|
<view class="rateMe-1-c">
|
|
|
|
<view class="rateMe-1-c-i">
|
|
|
|
<view class="rateMe-1-c-i-1">6.6</view>
|
|
|
|
<view class="rateMe-1-c-i-1">{{userDatas.score || 0}}</view>
|
|
|
|
<view class="rateMe-1-c-i-2">总评分(分)</view>
|
|
|
|
</view>
|
|
|
|
<view class="rateMe-1-c-i">
|
|
|
|
<view class="rateMe-1-c-i-1">13</view>
|
|
|
|
<view class="rateMe-1-c-i-1">{{userDatas.content_num || 0}}</view>
|
|
|
|
<view class="rateMe-1-c-i-2">评价人数(人)</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="rateMe-2">
|
|
|
|
<view class="rateMe-2" v-for="d in list" :key="d.id">
|
|
|
|
<view class="rateMe-2-1">
|
|
|
|
<view class="rateMe-2-1-l">评分</view>
|
|
|
|
<view class="rateMe-2-1-c">
|
|
|
|
<u-rate :count="10" v-model="value"></u-rate>
|
|
|
|
<u-rate :count="10" :value="d.star"></u-rate>
|
|
|
|
</view>
|
|
|
|
<view class="rateMe-2-1-r">一般</view>
|
|
|
|
<view class="rateMe-2-1-r">{{d.star>7?'优秀':d.star>5?'良好':'一般'}}</view>
|
|
|
|
</view>
|
|
|
|
<view class="rateMe-2-2">
|
|
|
|
<text style="color: #979797;">其它评价及建议:</text>
|
|
|
|
<text>张东老师教学水平高,桃李满天 下,学识渊博,深受学生敬仰。</text>
|
|
|
|
<text>{{d.content}}</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<u-loadmore :status="status" v-if="!notData"/>
|
|
|
|
<u-empty
|
|
|
|
v-if="notData"
|
|
|
|
mode="data"
|
|
|
|
text="暂无数据"
|
|
|
|
icon="/static/imagesV2/icon24.png"
|
|
|
|
>
|
|
|
|
</u-empty>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import {
|
|
|
|
mapState
|
|
|
|
} from 'vuex'
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
value: 10
|
|
|
|
page: 1,
|
|
|
|
list: [],
|
|
|
|
// 加载前值为loadmore,加载中为loading,没有数据为nomore
|
|
|
|
status: 'loadmore'
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState(['userDatas']),
|
|
|
|
notData() {
|
|
|
|
return this.status === 'nomore' && !this.list.length
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
this.onRetry()
|
|
|
|
},
|
|
|
|
onReachBottom() {
|
|
|
|
that.getData()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onRetry(){
|
|
|
|
this.page=1
|
|
|
|
this.list = []
|
|
|
|
this.getData()
|
|
|
|
},
|
|
|
|
getData() {
|
|
|
|
if(this.status === 'loading') return;
|
|
|
|
this.status = 'loading';
|
|
|
|
uni.showLoading({
|
|
|
|
title: '加载中',
|
|
|
|
mask: true
|
|
|
|
})
|
|
|
|
this.$service.P_get('/lecturer/content', {
|
|
|
|
page: this.page
|
|
|
|
}).then(res => {
|
|
|
|
uni.hideLoading();
|
|
|
|
if (res.code == 1) {
|
|
|
|
this.page++;
|
|
|
|
this.list = [
|
|
|
|
...this.list,
|
|
|
|
...res.data.data
|
|
|
|
];
|
|
|
|
this.status = res.data.data.length < res.data.per_page ? 'nomore' : 'loadmore'
|
|
|
|
}else {
|
|
|
|
this.status = 'loadmore';
|
|
|
|
if (res.msg) {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: res.msg
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '获取数据失败'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}).catch(e => {
|
|
|
|
this.status = 'loadmore';
|
|
|
|
uni.hideLoading()
|
|
|
|
uni.showToast({
|
|
|
|
icon: 'none',
|
|
|
|
title: '获取数据失败,请检查您的网络连接'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -98,6 +174,7 @@ |
|
|
|
}
|
|
|
|
.rateMe-2-1-c{
|
|
|
|
margin: 0 40rpx;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
.rateMe-2-1-r{
|
|
|
|
font-size: 24rpx;
|
...
|
...
|
|