;(function () { function ownKeys(object, enumerableOnly) { var keys = Object.keys(object) if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object) enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable })), keys.push.apply(keys, symbols) } return keys } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {} i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]) }) : Object.getOwnPropertyDescriptors ? Object.defineProperties( target, Object.getOwnPropertyDescriptors(source) ) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty( target, key, Object.getOwnPropertyDescriptor(source, key) ) }) } return target } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }) } else { obj[key] = value } return obj } function _toConsumableArray(arr) { return ( _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread() ) } function _nonIterableSpread() { throw new TypeError( 'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' ) } function _unsupportedIterableToArray(o, minLen) { if (!o) return if (typeof o === 'string') return _arrayLikeToArray(o, minLen) var n = Object.prototype.toString.call(o).slice(8, -1) if (n === 'Object' && o.constructor) n = o.constructor.name if (n === 'Map' || n === 'Set') return Array.from(o) if (n === 'Arguments' || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen) } function _iterableToArray(iter) { if ( (typeof Symbol !== 'undefined' && iter[Symbol.iterator] != null) || iter['@@iterator'] != null ) return Array.from(iter) } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr) } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i] } return arr2 } 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 = '._teacher-record_nb6q8_1{min-height:100vh;background-color:#f8f9fc;position:relative;overflow:hidden}._teacher-record_nb6q8_1 .van-nav-bar{transition:all .3s}._teacher-record_nb6q8_1 .van-tab{margin-top:.32rem;margin-bottom:.13333rem;padding:0 .37333rem}._teacher-record_nb6q8_1 .van-tab--active{font-size:.42667rem!important;color:#333}._teacher-record_nb6q8_1 .van-button--plain.van-button--primary{background-color:transparent}._bgImg_nb6q8_22{position:absolute;top:0;left:0;width:100%;height:5.01333rem;-o-object-fit:cover;object-fit:cover}._bg_nb6q8_22{position:absolute;top:0;left:0;width:100%;height:5.01333rem;background-color:rgba(0,0,0,.6);backdrop-filter:blur(.26667rem);-webkit-backdrop-filter:blur(.26667rem)}._teacherHeader_nb6q8_40{position:relative;z-index:10}._single_14ksn_1{margin-bottom:.53333rem}._introduction_14ksn_4{font-size:.34667rem;color:#666;line-height:1.6;padding-bottom:.4rem}._videoList_14ksn_10{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}._itemBg_14ksn_16{position:absolute;top:0;left:0;bottom:0;width:100%;height:100%;z-index:89}._videoItem_14ksn_25{width:4.18667rem;height:2.82667rem;background:#d8d8d8;border-radius:.26667rem;overflow:hidden;position:relative;margin-bottom:.26667rem}._videoItem_14ksn_25 ._icon-upload_14ksn_34{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff;z-index:9}._videoItem_14ksn_25 ._video_14ksn_10{position:absolute;left:0;top:0;width:100%;min-height:100%;background-color:#ccc}._videoItem_14ksn_25 .van-image{width:100%;height:100%;overflow:hidden}._fansGroup_14ksn_55{padding:0 0 .66667rem!important}._fansGroup_14ksn_55:last-child{padding-bottom:.32rem!important}._fansGroup_14ksn_55 .van-cell__title,._fansGroup_14ksn_55 .van-cell__value{flex:1 auto}._fansGroup_14ksn_55 p{font-size:.37333rem;color:#999;line-height:.53333rem;width:4.26667rem}._fansImage_14ksn_71{width:1.12rem;height:1.12rem;border-radius:50%;overflow:hidden}._fansTitle_14ksn_77{padding-left:.32rem;font-size:.42667rem;color:#1a1a1a;line-height:.58667rem}._videoGroup_14ksn_83{width:90%;line-height:0}._filterTitle_cir06_1{font-size:.48rem;font-weight:500;color:#000;line-height:.66667rem;text-align:center;padding:.53333rem 0}._fansGroup_cir06_9{padding:0 0 .66667rem!important}._fansGroup_cir06_9:last-child{padding-bottom:.32rem!important}._fansGroup_cir06_9 .van-cell__title,._fansGroup_cir06_9 .van-cell__value{flex:1 auto}._fansGroup_cir06_9 ._introduce_cir06_19{font-size:.37333rem;color:#999;line-height:.53333rem;width:6.93333rem}._fansImage_cir06_25{width:1.12rem;height:1.12rem;border-radius:50%;overflow:hidden}._fansTitle_cir06_31{padding-left:.32rem;font-size:.42667rem;color:#1a1a1a;line-height:.58667rem}._joinContainer_cir06_37{padding:.58667rem .37333rem}._joinText_cir06_40{font-size:.37333rem;color:#999;border-radius:.26667rem;border:.02667rem solid #dedede}._practice_xjmim_1{padding:.37333rem .37333rem 0;overflow:hidden}._practice_xjmim_1 ._group_xjmim_5{margin-bottom:.32rem;border-radius:.26667rem;overflow:hidden}._practice_xjmim_1 ._price_xjmim_10{font-size:.37333rem;color:#999}._practice_xjmim_1 ._price_xjmim_10 span{font-weight:600;color:#fa6400;font-size:.42667rem}._practice_xjmim_1 .van-stepper--round .van-stepper__minus{color:#333!important;border:#f3f3f3;background:#f3f3f3}._practice_xjmim_1 .van-stepper--round .van-stepper__plus{background:var(--van-primary)}._rTag_xjmim_27{padding:.26667rem 0}._rTag_xjmim_27 ._tag_xjmim_30{background:#e9fff8;margin-bottom:.21333rem}._selectPopup_xjmim_34{width:8.32rem;background:#ffffff;border-radius:.21333rem}._selectPopup_xjmim_34 ._selectContainer_xjmim_39{padding:.48rem .37333rem}._selectPopup_xjmim_34 ._rTitle_xjmim_42{font-size:.48rem}._selectPopup_xjmim_34 ._selectPopupContent_xjmim_45{padding:.53333rem 0}._selectPopup_xjmim_34 ._desc_xjmim_48,._selectPopup_xjmim_34 ._times_xjmim_49{font-size:.37333rem;color:#666;line-height:.53333rem}._selectPopup_xjmim_34 ._times_xjmim_49{padding-top:.4rem}._selectPopup_xjmim_34 ._times_xjmim_49 span{display:block}._selectPopup_xjmim_34 ._selectBtn_xjmim_60{display:flex;align-items:center;justify-content:space-between}._selectPopup_xjmim_34 ._selectBtn_xjmim_60 ._btn_xjmim_65{width:48%}._rTitle_xjmim_42{display:flex;align-items:center;font-size:.42667rem;color:#333;font-weight:500}._rTitle_xjmim_42:before{margin-right:.21333rem;content:" ";display:inline-block;width:.10667rem;height:.45333rem;background:linear-gradient(180deg,#59e5d5 0%,#01C1B5 100%);border-radius:.08rem}._protocol_xjmim_84{padding:0 .37333rem;background-color:#f6f8f9}._arrangeCell_xjmim_88{margin:.26667rem 0 2.13333rem!important;width:auto;border-radius:.26667rem;overflow:hidden}._fixedBtn_xjmim_94{position:fixed;bottom:0;left:0;right:0;z-index:9}._liveList_396y7_1{padding:.37333rem}._liCover_396y7_4{width:2.8rem;height:1.89333rem;border-radius:.10667rem;overflow:hidden}._liContent_396y7_10{padding-left:.37333rem;height:100%;display:flex;flex-direction:column;justify-content:space-between}._liContent_396y7_10 ._liTitle_396y7_17{font-size:.4rem;font-weight:500;color:#1a1a1a;line-height:.53333rem;padding-top:.10667rem;max-width:4.8rem}._num_396y7_25{color:#ff802c;font-size:.34667rem}._buyNum_396y7_29{color:#ff802c;display:flex;align-items:center;line-height:1;font-size:.34667rem}._price_396y7_36{font-size:.37333rem;color:#999}._price_396y7_36 ._priceNum_396y7_40{color:red;font-size:.48rem;font-weight:700}._price_396y7_36 ._priceNum_396y7_40 i{font-size:.4rem;font-style:normal}._price_396y7_36 ._label_396y7_49{padding-left:.21333rem}._liveGroup_396y7_52{border-radius:.26667rem;overflow:hidden;margin-bottom:.26667rem}._subjectName_396y7_57{position:absolute;bottom:.10667rem;left:0;font-size:.32rem;padding:.08rem .13333rem;color:#fff;line-height:1;border-radius:.02667rem;background:rgba(0,0,0,.29)}._timerString_396y7_68{font-size:.34667rem;display:flex;align-items:center;color:#666}._videoList_1yf9v_1{display:flex;justify-content:space-between;flex-wrap:wrap;padding:.37333rem}.van-list__loading,.van-list__finished-text,.van-list__error-text{width:100%}\n' document.head.appendChild(__vite_style__) System.register( [ './teacher-header.module-legacy.887a7104.js', './index-legacy.fa4145a4.js', './vendor-legacy.09f20d09.js', './index-legacy.f25f109a3.js', './index-legacy.637f3556.js', './index-legacy.637f35562.js', './index-legacy.f9759ffc.js', './index-legacy.69ca4eed.js', './index-legacy.595c24c3.js', './index-legacy.f25f109a.js', './index-legacy.f25f109a2.js', './index-legacy.f25f109a5.js', './icon_upload_poster-legacy.6c5487e0.js', './index-legacy.48bd16d8.js', './index-legacy.f25f109a7.js', './index-legacy.f25f109a4.js', './index-legacy.f25f109a12.js', './index-legacy.f25f109a10.js', './orderStatus-legacy.6131dfb6.js', './tradeOrder-legacy.a0642d41.js', './index-legacy.f25f109a6.js', './video-item-legacy.29e57e65.js', './index-legacy.1588182e.js', './music-legacy.6d4924e4.js', './index-legacy.2d78ae68.js', './index-legacy.f25f109a9.js', './icon_teacher-legacy.e765b7f7.js', './icon-jiaozi-legacy.dd5ed0e2.js', './index-legacy.f25f109a8.js', './index-legacy.f25f109a11.js', './index-legacy.9dfebfce.js', './index-legacy.f72eae88.js', './select-tag-legacy.4972aa0d.js', './index-legacy.f25f109a13.js', './index-legacy.f25f109a14.js', './index-legacy.6e10cd37.js', './index.module-legacy.9051c853.js', './select-subject-legacy.1290af03.js', './hooks-legacy.b91b3b59.js', './index-legacy.a92ed534.js', './index-legacy.92ff7530.js', './code-down-load-legacy.66a01c5d.js', './logo-legacy.cf4b3bd2.js', './browser-legacy.5a92c2a9.js', './music-icon-legacy.a161f8f1.js', './index-legacy.c75fe8a2.js' ], function (exports) { 'use strict' var __glob_18_0, __glob_18_1, __glob_18_2, __glob_18_3, __glob_18_4, __glob_18_5, __glob_18_6, __glob_18_7, __glob_18_8, __glob_18_9, __glob_18_10, __glob_18_11, __glob_18_12, __glob_18_13, __glob_18_14, __glob_18_15, __glob_18_16, __glob_18_17, __glob_18_18, styles$6, IconChat, ColHeader, defineComponent, Toast, createVNode, Fragment, createTextVNode, Cell, Image, Field, Button, Icon, isVNode, Popup, dayjs, Dialog, CellGroup, Stepper, Tag, ActionSheet, List, Rate, useRect, Tabs, Tab, SectionDetail, ColVideo, request, postMessage, state, getWeekCh, ColResult, listenerMessage, iconUploadPoster, Calendar, orderStatus, tradeOrder, VideoItem, MusicList, musicBuy, useEventListener, useWindowScroll, IconAvator, IconXueli, IconJiaozi return { setters: [ function (module) { __glob_18_0 = module._ __glob_18_1 = module.a __glob_18_2 = module.b __glob_18_3 = module.c __glob_18_4 = module.d __glob_18_5 = module.e __glob_18_6 = module.f __glob_18_7 = module.g __glob_18_8 = module.h __glob_18_9 = module.i __glob_18_10 = module.j __glob_18_11 = module.k __glob_18_12 = module.l __glob_18_13 = module.m __glob_18_14 = module.n __glob_18_15 = module.o __glob_18_16 = module.p __glob_18_17 = module.q __glob_18_18 = module.r styles$6 = module.s IconChat = module.I }, function (module) { ColHeader = module.C }, function (module) { defineComponent = module.d Toast = module.T createVNode = module.a Fragment = module.F createTextVNode = module.j Cell = module.C Image = module.I Field = module.G Button = module.B Icon = module.K isVNode = module.x Popup = module.P dayjs = module.g Dialog = module.D CellGroup = module.y Stepper = module.Y Tag = module.U ActionSheet = module.N List = module.M Rate = module.J useRect = module.t Tabs = module.v Tab = module.w }, function () {}, function () {}, function () {}, function (module) { SectionDetail = module.S }, function (module) { ColVideo = module.C }, function (module) { request = module.r postMessage = module.p state = module.s getWeekCh = module.m ColResult = module.C listenerMessage = module.l }, function () {}, function () {}, function () {}, function (module) { iconUploadPoster = module.i }, function (module) { Calendar = module.C }, function () {}, function () {}, function () {}, function () {}, function (module) { orderStatus = module.o }, function (module) { tradeOrder = module.t }, function () {}, function (module) { VideoItem = module.V }, function (module) { MusicList = module['default'] }, function (module) { musicBuy = module.m }, function (module) { useEventListener = module.u useWindowScroll = module.a }, function () {}, function (module) { IconAvator = module.I }, function (module) { IconXueli = module.I IconJiaozi = module.a }, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {}, function () {} ], execute: function execute() { var bgImg = '_bgImg_nb6q8_22' var bg = '_bg_nb6q8_22' var teacherHeader = '_teacherHeader_nb6q8_40' var styles$5 = { 'teacher-record': '_teacher-record_nb6q8_1', bgImg: bgImg, bg: bg, teacherHeader: teacherHeader } var single = '_single_14ksn_1' var introduction = '_introduction_14ksn_4' var videoList$1 = '_videoList_14ksn_10' var itemBg = '_itemBg_14ksn_16' var videoItem = '_videoItem_14ksn_25' var video = '_video_14ksn_10' var fansGroup$1 = '_fansGroup_14ksn_55' var fansImage$1 = '_fansImage_14ksn_71' var fansTitle$1 = '_fansTitle_14ksn_77' var videoGroup = '_videoGroup_14ksn_83' var styles$4 = { single: single, introduction: introduction, videoList: videoList$1, itemBg: itemBg, videoItem: videoItem, 'icon-upload': '_icon-upload_14ksn_34', video: video, fansGroup: fansGroup$1, fansImage: fansImage$1, fansTitle: fansTitle$1, videoGroup: videoGroup } var filterTitle = '_filterTitle_cir06_1' var fansGroup = '_fansGroup_cir06_9' var introduce = '_introduce_cir06_19' var fansImage = '_fansImage_cir06_25' var fansTitle = '_fansTitle_cir06_31' var joinContainer = '_joinContainer_cir06_37' var joinText = '_joinText_cir06_40' var styles$3 = { filterTitle: filterTitle, fansGroup: fansGroup, introduce: introduce, fansImage: fansImage, fansTitle: fansTitle, joinContainer: joinContainer, joinText: joinText } var getAssetsHomeFile$3 = function getAssetsHomeFile$3(fileName) { var path = '../images/'.concat(fileName) var modules = { '../images/cert_active.png': __glob_18_0, '../images/cert_default.png': __glob_18_1, '../images/follow_bg.png': __glob_18_2, '../images/head_bg.png': __glob_18_3, '../images/icon-chat.png': __glob_18_4, '../images/icon-close.png': __glob_18_5, '../images/icon_fans.png': __glob_18_6, '../images/icon_subject.png': __glob_18_7, '../images/icon_video.png': __glob_18_8, '../images/live_active.png': __glob_18_9, '../images/live_bg.png': __glob_18_10, '../images/live_default.png': __glob_18_11, '../images/music_active.png': __glob_18_12, '../images/music_default.png': __glob_18_13, '../images/teacher-icon.png': __glob_18_14, '../images/video_active.png': __glob_18_15, '../images/video_default.png': __glob_18_16, '../images/vip_active.png': __glob_18_17, '../images/vip_default.png': __glob_18_18 } return modules[path].default } var JoinChat = defineComponent({ name: 'joinChat', props: { item: { type: Object, default: {} }, onClose: { type: Function, default: function _default(id) {} } }, data: function data() { return { desc: '' } }, methods: { onJoinChat: function onJoinChat() { var _this = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee() { return regeneratorRuntime.wrap( function _callee$(_context) { while (1) { switch ((_context.prev = _context.next)) { case 0: _context.prev = 0 _context.next = 3 return request.post( '/api-student/imGroupMemberAudit/apply', { data: { groupId: _this.item.id, auditStatus: 'AUDITING', roleType: 'STUDENT', desc: _this.desc } } ) case 3: Toast('申请成功') _this.desc = '' _this.onClose && _this.onClose(_this.item.id) _context.next = 10 break case 8: _context.prev = 8 _context.t0 = _context['catch'](0) case 10: case 'end': return _context.stop() } } }, _callee, null, [[0, 8]] ) }) )() } }, render: function render() { var _this2 = this return createVNode(Fragment, null, [ createVNode( 'div', { class: [styles$3.filterTitle, 'van-hairline--bottom'] }, [createTextVNode('\u7533\u8BF7\u5165\u7FA4')] ), createVNode('div', { class: styles$3.joinContainer }, [ createVNode( Cell, { center: true, class: styles$3.fansGroup, border: false }, { icon: function icon() { return createVNode( Image, { src: _this2.item.img || getAssetsHomeFile$3('icon_fans.png'), fit: 'cover', class: styles$3.fansImage }, null ) }, title: function title() { return createVNode( 'div', { class: styles$3.fansTitle }, [ createVNode('div', { class: styles$3.title }, [ _this2.item.name ]), createVNode( 'p', { class: ['van-ellipsis', styles$3.introduce] }, [_this2.item.introduce] ) ] ) } } ), createVNode( Field, { type: 'textarea', class: styles$3.joinText, rows: 2, maxlength: 200, modelValue: this.desc, 'onUpdate:modelValue': function onUpdateModelValue( $event ) { return (_this2.desc = $event) }, placeholder: '请填写您的入群申请,会更快的被通过喔~' }, null ) ]), createVNode('div', { class: 'btnGroup' }, [ createVNode( Button, { type: 'primary', block: true, round: true, style: { width: '70%', margin: '0 auto' }, onClick: this.onJoinChat }, { default: function _default() { return [createTextVNode('\u786E\u8BA4')] } } ) ]) ]) } }) function _isSlot$2(s) { return ( typeof s === 'function' || (Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s)) ) } var getAssetsHomeFile$2 = function getAssetsHomeFile$2(fileName) { var path = '../images/'.concat(fileName) var modules = { '../images/cert_active.png': __glob_18_0, '../images/cert_default.png': __glob_18_1, '../images/follow_bg.png': __glob_18_2, '../images/head_bg.png': __glob_18_3, '../images/icon-chat.png': __glob_18_4, '../images/icon-close.png': __glob_18_5, '../images/icon_fans.png': __glob_18_6, '../images/icon_subject.png': __glob_18_7, '../images/icon_video.png': __glob_18_8, '../images/live_active.png': __glob_18_9, '../images/live_bg.png': __glob_18_10, '../images/live_default.png': __glob_18_11, '../images/music_active.png': __glob_18_12, '../images/music_default.png': __glob_18_13, '../images/teacher-icon.png': __glob_18_14, '../images/video_active.png': __glob_18_15, '../images/video_default.png': __glob_18_16, '../images/vip_active.png': __glob_18_17, '../images/vip_default.png': __glob_18_18 } return modules[path].default } var Single = defineComponent({ name: 'single', props: { userInfo: { type: Object, default: {} } }, data: function data() { var query = this.$route.query return { videoStatus: false, chatStatus: false, teacherId: query.teacherId, fansList: [], chatItem: {}, videoItem: {}, isAddBrowse: false } }, mounted: function mounted() { var _this3 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee2() { var res return regeneratorRuntime.wrap( function _callee2$(_context2) { while (1) { switch ((_context2.prev = _context2.next)) { case 0: _context2.prev = 0 _context2.next = 3 return request.post( '/api-student/imGroup/queryTeacherGroup', { data: { type: 'FAN', createUserId: _this3.teacherId } } ) case 3: res = _context2.sent _this3.fansList = res.data || [] _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]] ) }) )() }, methods: { onDetail: function onDetail(item) { var _this4 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee3() { return regeneratorRuntime.wrap(function _callee3$( _context3 ) { while (1) { switch ((_context3.prev = _context3.next)) { case 0: if (!(!item.hasWaitAuditFlag && !item.existFlag)) { _context3.next = 4 break } _this4.chatStatus = true _this4.chatItem = item return _context3.abrupt('return') case 4: // 进入群聊天 if (item.existFlag) { postMessage({ api: 'joinChatGroup', content: { type: 'multi', // single 单人 multi 多人 id: item.id } }) } case 5: case 'end': return _context3.stop() } } }, _callee3) }) )() }, onPlay: function onPlay() { var _this5 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee4() { return regeneratorRuntime.wrap( function _callee4$(_context4) { while (1) { switch ((_context4.prev = _context4.next)) { case 0: _context4.prev = 0 if (_this5.isAddBrowse) { _context4.next = 3 break } return _context4.abrupt('return') case 3: _context4.next = 5 return request.get( '/api-student/teacher/addVideoBrowse', { hideLoading: true, params: { videoId: _this5.videoItem.id } } ) case 5: _this5.isAddBrowse = false _context4.next = 10 break case 8: _context4.prev = 8 _context4.t0 = _context4['catch'](0) case 10: case 'end': return _context4.stop() } } }, _callee4, null, [[0, 8]] ) }) )() } }, render: function render() { var _this6 = this var _slot var userInfo = this.userInfo return createVNode('div', { class: styles$4.single }, [ userInfo.introduction && createVNode( SectionDetail, { icon: 'personal', title: '个人介绍', size: 24, border: false }, { default: function _default() { return [ createVNode('p', { class: styles$4.introduction }, [ userInfo.introduction ]) ] } } ), userInfo.styleVideo && userInfo.styleVideo.length > 0 && createVNode( SectionDetail, { icon: 'elegant', title: '老师风采', size: 24, border: false }, { default: function _default() { return [ createVNode('div', { class: styles$4.videoList }, [ userInfo.styleVideo.map(function (item) { return createVNode( 'div', { class: styles$4.videoItem }, [ createVNode( 'div', { class: styles$4.itemBg, onClick: function onClick() { _this6.videoStatus = true _this6.isAddBrowse = true _this6.videoItem = item } }, null ), createVNode( Icon, { class: styles$4['icon-upload'], name: getAssetsHomeFile$2( 'icon_video.png' ), size: 26 }, null ), createVNode( Image, { src: item.cover || iconUploadPoster, fit: 'cover' }, null ) ] ) }) ]) ] } } ), this.fansList && this.fansList.length > 0 && createVNode( SectionDetail, { icon: 'fans', title: '粉丝群', size: 24, border: false }, _isSlot$2( (_slot = this.fansList.map(function (item) { return createVNode( Cell, { center: true, class: styles$4.fansGroup, border: false }, { icon: function icon() { return createVNode( Image, { src: item.img || getAssetsHomeFile$2('icon_fans.png'), fit: 'cover', class: styles$4.fansImage }, null ) }, title: function title() { return createVNode( 'div', { class: styles$4.fansTitle }, [ createVNode( 'div', { class: styles$4.title }, [item.name] ), createVNode('p', { class: 'van-ellipsis' }, [ item.introduce ]) ] ) }, default: function _default() { return createVNode( Button, { type: 'primary', size: 'small', round: true, disabled: item.hasWaitAuditFlag, onClick: function onClick() { return _this6.onDetail(item) } }, { default: function _default() { return [ item.existFlag ? '去聊天' : '', item.hasWaitAuditFlag ? '审核中' : '', !item.hasWaitAuditFlag && !item.existFlag ? '申请入群' : '' ] } } ) } } ) })) ) ? _slot : { default: function _default() { return [_slot] } } ), createVNode( Popup, { show: this.chatStatus, position: 'bottom', round: true, closeable: true, 'safe-area-inset-bottom': true, onClose: function onClose() { return (_this6.chatStatus = false) } }, { default: function _default() { return [ createVNode( JoinChat, { item: _this6.chatItem, onClose: function onClose(id) { _this6.fansList.forEach(function (item) { item.id === id && (item.hasWaitAuditFlag = true) }) _this6.chatStatus = false } }, null ) ] } } ), createVNode( Popup, { show: this.videoStatus, round: true, class: styles$4.videoGroup, closeable: true, onClose: function onClose() { _this6.videoStatus = false _this6.isAddBrowse = false } }, { default: function _default() { var _this6$videoItem return [ _this6.videoStatus && createVNode( ColVideo, { playsinline: true, onPlay: _this6.onPlay, src: ((_this6$videoItem = _this6.videoItem) === null || _this6$videoItem === void 0 ? void 0 : _this6$videoItem.videoUrl) + '#t=0.1' }, null ) ] } } ) ]) } }) var practice = '_practice_xjmim_1' var group = '_group_xjmim_5' var price$1 = '_price_xjmim_10' var rTag = '_rTag_xjmim_27' var tag = '_tag_xjmim_30' var selectPopup = '_selectPopup_xjmim_34' var selectContainer = '_selectContainer_xjmim_39' var rTitle = '_rTitle_xjmim_42' var selectPopupContent = '_selectPopupContent_xjmim_45' var desc = '_desc_xjmim_48' var times = '_times_xjmim_49' var selectBtn = '_selectBtn_xjmim_60' var btn = '_btn_xjmim_65' var protocol = '_protocol_xjmim_84' var arrangeCell = '_arrangeCell_xjmim_88' var fixedBtn = '_fixedBtn_xjmim_94' var styles$2 = { practice: practice, group: group, price: price$1, rTag: rTag, tag: tag, selectPopup: selectPopup, selectContainer: selectContainer, rTitle: rTitle, selectPopupContent: selectPopupContent, desc: desc, times: times, selectBtn: selectBtn, btn: btn, protocol: protocol, arrangeCell: arrangeCell, fixedBtn: fixedBtn } var Practice = defineComponent({ name: 'practice', props: { userInfo: { type: Object, default: {} } }, data: function data() { var query = this.$route.query return { teacherId: query.teacherId, subjectId: query.subjectId, teacherSubjectList: [], subjectStatus: false, subjectInfo: { subjectPrice: 0, courseMinutes: 0, subjectName: '', subjectId: 0 }, courseNum: 4, calendarStatus: false, calendarList: [], selectCourseList: [], coursePlanStatus: false, selectStatus: false, coursePlanList: [], calendarDate: dayjs().add(1, 'day').toDate(), // 日历当前时间 settingStatus: true, // 是否设置陪练课 loadDataStatus: true // 是否加载数据 } }, mounted: function mounted() { var _this7 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee5() { var res, result, _state$user$data, userSubjectId, findItem, tempRes, _subjectName, subjectPrice, courseMinutes, subjectId return regeneratorRuntime.wrap( function _callee5$(_context5) { while (1) { switch ((_context5.prev = _context5.next)) { case 0: _context5.prev = 0 _this7.loadDataStatus = true _context5.next = 4 return request.get( '/api-student/courseSchedule/getTeacherSubjectPrice', { params: { teacherId: _this7.teacherId } } ) case 4: res = _context5.sent _this7.loadDataStatus = false result = res.data || [] if (result.length > 0) { userSubjectId = _this7.subjectId || ((_state$user$data = state.user.data) === null || _state$user$data === void 0 ? void 0 : _state$user$data.subjectId) findItem = result.find(function (item) { return item.subjectId === Number(userSubjectId) }) // 判断是否有跟学生相同的科目,如果没有则默认取第一个 tempRes = findItem || result[0] ;(_subjectName = tempRes.subjectName), (subjectPrice = tempRes.subjectPrice), (courseMinutes = tempRes.courseMinutes), (subjectId = tempRes.subjectId) _this7.subjectInfo = { subjectPrice: subjectPrice, courseMinutes: courseMinutes, subjectName: _subjectName, subjectId: subjectId } result.forEach(function (item) { item.name = item.subjectName }) _this7.teacherSubjectList = result _this7.getList() _this7.onBuy(true) _this7.settingStatus = true } else { _this7.settingStatus = false } _context5.next = 13 break case 10: _context5.prev = 10 _context5.t0 = _context5['catch'](0) _this7.loadDataStatus = false case 13: case 'end': return _context5.stop() } } }, _callee5, null, [[0, 10]] ) }) )() }, computed: { showSelectList: function showSelectList() { var arr = this.selectCourseList var list = _toConsumableArray(arr) list.forEach(function (item) { item.title = dayjs(item.startTime).format('YYYY-MM-DD') + ' ' + getWeekCh(dayjs(item.startTime).day()) + ' ' + item.start + '~' + item.end }) return list }, selectType: function selectType() { // 循环次数是否足够 return this.selectCourseList.length < this.courseNum ? 'noEnough' : 'enough' } }, methods: { onSubmit: function onSubmit() { var _this8 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee6() { return regeneratorRuntime.wrap(function _callee6$( _context6 ) { while (1) { switch ((_context6.prev = _context6.next)) { case 0: if (!(_this8.selectCourseList.length <= 0)) { _context6.next = 3 break } Toast('请选择课程时间') return _context6.abrupt('return') case 3: if ( !( _this8.selectCourseList.length < _this8.courseNum ) ) { _context6.next = 6 break } _this8.selectStatus = true return _context6.abrupt('return') case 6: _context6.next = 8 return _this8._lookCourse() case 8: case 'end': return _context6.stop() } } }, _callee6) }) )() }, getList: function getList(date) { var _this9 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee7() { var _state$user$data2, tempDate, params, res, result, tempObj return regeneratorRuntime.wrap( function _callee7$(_context7) { while (1) { switch ((_context7.prev = _context7.next)) { case 0: _context7.prev = 0 tempDate = date || dayjs().add(1, 'day').toDate() params = { day: dayjs(tempDate).format('DD'), month: dayjs(tempDate).format('MM'), year: dayjs(tempDate).format('YYYY') } _context7.next = 5 return request.post( '/api-student/courseSchedule/createPracticeCourseCalendar', { data: _objectSpread( _objectSpread({}, params), {}, { studentId: (_state$user$data2 = state.user.data) === null || _state$user$data2 === void 0 ? void 0 : _state$user$data2.userId, teacherId: _this9.teacherId } ) } ) case 5: res = _context7.sent result = res.data || [] tempObj = {} result.forEach(function (item) { tempObj[item.date] = item }) _this9.calendarList = tempObj _this9.calendarStatus = result.length > 0 _context7.next = 15 break case 13: _context7.prev = 13 _context7.t0 = _context7['catch'](0) case 15: case 'end': return _context7.stop() } } }, _callee7, null, [[0, 13]] ) }) )() }, onSelectDay: function onSelectDay(obj) { var result = obj || [] var list = _toConsumableArray(this.selectCourseList) result.forEach(function (item) { var isExist = list.some(function (course) { return course.startTime === item.startTime }) !isExist && list.push(_objectSpread({}, item)) }) // 去掉不在 var tempList = [] list.forEach(function (item) { var isExist = result.some(function (course) { return course.startTime === item.startTime }) isExist && tempList.push(item) }) // 对数组进行排序 tempList.sort(function (first, second) { if (first.startTime > second.startTime) return 1 if (first.startTime < second.startTime) return -1 return 0 }) console.log(tempList, 'list') this.selectCourseList = [].concat(tempList) }, onCloseTag: function onCloseTag(item) { var _this10 = this Dialog.confirm({ title: '提示', message: '您是否要删除该选择的课程?', confirmButtonColor: 'var(--van-primary)' }).then(function () { var index = _this10.selectCourseList.findIndex(function ( course ) { return course.startTime === item.startTime }) _this10.selectCourseList.splice(index, 1) }) }, _lookCourse: function _lookCourse(callBack) { var _this11 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee8() { var _times, res, result, message return regeneratorRuntime.wrap( function _callee8$(_context8) { while (1) { switch ((_context8.prev = _context8.next)) { case 0: _context8.prev = 0 _times = [] _this11.selectCourseList.forEach(function (item) { _times.push({ startTime: item.startTime, endTime: item.endTime }) }) _context8.next = 5 return request.post( '/api-student/courseGroup/lockCourseToCache', { data: { courseNum: _this11.courseNum, courseType: 'PRACTICE', loop: _this11.selectType === 'noEnough' ? 1 : 0, teacherId: _this11.teacherId, timeList: [].concat(_times) } } ) case 5: res = _context8.sent result = res.data || [] result.forEach(function (item, index) { _this11.coursePlanList[index] = _objectSpread( _objectSpread( {}, _this11.coursePlanList[index] ), {}, { startTime: item.startTime, endTime: item.endTime, classNum: index + 1 } ) }) _this11.coursePlanStatus = true _this11.selectStatus = true callBack && callBack() _context8.next = 17 break case 13: _context8.prev = 13 _context8.t0 = _context8['catch'](0) // 报错时需要重置日历表的数据 message = _context8.t0.message Dialog.alert({ title: '提示', confirmButtonColor: 'var(--van-primary)', message: message }).then(function () { _this11.getList( _this11.calendarDate || new Date() ) _this11.selectCourseList = [] _this11.selectStatus = false }) case 17: case 'end': return _context8.stop() } } }, _callee8, null, [[0, 13]] ) }) )() }, onReset: function onReset() { var _this12 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee9() { return regeneratorRuntime.wrap(function _callee9$( _context9 ) { while (1) { switch ((_context9.prev = _context9.next)) { case 0: // 是否有锁课状态 或 是锁课类型的 if ( _this12.coursePlanStatus || _this12.selectType === 'enough' ) { _this12.selectStatus = false setTimeout(function () { _this12.coursePlanList = [] }, 500) } else if (_this12.selectType === 'noEnough') { _this12.selectStatus = false } setTimeout(function () { _this12.coursePlanStatus = false }, 500) case 2: case 'end': return _context9.stop() } } }, _callee9) }) )() }, onSure: function onSure() { var _this13 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee10() { var status return regeneratorRuntime.wrap(function _callee10$( _context10 ) { while (1) { switch ((_context10.prev = _context10.next)) { case 0: status = _this13.coursePlanStatus _context10.next = 3 return _this13._lookCourse(function () { if (status) { _this13.selectStatus = false _this13.onBuy() } }) case 3: case 'end': return _context10.stop() } } }, _callee10) }) )() }, onBuy: function onBuy(goTo) { var _this14 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee12() { var res, subjectInfo, tempCourseList, result return regeneratorRuntime.wrap( function _callee12$(_context12) { while (1) { switch ((_context12.prev = _context12.next)) { case 0: _context12.prev = 0 _context12.next = 3 return request.post( '/api-student/userOrder/getPendingOrder', { data: { goodType: 'PRACTICE', bizId: _this14.teacherId } } ) case 3: res = _context12.sent subjectInfo = _this14.subjectInfo tempCourseList = _toConsumableArray( _this14.coursePlanList ) // console.log(this.coursePlanList) tempCourseList.forEach(function (item) { item.classDate = dayjs(item.startTime).format( 'YYYY-MM-DD' ) item.title = '' .concat( dayjs(item.startTime).format('YYYY-MM-DD'), ' ' ) .concat( getWeekCh(dayjs(item.startTime).day()), ' ' ) .concat( dayjs(item.startTime).format('HH:mm'), '~' ) .concat(dayjs(item.endTime).format('HH:mm')) }) orderStatus.orderObject.orderType = 'PRACTICE' orderStatus.orderObject.orderName = subjectInfo.subjectName + '陪练课' orderStatus.orderObject.orderDesc = subjectInfo.subjectName + '陪练课' orderStatus.orderObject.actualPrice = Number( ( _this14.courseNum * subjectInfo.subjectPrice ).toFixed(2) ) orderStatus.orderObject.orderNo = '' orderStatus.orderObject.orderList = [ { orderType: 'PRACTICE', goodsName: subjectInfo.subjectName + '陪练课', courseGroupName: subjectInfo.subjectName + '陪练课', courseIntroduce: subjectInfo.subjectName + '陪练课', subjectId: subjectInfo.subjectId, singleCourseMinutes: subjectInfo.courseMinutes, courseNum: _this14.courseNum, coursePrice: ( _this14.courseNum * subjectInfo.subjectPrice ).toFixed(2), teacherName: _this14.userInfo.username || '\u6E38\u5BA2'.concat( _this14.userInfo.userId || '' ), teacherId: _this14.userInfo.userId, starGrade: _this14.userInfo.starGrade, avatar: _this14.userInfo.heardUrl, classTime: tempCourseList } ] result = res.data if (result) { Dialog.confirm({ title: '提示', message: '您有一个未支付的订单,是否继续支付?', confirmButtonColor: '#269a93', cancelButtonText: '取消订单', confirmButtonText: '继续支付' }) .then( /*#__PURE__*/ _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark( function _callee11() { return regeneratorRuntime.wrap( function _callee11$(_context11) { while (1) { switch ( (_context11.prev = _context11.next) ) { case 0: tradeOrder( result, _this14.routerTo ) // this.routerTo() case 1: case 'end': return _context11.stop() } } }, _callee11 ) } ) ) ) .catch(function () { Dialog.close() // 只用取消订单,不用做其它处理 _this14.cancelPayment(result.orderNo) }) } else { !goTo && _this14.routerTo() } _context12.next = 19 break case 17: _context12.prev = 17 _context12.t0 = _context12['catch'](0) case 19: case 'end': return _context12.stop() } } }, _callee12, null, [[0, 17]] ) }) )() }, routerTo: function routerTo() { this.$router.push({ path: '/orderDetail', query: { orderType: 'PRACTICE' } }) }, cancelPayment: function cancelPayment(orderNo) { return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee13() { return regeneratorRuntime.wrap( function _callee13$(_context13) { while (1) { switch ((_context13.prev = _context13.next)) { case 0: _context13.prev = 0 _context13.next = 3 return request.post( '/api-student/userOrder/orderCancel', { data: { orderNo: orderNo } } ) case 3: _context13.next = 7 break case 5: _context13.prev = 5 _context13.t0 = _context13['catch'](0) case 7: case 'end': return _context13.stop() } } }, _callee13, null, [[0, 5]] ) }) )() } }, render: function render() { var _this15 = this return createVNode(Fragment, null, [ !this.loadDataStatus && (this.settingStatus ? createVNode(Fragment, null, [ createVNode('div', { class: styles$2.practice }, [ createVNode( CellGroup, { class: styles$2.group, border: false }, { default: function _default() { return [ _this15.subjectInfo.subjectPrice > 0 && createVNode( Cell, { title: '陪练课收费' }, { default: function _default() { return createVNode( 'div', { class: styles$2.price }, [ createVNode('span', null, [ createTextVNode('\xA5'), _this15.$filters.moneyFormat( _this15.subjectInfo .subjectPrice ) ]), createTextVNode('/'), _this15.subjectInfo.courseMinutes, createTextVNode('\u5206\u949F') ] ) } } ), createVNode( Cell, { title: '选择专业', isLink: true, value: _this15.subjectInfo.subjectName, onClick: function onClick() { return (_this15.subjectStatus = true) } }, null ), createVNode( Cell, { title: '课时数' }, { default: function _default() { return createVNode( Stepper, { modelValue: _this15.courseNum, 'onUpdate:modelValue': function onUpdateModelValue( $event ) { return (_this15.courseNum = $event) }, theme: 'round', max: 12, min: 1, buttonSize: 22, onChange: function onChange() { _this15.selectCourseList = [] } }, null ) } } ) ] } } ), this.calendarStatus && createVNode('div', { class: styles$2.group }, [ createVNode( Calendar, { selectList: this.selectCourseList, list: this.calendarList, maxDays: this.courseNum, nextMonth: function nextMonth(date) { return _this15.getList(date) }, prevMonth: function prevMonth(date) { return _this15.getList(date) }, selectDay: this.onSelectDay, calendarDate: this.calendarDate, 'onUpdate:calendarDate': function onUpdateCalendarDate($event) { return (_this15.calendarDate = $event) } }, null ) ]), createVNode( Cell, { class: [styles$2.arrangeCell] }, { title: function title() { return createVNode( 'div', { class: styles$2.rTitle }, [ createVNode('span', null, [ createTextVNode( '\u5DF2\u9009\u62E9\u8BFE\u7A0B\u65F6\u95F4' ) ]) ] ) }, label: function label() { return createVNode( 'div', { class: styles$2.rTag }, [ _this15.showSelectList.map(function (item) { return createVNode(Fragment, null, [ createVNode( Tag, { plain: true, round: true, closeable: true, size: 'large', type: 'primary', class: styles$2.tag, onClose: function onClose() { return _this15.onCloseTag(item) } }, { default: function _default() { return [item.title] } } ), createVNode('br', null, null) ]) }) ] ) } } ), createVNode( Popup, { show: this.selectStatus, class: styles$2.selectPopup }, { default: function _default() { return [ createVNode( 'div', { class: styles$2.selectContainer }, [ createVNode( 'div', { class: styles$2.rTitle }, [ createVNode('span', null, [ createTextVNode('\u63D0\u793A') ]) ] ), createVNode( 'div', { class: styles$2.selectPopupContent }, [ createVNode( 'p', { class: styles$2.desc }, [ _this15.selectType === 'noEnough' && !_this15.coursePlanStatus ? '您所选择的上课时间未达到您输入的课时数,系统根据已选时间将自动按周顺延排课。' : '您已选择以下上课时间段,时间段会暂时锁定,锁定期间学员不可购买该时间段课程。' ] ), _this15.coursePlanList && _this15.coursePlanList.length > 0 && _this15.coursePlanStatus && createVNode( 'p', { class: styles$2.times }, [ _this15.coursePlanList.map( function (item) { return createVNode( 'span', null, [ dayjs( item.startTime || new Date() ).format('YYYY-MM-DD'), ' ', dayjs( item.startTime || new Date() ).format('HH:mm'), createTextVNode('~'), dayjs( item.endTime || new Date() ).format('HH:mm') ] ) } ) ] ) ] ), createVNode( 'div', { class: styles$2.selectBtn }, [ createVNode( Button, { class: styles$2.btn, type: 'primary', round: true, block: true, plain: true, onClick: _this15.onReset }, { default: function _default() { return [ _this15.selectType === 'noEnough' ? '继续选择' : '重新选择' ] } } ), createVNode( Button, { class: styles$2.btn, type: 'primary', round: true, block: true, onClick: _this15.onSure }, { default: function _default() { return [ createTextVNode( '\u786E\u8BA4' ) ] } } ) ] ) ] ) ] } } ), createVNode( ActionSheet, { show: this.subjectStatus, actions: this.teacherSubjectList, cancelText: '取消', closeOnClickAction: true, onCancel: function onCancel() { return (_this15.subjectStatus = false) }, onSelect: function onSelect(item) { var subjectName = item.subjectName, subjectPrice = item.subjectPrice, courseMinutes = item.courseMinutes, subjectId = item.subjectId _this15.subjectInfo = { subjectPrice: subjectPrice, courseMinutes: courseMinutes, subjectName: subjectName, subjectId: subjectId } _this15.subjectStatus = false } }, null ) ]), createVNode( 'div', { class: ['btnGroup', styles$2.fixedBtn], style: { background: '#fff', paddingTop: '10px' } }, [ createVNode( Button, { block: true, round: true, type: 'primary', onClick: this.onSubmit }, { default: function _default() { return [ createTextVNode('\u786E\u8BA4\u7EA6\u8BFE') ] } } ) ] ) ]) : createVNode( ColResult, { btnStatus: false, classImgSize: 'SMALL', tips: '老师暂未开放陪练课' }, null )) ]) } }) var liveList = '_liveList_396y7_1' var liCover = '_liCover_396y7_4' var liContent = '_liContent_396y7_10' var liTitle = '_liTitle_396y7_17' var num = '_num_396y7_25' var buyNum = '_buyNum_396y7_29' var price = '_price_396y7_36' var priceNum = '_priceNum_396y7_40' var label = '_label_396y7_49' var liveGroup = '_liveGroup_396y7_52' var subjectName = '_subjectName_396y7_57' var timerString = '_timerString_396y7_68' var styles$1 = { liveList: liveList, liCover: liCover, liContent: liContent, liTitle: liTitle, num: num, buyNum: buyNum, price: price, priceNum: priceNum, label: label, liveGroup: liveGroup, subjectName: subjectName, timerString: timerString } function _isSlot$1(s) { return ( typeof s === 'function' || (Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s)) ) } var Live = defineComponent({ name: 'live', data: function data() { var query = this.$route.query return { list: [], dataShow: true, // 判断是否有数据 loading: false, finished: false, params: { teacherId: query.teacherId, groupStatus: 'APPLY', page: 1, rows: 20 } } }, mounted: function mounted() { this.getList() }, methods: { formatTime: function formatTime(time) { var timeStr = dayjs(time || new Date()) var weekStr = [ '周日', '周一', '周二', '周三', '周四', '周五', '周六' ] // console.log(timeStr.day()) return ( timeStr.format('YYYY-MM-DD') + '('.concat(weekStr[timeStr.day()], ')') ) }, getList: function getList() { var _this16 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee14() { var params, res, result return regeneratorRuntime.wrap( function _callee14$(_context14) { while (1) { switch ((_context14.prev = _context14.next)) { case 0: _context14.prev = 0 params = _objectSpread({}, _this16.params) if (state.version) { params.version = state.version || '' // 处理ios审核版本 params.platform = 'ios-student' } _context14.next = 5 return request.post( '/api-student/courseGroup/queryPageCourseGroup', { data: _objectSpread({}, params) } ) case 5: res = _context14.sent _this16.loading = false result = res.data || {} // 处理重复请求数据 if ( !( _this16.list.length > 0 && result.pageNo === 1 ) ) { _context14.next = 10 break } return _context14.abrupt('return') case 10: _this16.list = _this16.list.concat( result.rows || [] ) _this16.finished = result.pageNo >= result.totalPage _this16.params.page = result.pageNo + 1 _this16.dataShow = _this16.list.length > 0 _context14.next = 20 break case 16: _context14.prev = 16 _context14.t0 = _context14['catch'](0) _this16.dataShow = false _this16.finished = true case 20: case 'end': return _context14.stop() } } }, _callee14, null, [[0, 16]] ) }) )() }, onDetail: function onDetail(item) { this.$router.push({ path: '/liveDetail', query: { groupId: item.courseGroupId } }) } }, render: function render() { var _this17 = this var _slot return createVNode(Fragment, null, [ this.dataShow ? createVNode( List, { class: styles$1.liveList, loading: this.loading, 'onUpdate:loading': function onUpdateLoading($event) { return (_this17.loading = $event) }, immediateCheck: false, finished: this.finished, finishedText: '没有更多了' }, _isSlot$1( (_slot = this.list.map(function (item) { return createVNode( CellGroup, { class: styles$1.liveGroup, border: false, onClick: function onClick() { return _this17.onDetail(item) } }, { default: function _default() { return [ createVNode( Cell, { style: { paddingTop: '19px', paddingBottom: '19px' } }, { icon: function icon() { return createVNode( 'div', { style: { position: 'relative', lineHeight: '0' } }, [ createVNode( Image, { class: styles$1.liCover, src: item.backgroundPic, fit: 'cover' }, null ), createVNode( 'span', { class: styles$1.subjectName }, [ item === null || item === void 0 ? void 0 : item.subjectName ] ) ] ) }, title: function title() { return createVNode( 'div', { class: styles$1.liContent }, [ createVNode( 'div', { class: [ styles$1.liTitle, 'van-ellipsis' ] }, [item.courseGroupName] ), createVNode( 'div', { class: styles$1.price }, [ item.coursePrice > 0 && createVNode(Fragment, null, [ createVNode( 'span', { class: styles$1.priceNum }, [ createVNode('i', null, [ createTextVNode( '\xA5' ) ]), _this17.$filters.moneyFormat( item.coursePrice ) ] ) ]), createVNode( 'span', { class: styles$1.label }, [ item.coursePrice > 0 && '/', item.courseNum, createTextVNode( '\u8BFE\u65F6' ) ] ) ] ) ] ) } } ), createVNode( Cell, { titleStyle: { color: '#666666', fontSize: '13px' } }, { title: function title() { return createVNode( 'span', { class: styles$1.timerString }, [ _this17.formatTime( item.salesStartDate ) ] ) }, default: function _default() { return createVNode('div', null, [ item.existBuy === 1 ? createVNode( 'span', { class: styles$1.buyNum }, [ createTextVNode( '\u5DF2\u8D2D\u4E70' ) ] ) : createVNode( 'span', { class: styles$1.num }, [ item.studentCount, createTextVNode( '\u4EBA\u5DF2\u8D2D\u4E70' ) ] ) ]) } } ) ] } } ) })) ) ? _slot : { default: function _default() { return [_slot] } } ) : createVNode( ColResult, { btnStatus: false, classImgSize: 'SMALL', tips: '暂无直播课' }, null ) ]) } }) var videoList = '_videoList_1yf9v_1' var styles = { videoList: videoList } function _isSlot(s) { return ( typeof s === 'function' || (Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s)) ) } var VideoList = defineComponent({ name: 'VideoList', data: function data() { var query = this.$route.query return { list: [], dataShow: true, // 判断是否有数据 loading: false, finished: false, params: { teacherId: query.teacherId, page: 1, rows: 20 } } }, mounted: function mounted() { this.getList() }, methods: { getList: function getList() { var _this18 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee15() { var params, res, result return regeneratorRuntime.wrap( function _callee15$(_context15) { while (1) { switch ((_context15.prev = _context15.next)) { case 0: _context15.prev = 0 params = _objectSpread({}, _this18.params) if (state.version) { params.version = state.version || '' // 处理ios审核版本 params.platform = 'ios-student' } _context15.next = 5 return request.post( '/api-student/videoLesson/selectGroup', { data: _objectSpread({}, params) } ) case 5: res = _context15.sent _this18.loading = false result = res.data || {} // 处理重复请求数据 if ( !( _this18.list.length > 0 && result.pageNo === 1 ) ) { _context15.next = 10 break } return _context15.abrupt('return') case 10: _this18.list = _this18.list.concat( result.rows || [] ) _this18.finished = result.pageNo >= result.totalPage _this18.params.page = result.pageNo + 1 _this18.dataShow = _this18.list.length > 0 _context15.next = 20 break case 16: _context15.prev = 16 _context15.t0 = _context15['catch'](0) _this18.dataShow = false _this18.finished = true case 20: case 'end': return _context15.stop() } } }, _callee15, null, [[0, 16]] ) }) )() }, onDetail: function onDetail(item) { this.$router.push({ path: '/videoDetail', query: { groupId: item.id } }) } }, render: function render() { var _this19 = this var _slot return createVNode(Fragment, null, [ this.dataShow ? createVNode( List, { class: styles.videoList, loading: this.loading, 'onUpdate:loading': function onUpdateLoading($event) { return (_this19.loading = $event) }, finished: this.finished, immediateCheck: false, finishedText: '没有更多了', onLoad: this.getList }, _isSlot( (_slot = this.list.map(function (item) { return createVNode( VideoItem, { item: item, onClick: _this19.onDetail }, null ) })) ) ? _slot : { default: function _default() { return [_slot] } } ) : createVNode( ColResult, { btnStatus: false, classImgSize: 'SMALL', tips: '暂无视频课' }, null ) ]) } }) var Music = defineComponent({ name: 'music', data: function data() { var query = this.$route.query return { teacherId: query.teacherId, list: [], dataShow: false, // 判断是否有数据 loading: false, finished: false, params: { page: 1, rows: 20 } } }, methods: { onItemClick: function onItemClick(item) { var _this20 = this musicBuy(item, function (path) { _this20.$router.push({ path: path, query: { orderType: 'MUSIC' } }) }) } }, render: function render() { return createVNode(Fragment, null, [ createVNode( MusicList, { hideSearch: true, myself: true, onItemClick: this.onItemClick, teacherId: this.teacherId }, null ) ]) } }) var getAssetsHomeFile$1 = function getAssetsHomeFile$1(fileName) { var path = '../images/'.concat(fileName) var modules = { '../images/cert_active.png': __glob_18_0, '../images/cert_default.png': __glob_18_1, '../images/follow_bg.png': __glob_18_2, '../images/head_bg.png': __glob_18_3, '../images/icon-chat.png': __glob_18_4, '../images/icon-close.png': __glob_18_5, '../images/icon_fans.png': __glob_18_6, '../images/icon_subject.png': __glob_18_7, '../images/icon_video.png': __glob_18_8, '../images/live_active.png': __glob_18_9, '../images/live_bg.png': __glob_18_10, '../images/live_default.png': __glob_18_11, '../images/music_active.png': __glob_18_12, '../images/music_default.png': __glob_18_13, '../images/teacher-icon.png': __glob_18_14, '../images/video_active.png': __glob_18_15, '../images/video_default.png': __glob_18_16, '../images/vip_active.png': __glob_18_17, '../images/vip_default.png': __glob_18_18 } return modules[path].default } var TeacherHeader = defineComponent({ name: 'teacher-header', props: { userInfo: { type: Object, default: {} }, teacherId: { type: String || Number, default: '' } }, data: function data() { return { iconShow: false } }, computed: { subjectNameList: function subjectNameList() { var userInfo = this.userInfo var subjectName = userInfo.subjectName return subjectName ? subjectName.split(',') : [] }, starGrade: function starGrade() { var starGrade = this.userInfo.starGrade return Number(starGrade) || 0 } }, methods: { onStart: function onStart() { var _this21 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee16() { var star, count return regeneratorRuntime.wrap( function _callee16$(_context16) { while (1) { switch ((_context16.prev = _context16.next)) { case 0: _context16.prev = 0 star = _this21.userInfo.isStar ? 0 : 1 _context16.next = 4 return request.get( '/api-student/teacher/starOrUnStar', { params: { userId: _this21.teacherId, starStatus: star } } ) case 4: // const str = star ? '关注成功' : '已取消关注' _this21.userInfo.isStar = star count = star ? _this21.userInfo.fansNum + 1 : _this21.userInfo.fansNum - 1 _this21.userInfo.fansNum = count <= 0 ? 0 : count // Toast(str) _context16.next = 11 break case 9: _context16.prev = 9 _context16.t0 = _context16['catch'](0) case 11: case 'end': return _context16.stop() } } }, _callee16, null, [[0, 9]] ) }) )() }, // 检验是否有对应徽章 checkBadge: function checkBadge(type) { // tag : 老师点亮图标 // STYLE:个人风采 // VIDEO:视频课 // LIVE:直播课, // MUSIC:曲目 逗号隔开 var status = false var userInfo = this.userInfo switch (type) { case 'STYLE': case 'VIDEO': case 'LIVE': case 'MUSIC': if (userInfo.tag) { status = userInfo.tag.indexOf(type) > -1 } break case 'VIP': status = userInfo.isVip > 0 break default: status = false break } return status }, openTeacherIcon: function openTeacherIcon() { this.iconShow = true } }, render: function render() { var _this22 = this var iconList = [ { icon: 'cert_active.png', title: '演奏Mlog达人', des: '个人风采中上传老师风采视频并通过审核' }, { icon: 'video_active.png', title: '教学视频达人', des: '发布您制作的教学视频课程并通过审核' }, { icon: 'live_active.png', title: '直播up达人', des: '达到开通直播权限标准并开通直播功能' }, { icon: 'music_active.png', title: '乐谱歌单达人', des: '上传您制作的乐谱并通过审核' } ] return createVNode(Fragment, null, [ createVNode('div', { class: styles$6.headerContent }, [ createVNode('div', { class: styles$6.headerCount }, [ createVNode('div', { class: styles$6.teacherContent }, [ createVNode( 'div', { class: styles$6.teacherIcon, onClick: function onClick() { // 判断是否在直播中 if (_this22.userInfo.liveing === 1) { postMessage({ api: 'joinLiveRoom', content: { roomId: _this22.userInfo.roomUid, teacherId: _this22.userInfo.userId } }) } } }, [ createVNode( Image, { class: [ styles$6.avatar, this.checkBadge('VIP') && styles$6.avatarActive ], round: true, src: this.userInfo.heardUrl || IconAvator, fit: 'cover' }, null ), this.userInfo.liveing === 1 && createVNode('p', { class: styles$6.liveTag }, [ createTextVNode('\u76F4\u64AD\u4E2D') ]), createVNode( Image, { class: styles$6.teacherIconVip, src: this.checkBadge('VIP') ? getAssetsHomeFile$1('vip_active.png') : getAssetsHomeFile$1('vip_default.png') }, null ) ] ), createVNode('div', { class: styles$6.teacherOperation }, [ createVNode( Button, { type: 'primary', size: 'small', plain: true, round: true, class: [ styles$6.btn, this.userInfo.isStar ? styles$6.btnStar : '' ], onClick: this.onStart }, { default: function _default() { return [ _this22.userInfo.isStar ? '已关注' : '关注' ] } } ), createVNode( Button, { type: 'primary', size: 'small', round: true, style: { marginLeft: '5px' }, class: styles$6.btn, icon: IconChat, onClick: function onClick() { postMessage({ api: 'joinChatGroup', content: { type: 'single', // single 单人 multi 多人 id: _this22.teacherId } }) } }, { default: function _default() { return [createTextVNode('\u804A\u5929')] } } ) ]) ]), createVNode('div', { class: styles$6.teacherInfo }, [ createVNode('div', { class: styles$6.teacherInfoName }, [ this.userInfo.username || '\u6E38\u5BA2'.concat(this.userInfo.userId || '') ]), this.userInfo.degreeFlag ? createVNode('img', { src: IconXueli }, null) : null, this.userInfo.teacherFlag ? createVNode('img', { src: IconJiaozi }, null) : null ]), createVNode('div', { class: styles$6.teacherHonor }, [ createVNode('div', null, [ createTextVNode('\u52CB\u7AE0\uFF1A') ]), createVNode( 'div', { class: styles$6.teacherIcons, onClick: this.openTeacherIcon }, [ createVNode( Image, { class: styles$6.iconOther, src: this.checkBadge('STYLE') ? getAssetsHomeFile$1('cert_active.png') : getAssetsHomeFile$1('cert_default.png') }, null ), createVNode( Image, { class: styles$6.iconOther, src: this.checkBadge('VIDEO') ? getAssetsHomeFile$1('video_active.png') : getAssetsHomeFile$1('video_default.png') }, null ), createVNode( Image, { class: styles$6.iconOther, src: this.checkBadge('LIVE') ? getAssetsHomeFile$1('live_active.png') : getAssetsHomeFile$1('live_default.png') }, null ), createVNode( Image, { class: styles$6.iconOther, src: this.checkBadge('MUSIC') ? getAssetsHomeFile$1('music_active.png') : getAssetsHomeFile$1('music_default.png') }, null ) ] ), createVNode('div', { class: styles$6.score }, [ createTextVNode('\u8BC4\u5206\uFF1A') ]), createVNode('div', { class: styles$6.level }, [ this.starGrade ? createVNode( Rate, { readonly: true, modelValue: this.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')] ) ]) ]), createVNode('div', { class: styles$6.piNameSubject }, [ createVNode( Image, { class: styles$6.subjectSection, src: getAssetsHomeFile$1('icon_subject.png'), fit: 'contain' }, null ), createVNode('div', { class: styles$6.subjectList }, [ this.subjectNameList.map(function (item) { return createVNode( 'span', { class: styles$6.subject }, [item] ) }) ]) ]), createVNode('div', { class: styles$6['teacher-bottom'] }, [ createVNode('div', { class: styles$6['teacher-data'] }, [ createVNode( 'div', { class: styles$6['teacher-data_item'] }, [ createTextVNode('\u7C89\u4E1D '), createVNode('span', null, [ this.userInfo.fansNum || 0 ]) ] ), createVNode( 'div', { class: styles$6['teacher-data_item'] }, [ createTextVNode('\u5DF2\u4E0A\u8BFE\u65F6 '), createVNode('span', null, [ this.userInfo.expTime || 0 ]) ] ) ]) ]) ]) ]), createVNode( Popup, { class: styles$6['teaherPopup'], show: this.iconShow, 'onUpdate:show': function onUpdateShow($event) { return (_this22.iconShow = $event) } }, { default: function _default() { return [ createVNode( Image, { src: getAssetsHomeFile$1('teacher-icon.png') }, null ), createVNode( 'div', { class: styles$6.teacherIconWrap }, [ iconList.map(function (n) { return createVNode( 'div', { class: styles$6.teacherIconItem }, [ createVNode( 'div', { class: styles$6.teacherIconItemTop }, [ createVNode( Image, { src: getAssetsHomeFile$1(n.icon) }, null ), createVNode( 'div', { class: styles$6.teacherIconTitle }, [n.title] ) ] ), createVNode( 'div', { class: styles$6.teacherIconDes }, [n.des] ) ] ) }) ] ), createVNode( Image, { onClick: function onClick() { return (_this22.iconShow = false) }, class: styles$6.closeIcon, src: getAssetsHomeFile$1('icon-close.png') }, null ) ] } } ) ]) } }) var getAssetsHomeFile = exports( 'getAssetsHomeFile', function (fileName) { var path = './images/'.concat(fileName) var modules = { './images/cert_active.png': __glob_18_0, './images/cert_default.png': __glob_18_1, './images/follow_bg.png': __glob_18_2, './images/head_bg.png': __glob_18_3, './images/icon-chat.png': __glob_18_4, './images/icon-close.png': __glob_18_5, './images/icon_fans.png': __glob_18_6, './images/icon_subject.png': __glob_18_7, './images/icon_video.png': __glob_18_8, './images/live_active.png': __glob_18_9, './images/live_bg.png': __glob_18_10, './images/live_default.png': __glob_18_11, './images/music_active.png': __glob_18_12, './images/music_default.png': __glob_18_13, './images/teacher-icon.png': __glob_18_14, './images/video_active.png': __glob_18_15, './images/video_default.png': __glob_18_16, './images/vip_active.png': __glob_18_17, './images/vip_default.png': __glob_18_18 } return modules[path].default } ) var teacherHome = exports( 'default', defineComponent({ name: 'teacherHome', data: function data() { // 先取session中的数据,没有再取参数,默认为老师风采 var tabs = sessionStorage.getItem('teacherHomeTabs') || '' var query = this.$route.query return { teacherId: query.teacherId, tabs: tabs || query.tabs || 'single', userInfo: {}, background: 'rgba(55, 205, 177, 0)', headColor: '#fff', height: 'auto', backIconColor: 'white', homeContaiterHeight: '' } }, created: function created() { return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee17() { return regeneratorRuntime.wrap(function _callee17$( _context17 ) { while (1) { switch ((_context17.prev = _context17.next)) { case 0: case 'end': return _context17.stop() } } }, _callee17) }) )() }, mounted: function mounted() { var _this23 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee18() { return regeneratorRuntime.wrap(function _callee18$( _context18 ) { while (1) { switch ((_context18.prev = _context18.next)) { case 0: _this23.getTeacherDetail() // 监听页面返回 listenerMessage('webViewOnResume', function () { _this23.getTeacherDetail() }) useEventListener( document, 'scroll', function (evt) { var _useWindowScroll = useWindowScroll(), y = _useWindowScroll.y // this.background = `rgba(255, 255, 255, ${y.value / 100})` // console.log(y.value) 142 if (y.value > 52) { _this23.headColor = '#000' _this23.background = '#fff' _this23.backIconColor = 'black' } else { _this23.background = 'transparent' _this23.headColor = '#fff' _this23.backIconColor = 'white' } } ) case 3: case 'end': return _context18.stop() } } }, _callee18) }) )() }, methods: { getTeacherDetail: function getTeacherDetail() { var _this24 = this return _asyncToGenerator( /*#__PURE__*/ regeneratorRuntime.mark(function _callee19() { var res return regeneratorRuntime.wrap( function _callee19$(_context19) { while (1) { switch ((_context19.prev = _context19.next)) { case 0: _context19.prev = 0 _context19.next = 3 return request.get( '/api-student/teacher/queryTeacherHome', { params: { userId: _this24.teacherId } } ) case 3: res = _context19.sent _this24.userInfo = res.data _context19.next = 9 break case 7: _context19.prev = 7 _context19.t0 = _context19['catch'](0) case 9: case 'end': return _context19.stop() } } }, _callee19, null, [[0, 7]] ) }) )() } }, render: function render() { var _this25 = this return createVNode( 'div', { class: styles$5['teacher-record'] }, [ createVNode('div', { ref: 'headers' }, [ createVNode( ColHeader, { background: this.background, border: false, color: this.headColor, backIconColor: this.backIconColor, onHeaderBack: function onHeaderBack() { _this25.$nextTick(function () { var _useRect = useRect(_this25.$refs.headers), height = _useRect.height _this25.height = height // this.homeContaiterHeight = `calc(100vh - var(--van-tabs-line-height) - ${height}px - 15px)` }) } }, null ) ]), createVNode( 'img', { class: styles$5.bgImg, src: this.userInfo.heardUrl }, null ), createVNode('div', { class: styles$5.bg }, null), createVNode('div', { class: styles$5.teacherHeader }, [ createVNode( TeacherHeader, { userInfo: this.userInfo, teacherId: this.teacherId }, null ) ]), createVNode( Tabs, { color: 'var(--van-primary)', background: '#f8f9fc', shrink: true, lineWidth: 20, sticky: true, offsetTop: this.height, active: this.tabs, 'onUpdate:active': function onUpdateActive($event) { return (_this25.tabs = $event) }, onChange: function onChange() { sessionStorage.setItem( 'teacherHomeTabs', _this25.tabs ) } }, { default: function _default() { return [ createVNode( Tab, { title: '个人风采', name: 'single' }, { default: function _default() { return [ createVNode( 'div', { style: { minHeight: _this25.homeContaiterHeight } }, [ _this25.tabs === 'single' && createVNode( Single, { userInfo: _this25.userInfo }, null ) ] ) ] } } ), createVNode( Tab, { title: '陪练课', name: 'practice' }, { default: function _default() { return [ createVNode( 'div', { style: { minHeight: _this25.homeContaiterHeight } }, [ _this25.tabs === 'practice' && createVNode( Practice, { userInfo: _this25.userInfo }, null ) ] ) ] } } ), createVNode( Tab, { title: '直播课', name: 'live' }, { default: function _default() { return [ createVNode( 'div', { style: { minHeight: _this25.homeContaiterHeight } }, [ _this25.tabs === 'live' && createVNode(Live, null, null) ] ) ] } } ), createVNode( Tab, { title: '视频课', name: 'video' }, { default: function _default() { return [ createVNode( 'div', { style: { minHeight: _this25.homeContaiterHeight } }, [ _this25.tabs === 'video' && createVNode(VideoList, null, null) ] ) ] } } ), createVNode( Tab, { title: '乐谱', name: 'music' }, { default: function _default() { return [ createVNode( 'div', { style: { minHeight: _this25.homeContaiterHeight } }, [ _this25.tabs === 'music' && createVNode(Music, null, null) ] ) ] } } ) ] } } ) ] ) } }) ) } } } ) })()