index-legacy.46cc4b16.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514
  1. ;(function () {
  2. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  3. try {
  4. var info = gen[key](arg)
  5. var value = info.value
  6. } catch (error) {
  7. reject(error)
  8. return
  9. }
  10. if (info.done) {
  11. resolve(value)
  12. } else {
  13. Promise.resolve(value).then(_next, _throw)
  14. }
  15. }
  16. function _asyncToGenerator(fn) {
  17. return function () {
  18. var self = this,
  19. args = arguments
  20. return new Promise(function (resolve, reject) {
  21. var gen = fn.apply(self, args)
  22. function _next(value) {
  23. asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value)
  24. }
  25. function _throw(err) {
  26. asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err)
  27. }
  28. _next(undefined)
  29. })
  30. }
  31. }
  32. var __vite_style__ = document.createElement('style')
  33. __vite_style__.innerHTML =
  34. '._open-live_asp60_1{overflow:hidden;background:url(./assets/header_bg.f52d26aa.png) top center no-repeat;background-size:100%}._open-live_asp60_1 ._header-content_asp60_6{padding:0 1.81333rem .53333rem}._open-live_asp60_1 ._header-content_asp60_6 .van-button--disabled{opacity:1}._openBtn_asp60_12{background:url(./assets/btn.5419a9de.png) no-repeat center;background-size:cover}._open-teacher-info_asp60_16{margin:.8rem .37333rem 0;width:auto;background-color:transparent!important;padding:0!important}._open-teacher-info_asp60_16 ._userLogo_asp60_22{width:1.49333rem;height:1.49333rem;border-radius:50%;overflow:hidden}._open-teacher-info_asp60_16 .van-cell__value{display:flex;align-items:center;justify-content:space-between}._teacher-info_asp60_33{display:flex;align-items:flex-start;justify-content:center;flex-direction:column;padding-left:.21333rem}._teacher-info_asp60_33 ._teacher-name_asp60_40{display:flex;align-items:center;font-weight:500;color:#1a1a1a;line-height:1.2;font-size:.53333rem;padding-top:.13333rem;padding-bottom:.13333rem}._teacher-info_asp60_33 ._level_asp60_50{line-height:1.2}._cert_asp60_53{margin-left:.13333rem;height:.64rem}._cert_asp60_53 .van-image__img{width:auto!important}._teacher-desc_asp60_60{display:flex;padding:.58667rem .37333rem}._teacher-desc_asp60_60 ._teacherItem_asp60_64{padding-right:.21333rem;margin-right:.21333rem;text-align:center;min-width:1.54667rem;display:flex;align-items:center}._teacher-desc_asp60_60 ._teacherItem_asp60_64:first-child{border-right:.02667rem solid #d3d3d3}._teacher-desc_asp60_60 ._teacherItem_asp60_64 ._title_asp60_75{font-size:.45333rem;font-weight:500;color:#000;line-height:1}._teacher-desc_asp60_60 ._teacherItem_asp60_64 ._content_asp60_81{font-size:.37333rem;font-weight:400;color:#333;line-height:1;padding-right:.13333rem}._open-tips_asp60_88{margin:0 .37333rem .32rem;padding:0 .26667rem;display:flex;align-items:center;background:#ffffff;border-radius:.26667rem;font-size:.34667rem;color:#ff9e5a;line-height:.58667rem;height:.96rem}._open-tips_asp60_88 p{padding-left:.13333rem}._open-content_asp60_103{border-radius:.26667rem;margin:0 .37333rem 1.06667rem;background-color:#fff;padding:.32rem;position:relative}._open-content_asp60_103 h2{font-size:.42667rem;padding:.21333rem 0;font-weight:600;color:#333;line-height:1.5}._open-content_asp60_103 ._cert-text_asp60_117{font-size:.34667rem;line-height:1.3;padding-bottom:.32rem;color:#999}._open-content_asp60_103 ._cert-img_asp60_123{border-radius:.13333rem;overflow:hidden;line-height:0;margin-bottom:.21333rem}\n'
  35. document.head.appendChild(__vite_style__)
  36. System.register(
  37. [
  38. './vendor-legacy.09f20d09.js',
  39. './index-legacy.f25f109a.js',
  40. './index-legacy.f25f109a2.js',
  41. './index-legacy.f25f109a9.js',
  42. './index-legacy.f25f109a3.js',
  43. './index-legacy.fa4145a4.js',
  44. './index-legacy.595c24c3.js',
  45. './icon_teacher-legacy.e765b7f7.js',
  46. './index-legacy.f25f109a8.js'
  47. ],
  48. function (exports) {
  49. 'use strict'
  50. var defineComponent,
  51. Dialog,
  52. Toast,
  53. createVNode,
  54. Fragment,
  55. Cell,
  56. Rate,
  57. createTextVNode,
  58. Image,
  59. Icon,
  60. Sticky,
  61. Button,
  62. ColHeader,
  63. state,
  64. request,
  65. postMessage,
  66. ColResult,
  67. IconAvator
  68. return {
  69. setters: [
  70. function (module) {
  71. defineComponent = module.d
  72. Dialog = module.D
  73. Toast = module.T
  74. createVNode = module.a
  75. Fragment = module.F
  76. Cell = module.C
  77. Rate = module.J
  78. createTextVNode = module.j
  79. Image = module.I
  80. Icon = module.K
  81. Sticky = module.S
  82. Button = module.B
  83. },
  84. function () {},
  85. function () {},
  86. function () {},
  87. function () {},
  88. function (module) {
  89. ColHeader = module.C
  90. },
  91. function (module) {
  92. state = module.s
  93. request = module.r
  94. postMessage = module.p
  95. ColResult = module.C
  96. },
  97. function (module) {
  98. IconAvator = module.I
  99. },
  100. function () {}
  101. ],
  102. execute: function execute() {
  103. var openBtn = '_openBtn_asp60_12'
  104. var userLogo = '_userLogo_asp60_22'
  105. var level = '_level_asp60_50'
  106. var cert = '_cert_asp60_53'
  107. var teacherItem = '_teacherItem_asp60_64'
  108. var title = '_title_asp60_75'
  109. var content = '_content_asp60_81'
  110. var styles = {
  111. 'open-live': '_open-live_asp60_1',
  112. 'header-content': '_header-content_asp60_6',
  113. openBtn: openBtn,
  114. 'open-teacher-info': '_open-teacher-info_asp60_16',
  115. userLogo: userLogo,
  116. 'teacher-info': '_teacher-info_asp60_33',
  117. 'teacher-name': '_teacher-name_asp60_40',
  118. level: level,
  119. cert: cert,
  120. 'teacher-desc': '_teacher-desc_asp60_60',
  121. teacherItem: teacherItem,
  122. title: title,
  123. content: content,
  124. 'open-tips': '_open-tips_asp60_88',
  125. 'open-content': '_open-content_asp60_103',
  126. 'cert-text': '_cert-text_asp60_117',
  127. 'cert-img': '_cert-img_asp60_123'
  128. }
  129. var tips =
  130. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAALRQTFRFAAAA/5kz/6px/5lN/5lm/5ZI/5tX/6Rk/7eC/5VJ/5NI/6hr/51Y/7qL/7qM/51Z/6hq/5NI/6Ji/7yM/5RI/5dN/7aE/7eE/7yO/5RJ/5RJ/7yP/72P/55a/6ls/76R/5RJ/5ZN/51a/55b/59d/6Jj/6Nj/6lt/6lu/6pu/6tx/6ty/611/7N+/7iI/7uN/76R/8ij/86s/9m//97H/+PP/+zf/+3g/+3h/+/l//37////uo7UtgAAACB0Uk5TAAUJCgouODg5k5Wen6CgoaG7xsbX1+Li4/j9/f3+/v77Ap2qAAAAo0lEQVQY0yWLQW6DMBQFh29jQYnaJvtKvf/ZsklEgsDmvSy8HM3MADCVr+y2th0YIJbbFVS1PddGJq5/gKqY53icics/oHE5jKa2x3QDVMdISHyXGPtvkKCUWPoPFuA5cmfTADtnd1/VwDa59v5J5xovATpjwja8o21g8fuTbDhqOoeLBEkvA/c90c4J2DcDj5WEjpaTbTjuqxkASpkz9V0r8AG2xm36KYuxVQAAAABJRU5ErkJggg=='
  131. var banner2 = './assets/2.d60d5fe9.png'
  132. var banner3 = './assets/3.a6301a1a.png'
  133. var index = exports(
  134. 'default',
  135. defineComponent({
  136. name: 'live-cert',
  137. computed: {
  138. users: function users() {
  139. return state.user.data
  140. },
  141. btnStatus: function btnStatus() {
  142. // this.users?.fansNum
  143. // this.users?.expTime
  144. var users = this.users
  145. var fansNum = this.fansNum
  146. var expTime = this.overClassNum
  147. return (
  148. (users === null || users === void 0
  149. ? void 0
  150. : users.fansNum) >= fansNum &&
  151. (users === null || users === void 0
  152. ? void 0
  153. : users.expTime) >= expTime
  154. )
  155. }
  156. },
  157. data: function data() {
  158. return { fansNum: 0, overClassNum: 0 }
  159. },
  160. mounted: function mounted() {
  161. var _this = this
  162. return _asyncToGenerator(
  163. /*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
  164. var _state$user$data
  165. var liveFlag, _state$user$data2, res, result
  166. return regeneratorRuntime.wrap(
  167. function _callee$(_context) {
  168. while (1) {
  169. switch ((_context.prev = _context.next)) {
  170. case 0:
  171. liveFlag =
  172. (_state$user$data = state.user.data) === null ||
  173. _state$user$data === void 0
  174. ? void 0
  175. : _state$user$data.liveFlag
  176. state.openLiveStatus =
  177. liveFlag === 1 ? true : false
  178. _context.prev = 2
  179. _context.next = 5
  180. return request.get(
  181. '/api-teacher/sysConfig/queryByParamNameList',
  182. {
  183. params: {
  184. paramNames:
  185. 'open_live_fans_num,open_list_over_class'
  186. }
  187. }
  188. )
  189. case 5:
  190. res = _context.sent
  191. result = res.data
  192. result.forEach(function (item) {
  193. if (item.paramName === 'open_live_fans_num') {
  194. _this.fansNum = Number(item.paramValue)
  195. } else if (
  196. item.paramName === 'open_list_over_class'
  197. ) {
  198. _this.overClassNum = Number(item.paramValue)
  199. }
  200. }) // 如果没有达人认证,则需要先去认证
  201. if (
  202. !(
  203. (_state$user$data2 = state.user.data) !==
  204. null &&
  205. _state$user$data2 !== void 0 &&
  206. _state$user$data2.entryFlag
  207. )
  208. ) {
  209. Dialog.alert({
  210. message:
  211. '您尚未完成达人认证,达人认证后才可开通直播权限哦!',
  212. confirmButtonColor: '#01C1B5'
  213. }).then(function () {
  214. _this.$router.replace('/teacherCert')
  215. })
  216. }
  217. _context.next = 13
  218. break
  219. case 11:
  220. _context.prev = 11
  221. _context.t0 = _context['catch'](2)
  222. case 13:
  223. case 'end':
  224. return _context.stop()
  225. }
  226. }
  227. },
  228. _callee,
  229. null,
  230. [[2, 11]]
  231. )
  232. })
  233. )()
  234. },
  235. methods: {
  236. onOpenLive: function onOpenLive() {
  237. return _asyncToGenerator(
  238. /*#__PURE__*/ regeneratorRuntime.mark(function _callee2() {
  239. return regeneratorRuntime.wrap(
  240. function _callee2$(_context2) {
  241. while (1) {
  242. switch ((_context2.prev = _context2.next)) {
  243. case 0:
  244. _context2.prev = 0
  245. _context2.next = 3
  246. return request.get(
  247. '/api-teacher/teacher/openLive',
  248. {}
  249. )
  250. case 3:
  251. Toast('开通成功')
  252. setTimeout(function () {
  253. postMessage({ api: 'back' })
  254. }, 1000)
  255. _context2.next = 9
  256. break
  257. case 7:
  258. _context2.prev = 7
  259. _context2.t0 = _context2['catch'](0)
  260. case 9:
  261. case 'end':
  262. return _context2.stop()
  263. }
  264. }
  265. },
  266. _callee2,
  267. null,
  268. [[0, 7]]
  269. )
  270. })
  271. )()
  272. }
  273. },
  274. render: function render() {
  275. var _this2 = this
  276. return createVNode(Fragment, null, [
  277. state.openLiveStatus
  278. ? createVNode(
  279. ColResult,
  280. {
  281. classImgSize: 'CERT',
  282. type: 'liveCert',
  283. style: { paddingTop: '60px' },
  284. tips: '开通成功,快去开启直播或创建直播课吧'
  285. },
  286. null
  287. )
  288. : createVNode('div', { class: styles['open-live'] }, [
  289. createVNode(
  290. ColHeader,
  291. {
  292. background: 'transparent',
  293. border: false,
  294. title: ' '
  295. },
  296. null
  297. ),
  298. createVNode(
  299. Cell,
  300. { class: styles['open-teacher-info'], border: false },
  301. {
  302. default: function _default() {
  303. var _this2$users,
  304. _this2$users2,
  305. _this2$users3,
  306. _this2$users4
  307. return [
  308. createVNode(
  309. 'div',
  310. { class: styles['teacher-info'] },
  311. [
  312. createVNode(
  313. 'div',
  314. { class: styles['teacher-name'] },
  315. [
  316. ((_this2$users = _this2.users) ===
  317. null || _this2$users === void 0
  318. ? void 0
  319. : _this2$users.username) ||
  320. '\u6E38\u5BA2'.concat(
  321. (_this2$users2 = _this2.users) ===
  322. null || _this2$users2 === void 0
  323. ? void 0
  324. : _this2$users2.userId
  325. )
  326. ]
  327. ),
  328. createVNode(
  329. 'div',
  330. { class: styles.level },
  331. [
  332. (_this2$users3 = _this2.users) !==
  333. null &&
  334. _this2$users3 !== void 0 &&
  335. _this2$users3.starGrade
  336. ? createVNode(
  337. Rate,
  338. {
  339. modelValue:
  340. (_this2$users4 =
  341. _this2.users) === null ||
  342. _this2$users4 === void 0
  343. ? void 0
  344. : _this2$users4.starGrade,
  345. iconPrefix: 'iconfont',
  346. color: '#FFC459',
  347. 'void-icon': 'star_default',
  348. icon: 'star_active',
  349. size: 15
  350. },
  351. null
  352. )
  353. : createVNode(
  354. 'span',
  355. {
  356. style: {
  357. fontSize: '12px',
  358. color: '#999999'
  359. }
  360. },
  361. [
  362. createTextVNode(
  363. '\u6682\u65E0\u8BC4\u5206'
  364. )
  365. ]
  366. )
  367. ]
  368. )
  369. ]
  370. )
  371. ]
  372. },
  373. icon: function icon() {
  374. var _this2$users5
  375. return createVNode(
  376. Image,
  377. {
  378. class: styles.userLogo,
  379. src:
  380. ((_this2$users5 = _this2.users) === null ||
  381. _this2$users5 === void 0
  382. ? void 0
  383. : _this2$users5.headUrl) || IconAvator,
  384. fit: 'cover'
  385. },
  386. null
  387. )
  388. }
  389. }
  390. ),
  391. createVNode('div', { class: styles['teacher-desc'] }, [
  392. createVNode('div', { class: [styles.teacherItem] }, [
  393. createVNode('div', { class: styles.content }, [
  394. createTextVNode('\u7C89\u4E1D')
  395. ]),
  396. createVNode('div', { class: styles.title }, [
  397. this.fansNum
  398. ])
  399. ]),
  400. createVNode(
  401. 'div',
  402. {
  403. class: styles.teacherItem,
  404. style: { textAlign: 'right' }
  405. },
  406. [
  407. createVNode('div', { class: styles.content }, [
  408. createTextVNode('\u5DF2\u4E0A\u8BFE\u65F6')
  409. ]),
  410. createVNode('div', { class: styles.title }, [
  411. this.overClassNum
  412. ])
  413. ]
  414. )
  415. ]),
  416. !this.btnStatus
  417. ? createVNode('div', { class: styles['open-tips'] }, [
  418. createVNode(
  419. Icon,
  420. { name: tips, size: '16' },
  421. null
  422. ),
  423. createVNode('p', null, [
  424. createTextVNode(
  425. '\u4F60\u5C1A\u672A\u8FBE\u5230\u5F00\u901A\u76F4\u64AD\u7684\u6761\u4EF6'
  426. )
  427. ])
  428. ])
  429. : null,
  430. createVNode('div', { class: styles['open-content'] }, [
  431. createVNode('h2', null, [
  432. createTextVNode('\u76F4\u64AD')
  433. ]),
  434. createVNode('p', { class: styles['cert-text'] }, [
  435. createTextVNode(
  436. '\u5F00\u901A\u76F4\u64AD\u529F\u80FD\u540E\uFF0C\u60A8\u53EF\u4EE5\u521B\u5EFA\u81EA\u5DF1\u7684\u76F4\u64AD\u95F4\u5F00\u542F\u76F4\u64AD\u3002'
  437. )
  438. ]),
  439. createVNode('p', { class: styles['cert-img'] }, [
  440. createVNode(
  441. Image,
  442. {
  443. src: banner2,
  444. width: '100%',
  445. height: '150px',
  446. fit: 'contain'
  447. },
  448. null
  449. )
  450. ]),
  451. createVNode('h2', null, [
  452. createTextVNode('\u76F4\u64AD\u8BFE')
  453. ]),
  454. createVNode('p', { class: styles['cert-text'] }, [
  455. createTextVNode(
  456. '\u60A8\u53EF\u5236\u5B9A\u6559\u5B66\u65B9\u6848\u8BBE\u7F6E\u76F4\u64AD\u8BFE\u7A0B\uFF0C\u5B66\u5458\u8D2D\u4E70\u540E\uFF0C\u60A8\u53EF\u5728\u76F4\u64AD\u95F4\u5BF9\u8D2D\u4E70\u76F4\u64AD\u8BFE\u7684\u5B66\u5458\u8FDB\u884C\u76F4\u64AD\u6559\u5B66\uFF0C\u76F4\u64AD\u8BFE\u7A0B\u65E0\u4EBA\u6570\u4E0A\u9650\uFF0C\u53EF\u6781\u5927\u7684\u63D0\u9AD8\u8BFE\u7A0B\u6536\u5165\u3002'
  457. )
  458. ]),
  459. createVNode('p', { class: styles['cert-img'] }, [
  460. createVNode(
  461. Image,
  462. {
  463. src: banner3,
  464. width: '100%',
  465. height: '150px',
  466. fit: 'contain'
  467. },
  468. null
  469. )
  470. ])
  471. ]),
  472. createVNode(
  473. Sticky,
  474. { offsetBottom: 0, position: 'bottom' },
  475. {
  476. default: function _default() {
  477. return [
  478. createVNode(
  479. 'div',
  480. {
  481. class: [
  482. styles['header-content'],
  483. 'btnGroup'
  484. ]
  485. },
  486. [
  487. createVNode(
  488. Button,
  489. {
  490. round: true,
  491. plain: true,
  492. block: true,
  493. disabled: !_this2.btnStatus,
  494. class: styles.openBtn,
  495. onClick: _this2.onOpenLive
  496. },
  497. null
  498. )
  499. ]
  500. )
  501. ]
  502. }
  503. }
  504. )
  505. ])
  506. ])
  507. }
  508. })
  509. )
  510. }
  511. }
  512. }
  513. )
  514. })()