index.a19350d3.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. import {
  2. d as g,
  3. b as m,
  4. a_ as l,
  5. c as t,
  6. F as d,
  7. O as f,
  8. b1 as h,
  9. a as c,
  10. aB as v,
  11. aC as o
  12. } from './index.1d0cc84f.js'
  13. import { C as p } from './index.b42087f4.js'
  14. import { P as y } from './index.cf4d47ea.js'
  15. import { I as x } from './index.37658c21.js'
  16. import { E as w, a as s } from './index2.07a0e1bf.js'
  17. import './index2.ba9e0a49.js'
  18. import './index2.6b7eb987.js'
  19. const E = '_liveClass_w1fih_1'
  20. var b = { liveClass: E },
  21. u = g({
  22. name: 'list',
  23. props: { groupStatus: { type: String, default: '' } },
  24. data() {
  25. return {
  26. pageInfo: { limit: 9, page: 1, total: 0, page_size: [9, 18, 36, 45] },
  27. list: [],
  28. loading: !1,
  29. dataShow: !1
  30. }
  31. },
  32. mounted() {
  33. this.getList()
  34. },
  35. methods: {
  36. async getList() {
  37. var e
  38. this.loading = !0
  39. try {
  40. const { data: a } = await m.post(
  41. '/api-website/courseGroup/queryPageCourseGroup',
  42. {
  43. data: {
  44. groupStatus: this.groupStatus,
  45. page: this.pageInfo.page,
  46. rows: this.pageInfo.limit,
  47. teacherId: (e = l.user.data) == null ? void 0 : e.userId
  48. }
  49. }
  50. )
  51. ;(this.list = a.rows || []),
  52. (this.pageInfo.total = a.total),
  53. a.total <= 0 && (this.dataShow = !0)
  54. } catch {}
  55. this.dataShow
  56. ? (this.loading = !1)
  57. : setTimeout(() => {
  58. this.loading = !1
  59. }, 200)
  60. }
  61. },
  62. render() {
  63. var e, a, i, r
  64. return t(d, null, [
  65. ((e = l.user.data) == null ? void 0 : e.entryFlag) &&
  66. ((a = l.user.data) == null ? void 0 : a.liveFlag)
  67. ? t(d, null, [
  68. t('div', { class: 'flex flex-wrap px-10' }, [
  69. t(
  70. w,
  71. {
  72. loading: this.loading,
  73. animated: !0,
  74. class: 'flex',
  75. count: 3
  76. },
  77. {
  78. default: () => [
  79. this.list.map(n =>
  80. t('div', { class: 'w-1/3 pt-8' }, [
  81. t(x, { item: n }, null)
  82. ])
  83. )
  84. ],
  85. template: () =>
  86. t('div', { class: 'w-1/3' }, [
  87. t(
  88. 'div',
  89. { class: 'flex flex-col pt-8 w-[262px] m-auto' },
  90. [
  91. t(
  92. s,
  93. {
  94. variant: 'image',
  95. style: { width: '100%', height: '175px' }
  96. },
  97. null
  98. ),
  99. t(
  100. 'div',
  101. {
  102. class:
  103. 'mx-2.5 py-3.5 border-b border-b-[#F2F2F2]'
  104. },
  105. [
  106. t(
  107. 'div',
  108. {
  109. class:
  110. 'text-lg leading-none font-semibold whitespace-nowrap overflow-hidden text-ellipsis'
  111. },
  112. [t(s, { variant: 'h3' }, null)]
  113. ),
  114. t(
  115. 'div',
  116. { class: 'text-sm text-[#999] pt-2.5' },
  117. [
  118. t(
  119. s,
  120. { variant: 'p', style: { width: '50%' } },
  121. null
  122. )
  123. ]
  124. )
  125. ]
  126. ),
  127. t(
  128. 'div',
  129. { class: 'mx-2.5 py-4 flex items-center' },
  130. [
  131. t(
  132. s,
  133. {
  134. variant: 'circle',
  135. style: {
  136. width: '22px',
  137. height: '22px',
  138. marginRight: '5px'
  139. }
  140. },
  141. null
  142. ),
  143. t(
  144. s,
  145. { variant: 'p', style: { width: '20%' } },
  146. null
  147. ),
  148. t('p', { style: { width: '45%' } }, null),
  149. t(
  150. s,
  151. { variant: 'p', style: { width: '20%' } },
  152. null
  153. )
  154. ]
  155. )
  156. ]
  157. )
  158. ])
  159. }
  160. )
  161. ]),
  162. t(
  163. y,
  164. {
  165. total: this.pageInfo.total,
  166. page: this.pageInfo.page,
  167. 'onUpdate:page': n => (this.pageInfo.page = n),
  168. limit: this.pageInfo.limit,
  169. 'onUpdate:limit': n => (this.pageInfo.limit = n),
  170. pageSizes: this.pageInfo.page_size,
  171. pagination: this.getList
  172. },
  173. null
  174. ),
  175. this.dataShow && t(p, null, null)
  176. ])
  177. : (i = l.user.data) != null && i.entryFlag
  178. ? !((r = l.user.data) != null && r.liveFlag) &&
  179. t(
  180. p,
  181. {
  182. type: 'live',
  183. message:
  184. '\u60A8\u5C1A\u672A\u5F00\u901A\u76F4\u64AD\u670D\u52A1\uFF0C\u5F00\u901A\u540E\u5373\u53EF\u521B\u5EFA\u76F4\u64AD\u8BFE\u7A0B~',
  185. buttonVisibility: !1,
  186. buttonText: '\u7ACB\u5373\u5F00\u901A',
  187. onDetail: () => {
  188. this.$router.push('/teacherAuth')
  189. }
  190. },
  191. null
  192. )
  193. : t(
  194. p,
  195. {
  196. type: 'teacherCert',
  197. message:
  198. '\u60A8\u8FD8\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u540E\u624D\u53EF\u521B\u5EFA\u89C6\u9891\u8BFE\u54E6~',
  199. buttonVisibility: !0,
  200. buttonText: '\u53BB\u8BA4\u8BC1',
  201. onDetail: () => {
  202. this.$router.push('/teacherAuth')
  203. }
  204. },
  205. null
  206. )
  207. ])
  208. }
  209. }),
  210. P = g({
  211. name: 'live-class',
  212. data() {
  213. return { activeName: 'ING' }
  214. },
  215. render() {
  216. return t('div', { class: [b.liveClass, 'relative'] }, [
  217. t(
  218. f,
  219. {
  220. round: !0,
  221. type: 'primary',
  222. class: 'absolute right-11 top-4 z-10',
  223. onClick: () => {
  224. var e, a, i, r
  225. if (
  226. ((e = l.user.data) == null ? void 0 : e.entryFlag) &&
  227. ((a = l.user.data) == null ? void 0 : a.liveFlag)
  228. )
  229. this.$router.push({
  230. path: '/userInfo/liveOperation',
  231. query: { type: 'create' }
  232. })
  233. else {
  234. if (!((i = l.user.data) != null && i.entryFlag)) {
  235. h.error(
  236. '\u60A8\u8FD8\u672A\u5B8C\u6210\u8FBE\u4EBA\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u540E\u624D\u53EF\u521B\u5EFA\u89C6\u9891\u8BFE'
  237. )
  238. return
  239. }
  240. if (!((r = l.user.data) != null && r.liveFlag)) {
  241. h.error(
  242. '\u60A8\u5C1A\u672A\u5F00\u901A\u76F4\u64AD\u670D\u52A1\uFF0C\u5F00\u901A\u540E\u5373\u53EF\u521B\u5EFA\u76F4\u64AD\u8BFE\u7A0B'
  243. )
  244. return
  245. }
  246. }
  247. }
  248. },
  249. { default: () => [c('\u65B0\u5EFA\u76F4\u64AD\u8BFE')] }
  250. ),
  251. t(
  252. v,
  253. {
  254. modelValue: this.activeName,
  255. 'onUpdate:modelValue': e => (this.activeName = e)
  256. },
  257. {
  258. default: () => [
  259. t(
  260. o,
  261. { label: '\u8FDB\u884C\u4E2D', name: 'ING' },
  262. {
  263. default: () => [
  264. this.activeName === 'ING' &&
  265. t(u, { groupStatus: 'ING' }, null)
  266. ]
  267. }
  268. ),
  269. t(
  270. o,
  271. { label: '\u672A\u4E0A\u67B6', name: 'NOT_SALE' },
  272. {
  273. default: () => [
  274. this.activeName === 'NOT_SALE' &&
  275. t(u, { groupStatus: 'NOT_SALE' }, null)
  276. ]
  277. }
  278. ),
  279. t(
  280. o,
  281. { label: '\u9500\u552E\u4E2D', name: 'APPLY' },
  282. {
  283. default: () => [
  284. this.activeName === 'APPLY' &&
  285. t(u, { groupStatus: 'APPLY' }, null)
  286. ]
  287. }
  288. ),
  289. t(
  290. o,
  291. { label: '\u5DF2\u5B8C\u6210', name: 'COMPLETE' },
  292. {
  293. default: () => [
  294. this.activeName === 'COMPLETE' &&
  295. t(u, { groupStatus: 'COMPLETE' }, null)
  296. ]
  297. }
  298. ),
  299. t(
  300. o,
  301. { label: '\u5DF2\u53D6\u6D88', name: 'CANCEL' },
  302. {
  303. default: () => [
  304. this.activeName === 'CANCEL' &&
  305. t(u, { groupStatus: 'CANCEL' }, null)
  306. ]
  307. }
  308. )
  309. ]
  310. }
  311. )
  312. ])
  313. }
  314. })
  315. export { P as default }