1234 |
- ;(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_p4y6r_1{background:linear-gradient(#59e5d5,30%,#ffffff)}.van-list__loading,.van-list__finished-text,.van-list__error-text{width:100%}._elegant_p4y6r_9{display:flex;justify-content:space-between;flex-wrap:wrap;padding:.37333rem}._itemBg_p4y6r_15{position:absolute;top:0;left:0;bottom:0;width:100%;height:100%;z-index:89}._tedeoItem_p4y6r_24{border-radius:.10667rem .10667rem 0 0;background-color:#fff;overflow:hidden;width:4.48rem;margin-bottom:.32rem;position:relative}._tedeoItem_p4y6r_24 ._teCover_p4y6r_32{height:2.93333rem;width:100%;vertical-align:middle;overflow:hidden;position:relative}._tedeoItem_p4y6r_24 ._teSection_p4y6r_39{padding:.21333rem}._tedeoItem_p4y6r_24 ._teTitle_p4y6r_42{font-size:.37333rem;color:#1a1a1a;line-height:.53333rem}._tedeoItem_p4y6r_24 ._info_p4y6r_47{display:flex;align-items:center;justify-content:space-between}._tedeoItem_p4y6r_24 ._teUserInfo_p4y6r_52{display:flex;align-items:center;font-size:.32rem;color:#999;padding:.21333rem 0}._tedeoItem_p4y6r_24 ._teUserInfo_p4y6r_52 ._teUserLogo_p4y6r_59{width:.48rem;height:.48rem;border-radius:50%;margin-right:.13333rem;overflow:hidden}._tedeoItem_p4y6r_24 ._teUserInfo_p4y6r_52 ._teUserName_p4y6r_66{padding-right:.16rem;margin-right:.16rem}._tedeoItem_p4y6r_24 ._teUserNum_p4y6r_70{color:#999}._searchContainer_p4y6r_73{background-color:#fff}._item_p4y6r_15{display:flex;align-items:center;justify-content:space-between;padding:.37333rem}._item_p4y6r_15 ._searchItem_p4y6r_82{width:4.48rem;height:1.49333rem}._item_p4y6r_15 ._title_p4y6r_86{font-size:.37333rem;font-weight:600;color:#333;line-height:.53333rem;padding-top:.26667rem;padding-left:2rem}._item_p4y6r_15 ._content_p4y6r_94{padding-left:2rem;font-size:.32rem;color:#666;line-height:.53333rem}._item_p4y6r_15 ._searchFollow_p4y6r_100{background:url(./assets/follow_bg.cb00a284.png) no-repeat center;background-size:100%}._item_p4y6r_15 ._active_p4y6r_104 ._title_p4y6r_86,._item_p4y6r_15 ._active_p4y6r_104 ._content_p4y6r_94{color:#ff1f95}._item_p4y6r_15 ._searchLive_p4y6r_108{background:url(./assets/live_bg.297fb1e3.png) no-repeat center;background-size:100%}._item_p4y6r_15 ._active2_p4y6r_112 ._title_p4y6r_86,._item_p4y6r_15 ._active2_p4y6r_112 ._content_p4y6r_94{color:var(--van-primary)}._searchDefault_p4y6r_116{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_p4y6r_116 ._star_p4y6r_126{margin-right:.13333rem}._video_p4y6r_129{position:absolute;left:0;top:0;width:100%;min-height:100%;background-color:#ccc;border-radius:.10667rem .10667rem 0 0}._living_p4y6r_138{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_p4y6r_138 span{padding-left:.13333rem}._animation_p4y6r_155{height:.48rem!important;width:.53333rem!important}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.f3028e6e.js','./index-legacy.d06425fc.js','./index-legacy.bde1c600.js','./index-legacy.fb33a498.js','./vendor-legacy.9dc75612.js','./index-legacy.f25f109a6.js','./index-legacy.f25f109a5.js','./index-legacy.f25f109a4.js','./organ-search-legacy.6b5a6562.js','./icon_teacher-legacy.00e7cdce.js','./bars-legacy.9085ff9b.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a3.js','./index-legacy.f25f109a9.js'],function(exports){'use strict';var ColHeader,ColResult,Search,state,request,defineComponent,createVNode,Sticky,List,Image,createTextVNode,isVNode,Popup,OrganSearch,iconTeacher,bars;return{setters:[function(module){ColHeader=module.C;},function(module){ColResult=module.C;},function(module){Search=module.S;},function(module){state=module.s;request=module.r;},function(module){defineComponent=module.d;createVNode=module.a;Sticky=module.S;List=module.z;Image=module.q;createTextVNode=module.b;isVNode=module.y;Popup=module.P;},function(){},function(){},function(){},function(module){OrganSearch=module.O;},function(module){iconTeacher=module.i;},function(module){bars=module.b;},function(){},function(){},function(){}],execute:function execute(){var classHeader="_classHeader_p4y6r_1";var elegant="_elegant_p4y6r_9";var itemBg="_itemBg_p4y6r_15";var tedeoItem="_tedeoItem_p4y6r_24";var teCover="_teCover_p4y6r_32";var teSection="_teSection_p4y6r_39";var teTitle="_teTitle_p4y6r_42";var info="_info_p4y6r_47";var teUserInfo="_teUserInfo_p4y6r_52";var teUserLogo="_teUserLogo_p4y6r_59";var teUserName="_teUserName_p4y6r_66";var teUserNum="_teUserNum_p4y6r_70";var searchContainer="_searchContainer_p4y6r_73";var item="_item_p4y6r_15";var searchItem="_searchItem_p4y6r_82";var title="_title_p4y6r_86";var content="_content_p4y6r_94";var searchFollow="_searchFollow_p4y6r_100";var active="_active_p4y6r_104";var searchLive="_searchLive_p4y6r_108";var active2="_active2_p4y6r_112";var searchDefault="_searchDefault_p4y6r_116";var star="_star_p4y6r_126";var video="_video_p4y6r_129";var living="_living_p4y6r_138";var animation="_animation_p4y6r_155";var styles={classHeader:classHeader,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(){return{searchStatus:false,openStatus:false,subjectList:[],params:{username:'',page:1,subjectId:null,subjectName:''},dataShow:true,// 判断是否有数据
- loading:false,finished:false,list:[]};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var _state$user$data,_state$user$data2;var res;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:sessionStorage.removeItem('teacherHomeTabs');_this.params.subjectId=((_state$user$data=state.user.data)===null||_state$user$data===void 0?void 0:_state$user$data.subjectId)||null;_this.params.subjectName=((_state$user$data2=state.user.data)===null||_state$user$data2===void 0?void 0:_state$user$data2.subjectName)||'';_context.prev=3;_context.next=6;return request.get('/api-student/subject/subjectSelect');case 6:res=_context.sent;_this.subjectList=res.data||[];_context.next=12;break;case 10:_context.prev=10;_context.t0=_context["catch"](3);case 12:_context.next=14;return _this.getList();case 14:case"end":return _context.stop();}}},_callee,null,[[3,10]]);}))();},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=_this2.params;_context2.next=4;return request.post('/api-student/teacher/stylePage',{data:_objectSpread({},params)});case 4:res=_context2.sent;console.log(res);_this2.loading=false;result=res.data||{};// 处理重复请求数据
- 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;console.log(_this2.list);_context2.next=21;break;case 17:_context2.prev=17;_context2.t0=_context2["catch"](0);_this2.dataShow=false;_this2.finished=true;case 21:case"end":return _context2.stop();}}},_callee2,null,[[0,17]]);}))();},onSort:function onSort(){this.params.page=1;this.list=[];this.dataShow=true;// 判断是否有数据
- 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.$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},{default:function _default(){return[createVNode(ColHeader,{"class":styles.classHeader,"border":false,"background":"transparent","isFixed":false},null),createVNode(Search,{"placeholder":"请输入老师名称","showAction":true,"onSearch":_this3.onSearch,"onFilter":function onFilter(){_this3.searchStatus=!_this3.searchStatus;_this3.openStatus=!_this3.openStatus;}},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("video",{"width":"100%","class":styles.video},[createVNode("source",{"src":item.videoUrl+'#t=1,3',"type":"video/mp4"},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']},[(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)];}})]);}}));}};});})();
|