TeacherCourse.vue 930 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="com-teacher-course" v-if="info">
  3. <view class="header">
  4. <image :src="info.imgUrl" class="img"></image>
  5. </view>
  6. <view class="intro">
  7. <view class="name">{{info.name}}</view>
  8. <view class="tips">
  9. 体验
  10. <text class="sign">¥</text>
  11. <text class="price">{{info.singlePrice}}</text>/课时
  12. </view>
  13. </view>
  14. <view class="btns">
  15. <button class="btn" @click="onViewCourse(info.id)">预约</button>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. name:"TeacherCourse",
  22. emits:['onViewReserve'],
  23. props:{
  24. info:{
  25. type:Object,
  26. default:()=>{
  27. return null;
  28. }
  29. }
  30. },
  31. data() {
  32. return {
  33. };
  34. },
  35. methods:{
  36. onViewCourse(id){
  37. this.$emit("onViewReserve",id);
  38. // uni.navigateTo({
  39. // url:'/pages/fitness/Course/Course?id='+id,
  40. // })
  41. },
  42. },
  43. }
  44. </script>
  45. <style lang="scss">
  46. @import "./TeacherCourse.scss";
  47. </style>