TeacherSection.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <view class="com-teacher-section" v-if="info!=null">
  3. <view class="header" @click="onViewTeacher">
  4. <image :src="info.headerImg" class="image"></image>
  5. </view>
  6. <view class="intro" @click="onViewTeacher">
  7. <view class="name">{{info.name}}</view>
  8. <view class="tips">{{info.tips}}</view>
  9. </view>
  10. <view class="yy">
  11. <view class="btn">
  12. <button class="btn-yy" @click="onViewReserve">预约</button>
  13. </view>
  14. <view class="text">
  15. 共有<text class="txt"> {{info.reqTotal}}</text>人预约
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. name:"TeacherSection",
  23. emits:['onViewTeacher','onViewReserve'],
  24. props:{
  25. info:{
  26. type:Object,
  27. default:()=>{
  28. return null
  29. }
  30. }
  31. },
  32. data() {
  33. return {
  34. };
  35. },
  36. methods:{
  37. onViewTeacher(e){
  38. this.$emit("onViewTeacher",this.info.id);
  39. },
  40. onViewReserve(e){
  41. this.$emit("onViewReserve",this.info.id);
  42. }
  43. }
  44. }
  45. </script>
  46. <style lang="scss">
  47. @import './TeacherSection.scss'
  48. </style>