1 |
- !function(){function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?e(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t,r,n,a,o,s){try{var i=e[o](s),c=i.value}catch(u){return void r(u)}i.done?t(c):Promise.resolve(c).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,o){var s=e.apply(t,r);function i(e){n(s,a,o,i,c,"next",e)}function c(e){n(s,a,o,i,c,"throw",e)}i(void 0)}))}}var o=document.createElement("style");o.innerHTML="._tradeList_ums1x_1 ._searchTime_ums1x_1,._tradeList_ums1x_1 ._searchType_ums1x_2{color:#1a1a1a;font-size:.37333rem}._tradeList_ums1x_1 .iconfont-down{margin-left:.10667rem}._tradeList_ums1x_1 .van-cell-group{overflow:hidden;border-radius:.26667rem;margin-bottom:.32rem}._tradeList_ums1x_1 ._list_ums1x_14{padding:0 .37333rem}._tradeList_ums1x_1 ._tradeLogo_ums1x_17{width:.93333rem;height:.93333rem;border-radius:50%;margin-right:.26667rem;overflow:hidden}._tradeList_ums1x_1 ._tradeType_ums1x_24{color:var(--van-primary)}._tradeList_ums1x_1 ._title_ums1x_27,._tradeList_ums1x_1 ._content_ums1x_28{padding-top:.02667rem;display:flex;justify-content:space-between;flex-direction:column;line-height:.48rem;color:#333;font-size:.37333rem}._tradeList_ums1x_1 ._desc_ums1x_37,._tradeList_ums1x_1 ._num_ums1x_38{padding-top:.08rem;font-size:.34667rem;color:#999}._btnList_ums1x_43{display:flex;align-items:center;justify-content:flex-end;padding-bottom:var(--van-cell-vertical-padding);padding-right:var(--van-cell-horizontal-padding)}._btnList_ums1x_43 .van-button+.van-button{margin-left:.26667rem}\n",document.head.appendChild(o),System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.c835419c.js","./index-legacy.c8c5bc4e.js","./index-legacy.7ce7fe04.js","./index-legacy.33d046ca.js","./index-legacy.3ccba950.js","./index-legacy.43e69380.js","./index-legacy.2904d274.js","./orderStatus-legacy.12eb861d.js","./index-legacy.6ac2a941.js","./hooks-legacy.5cc9e329.js","./index-legacy.27db412d.js","./use-tab-status-legacy.d7434e0b.js","./utils-legacy.9fa07eff.js","./index-legacy.058dcb53.js"],(function(e){"use strict";var r,n,o,s,i,c,u,d,l,p,m,f,h,g,_,v,y,x,b,w,j,O,P,T;return{setters:[function(e){r=e.w,n=e.y,o=e.d,s=e.D,i=e.j,c=e.N,u=e.A,d=e.B,l=e.C,p=e.aS,m=e.b6,f=e.$},function(e){h=e.A},function(e){g=e.C},function(e){_=e.C},function(){},function(e){v=e.S},function(e){y=e.L},function(e){x=e.m,b=e.o,w=e.g},function(e){j=e.o},function(e){O=e.C},function(e){P=e.u},function(e){T=e.D},function(){},function(){},function(){}],execute:function(){var S={tradeList:"_tradeList_ums1x_1",searchTime:"_searchTime_ums1x_1",searchType:"_searchType_ums1x_2",list:"_list_ums1x_14",tradeLogo:"_tradeLogo_ums1x_17",tradeType:"_tradeType_ums1x_24",title:"_title_ums1x_27",content:"_content_ums1x_28",desc:"_desc_ums1x_37",num:"_num_ums1x_38",btnList:"_btnList_ums1x_43"},L=function(){var e=a(regeneratorRuntime.mark((function e(n,a){var o,s,i,c,u,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=n.goodType,s={},e.t0=o,e.next="PIANO_ROOM"===e.t0?5:"VIP"===e.t0||"SVIP"===e.t0?17:"MUSIC"===e.t0?28:"ALBUM"===e.t0?39:50;break;case 5:return e.prev=5,e.next=8,k(n.bizId);case 8:i=e.sent,console.log("res",i),s=t({orderType:n.goodType,goodsName:n.goodName},i),e.next=16;break;case 13:throw e.prev=13,e.t1=e.catch(5),new Error(e.t1.message);case 16:return e.abrupt("break",50);case 17:return e.prev=17,e.next=20,N(n.id);case 20:c=e.sent,s={orderType:n.goodType,goodName:n.goodName,num:n.goodNum,id:n.id,title:x[c.period]||"",price:null!=a&&a.couponAmount?Number((c.salePrice-a.couponAmount+a.discountPrice).toFixed(2)):c.salePrice||n.actualPrice,startTime:r(c.startTime).format("YYYY-MM-DD"),endTime:r(c.endTime).format("YYYY-MM-DD")},e.next=27;break;case 24:throw e.prev=24,e.t2=e.catch(17),new Error(e.t2.message);case 27:return e.abrupt("break",50);case 28:return e.prev=28,e.next=31,D(n.bizId);case 31:u=e.sent,s=t({orderType:n.goodType,goodName:n.goodName},u),e.next=38;break;case 35:throw e.prev=35,e.t3=e.catch(28),new Error(e.t3.message);case 38:return e.abrupt("break",50);case 39:return e.prev=39,e.next=42,C(n.bizId);case 42:d=e.sent,s=t({orderType:n.goodType,goodName:n.goodName},d),e.next=49;break;case 46:throw e.prev=46,e.t4=e.catch(39),new Error(e.t4.message);case 49:return e.abrupt("break",50);case 50:s.orderType=o,s.goodName=n.goodName,j.orderObject.orderList.push(s);case 53:case"end":return e.stop()}}),e,null,[[5,13],[17,24],[28,35],[39,46]])})));return function(t,r){return e.apply(this,arguments)}}(),k=function(){var e=a(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.get("/api-teacher/pianoRoomSettings/detail/".concat(t));case 3:return r=e.sent,e.abrupt("return",r.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(t){return e.apply(this,arguments)}}(),N=function(){var e=a(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.get("/api-teacher/vipCardRecord/detail/"+t);case 3:return r=e.sent,e.abrupt("return",r.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(t){return e.apply(this,arguments)}}(),D=function(){var e=a(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.get("/api-teacher/music/sheet/detail/".concat(t));case 3:return r=e.sent,e.abrupt("return",r.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(t){return e.apply(this,arguments)}}(),C=function(){var e=a(regeneratorRuntime.mark((function e(t){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.post("/api-teacher/music/album/detail",{data:{id:t}});case 3:return r=e.sent,e.abrupt("return",r.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(t){return e.apply(this,arguments)}}(),R=function(e,t){var r=e.orderNo,n=e.actualPrice,o=e.orderDesc,s=e.orderName,i=e.orderType,c=e.orderDetailList,u=e.couponAmount,d=e.discountPrice;j.orderObject.orderType=i,j.orderObject.orderName=s,j.orderObject.orderDesc=o,j.orderObject.orderNo=r,j.orderObject.actualPrice=n,j.orderObject.discountPrice=d,j.orderObject.orderList=[],console.log(e);try{c.forEach(function(){var e=a(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,L(t,{couponAmount:u,discountPrice:d});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t&&t()}catch(l){}};e("default",o({name:"list",data:function(){return{timeStatus:!1,currentDate:new Date,typeStatus:!1,actions:[{name:"全部"},{name:"待支付",status:"WAIT_PAY"},{name:"支付中",status:"PAYING"},{name:"已付款",status:"PAID"},{name:"已关闭",status:"CLOSE"},{name:"支付失败",status:"FAIL"}],list:[],dataShow:!0,loading:!1,finished:!1,searchName:"全部",params:{status:"",page:1,rows:20}}},mounted:function(){P("交易记录")},methods:{getList:function(){var e=this;return a(regeneratorRuntime.mark((function a(){var o,s,i,c,u;return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!e.loading){a.next=2;break}return a.abrupt("return");case 2:return e.loading=!0,a.prev=3,o=t(t({},e.params),{},{searchDate:r(e.currentDate).format("YYYY-MM")}),a.next=7,n.post("/api-teacher/userOrder/page",{data:t({},o)});case 7:s=a.sent,i=s.code,c=s.data,200===i&&(u=c||{},e.list=e.list.concat(u.rows||[]),e.finished=u.pageNo>=u.totalPage,e.params.page=u.pageNo+1,e.dataShow=e.list.length>0),a.next=17;break;case 13:a.prev=13,a.t0=a.catch(3),e.dataShow=!1,e.finished=!0;case 17:e.loading=!1;case 18:case"end":return a.stop()}}),a,null,[[3,13]])})))()},onDetail:function(e){this.$router.push({path:"/tradeDetail",query:{orderNo:e.orderNo,path:"tradeRecord"}})},onConfirm:function(e){this.currentDate=e,this.timeStatus=!1,this.onSearch()},onSelect:function(e){this.params.status=e.status,this.searchName=e.name,this.onSearch()},onSearch:function(){this.dataShow=!0,this.loading=!1,this.finished=!1,this.list=[],this.params.page=1,this.getList()},onCancelPay:function(e){var t=this;return a(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:s.confirm({message:"是否取消订单?",confirmButtonText:"确定",confirmButtonColor:"var(--van-primary)",cancelButtonText:"取消"}).then(a(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,n.post("/api-teacher/userOrder/orderCancel",{data:{orderNo:e.orderNo}});case 3:t.onSearch(),r.next=8;break;case 6:r.prev=6,r.t0=r.catch(0);case 8:case"end":return r.stop()}}),r,null,[[0,6]])}))));case 1:case"end":return r.stop()}}),r)})))()},onPay:function(e){var t=this;return a(regeneratorRuntime.mark((function r(){var a,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,n.get("/api-teacher/userOrder/detailByOrderNo/".concat(e.orderNo));case 3:a=r.sent,o=a.data,R(o,(function(){t.$router.push({path:"/orderDetail",query:{orderType:o.orderType}})})),r.next=10;break;case 8:r.prev=8,r.t0=r.catch(0);case 10:case"end":return r.stop()}}),r,null,[[0,8]])})))()}},render:function(){var e,t,n=this;return i("div",{class:S.tradeList},[i(v,{position:"top"},{default:function(){return[i(O,{isFixed:!1},null),i(g,{center:!0,style:{backgroundColor:"#F7F8F9"}},{title:function(){return i("div",{class:S.searchTime,onClick:function(){n.timeStatus=!0}},[i("span",null,[n.$filters.dateFormat(n.currentDate,"YYYY-MM")]),i(c,{classPrefix:"iconfont",name:"down",size:12,color:"var(--van-primary)"},null)])},value:function(){return i("div",{class:S.searchType,onClick:function(){n.typeStatus=!0}},[i("span",null,[n.searchName]),i(c,{classPrefix:"iconfont",name:"down",size:12,color:"var(--van-primary)"},null)])}})]}}),this.dataShow?i(y,{loading:this.loading,finished:this.finished,finishedText:" ",class:[S.list],onLoad:this.getList},(t=e=this.list.map((function(e){return i(_,{border:!1,onClick:function(){n.onDetail(e)}},{default:function(){return[i(g,{title:r(e.createTime).format("YYYY-MM-DD HH:mm"),value:b[e.status],valueClass:S.tradeType},null),i(g,{border:!1},{title:function(){return i("div",{class:S.title},[i("span",null,[e.orderName]),i("span",{class:S.desc},[w[e.orderType]])])},default:function(){return i("div",{class:S.content},[i("span",{class:S.price},[u("¥"),n.$filters.moneyFormat(e.actualPrice)])])}}),"PAYING"===e.status||"WAIT_PAY"===e.status?i("div",{class:S.btnList},[i(d,{size:"small",round:!0,onClick:function(t){t.stopPropagation(),n.onCancelPay(e)}},{default:function(){return[u("取消订单")]}}),i(d,{size:"small",round:!0,type:"primary",onClick:function(t){t.stopPropagation(),n.onPay(e)}},{default:function(){return[u("继续支付")]}})]):null]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!f(t)?e:{default:function(){return[e]}})):i(l,{btnStatus:!1,classImgSize:"SMALL",tips:"暂无购买记录"},null),i(p,{show:this.timeStatus,"onUpdate:show":function(e){return n.timeStatus=e},position:"bottom",round:!0,closeOnPopstate:!0},{default:function(){return[i(T,{type:"year-month",modelValue:n.currentDate,"onUpdate:modelValue":function(e){return n.currentDate=e},formatter:m,onCancel:function(){n.timeStatus=!1},onConfirm:n.onConfirm},null)]}}),i(h,{show:this.typeStatus,"onUpdate:show":function(e){return n.typeStatus=e},actions:this.actions,closeOnClickAction:!0,cancelText:"取消",onSelect:this.onSelect,onCancel:function(){n.typeStatus=!1}},null)])}}))}}}))}();
|