index-legacy.ba3d9670.js 16 KB

1
  1. !function(){function e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function r(r){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){t(r,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(a,e))}))}return r}function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(e,r,t,n,a,o,c){try{var u=e[o](c),s=u.value}catch(i){return void t(i)}u.done?r(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var r=this,t=arguments;return new Promise((function(a,o){var c=e.apply(r,t);function u(e){n(c,a,o,u,s,"next",e)}function s(e){n(c,a,o,u,s,"throw",e)}u(void 0)}))}}System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.43e69380.js","./index-legacy.3ccba950.js","./index-legacy.9d5cae73.js","./index-legacy.cf09c997.js","./index-legacy.33d046ca.js","./index-legacy.7ce7fe04.js","./index-legacy.c8c5bc4e.js","./index-legacy.4be048cf.js","./index-legacy.bdbc14c4.js","./icon_member-legacy.839f4db8.js","./index.module-legacy.2b200250.js","./index-legacy.6ac2a941.js","./bg-image-1-legacy.249763f1.js","./index-legacy.9696a579.js","./index-legacy.2904d274.js","./orderStatus-legacy.12eb861d.js","./index-legacy.27db412d.js","./use-tab-status-legacy.d7434e0b.js","./use-id-legacy.ef8b5e97.js","./use-refs-legacy.d925b49f.js","./index-legacy.cae55a25.js","./index-legacy.4bad5b90.js","./utils-legacy.9fa07eff.js","./index-legacy.058dcb53.js"],(function(e){"use strict";var t,n,o,c,u,s,i,d,p,l,f,m,g,b,v,y,h,w,x,T,N,j,I,k,P,O,D,R,S,C,E,Y,z,A,L;return{setters:[function(e){t=e.g,n=e.w,o=e.y,c=e.d,u=e.Q,s=e.S,i=e.V,d=e.j,p=e.bw,l=e.N,f=e.A,m=e.bC,g=e.F,b=e.B,v=e.C,y=e.aS,h=e.b6,w=e.$,x=e.D},function(e){T=e.L},function(){},function(){},function(e){N=e.T,j=e.a},function(){},function(e){I=e.C},function(e){k=e.C},function(e){P=e.I},function(e){O=e.S},function(e){D=e.i},function(e){R=e.s},function(e){S=e.C},function(e){C=e.b},function(e){E=e.T},function(e){Y=e.m,z=e.o},function(e){A=e.o},function(e){L=e.D},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var M="STUDENT"===t.platformType?"/api-student":"/api-teacher",V=function(){var e=a(regeneratorRuntime.mark((function e(t,a){var o,c,u,s,i,d,p,l,f,m,g,b,v,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=t.goodType,c={},e.t0=o,e.next="LIVE"===e.t0||"GROUP"===e.t0?5:"PRACTICE"===e.t0?19:"VIDEO"===e.t0?22:"VIP"===e.t0?34:"MUSIC"===e.t0?45:"ALBUM"===e.t0?56:"TENANT_ALBUM"===e.t0?67:"ACTI_REGIST"===e.t0?78:89;break;case 5:return e.prev=5,e.next=8,U(t.bizId);case 8:u=e.sent,s=[],(u.planList||[]).forEach((function(e){var r=e.startTime||new Date,t=e.endTime||new Date;s.push({courseTime:"".concat(n(r).format("YYYY-MM-DD")," ").concat(n(r).format("HH:mm"),"~").concat(n(t).format("HH:mm")),coursePlan:e.plan,id:e.courseId})})),c={orderType:t.goodType,goodName:t.goodName,courseGroupId:u.courseGroupId,courseGroupName:u.courseGroupName,coursePrice:u.coursePrice,teacherName:u.userName||"游客".concat(u.teacherId||""),teacherId:u.teacherId,avatar:u.avatar,courseInfo:s},e.next=18;break;case 15:throw e.prev=15,e.t1=e.catch(5),new Error(e.t1.message);case 18:return e.abrupt("break",89);case 19:return i=JSON.parse(t.bizContent),c=r(r({},i),{},{teacherName:t.username,starGrade:t.starGrade,avatar:t.avatar}),e.abrupt("break",89);case 22:return e.prev=22,e.next=25,G(t.bizId);case 25:d=e.sent,p=d.lessonGroup,l=d.detailList,c={orderType:t.goodType,goodName:t.goodName,courseGroupId:p.id,courseGroupName:p.lessonName,coursePrice:p.lessonPrice,teacherName:p.username,teacherId:p.teacherId,avatar:p.avatar,courseInfo:l},e.next=33;break;case 30:throw e.prev=30,e.t2=e.catch(22),new Error(e.t2.message);case 33:return e.abrupt("break",89);case 34:return e.prev=34,e.next=37,B(t.id);case 37:f=e.sent,c={orderType:t.goodType,goodName:t.goodName,id:t.id,title:Y[f.period]||"",price:null!=a&&a.couponAmount?Number((f.salePrice-a.couponAmount+a.discountPrice).toFixed(2)):f.salePrice||t.actualPrice,startTime:n(f.startTime).format("YYYY-MM-DD"),endTime:n(f.endTime).format("YYYY-MM-DD")},e.next=44;break;case 41:throw e.prev=41,e.t3=e.catch(34),new Error(e.t3.message);case 44:return e.abrupt("break",89);case 45:return e.prev=45,e.next=48,H(t.bizId);case 48:m=e.sent,c=r({orderType:t.goodType,goodName:t.goodName},m),e.next=55;break;case 52:throw e.prev=52,e.t4=e.catch(45),new Error(e.t4.message);case 55:return e.abrupt("break",89);case 56:return e.prev=56,e.next=59,F(t.bizId);case 59:g=e.sent,c=r({orderType:t.goodType,goodName:t.goodName},g),e.next=66;break;case 63:throw e.prev=63,e.t5=e.catch(56),new Error(e.t5.message);case 66:return e.abrupt("break",89);case 67:return e.prev=67,e.next=70,q(t.bizId);case 70:v=e.sent,c=r(r({orderType:t.goodType,goodName:t.goodName},v),{},{purchaseNum:(null===(b=t.bizInfo)||void 0===b?void 0:b.bizValidTime)||v.purchaseNum}),e.next=77;break;case 74:throw e.prev=74,e.t6=e.catch(67),new Error(e.t6.message);case 77:return e.abrupt("break",89);case 78:return e.prev=78,e.next=81,_(t.bizId);case 81:y=e.sent,c={orderType:t.goodType,goodsName:y.activityName,activityId:y.id,actualPrice:y.registrationPrice},e.next=88;break;case 85:throw e.prev=85,e.t7=e.catch(78),new Error(e.t7.message);case 88:return e.abrupt("break",89);case 89:c.orderType=o,c.goodName=t.goodName,A.orderObject.orderList.push(c);case 92:case"end":return e.stop()}}),e,null,[[5,15],[22,30],[34,41],[45,52],[56,63],[67,74],[78,85]])})));return function(r,t){return e.apply(this,arguments)}}(),G=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.get("".concat(M,"/videoLesson/selectVideoLesson"),{params:{groupId:r}});case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取视频课详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),U=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.get("".concat(M,"/courseGroup/queryLiveCourseInfo"),{params:{groupId:r}});case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取直播课详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),B=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.get("".concat(M,"/vipCardRecord/detail/")+r);case 3:return t=e.sent,e.abrupt("return",t.data||[]);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取会员详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),H=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.get("".concat(M,"/music/sheet/detail/").concat(r));case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取曲目详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),_=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.post("".concat(M,"/open/activity/info/").concat(r));case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取曲目详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),F=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.post("".concat(M,"/music/album/detail"),{data:{id:r}});case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取专辑详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),q=function(){var e=a(regeneratorRuntime.mark((function e(r){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.post("".concat(M,"/userTenantAlbumRecord/detail"),{requestType:"form",data:{albumId:r}});case 3:return t=e.sent,e.abrupt("return",t.data);case 7:throw e.prev=7,e.t0=e.catch(0),new Error("获取机构专辑详情失败");case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(r){return e.apply(this,arguments)}}(),W=function(e,t){var n=e.orderNo,o=e.actualPrice,c=e.orderDesc,u=e.orderName,s=e.orderType,i=e.orderDetailList,d=e.couponAmount,p=e.discountPrice,l=e.paymentConfig,f=e.paymentVendor,m=e.paymentVersion;A.orderObject.orderType=s,A.orderObject.orderName=u,A.orderObject.orderDesc=c,A.orderObject.actualPrice=o,A.orderObject.orderNo=n,A.orderObject.discountPrice=p,A.orderObject.orderList=[],A.orderObject.paymentConfig=r(r({},l),{},{paymentVendor:f,paymentVersion:m});try{i.forEach(function(){var e=a(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V(r,{couponAmount:d,discountPrice:p});case 2:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()),t&&t()}catch(g){}};e("default",c({name:"MusicList",setup:function(){var e=u(),t=s({actions:[{name:"待支付",status:"WAIT_PAY"},{name:"支付中",status:"PAYING"},{name:"已付款",status:"PAID"},{name:"已关闭",status:"CLOSE"},{name:"支付失败",status:"FAIL"}],timeStatus:!1,currentSearchDate:new Date,currentDate:new Date,list:[],dataShow:!0,loading:!1,finished:!1,searchName:"全部",params:{status:"",keyword:"",page:1,rows:20},type:"buy"}),c=function(){var e=a(regeneratorRuntime.mark((function e(){var a,c,u,s,i,d,p;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.loading){e.next=2;break}return e.abrupt("return");case 2:return t.loading=!0,e.prev=3,a=r(r({},t.params),{},{searchDate:n(t.currentSearchDate).format("YYYY-MM")}),c="buy"===t.type?"/api-student/userOrder/page":"/api-student/userOrderRefunds/page",e.next=8,o.post(c,{data:r(r({},a),{},{dateTime:"refund"===t.type?a.searchDate:void 0,timeType:"refund"===t.type?"MONTH":void 0})});case 8:u=e.sent,s=u.code,i=u.data,200===s&&(null===(d=(p=i||{}).rows)||void 0===d||d.forEach((function(e){(e.orderDetailList||[]).forEach((function(e){var r="DISCOUNT"===e.goodType?e.bizContent:e.bizContent?JSON.parse(e.bizContent):{};if(r&&r.purchaseType){"DAY"===r.purchaseType?e.unit="天":(e.unit="个月",e.bizInfo.bizValidTime=e.bizInfo.bizValidTime*{MONTH:1,QUARTERLY:3,YEAR_HALF:6,YEAR:12}[r.purchaseType])}else e.unit="个月"}))})),t.list=t.list.concat(p.rows||[]),t.finished=p.pageNo>=p.totalPage,t.params.page=p.pageNo+1,t.dataShow=t.list.length>0),e.next=19;break;case 14:e.prev=14,e.t0=e.catch(3),console.log(e.t0,"e"),t.dataShow=!1,t.finished=!0;case 19:t.loading=!1;case 20:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(){return e.apply(this,arguments)}}(),Y=function(e){t.currentDate=e,t.currentSearchDate=e,t.timeStatus=!1,A()},A=function(e){t.dataShow=!0,t.loading=!1,t.finished=!1,t.list=[],t.params.page=1,t.params.keyword=e,c()},M=function(){var e=a(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.confirm({message:"是否取消订单?",confirmButtonText:"确定",confirmButtonColor:"var(--van-primary)",cancelButtonText:"取消"}).then(a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.post("/api-student/userOrder/orderCancel",{data:{orderNo:r.orderNo}});case 3:A(),e.next=8;break;case 6:e.prev=6,e.t0=e.catch(0);case 8:case"end":return e.stop()}}),e,null,[[0,6]])}))));case 1:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),V=function(){var t=a(regeneratorRuntime.mark((function t(n){var a,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,o.get("/api-student/userOrder/detailByOrderNo/".concat(n.orderNo));case 3:a=t.sent,c=a.data,W(r(r({},c),{},{paymentConfig:n.paymentConfig}),(function(){e.push({path:"/orderDetail",query:{orderType:c.orderType}})})),t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}();return i((function(){c()})),function(){var r,a;return d(g,null,[d("div",{class:R.sticky},[d(E,null,{default:function(){return[d(S,{background:"transparent",isFixed:!1,border:!1,color:"#131415"},null),d(O,{onSearch:A,type:"tenant",background:"transparent",inputBackground:"transparent"},{left:function(){return d("div",{class:R.label,onClick:function(){return t.timeStatus=!0}},[p(t.currentSearchDate,"YYYY-MM"),d(l,{classPrefix:"iconfont",name:"down",size:12,color:"#948D93"},null)])}}),d(N,{color:"var(--van-primary)",background:"transparent",lineWidth:20,shrink:!0,class:R.tagTabs,"onClick-tab":function(e){t.type="REFUND"===e.name?"refund":"buy",t.params.status=e.name,A()}},{default:function(){return[d(j,{title:"全部",name:""},null),t.actions.map((function(e){return d(j,{title:e.name,name:e.status},null)}))]}})]}}),d("img",{class:R.bgImg,src:C},null)]),d("div",{class:R.tradeList},[t.dataShow?d(T,{finished:t.finished,finishedText:" ",class:[R.list],onLoad:c},(a=r=t.list.map((function(r){return d(I,{border:!1,onClick:function(){!function(r){"refund"!==t.type&&e.push({path:"/goodsDetail",query:{orderNo:r.orderNo,path:"tradeRecord"}})}(r)}},{default:function(){return[d(k,{border:!1,title:n(r.createTime).format("YYYY-MM-DD HH:mm"),value:"buy"===t.type?z[r.status]:r.operateReason,valueClass:R.tradeType},null),r.orderDetailList&&r.orderDetailList.map((function(e){return d(k,{border:!1,class:R.orderSection},{icon:function(){var r;return d(P,{src:"VIP"===e.goodType?D:null===(r=e.bizInfo)||void 0===r?void 0:r.bizCover,class:R.tradeLogo},null)},title:function(){var r,t,n;return d("div",{class:R.goodsSection},[d("div",{class:[R.title]},[d("span",{class:[R.name,"van-ellipsis"]},[null===(r=e.bizInfo)||void 0===r?void 0:r.bizName]),d("span",{class:R.desc},[f("¥"),m(e.actualPrice)])]),d("div",{class:R.description},[d("span",{class:[R.d,"van-ellipsis"]},[null===(t=e.bizInfo)||void 0===t?void 0:t.bizDesc]),"VIP"!==e.goodType&&d(g,null,["TENANT_ALBUM"===e.goodType?d("span",{class:R.t},[f("x"),null===(n=e.bizInfo)||void 0===n?void 0:n.bizValidTime,e.unit]):d("span",{class:R.t},[f("永久")])])])])}})})),d("div",{class:R.paymentPrice},[["PAYING","WAIT_PAY"].includes(r.status)?"需付款":"CLOSE"===r.status?"订单金额":"实付款",d("span",null,[d("i",null,[f("¥")]),m(r.actualPrice)])]),"PAYING"===r.status||"WAIT_PAY"===r.status?d("div",{class:R.btnList},[d(b,{size:"small",round:!0,onClick:function(e){e.stopPropagation(),M(r)}},{default:function(){return[f("取消订单")]}}),d(b,{size:"small",round:!0,type:"primary",onClick:function(e){e.stopPropagation(),V(r)}},{default:function(){return[f("继续付款")]}})]):null]}})})),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!w(a)?r:{default:function(){return[r]}})):d(v,{btnStatus:!1,classImgSize:"CERT",tips:"buy"===t.type?"暂无购买记录":"暂无退款记录"},null)]),d(y,{show:t.timeStatus,"onUpdate:show":function(e){return t.timeStatus=e},position:"bottom",round:!0,closeOnPopstate:!0},{default:function(){return[d(L,{type:"year-month",modelValue:t.currentDate,"onUpdate:modelValue":function(e){return t.currentDate=e},formatter:h,onCancel:function(){t.timeStatus=!1},onConfirm:Y},null)]}})])}}}))}}}))}();