Browse Source

学员评分修改

master
unknown 12 months ago
parent
commit
39eb7d1b04
  1. 4
      components/commentItem/commentItem.vue
  2. 15
      pages/login/login.vue
  3. 16
      pages/tabbar/examSimulation/comp/studentComment.vue
  4. 10
      pages/tabbar/examSimulation/index.vue

4
components/commentItem/commentItem.vue

@ -7,8 +7,8 @@
<view class="date">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd')}}</view> <view class="date">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd')}}</view>
</view> </view>
<view class="starBox"> <view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" :readonly="true"></u-rate>
<view class="num">{{item.stars}}</view>
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" :readonly="true" allowHalf></u-rate>
<view class="num">{{ item.stars?item.stars.toFixed(1):0 }}</view>
</view> </view>
<view class="text">{{item.description}}</view> <view class="text">{{item.description}}</view>
<!-- <view class="imgBox"> <!-- <view class="imgBox">

15
pages/login/login.vue

@ -9,8 +9,8 @@
<image :src="imgUrl" mode=""></image> <image :src="imgUrl" mode=""></image>
</view> </view>
<view class="form"> <view class="form">
<view class="form-item">
<mySelect :value="FormData.tenantName" @click.native="show=true" placeholder="请选择服务地区"/>
<view class="form-item" @click.native="tenantClick">
<mySelect :value="FormData.tenantName" placeholder="请选择服务地区"/>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="inputBox my"> <view class="inputBox my">
@ -33,7 +33,7 @@
</view> </view>
</view> --> </view> -->
</view> </view>
<u-picker :show="show" :columns="columnsArea" keyName="name" @confirm="confirmArea" @cancel="show=false"></u-picker>
<u-picker :show="show" :columns="columnsArea" keyName="name" @confirm="confirmArea" @cancel="show=false" @close="show=false"></u-picker>
<u-action-sheet :actions="list" :title="title" :show="showRole" @select="selectClick" ></u-action-sheet> <u-action-sheet :actions="list" :title="title" :show="showRole" @select="selectClick" ></u-action-sheet>
</view> </view>
</template> </template>
@ -65,6 +65,9 @@
this.tenantPageFn() this.tenantPageFn()
this.roleObj = this.$store.state.user.vuex_role this.roleObj = this.$store.state.user.vuex_role
}, },
onPullDownRefresh() {
this.tenantPageFn()
},
computed: { computed: {
btnHighlight() { btnHighlight() {
@ -73,6 +76,10 @@
} }
}, },
methods: { methods: {
tenantClick() {
if(!this.columnsArea.length) return this.$u.toast('没有获得服务地区,请下拉刷新重新加载')
this.show = true
},
selectClick(item) { selectClick(item) {
this.showRole = false this.showRole = false
this.chooseIdentity(item.name) this.chooseIdentity(item.name)
@ -103,7 +110,7 @@
status: 0 status: 0
} }
const {data: res} = await tenantPage(obj) const {data: res} = await tenantPage(obj)
this.columnsArea.push(res.list)
this.columnsArea = [res.list]
console.log(res) console.log(res)
}, },
// //

16
pages/tabbar/examSimulation/comp/studentComment.vue

@ -13,12 +13,12 @@
<view class="tab">有视频6</view> <view class="tab">有视频6</view>
</view> </view>
<view class="list" v-if="list.length"> <view class="list" v-if="list.length">
<view class="card" v-for="(item,index) in index" :key="index">
<view class="card" v-for="(item,index) in list" :key="index">
<commentItem :item="item"/> <commentItem :item="item"/>
</view> </view>
</view> </view>
<view style="padding-bottom: 20rpx;" v-if="list.length">
<view style="padding-bottom: 20rpx;" v-if="list.length>5">
<u-loadmore :status="status" /> <u-loadmore :status="status" />
</view> </view>
<nodata v-if="!list.length&&status=='nomore'"></nodata> <nodata v-if="!list.length&&status=='nomore'"></nodata>
@ -58,12 +58,13 @@
this.coachCommentPageFn() this.coachCommentPageFn()
}, },
onReachBottom() {
if(this.total>this.list.length) {
this.coachCommentPageFn()
}
},
methods: { methods: {
loadMore() {
if(this.total>this.list.length) {
this.coachCommentPageFn()
}
},
searchFn(val) { searchFn(val) {
this.params.studentName = val this.params.studentName = val
this.initList() this.initList()
@ -109,6 +110,7 @@
.card { .card {
padding: 28rpx; padding: 28rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.tabs { .tabs {
display: flex; display: flex;

10
pages/tabbar/examSimulation/index.vue

@ -5,7 +5,7 @@
<!-- 预约记录 --> <!-- 预约记录 -->
<simulation v-if="identity=='考场模拟教练'"/> <simulation v-if="identity=='考场模拟教练'"/>
<!-- 学员评价 --> <!-- 学员评价 -->
<studentComment v-if="identity=='模拟器老师'"/>
<studentComment v-if="identity=='模拟器老师'" ref="studentCommentRef"/>
</view> </view>
</template> </template>
@ -23,6 +23,14 @@
onShow() { onShow() {
uni.hideTabBar(); uni.hideTabBar();
}, },
onPullDownRefresh() {
this.$refs.studentCommentRef.initList()
},
onReachBottom() {
if(identity=='模拟器老师') {
this.$refs.studentCommentRef.loadMore()
}
},
} }
</script> </script>

Loading…
Cancel
Save