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.
|
|
<template> <view class="tabCon"> <view class="tab1"> <view class="card" @click="goPage(item)" v-for="(item,index) in coachList" :key="index"> <view class="avatar"> <image :src="item.photoPath" mode="" @error="handleImageError(item)"></image> </view> <view class="rightCon"> <view class="flex"> <view class="name">{{ item.name }}</view> <!-- <view class="age">10年教龄</view> --> </view> <view class="flex-b"> <view class="starBox"> <u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" disabled style="pointer-events: none;"></u-rate> <view class="num">{{item.stars}}分</view> </view> <view class="btn" v-if="showSign">报名</view> <view class="more" v-else> <view class="moreText">查看详情</view> <u-icon name="arrow-right"></u-icon> </view> </view> </view> </view> </view> <view style="padding-bottom: 20rpx;"> <u-loadmore :status="status" /> </view> </view> </template>
<script> export default { props: ['showSign', 'coachList', 'status'], methods: { goPage(item) { if(this.showSign) { }else { this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?coachId='+ item.id) } }, handleImageError(item) { item.photoPath = require('@/static/images/index/avatar.png') } } } </script>
<style lang="scss" scoped> .tabCon { width: 100%; .tab1 { width: 100%; .card { width: 100%; display: flex; align-items: center; padding: 36rpx; margin-top: 20rpx; .avatar { width: 100rpx; height: 98rpx; border-radius: 50%; margin-right: 34rpx; background-color: #f6f6f6; } .rightCon { flex: 1; width: 0; .flex { .name { font-size: 32rpx; color: #333; font-weight: 500; } .age { width: 142rpx; height: 40rpx; background: #E8F3FE; border-radius: 4rpx; color: $themC; text-align: center; line-height: 40rpx; margin-left: 24rpx; font-size: 24rpx; } } .flex-b { margin-top: 14rpx; .more { display: flex; align-items: center; .moreText { font-size: 24rpx; color: #686B73; margin-right: 10rpx; } } } } } } } .btn { width: 130rpx; height: 60rpx; background: #1989FA; border-radius: 8rpx; color: #fff; text-align: center; line-height: 60rpx; font-size: 28rpx; } </style>
|