index.tsx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { Cell, CellGroup, Image } from 'vant'
  2. import { defineComponent } from 'vue'
  3. import styles from './index.module.less'
  4. import { orderStatus } from '../orderStatus'
  5. import iconTeacher from '@common/images/icon_teacher.png'
  6. import request from '@/helpers/request'
  7. import { moneyFormat } from '@/helpers/utils'
  8. export default defineComponent({
  9. name: 'OrderVideo',
  10. props: {
  11. item: {
  12. type: Object,
  13. default: {}
  14. }
  15. },
  16. render() {
  17. const item = this.item
  18. return (
  19. <div class={styles.videoOrder}>
  20. <CellGroup border={false}>
  21. <Cell
  22. center
  23. v-slots={{
  24. title: () => (
  25. <div class={[styles.title, 'van-ellipsis']}>
  26. <span class={styles.tag}>视频课</span>
  27. {item.courseGroupName}
  28. </div>
  29. )
  30. }}
  31. />
  32. <Cell
  33. center
  34. title={item.teacherName}
  35. titleClass={styles.teacher}
  36. v-slots={{
  37. icon: () => (
  38. <Image
  39. class={styles.userLogo}
  40. src={item.avatar || iconTeacher}
  41. />
  42. ),
  43. default: () => (
  44. <span class={styles.price}>
  45. <i>¥</i>
  46. {moneyFormat(item.coursePrice)}
  47. </span>
  48. )
  49. }}
  50. />
  51. </CellGroup>
  52. </div>
  53. )
  54. }
  55. })