index.941cbb9b.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. import { C as s } from './index.b42087f4.js'
  2. import { P as l } from './index.cf4d47ea.js'
  3. import { d as i, b as o, c as t, a as n, bw as p } from './index.1d0cc84f.js'
  4. import { E as r, a as e } from './index2.07a0e1bf.js'
  5. import { E as d } from './index2.6b7eb987.js'
  6. import './index2.ba9e0a49.js'
  7. var x = i({
  8. name: 'MyFans',
  9. data() {
  10. return {
  11. pageInfo: { limit: 12, page: 1, total: 0, page_size: [12, 24, 48, 60] },
  12. list: [],
  13. loading: !1,
  14. dataShow: !1
  15. }
  16. },
  17. mounted() {
  18. this.getList()
  19. },
  20. methods: {
  21. async getList() {
  22. this.loading = !0
  23. try {
  24. const { data: a } = await o.post('/api-website/teacher/queryMyFans', {
  25. requestType: 'json',
  26. data: { page: this.pageInfo.page, rows: this.pageInfo.limit }
  27. })
  28. ;(this.list = a.rows || []),
  29. console.log(this.list),
  30. (this.pageInfo.total = a.total),
  31. a.total <= 0 && (this.dataShow = !0)
  32. } catch {}
  33. this.dataShow
  34. ? (this.loading = !1)
  35. : setTimeout(() => {
  36. this.loading = !1
  37. }, 200)
  38. }
  39. },
  40. render() {
  41. return t(
  42. 'div',
  43. { class: 'h-full bg-[#FAFAFA] rounded-md overflow-hidden' },
  44. [
  45. t(
  46. 'div',
  47. {
  48. class:
  49. 'text-sm text-[#333] bg-white leading-none px-6 py-5 border-b border-b-[#E5E5E5]'
  50. },
  51. [n('\u6211\u7684\u7C89\u4E1D')]
  52. ),
  53. t('div', { class: ' pt-4' }, [
  54. t(
  55. r,
  56. {
  57. loading: this.loading,
  58. animated: !0,
  59. class: ' w-full m-auto px-[14px] flex',
  60. count: 3
  61. },
  62. {
  63. default: () => [
  64. t('div', { class: 'flex flex-wrap px-3' }, [
  65. this.list.map(a =>
  66. t('div', { class: 'basis-1/3 ' }, [
  67. t(
  68. 'div',
  69. {
  70. class:
  71. 'w-[296px] rounded-md bg-white py-4 px-[14px] mb-4 m-auto flex items-center hover:drop-shadow-lg transition-all'
  72. },
  73. [
  74. t(
  75. p,
  76. { src: a.avatar, class: 'w-14 h-14 rounded-full' },
  77. null
  78. ),
  79. t('div', { class: 'pl-2.5' }, [
  80. t(
  81. 'p',
  82. {
  83. class:
  84. 'text-base text-[#333] font-semibold leading-tight pb-1.5'
  85. },
  86. [a.userName]
  87. ),
  88. t('p', null, [
  89. t(
  90. d,
  91. {
  92. effect: 'dark',
  93. size: 'small',
  94. color: '#FFF1DE',
  95. style: {
  96. borderColor: '#FFF1DE',
  97. color: '#FF8C00',
  98. marginRight: '5px'
  99. }
  100. },
  101. { default: () => [a.subjectName] }
  102. )
  103. ])
  104. ])
  105. ]
  106. )
  107. ])
  108. )
  109. ])
  110. ],
  111. template: () =>
  112. t(
  113. 'div',
  114. {
  115. class:
  116. 'w-[296px] rounded-md bg-white py-4 px-[14px] mb-4 m-auto flex items-center hover:drop-shadow-lg transition-all'
  117. },
  118. [
  119. t(
  120. e,
  121. {
  122. variant: 'circle',
  123. style: { width: '56px', height: '56px' }
  124. },
  125. null
  126. ),
  127. t('div', { class: 'flex w-32 flex-col pl-2.5' }, [
  128. t(e, { variant: 'h3' }, null),
  129. t(
  130. e,
  131. {
  132. variant: 'p',
  133. style: { width: '60%', marginTop: '6px' }
  134. },
  135. null
  136. )
  137. ])
  138. ]
  139. )
  140. }
  141. )
  142. ]),
  143. t(
  144. l,
  145. {
  146. total: this.pageInfo.total,
  147. page: this.pageInfo.page,
  148. 'onUpdate:page': a => (this.pageInfo.page = a),
  149. limit: this.pageInfo.limit,
  150. 'onUpdate:limit': a => (this.pageInfo.limit = a),
  151. pageSizes: this.pageInfo.page_size,
  152. pagination: this.getList
  153. },
  154. null
  155. ),
  156. this.dataShow && t(s, null, null)
  157. ]
  158. )
  159. }
  160. })
  161. export { x as default }