index.tsx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import sutdentDownLoad from '@/common/images/student_download.png'
  2. import teacherDownLoad from '@/common/images/teacher_download.png'
  3. import { getUserType } from '@/helpers/utils'
  4. import { ElDialog } from 'element-plus'
  5. import { defineComponent } from 'vue'
  6. export const getAssetsHomeFile = (fileName: string) => {
  7. const path = `../../images/${fileName}`
  8. const modules = import.meta.globEager('../../images/*')
  9. return modules[path].default
  10. }
  11. export default defineComponent({
  12. name: 'open-member',
  13. render() {
  14. console.log(getUserType())
  15. return (
  16. <div>
  17. <img
  18. src={getAssetsHomeFile('icon_king.png')}
  19. class="w-[318px] absolute -top-10 left-1/2 -ml-[158px]"
  20. />
  21. <div class="text-center text-2xl font-semibold text-[#333] pt-[70px] pb-9">
  22. 手机扫码开通{getUserType() === 'STUDENT' ? '酷乐秀' : '酷乐秀学院'}
  23. 会员
  24. </div>
  25. {getUserType() === 'TEACHER' ? (
  26. <img
  27. src={teacherDownLoad}
  28. class="mx-auto w-[216px] h-[216px] align-middle border-4 border-solid border-[#2DC7AA] rounded-[10px]"
  29. />
  30. ) : (
  31. <img
  32. src={sutdentDownLoad}
  33. class="mx-auto w-[216px] h-[216px] align-middle border-4 border-solid border-[#2DC7AA] rounded-[10px]"
  34. />
  35. )}
  36. <p class="text-lg text-center text-[#333] pt-8">
  37. 打开{getUserType() === 'STUDENT' ? '酷乐秀' : '酷乐秀学院'}
  38. App,扫一扫开通会员
  39. </p>
  40. </div>
  41. )
  42. }
  43. })