teacher-elegant-legacy.00374769.js 14 KB

12345
  1. ;(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 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="._classHeader_169h0_1{background:linear-gradient(#59e5d5,30%,#ffffff)}._teacher-elegant_169h0_4 .van-list__loading,._teacher-elegant_169h0_4 .van-list__finished-text,._teacher-elegant_169h0_4 .van-list__error-text{width:100%}._label_169h0_9{margin-right:.21333rem;font-size:.37333rem}._label_169h0_9 .van-list__loading,._label_169h0_9 .van-list__finished-text,._label_169h0_9 .van-list__error-text{width:100%}._label_169h0_9 .iconfont-down{margin-left:.10667rem}._elegant_169h0_21{display:flex;justify-content:space-between;flex-wrap:wrap;padding:.37333rem}._itemBg_169h0_27{position:absolute;top:0;left:0;bottom:0;width:100%;height:100%;z-index:89}._tedeoItem_169h0_36{border-radius:.21333rem;background-color:#fff;overflow:hidden;width:4.48rem;margin-bottom:.32rem;position:relative}._tedeoItem_169h0_36 ._teCover_169h0_44{height:2.50667rem;width:100%;vertical-align:middle;overflow:hidden;position:relative;display:flex;align-items:center;justify-content:center}._tedeoItem_169h0_36 ._teSection_169h0_54{padding:.21333rem}._tedeoItem_169h0_36 ._teTitle_169h0_57{font-size:.37333rem;color:#1a1a1a;line-height:.53333rem}._tedeoItem_169h0_36 ._info_169h0_62{display:flex;align-items:center;justify-content:space-between}._tedeoItem_169h0_36 ._teUserInfo_169h0_67{display:flex;align-items:center;font-size:.32rem;color:#999;padding:.21333rem 0}._tedeoItem_169h0_36 ._teUserInfo_169h0_67 ._teUserLogo_169h0_74{width:.48rem;height:.48rem;border-radius:50%;margin-right:.13333rem;overflow:hidden}._tedeoItem_169h0_36 ._teUserInfo_169h0_67 ._teUserName_169h0_81{padding-right:.16rem;margin-right:.16rem;max-width:1.73333rem}._tedeoItem_169h0_36 ._teUserNum_169h0_86{color:#999}._searchContainer_169h0_89{background-color:#fff}._item_169h0_27{display:flex;align-items:center;justify-content:space-between;padding:.37333rem}._item_169h0_27 ._searchItem_169h0_98{width:4.48rem;height:1.49333rem}._item_169h0_27 ._title_169h0_102{font-size:.37333rem;font-weight:600;color:#333;line-height:.53333rem;padding-top:.26667rem;padding-left:2rem}._item_169h0_27 ._content_169h0_110{padding-left:2rem;font-size:.32rem;color:#666;line-height:.53333rem}._item_169h0_27 ._searchFollow_169h0_116{background:url(./assets/follow_bg.cb00a284.png) no-repeat center;background-size:100%}._item_169h0_27 ._active_169h0_120 ._title_169h0_102,._item_169h0_27 ._active_169h0_120 ._content_169h0_110{color:#ff1f95}._item_169h0_27 ._searchLive_169h0_124{background:url(./assets/live_bg.297fb1e3.png) no-repeat center;background-size:100%}._item_169h0_27 ._active2_169h0_128 ._title_169h0_102,._item_169h0_27 ._active2_169h0_128 ._content_169h0_110{color:var(--van-primary)}._searchDefault_169h0_132{margin:0 0 .32rem .37333rem;display:inline-flex;align-items:center;padding:.10667rem .21333rem;border-radius:.53333rem;color:#666;font-size:.34667rem;background:#f7f8f9}._searchDefault_169h0_132 ._star_169h0_142{margin-right:.13333rem}._video_169h0_145{position:absolute;left:0;top:0;width:100%;min-height:100%;background-color:#ccc;border-radius:.10667rem .10667rem 0 0}._living_169h0_154{position:absolute;top:0;left:0;color:#fff;font-weight:500;right:0;display:flex;align-items:center;justify-content:center;font-size:.42667rem;bottom:0;background:rgba(51,51,51,.5)}._living_169h0_154 span{padding-left:.13333rem}._animation_169h0_171{height:.48rem!important;width:.53333rem!important}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.dc9452cf.js','./index-legacy.1bceca67.js','./index-legacy.86b5acdc.js','./vendor-legacy.eeb61cf8.js','./index-legacy.f25f109a6.js','./index-legacy.f25f109a5.js','./index-legacy.f25f109a4.js','./organ-search-legacy.dfbe4929.js','./icon_teacher-legacy.42ba77b1.js','./icon_upload_poster-legacy.6c5487e0.js','./bars-legacy.9085ff9b.js','./index-legacy.f25f109a8.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a3.js','./index-legacy.f25f109a10.js'],function(exports){'use strict';var ColHeader,state,request,ColResult,ColSearch,defineComponent,createVNode,Sticky,Icon,List,Image,createTextVNode,isVNode,Popup,OrganSearch,iconTeacher,iconUploadPoster,bars;return{setters:[function(module){ColHeader=module.C;},function(module){state=module.s;request=module.r;ColResult=module.C;},function(module){ColSearch=module.C;},function(module){defineComponent=module.d;createVNode=module.a;Sticky=module.S;Icon=module.u;List=module.w;Image=module.I;createTextVNode=module.j;isVNode=module.x;Popup=module.P;},function(){},function(){},function(){},function(module){OrganSearch=module.O;},function(module){iconTeacher=module.i;},function(module){iconUploadPoster=module.i;},function(module){bars=module.b;},function(){},function(){},function(){},function(){}],execute:function execute(){var classHeader="_classHeader_169h0_1";var label="_label_169h0_9";var elegant="_elegant_169h0_21";var itemBg="_itemBg_169h0_27";var tedeoItem="_tedeoItem_169h0_36";var teCover="_teCover_169h0_44";var teSection="_teSection_169h0_54";var teTitle="_teTitle_169h0_57";var info="_info_169h0_62";var teUserInfo="_teUserInfo_169h0_67";var teUserLogo="_teUserLogo_169h0_74";var teUserName="_teUserName_169h0_81";var teUserNum="_teUserNum_169h0_86";var searchContainer="_searchContainer_169h0_89";var item="_item_169h0_27";var searchItem="_searchItem_169h0_98";var title="_title_169h0_102";var content="_content_169h0_110";var searchFollow="_searchFollow_169h0_116";var active="_active_169h0_120";var searchLive="_searchLive_169h0_124";var active2="_active2_169h0_128";var searchDefault="_searchDefault_169h0_132";var star="_star_169h0_142";var video="_video_169h0_145";var living="_living_169h0_154";var animation="_animation_169h0_171";var styles={classHeader:classHeader,"teacher-elegant":"_teacher-elegant_169h0_4",label:label,elegant:elegant,itemBg:itemBg,tedeoItem:tedeoItem,teCover:teCover,teSection:teSection,teTitle:teTitle,info:info,teUserInfo:teUserInfo,teUserLogo:teUserLogo,teUserName:teUserName,teUserNum:teUserNum,searchContainer:searchContainer,item:item,searchItem:searchItem,title:title,content:content,searchFollow:searchFollow,active:active,searchLive:searchLive,active2:active2,searchDefault:searchDefault,star:star,video:video,living:living,animation:animation};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var teacherElegant=exports('default',defineComponent({data:function data(){var _state$user$data;var sessionSubjectId=sessionStorage.getItem('elegantSubjectId');return{sessionSubjectId:sessionSubjectId,searchStatus:false,openStatus:false,subjectList:[],params:{username:'',page:1,subjectId:sessionSubjectId||((_state$user$data=state.user.data)===null||_state$user$data===void 0?void 0:_state$user$data.subjectId)||null,subjectName:''},dataShow:true,// 判断是否有数据
  2. loading:false,finished:false,list:[],height:'auto'};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var _state$user$data2;var res,subjectName;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.get('/api-student/subject/subjectSelect');case 3:res=_context.sent;_this.subjectList=res.data||[];_context.next=9;break;case 7:_context.prev=7;_context.t0=_context["catch"](0);case 9:subjectName='';_this.subjectList.forEach(function(item){var _item$subjects;(_item$subjects=item.subjects)===null||_item$subjects===void 0?void 0:_item$subjects.forEach(function(child){if(child.id===Number(_this.sessionSubjectId)){subjectName=child.name;}});});_this.params.subjectName=subjectName||((_state$user$data2=state.user.data)===null||_state$user$data2===void 0?void 0:_state$user$data2.subjectName)||'';_context.next=14;return _this.getList();case 14:sessionStorage.removeItem('teacherHomeTabs');sessionStorage.removeItem('elegantSubjectId');case 16:case"end":return _context.stop();}}},_callee,null,[[0,7]]);}))();},computed:{filterDot:function filterDot(){var subjectId=this.params.subjectId;return!!subjectId;}},methods:{getList:function getList(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var params,res,result;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;params=_objectSpread({},_this2.params);if(state.version){params.version=state.version||'';// 处理ios审核版本
  3. params.platform='ios-student';}_context2.next=5;return request.post('/api-student/teacher/stylePage',{data:_objectSpread({},params)});case 5:res=_context2.sent;_this2.loading=false;result=res.data||{};// 处理重复请求数据
  4. if(!(_this2.list.length>0&&result.pageNo===1)){_context2.next=10;break;}return _context2.abrupt("return");case 10:_this2.list=_this2.list.concat(result.rows||[]);_this2.finished=result.pageNo>=result.totalPage;_this2.params.page=result.pageNo+1;_this2.dataShow=_this2.list.length>0;_context2.next=20;break;case 16:_context2.prev=16;_context2.t0=_context2["catch"](0);_this2.dataShow=false;_this2.finished=true;case 20:case"end":return _context2.stop();}}},_callee2,null,[[0,16]]);}))();},onSort:function onSort(){this.params.page=1;this.list=[];this.dataShow=true;// 判断是否有数据
  5. this.loading=false;this.finished=false;this.searchStatus=false;this.getList();},onSearch:function onSearch(_search){this.params.username=_search;this.onSort();},onDetail:function onDetail(item){this.params.subjectId&&sessionStorage.setItem('elegantSubjectId',this.params.subjectId);this.$router.push({path:'/teacherHome',query:{teacherId:item.userId}});}},render:function render(){var _this3=this;var _slot;return createVNode("div",{"class":styles['teacher-elegant']},[createVNode(Sticky,{"offsetTop":0,"position":"top"},{default:function _default(){return[createVNode("div",{"ref":"header"},[createVNode(ColHeader,{"class":styles.classHeader,"border":false,"background":"transparent","isFixed":false},null),createVNode(ColSearch,{"placeholder":"请输入老师名称","onSearch":_this3.onSearch},{left:function left(){return createVNode("div",{"class":styles.label,"onClick":function onClick(){_this3.searchStatus=!_this3.searchStatus;_this3.openStatus=!_this3.openStatus;}},[_this3.params.subjectName,createVNode(Icon,{"classPrefix":"iconfont","name":"down","size":12,"color":"#333"},null)]);}})])];}}),this.dataShow?createVNode(List,{"loading":this.loading,"onUpdate:loading":function onUpdateLoading($event){return _this3.loading=$event;},"finished":this.finished,"finishedText":" ","immediateCheck":false,"class":[styles.elegant],"onLoad":this.getList},_isSlot(_slot=this.list.map(function(item){return createVNode("div",{"class":styles.tedeoItem},[createVNode("div",{"class":styles.itemBg,"onClick":function onClick(){_this3.onDetail(item);}},null),createVNode("div",{"class":styles.teCover},[createVNode(Image,{"src":item.cover||iconUploadPoster,"fit":"cover"},null),item.living===1&&createVNode("div",{"class":styles.living},[createVNode(Image,{"src":bars,"class":styles.animation},null),createVNode("span",null,[createTextVNode("\u64AD\u653E\u4E2D")])])]),createVNode("div",{"class":styles.teSection},[createVNode("div",{"class":[styles.teTitle,'van-ellipsis']},[item.lessonName]),createVNode("div",{"class":styles.info},[createVNode("div",{"class":styles.teUserInfo},[createVNode(Image,{"src":item.avatar||iconTeacher,"class":styles.teUserLogo},null),createVNode("span",{"class":[styles.teUserName,'van-hairline--right van-ellipsis']},[(item===null||item===void 0?void 0:item.username)||"\u6E38\u5BA2".concat((item===null||item===void 0?void 0:item.userId)||'')])]),createVNode("span",{"class":styles.teUserNum},[item.browse,createTextVNode("\u6D4F\u89C8")])])])]);}))?_slot:{default:function _default(){return[_slot];}}):createVNode(ColResult,{"btnStatus":false,"classImgSize":"SMALL","tips":"暂无老师风采"},null),createVNode(Popup,{"show":this.searchStatus,"position":"bottom","round":true,"closeable":true,"safe-area-inset-bottom":true,"onClose":function onClose(){return _this3.searchStatus=false;},"onClosed":function onClosed(){return _this3.openStatus=false;}},{default:function _default(){return[_this3.openStatus&&createVNode(OrganSearch,{"subjectList":_this3.subjectList,"onSort":_this3.onSort,"modelValue":_this3.params.subjectId,"onUpdate:modelValue":function onUpdateModelValue($event){return _this3.params.subjectId=$event;},"subjectName":_this3.params.subjectName,"onUpdate:subjectName":function onUpdateSubjectName($event){return _this3.params.subjectName=$event;}},null)];}})]);}}));}};});})();