1 |
- !function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var n={},r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof d?e:d,o=Object.create(i.prototype),a=new j(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=_(a,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=f(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(I){return{type:"throw",arg:I}}}n.wrap=l;var p={};function d(){}function h(){}function g(){}var m={};u(m,a,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(k([])));y&&y!==r&&i.call(y,a)&&(m=y);var x=g.prototype=d.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(e,n){function r(o,a,c,s){var u=f(e[o],e,a);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==t(p)&&i.call(p,"__await")?n.resolve(p.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):n.resolve(p).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,s)}))}s(u.arg)}var o;this._invoke=function(t,e){function i(){return new n((function(n,i){r(t,e,n,i)}))}return o=o?o.then(i,i):i()}}function _(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:S}}function S(){return{value:void 0,done:!0}}return h.prototype=g,u(x,"constructor",g),u(g,"constructor",h),h.displayName=u(g,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,s,"GeneratorFunction")),t.prototype=Object.create(x),t},n.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,c,(function(){return this})),n.AsyncIterator=b,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var a=new b(l(t,e,r,i),o);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(x),u(x,s,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},n.values=k,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),s=i.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},n}function n(t,e,n,r,i,o,a){try{var c=t[o](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,i)}function r(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function c(t){n(a,i,o,c,s,"next",t)}function s(t){n(a,i,o,c,s,"throw",t)}c(void 0)}))}}System.register(["./index-legacy.2afa0454.js","./index-legacy.5924a931.js","./index-legacy.ddd79631.js","./music_default-legacy.0ca69b44.js","./icon_timer-legacy.c5e10338.js","./icon_vip_default-legacy.d2430bdf.js","./index2-legacy.9b36938e.js","./index2-legacy.12ff18ed.js","./index2-legacy.11e2dacf.js"],(function(t){"use strict";var n,i,o,a,c,s,u,l,f,p,d,h,g,m,v,y,x,w,b,_,L,E,j,k,S,I,O,F,N,P,T,B,G,C,U;return{setters:[function(t){n=t.C},function(t){i=t.P},function(t){o=t.d,a=t.aL,c=t.b,s=t.be,u=t.c,l=t.a,f=t.bK,p=t.ay,d=t.bb,h=t.aX,g=t.F},function(t){m=t._,v=t.a,y=t.b,x=t.c,w=t.d,b=t.e,_=t.f,L=t.g,E=t.h,j=t.i,k=t.j,S=t.k,I=t.l,O=t.m,F=t.n,N=t.o},function(t){P=t._},function(t){T=t._,B=t.a},function(t){G=t.E},function(t){C=t.E,U=t.a},function(){}],execute:function(){var V=function(t){var e="../../user-info/images/".concat(t);return{"../../user-info/images/course_bg.png":m,"../../user-info/images/entry_active.png":v,"../../user-info/images/entry_default.png":y,"../../user-info/images/icon_cert.png":x,"../../user-info/images/icon_cert_default.png":w,"../../user-info/images/icon_king.png":b,"../../user-info/images/icon_live.png":_,"../../user-info/images/icon_live_default.png":L,"../../user-info/images/icon_member.png":E,"../../user-info/images/icon_member_default.png":j,"../../user-info/images/icon_music.png":k,"../../user-info/images/icon_music_default.png":S,"../../user-info/images/icon_timer.png":P,"../../user-info/images/icon_video.png":I,"../../user-info/images/icon_video_default.png":O,"../../user-info/images/icon_vip.png":T,"../../user-info/images/icon_vip_default.png":B,"../../user-info/images/music_active.png":F,"../../user-info/images/music_default.png":N}[e].default},z=o({name:"item",props:{item:{type:Object,default:{}},getList:{type:Function,default:function(){}}},computed:{subjects:function(){return this.item.subjectName.split(",")}},methods:{onUnLike:function(){var t=this;return r(e().mark((function n(){return e().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:a.confirm("确定取消关注吗?","提示").then(r(e().mark((function n(){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.get("/api-website/student/starOrUnStar",{params:{userId:t.item.userId,starStatus:0}});case 3:s.success("取消关注成功"),t.getList(),e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:case"end":return e.stop()}}),n,null,[[0,7]])}))));case 1:case"end":return n.stop()}}),n)})))()},checkBadge:function(t){var e=!1,n=this.item.teacher;switch(t){case"STYLE":case"VIDEO":case"LIVE":case"MUSIC":n.tag&&(e=n.tag.indexOf(t)>-1);break;case"VIP":e=n.isVip>0;break;default:e=!1}return e}},render:function(){var t=this.item;return u("div",{class:"w-[334px] rounded-[10px] mb-4 m-auto user-shadow relative"},[u("div",{class:"bg-[#CFF2FF] absolute right-4 top-5 text-[#0089B9] text-xs py-0.5 px-2 rounded-[10px]"},[l("老师")]),u("div",{class:"p-[18px] flex"},[u(f,{src:t.avatar||p,class:"w-12 h-12 rounded-full border-2 border-[#2DC7AA] object-cover"},null),u("div",{class:"flex flex-col pl-5"},[u("p",{class:"text-base text-[#333] font-semibold leading-tight pb-0"},[t.userName]),u("div",{class:"flex items-center"},[u("img",{src:this.checkBadge("STYLE")?V("icon_cert.png"):V("icon_cert_default.png"),class:"h-[26px] -ml-1"},null),u("img",{src:this.checkBadge("VIDEO")?V("icon_video.png"):V("icon_video_default.png"),class:"h-[26px] px-1"},null),u("img",{src:this.checkBadge("LIVE")?V("icon_live.png"):V("icon_live_default.png"),class:"h-[26px] px-1"},null),u("img",{src:this.checkBadge("MUSIC")?V("icon_music.png"):V("icon_music_default.png"),class:"h-[26px] px-1"},null)])])]),u("p",{class:"mx-4 mb-3"},[this.subjects.map((function(t){return u(G,{effect:"dark",size:"small",color:"#E0FEF9",round:!0,style:{borderColor:"#E0FEF9",color:"#1B967E",margin:"0 4px 8px"}},"function"==typeof(e=t)||"[object Object]"===Object.prototype.toString.call(e)&&!d(e)?t:{default:function(){return[t]}});var e}))]),u("div",{class:"border-[#E7E6E6] border-t block mx-2.5 pt-1 pb-2 text-center"},[u(h,{type:"text",plain:!0,size:"small",class:"!bg-white !text-[#999999] hover:!text-[#FF8B00]",onClick:this.onUnLike},{default:function(){return[l("取消关注")]}})])])}}),Y=o({name:"list",data:function(){return{pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},list:[],loading:!1,dataShow:!1}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;return r(e().mark((function n(){var r,i;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.prev=1,e.next=4,c.post("/api-website/student/queryMyFollow",{requestType:"json",data:{page:t.pageInfo.page,rows:t.pageInfo.limit}});case 4:r=e.sent,i=r.data,t.list=i.rows||[],t.pageInfo.total=i.total,i.total<=0&&(t.dataShow=!0),e.next=13;break;case 11:e.prev=11,e.t0=e.catch(1);case 13:t.dataShow?t.loading=!1:setTimeout((function(){t.loading=!1}),200);case 14:case"end":return e.stop()}}),n,null,[[1,11]])})))()}},render:function(){var t=this;return u(g,null,[u("div",{class:"px-3 pt-5"},[u(C,{loading:this.loading,animated:!0,class:"w-full m-auto flex flex-wrap",count:2},{default:function(){return[u("div",{class:"flex flex-wrap"},[t.list.map((function(e){return u("div",{class:"basis-1/2"},[u(z,{item:e,getList:t.getList},null)])}))])]},template:function(){return u("div",{class:"w-[334px] rounded-[10px] p-[18px] flex mb-4 m-auto flex-col user-shadow relative"},[u("div",{class:"flex w-full"},[u(U,{variant:"circle",style:{width:"48px",height:"48px"}},null),u("div",{class:"flex flex-1 flex-col pl-5"},[u(U,{variant:"h3",style:{width:"50%",marginBottom:"8px"}},null),u(U,{variant:"p",style:{width:"60%"}},null)])]),u(U,{variant:"p",style:{width:"60%",marginTop:"6px"}},null)])}})]),this.dataShow&&u(n,null,null),u(i,{total:this.pageInfo.total,page:this.pageInfo.page,"onUpdate:page":function(e){return t.pageInfo.page=e},limit:this.pageInfo.limit,"onUpdate:limit":function(e){return t.pageInfo.limit=e},pageSizes:this.pageInfo.page_size,pagination:this.getList},null)])}});t("default",o({name:"my-follow",data:function(){return{active:"MYFOLLOW"}},render:function(){return u("div",{class:"rounded-md overflow-hidden"},[u("div",{class:"text-2xl font-semibold text-black leading-none px-6 py-5 "},[l("关注的老师")]),u(Y,null,null)])}}))}}}))}();
|