12345678910111213 |
- ;(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);});};}System.register(['./index-legacy.5669f9d5.js','./index-legacy.01d7405a.js','./index-legacy.902a9e5a.js','./music_default-legacy.0ca69b44.js','./icon_timer-legacy.c5e10338.js','./icon_vip_default-legacy.d2430bdf.js','./vendor-legacy.b19481d4.js'],function(exports){'use strict';var ColEmpty,Pagination,request,iconTeacher,__glob_5_0,__glob_5_1,__glob_5_2,__glob_5_3,__glob_5_4,__glob_5_5,__glob_5_6,__glob_5_7,__glob_5_8,__glob_5_9,__glob_5_10,__glob_5_11,__glob_5_13,__glob_5_14,__glob_5_17,__glob_5_18,__glob_5_12,__glob_5_15,__glob_5_16,defineComponent,ElMessageBox,ElMessage,dayjs,createVNode,createTextVNode,ElImage,ElTag,ElButton,isVNode,ElSkeleton,ElSkeletonItem,Fragment;return{setters:[function(module){ColEmpty=module.C;},function(module){Pagination=module.P;},function(module){request=module.r;iconTeacher=module.d;},function(module){__glob_5_0=module._;__glob_5_1=module.a;__glob_5_2=module.b;__glob_5_3=module.c;__glob_5_4=module.d;__glob_5_5=module.e;__glob_5_6=module.f;__glob_5_7=module.g;__glob_5_8=module.h;__glob_5_9=module.i;__glob_5_10=module.j;__glob_5_11=module.k;__glob_5_13=module.l;__glob_5_14=module.m;__glob_5_17=module.n;__glob_5_18=module.o;},function(module){__glob_5_12=module._;},function(module){__glob_5_15=module._;__glob_5_16=module.a;},function(module){defineComponent=module.d;ElMessageBox=module.j;ElMessage=module.E;dayjs=module.a9;createVNode=module.c;createTextVNode=module.a;ElImage=module.x;ElTag=module.T;ElButton=module.k;isVNode=module.a8;ElSkeleton=module.aj;ElSkeletonItem=module.ak;Fragment=module.F;}],execute:function execute(){function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var getAssetsHomeFile=function getAssetsHomeFile(fileName){var path="../../user-info/images/".concat(fileName);var modules={"../../user-info/images/course_bg.png":__glob_5_0,"../../user-info/images/entry_active.png":__glob_5_1,"../../user-info/images/entry_default.png":__glob_5_2,"../../user-info/images/icon_cert.png":__glob_5_3,"../../user-info/images/icon_cert_default.png":__glob_5_4,"../../user-info/images/icon_king.png":__glob_5_5,"../../user-info/images/icon_live.png":__glob_5_6,"../../user-info/images/icon_live_default.png":__glob_5_7,"../../user-info/images/icon_member.png":__glob_5_8,"../../user-info/images/icon_member_default.png":__glob_5_9,"../../user-info/images/icon_music.png":__glob_5_10,"../../user-info/images/icon_music_default.png":__glob_5_11,"../../user-info/images/icon_timer.png":__glob_5_12,"../../user-info/images/icon_video.png":__glob_5_13,"../../user-info/images/icon_video_default.png":__glob_5_14,"../../user-info/images/icon_vip.png":__glob_5_15,"../../user-info/images/icon_vip_default.png":__glob_5_16,"../../user-info/images/music_active.png":__glob_5_17,"../../user-info/images/music_default.png":__glob_5_18};return modules[path].default;};var Item=defineComponent({name:'item',props:{item:{type:Object,default:{}},getList:{type:Function,default:function _default(){}}},computed:{subjects:function subjects(){var subjectName=this.item.subjectName;return subjectName.split(',')||[];}},methods:{onUnLike:function onUnLike(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:// console.log(this.item)
- ElMessageBox.confirm('确定取消关注吗?','提示').then(/*#__PURE__*/_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.get('/api-website/student/starOrUnStar',{params:{userId:_this.item.userId,starStatus:0}});case 3:ElMessage.success('取消关注成功');_this.getList();_context.next=9;break;case 7:_context.prev=7;_context.t0=_context["catch"](0);case 9:case"end":return _context.stop();}}},_callee,null,[[0,7]]);})));case 1:case"end":return _context2.stop();}}},_callee2);}))();},checkBadge:function checkBadge(type){// tag : 老师点亮图标
- // STYLE:个人风采
- // VIDEO:视频课
- // LIVE:直播课,
- // MUSIC:曲目 逗号隔开
- var status=false;var teacher=this.item.teacher;switch(type){case'STYLE':case'VIDEO':case'LIVE':case'MUSIC':if(teacher&&teacher.tag){status=teacher.tag.indexOf(type)>-1;}break;case'VIP':if(teacher.membershipStartTime&&teacher.membershipEndTime){var startTime=dayjs(teacher.membershipStartTime).valueOf();var endTime=dayjs(teacher.membershipEndTime).valueOf();var nowTime=dayjs().valueOf();status=nowTime>=startTime&&nowTime<=endTime;}else{status=false;}break;default:status=false;break;}return status;}},render:function render(){var item=this.item;return createVNode("div",{"class":"w-[334px] rounded-[10px] mb-4 m-auto user-shadow relative"},[createVNode("div",{"class":"bg-[#CFF2FF] absolute right-4 top-5 text-[#0089B9] text-xs py-0.5 px-2 rounded-[10px]"},[createTextVNode("\u8001\u5E08")]),createVNode("div",{"class":"p-[18px] flex"},[createVNode(ElImage,{"src":item.avatar||iconTeacher,"class":"w-12 h-12 rounded-full border-2 border-[#2DC7AA] object-cover"},null),createVNode("div",{"class":"flex flex-col pl-5"},[createVNode("p",{"class":"text-base text-[#333] font-semibold leading-tight pb-0"},[item.userName]),createVNode("div",{"class":"flex items-center"},[createVNode(ElImage,{"src":this.checkBadge('VIP')?getAssetsHomeFile('icon_vip.png'):getAssetsHomeFile('icon_vip_default.png'),"class":"h-7 -ml-1"},null),createVNode("img",{"src":this.checkBadge('STYLE')?getAssetsHomeFile('icon_cert.png'):getAssetsHomeFile('icon_cert_default.png'),"class":"h-[26px] px-1"},null),createVNode("img",{"src":this.checkBadge('VIDEO')?getAssetsHomeFile('icon_video.png'):getAssetsHomeFile('icon_video_default.png'),"class":"h-[26px] px-1"},null),createVNode("img",{"src":this.checkBadge('LIVE')?getAssetsHomeFile('icon_live.png'):getAssetsHomeFile('icon_live_default.png'),"class":"h-[26px] px-1"},null),createVNode("img",{"src":this.checkBadge('MUSIC')?getAssetsHomeFile('icon_music.png'):getAssetsHomeFile('icon_music_default.png'),"class":"h-[26px] px-1"},null)])])]),createVNode("p",{"class":"mx-4 mb-3"},[this.subjects.map(function(subject){return createVNode(ElTag,{"effect":"dark","size":"small","color":"#E0FEF9","round":true,"style":{borderColor:'#E0FEF9',color:'#1B967E',margin:'0 4px 8px'}},_isSlot(subject)?subject:{default:function _default(){return[subject];}});})]),createVNode("div",{"class":"border-[#E7E6E6] border-t block mx-2.5 pt-1 pb-2 text-center"},[createVNode(ElButton,{"type":"text","plain":true,"size":"small","class":"!bg-white !text-[#999999] hover:!text-[#FF8B00]","onClick":this.onUnLike},{default:function _default(){return[createTextVNode("\u53D6\u6D88\u5173\u6CE8")];}})])]);}});var List=defineComponent({name:'list',data:function data(){return{pageInfo:{// 分页规则
- limit:10,// 限制显示条数
- page:1,// 当前页
- total:0,// 总条数
- page_size:[10,20,40,50]// 选择限制显示条数
- },list:[],loading:false,dataShow:false// 是否有数据
- };},mounted:function mounted(){this.getList();},methods:{getList:function getList(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){var _yield$request$post,data;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_this2.loading=true;_context3.prev=1;_context3.next=4;return request.post('/api-website/student/queryMyFollow',{requestType:'json',data:{page:_this2.pageInfo.page,rows:_this2.pageInfo.limit}});case 4:_yield$request$post=_context3.sent;data=_yield$request$post.data;_this2.list=data.rows||[];_this2.pageInfo.total=data.total;if(data.total<=0){_this2.dataShow=true;}_context3.next=13;break;case 11:_context3.prev=11;_context3.t0=_context3["catch"](1);case 13:if(_this2.dataShow){_this2.loading=false;}else{setTimeout(function(){_this2.loading=false;},200);}case 14:case"end":return _context3.stop();}}},_callee3,null,[[1,11]]);}))();}},render:function render(){var _this3=this;return createVNode(Fragment,null,[createVNode("div",{"class":"px-3 pt-5"},[createVNode(ElSkeleton,{"loading":this.loading,"animated":true,"class":"w-full m-auto flex flex-wrap","count":2},{default:function _default(){return[createVNode("div",{"class":"flex flex-wrap"},[_this3.list.map(function(item){return createVNode("div",{"class":"basis-1/2"},[createVNode(Item,{"item":item,"getList":_this3.getList},null)]);})])];},template:function template(){return createVNode("div",{"class":"w-[334px] rounded-[10px] p-[18px] flex mb-4 m-auto flex-col user-shadow relative"},[createVNode("div",{"class":"flex w-full"},[createVNode(ElSkeletonItem,{"variant":"circle","style":{width:'48px',height:'48px'}},null),createVNode("div",{"class":"flex flex-1 flex-col pl-5"},[createVNode(ElSkeletonItem,{"variant":"h3","style":{width:'50%',marginBottom:'8px'}},null),createVNode(ElSkeletonItem,{"variant":"p","style":{width:'60%'}},null)])]),createVNode(ElSkeletonItem,{"variant":"p","style":{width:'60%',marginTop:'6px'}},null)]);}})]),this.dataShow&&createVNode(ColEmpty,null,null),createVNode(Pagination,{"total":this.pageInfo.total,"page":this.pageInfo.page,"onUpdate:page":function onUpdatePage($event){return _this3.pageInfo.page=$event;},"limit":this.pageInfo.limit,"onUpdate:limit":function onUpdateLimit($event){return _this3.pageInfo.limit=$event;},"pageSizes":this.pageInfo.page_size,"pagination":this.getList},null)]);}});var index=exports('default',defineComponent({name:'my-follow',data:function data(){return{active:'MYFOLLOW'};},render:function render(){return createVNode("div",{"class":"rounded-md overflow-hidden"},[createVNode("div",{"class":"text-2xl font-semibold text-black leading-none px-6 py-5 "},[createTextVNode("\u5173\u6CE8\u7684\u8001\u5E08")]),createVNode(List,null,null)]);}}));}};});})();
|