123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514 |
- ;(function () {
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
- try {
- var info = gen[key](arg)
- var value = info.value
- } catch (error) {
- reject(error)
- return
- }
- if (info.done) {
- resolve(value)
- } else {
- Promise.resolve(value).then(_next, _throw)
- }
- }
- function _asyncToGenerator(fn) {
- return function () {
- var self = this,
- args = arguments
- return new Promise(function (resolve, reject) {
- var gen = fn.apply(self, args)
- function _next(value) {
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value)
- }
- function _throw(err) {
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err)
- }
- _next(undefined)
- })
- }
- }
- var __vite_style__ = document.createElement('style')
- __vite_style__.innerHTML =
- '._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'
- document.head.appendChild(__vite_style__)
- System.register(
- [
- './vendor-legacy.09f20d09.js',
- './index-legacy.f25f109a.js',
- './index-legacy.f25f109a2.js',
- './index-legacy.f25f109a9.js',
- './index-legacy.f25f109a3.js',
- './index-legacy.fa4145a4.js',
- './index-legacy.595c24c3.js',
- './icon_teacher-legacy.e765b7f7.js',
- './index-legacy.f25f109a8.js'
- ],
- function (exports) {
- 'use strict'
- var defineComponent,
- Dialog,
- Toast,
- createVNode,
- Fragment,
- Cell,
- Rate,
- createTextVNode,
- Image,
- Icon,
- Sticky,
- Button,
- ColHeader,
- state,
- request,
- postMessage,
- ColResult,
- IconAvator
- return {
- setters: [
- function (module) {
- defineComponent = module.d
- Dialog = module.D
- Toast = module.T
- createVNode = module.a
- Fragment = module.F
- Cell = module.C
- Rate = module.J
- createTextVNode = module.j
- Image = module.I
- Icon = module.K
- Sticky = module.S
- Button = module.B
- },
- function () {},
- function () {},
- function () {},
- function () {},
- function (module) {
- ColHeader = module.C
- },
- function (module) {
- state = module.s
- request = module.r
- postMessage = module.p
- ColResult = module.C
- },
- function (module) {
- IconAvator = module.I
- },
- function () {}
- ],
- execute: function execute() {
- var openBtn = '_openBtn_asp60_12'
- var userLogo = '_userLogo_asp60_22'
- var level = '_level_asp60_50'
- var cert = '_cert_asp60_53'
- var teacherItem = '_teacherItem_asp60_64'
- var title = '_title_asp60_75'
- var content = '_content_asp60_81'
- var styles = {
- 'open-live': '_open-live_asp60_1',
- 'header-content': '_header-content_asp60_6',
- openBtn: openBtn,
- 'open-teacher-info': '_open-teacher-info_asp60_16',
- userLogo: userLogo,
- 'teacher-info': '_teacher-info_asp60_33',
- 'teacher-name': '_teacher-name_asp60_40',
- level: level,
- cert: cert,
- 'teacher-desc': '_teacher-desc_asp60_60',
- teacherItem: teacherItem,
- title: title,
- content: content,
- 'open-tips': '_open-tips_asp60_88',
- 'open-content': '_open-content_asp60_103',
- 'cert-text': '_cert-text_asp60_117',
- 'cert-img': '_cert-img_asp60_123'
- }
- var tips =
- '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=='
- var banner2 = './assets/2.d60d5fe9.png'
- var banner3 = './assets/3.a6301a1a.png'
- var index = exports(
- 'default',
- defineComponent({
- name: 'live-cert',
- computed: {
- users: function users() {
- return state.user.data
- },
- btnStatus: function btnStatus() {
- // this.users?.fansNum
- // this.users?.expTime
- var users = this.users
- var fansNum = this.fansNum
- var expTime = this.overClassNum
- return (
- (users === null || users === void 0
- ? void 0
- : users.fansNum) >= fansNum &&
- (users === null || users === void 0
- ? void 0
- : users.expTime) >= expTime
- )
- }
- },
- data: function data() {
- return { fansNum: 0, overClassNum: 0 }
- },
- mounted: function mounted() {
- var _this = this
- return _asyncToGenerator(
- /*#__PURE__*/ regeneratorRuntime.mark(function _callee() {
- var _state$user$data
- var liveFlag, _state$user$data2, res, result
- return regeneratorRuntime.wrap(
- function _callee$(_context) {
- while (1) {
- switch ((_context.prev = _context.next)) {
- case 0:
- liveFlag =
- (_state$user$data = state.user.data) === null ||
- _state$user$data === void 0
- ? void 0
- : _state$user$data.liveFlag
- state.openLiveStatus =
- liveFlag === 1 ? true : false
- _context.prev = 2
- _context.next = 5
- return request.get(
- '/api-teacher/sysConfig/queryByParamNameList',
- {
- params: {
- paramNames:
- 'open_live_fans_num,open_list_over_class'
- }
- }
- )
- case 5:
- res = _context.sent
- result = res.data
- result.forEach(function (item) {
- if (item.paramName === 'open_live_fans_num') {
- _this.fansNum = Number(item.paramValue)
- } else if (
- item.paramName === 'open_list_over_class'
- ) {
- _this.overClassNum = Number(item.paramValue)
- }
- }) // 如果没有达人认证,则需要先去认证
- if (
- !(
- (_state$user$data2 = state.user.data) !==
- null &&
- _state$user$data2 !== void 0 &&
- _state$user$data2.entryFlag
- )
- ) {
- Dialog.alert({
- message:
- '您尚未完成达人认证,达人认证后才可开通直播权限哦!',
- confirmButtonColor: '#01C1B5'
- }).then(function () {
- _this.$router.replace('/teacherCert')
- })
- }
- _context.next = 13
- break
- case 11:
- _context.prev = 11
- _context.t0 = _context['catch'](2)
- case 13:
- case 'end':
- return _context.stop()
- }
- }
- },
- _callee,
- null,
- [[2, 11]]
- )
- })
- )()
- },
- methods: {
- onOpenLive: function onOpenLive() {
- return _asyncToGenerator(
- /*#__PURE__*/ regeneratorRuntime.mark(function _callee2() {
- return regeneratorRuntime.wrap(
- function _callee2$(_context2) {
- while (1) {
- switch ((_context2.prev = _context2.next)) {
- case 0:
- _context2.prev = 0
- _context2.next = 3
- return request.get(
- '/api-teacher/teacher/openLive',
- {}
- )
- case 3:
- Toast('开通成功')
- setTimeout(function () {
- postMessage({ api: 'back' })
- }, 1000)
- _context2.next = 9
- break
- case 7:
- _context2.prev = 7
- _context2.t0 = _context2['catch'](0)
- case 9:
- case 'end':
- return _context2.stop()
- }
- }
- },
- _callee2,
- null,
- [[0, 7]]
- )
- })
- )()
- }
- },
- render: function render() {
- var _this2 = this
- return createVNode(Fragment, null, [
- state.openLiveStatus
- ? createVNode(
- ColResult,
- {
- classImgSize: 'CERT',
- type: 'liveCert',
- style: { paddingTop: '60px' },
- tips: '开通成功,快去开启直播或创建直播课吧'
- },
- null
- )
- : createVNode('div', { class: styles['open-live'] }, [
- createVNode(
- ColHeader,
- {
- background: 'transparent',
- border: false,
- title: ' '
- },
- null
- ),
- createVNode(
- Cell,
- { class: styles['open-teacher-info'], border: false },
- {
- default: function _default() {
- var _this2$users,
- _this2$users2,
- _this2$users3,
- _this2$users4
- return [
- createVNode(
- 'div',
- { class: styles['teacher-info'] },
- [
- createVNode(
- 'div',
- { class: styles['teacher-name'] },
- [
- ((_this2$users = _this2.users) ===
- null || _this2$users === void 0
- ? void 0
- : _this2$users.username) ||
- '\u6E38\u5BA2'.concat(
- (_this2$users2 = _this2.users) ===
- null || _this2$users2 === void 0
- ? void 0
- : _this2$users2.userId
- )
- ]
- ),
- createVNode(
- 'div',
- { class: styles.level },
- [
- (_this2$users3 = _this2.users) !==
- null &&
- _this2$users3 !== void 0 &&
- _this2$users3.starGrade
- ? createVNode(
- Rate,
- {
- modelValue:
- (_this2$users4 =
- _this2.users) === null ||
- _this2$users4 === void 0
- ? void 0
- : _this2$users4.starGrade,
- iconPrefix: 'iconfont',
- color: '#FFC459',
- 'void-icon': 'star_default',
- icon: 'star_active',
- size: 15
- },
- null
- )
- : createVNode(
- 'span',
- {
- style: {
- fontSize: '12px',
- color: '#999999'
- }
- },
- [
- createTextVNode(
- '\u6682\u65E0\u8BC4\u5206'
- )
- ]
- )
- ]
- )
- ]
- )
- ]
- },
- icon: function icon() {
- var _this2$users5
- return createVNode(
- Image,
- {
- class: styles.userLogo,
- src:
- ((_this2$users5 = _this2.users) === null ||
- _this2$users5 === void 0
- ? void 0
- : _this2$users5.headUrl) || IconAvator,
- fit: 'cover'
- },
- null
- )
- }
- }
- ),
- createVNode('div', { class: styles['teacher-desc'] }, [
- createVNode('div', { class: [styles.teacherItem] }, [
- createVNode('div', { class: styles.content }, [
- createTextVNode('\u7C89\u4E1D')
- ]),
- createVNode('div', { class: styles.title }, [
- this.fansNum
- ])
- ]),
- createVNode(
- 'div',
- {
- class: styles.teacherItem,
- style: { textAlign: 'right' }
- },
- [
- createVNode('div', { class: styles.content }, [
- createTextVNode('\u5DF2\u4E0A\u8BFE\u65F6')
- ]),
- createVNode('div', { class: styles.title }, [
- this.overClassNum
- ])
- ]
- )
- ]),
- !this.btnStatus
- ? createVNode('div', { class: styles['open-tips'] }, [
- createVNode(
- Icon,
- { name: tips, size: '16' },
- null
- ),
- createVNode('p', null, [
- createTextVNode(
- '\u4F60\u5C1A\u672A\u8FBE\u5230\u5F00\u901A\u76F4\u64AD\u7684\u6761\u4EF6'
- )
- ])
- ])
- : null,
- createVNode('div', { class: styles['open-content'] }, [
- createVNode('h2', null, [
- createTextVNode('\u76F4\u64AD')
- ]),
- createVNode('p', { class: styles['cert-text'] }, [
- createTextVNode(
- '\u5F00\u901A\u76F4\u64AD\u529F\u80FD\u540E\uFF0C\u60A8\u53EF\u4EE5\u521B\u5EFA\u81EA\u5DF1\u7684\u76F4\u64AD\u95F4\u5F00\u542F\u76F4\u64AD\u3002'
- )
- ]),
- createVNode('p', { class: styles['cert-img'] }, [
- createVNode(
- Image,
- {
- src: banner2,
- width: '100%',
- height: '150px',
- fit: 'contain'
- },
- null
- )
- ]),
- createVNode('h2', null, [
- createTextVNode('\u76F4\u64AD\u8BFE')
- ]),
- createVNode('p', { class: styles['cert-text'] }, [
- createTextVNode(
- '\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'
- )
- ]),
- createVNode('p', { class: styles['cert-img'] }, [
- createVNode(
- Image,
- {
- src: banner3,
- width: '100%',
- height: '150px',
- fit: 'contain'
- },
- null
- )
- ])
- ]),
- createVNode(
- Sticky,
- { offsetBottom: 0, position: 'bottom' },
- {
- default: function _default() {
- return [
- createVNode(
- 'div',
- {
- class: [
- styles['header-content'],
- 'btnGroup'
- ]
- },
- [
- createVNode(
- Button,
- {
- round: true,
- plain: true,
- block: true,
- disabled: !_this2.btnStatus,
- class: styles.openBtn,
- onClick: _this2.onOpenLive
- },
- null
- )
- ]
- )
- ]
- }
- }
- )
- ])
- ])
- }
- })
- )
- }
- }
- }
- )
- })()
|