1 |
- !function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?e(Object(a),!0).forEach((function(e){n(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 n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n,r,a,i,o){try{var s=e[i](o),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function s(e){r(o,a,i,s,u,"next",e)}function u(e){r(o,a,i,s,u,"throw",e)}s(void 0)}))}}var i=document.createElement("style");i.innerHTML="._tradeRecord_k8m2o_1 .van-tab--active{color:var(--van-primary)}._tradeRecord_k8m2o_1 .van-tab__text,._tradeRecord_k8m2o_1 ._tab_k8m2o_11{display:flex;width:100%;height:100%;align-items:center;justify-content:center}._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(i),System.register(["./ResizeObserver.es-legacy.44b91b4c.js","./index-legacy.3ccba950.js","./index-legacy.9d5cae73.js","./index-legacy.cf09c997.js","./index-legacy.c835419c.js","./index-legacy.c8c5bc4e.js","./index-legacy.7ce7fe04.js","./index-legacy.33d046ca.js","./index-legacy.43e69380.js","./index-legacy.2904d274.js","./tradeOrder-legacy.a0af1df5.js","./index-legacy.27db412d.js","./hooks-legacy.5cc9e329.js","./index-legacy.6ac2a941.js","./index-legacy.9696a579.js","./use-id-legacy.ef8b5e97.js","./use-tab-status-legacy.d7434e0b.js","./use-refs-legacy.d925b49f.js","./orderStatus-legacy.12eb861d.js","./utils-legacy.9fa07eff.js","./index-legacy.058dcb53.js","./index-legacy.4bad5b90.js"],(function(e){"use strict";var n,r,i,o,s,u,c,d,l,f,m,p,h,_,y,g,v,x,b,j,w,S,L,O,T,P,k;return{setters:[function(e){n=e.d,r=e.w,i=e.y,o=e.D,s=e.g,u=e.j,c=e.N,d=e.A,l=e.B,f=e.C,m=e.aS,p=e.b6,h=e.$},function(e){_=e.S},function(){},function(e){y=e.T,g=e.a},function(e){v=e.A},function(e){x=e.C},function(e){b=e.C},function(){},function(e){j=e.L},function(e){w=e.o,S=e.g},function(e){L=e.t},function(e){O=e.D},function(e){T=e.u},function(e){P=e.C},function(e){k=e.T},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var D="_tradeRecord_k8m2o_1",C={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"};var N=n({name:"list",props:{type:{type:String,default:"buy"},height:{type:Number,default:44}},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}}},methods:{getList:function(){var e=this;return a(regeneratorRuntime.mark((function n(){var a,o,s,u,c,d;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!e.loading){n.next=2;break}return n.abrupt("return");case 2:return e.loading=!0,n.prev=3,a=t(t({},e.params),{},{searchDate:r(e.currentDate).format("YYYY-MM")}),o="buy"===e.type?"/api-student/userOrder/page":"/api-student/userOrderRefunds/page",n.next=8,i.post(o,{data:t(t({},a),{},{dateTime:"refund"===e.type?a.searchDate:void 0,timeType:"refund"===e.type?"MONTH":void 0})});case 8:s=n.sent,u=s.code,c=s.data,200===u&&(d=c||{},e.list=e.list.concat(d.rows||[]),e.finished=d.pageNo>=d.totalPage,e.params.page=d.pageNo+1,e.dataShow=e.list.length>0),n.next=18;break;case 14:n.prev=14,n.t0=n.catch(3),e.dataShow=!1,e.finished=!0;case 18:e.loading=!1;case 19:case"end":return n.stop()}}),n,null,[[3,14]])})))()},onDetail:function(e){"refund"!==this.type&&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 n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o.confirm({message:"是否取消订单?",confirmButtonText:"确定",confirmButtonColor:"var(--van-primary)",cancelButtonText:"取消"}).then(a(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i.post("/api-student/userOrder/orderCancel",{data:{orderNo:e.orderNo}});case 3:t.onSearch(),n.next=8;break;case 6:n.prev=6,n.t0=n.catch(0);case 8:case"end":return n.stop()}}),n,null,[[0,6]])}))));case 1:case"end":return n.stop()}}),n)})))()},onPay:function(e){var t=this;return a(regeneratorRuntime.mark((function n(){var r,a;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,i.get("/api-student/userOrder/detailByOrderNo/".concat(e.orderNo));case 3:r=n.sent,a=r.data,(a.orderDetailList||[]).forEach((function(e){var t,n;e.vipEndDays=(null===(t=s.user.data)||void 0===t||null===(n=t.userVip)||void 0===n?void 0:n.vipEndDays)||0})),L(a,(function(){t.$router.push({path:"/orderDetail",query:{orderType:a.orderType}})})),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(0);case 12:case"end":return n.stop()}}),n,null,[[0,10]])})))()}},render:function(){var e,t,n=this;return u("div",{class:C.tradeList},[u(_,{position:"top",offsetTop:this.height},{default:function(){return[u(x,{center:!0,style:{backgroundColor:"#F7F8F9"}},{title:function(){return u("div",{class:C.searchTime,onClick:function(){n.timeStatus=!0}},[u("span",null,[n.$filters.dateFormat(n.currentDate,"YYYY-MM")]),u(c,{classPrefix:"iconfont",name:"down",size:12,color:"var(--van-primary)"},null)])},value:function(){return"buy"===n.type?u("div",{class:C.searchType,onClick:function(){n.typeStatus=!0}},[u("span",null,[n.searchName]),u(c,{classPrefix:"iconfont",name:"down",size:12,color:"var(--van-primary)"},null)]):null}})]}}),this.dataShow?u(j,{loading:this.loading,finished:this.finished,finishedText:" ",class:[C.list],onLoad:this.getList},(t=e=this.list.map((function(e){return u(b,{border:!1,onClick:function(){n.onDetail(e)}},{default:function(){return[u(x,{title:r(e.createTime).format("YYYY-MM-DD HH:mm"),value:"buy"===n.type?w[e.status]:e.operateReason,valueClass:C.tradeType},null),u(x,{border:!1},{title:function(){return u("div",{class:C.title},[u("span",null,[e.orderName]),u("span",{class:C.desc},[S[e.orderType]])])},default:function(){return u("div",{class:C.content},[u("span",{class:C.price},[d("¥"),"buy"===n.type?n.$filters.moneyFormat(e.actualPrice):n.$filters.moneyFormat(e.actualAmount)])])}}),"PAYING"===e.status||"WAIT_PAY"===e.status?u("div",{class:C.btnList},[u(l,{size:"small",round:!0,onClick:function(t){t.stopPropagation(),n.onCancelPay(e)}},{default:function(){return[d("取消订单")]}}),u(l,{size:"small",round:!0,type:"primary",onClick:function(t){t.stopPropagation(),n.onPay(e)}},{default:function(){return[d("继续支付")]}})]):null]}})})),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!h(t)?e:{default:function(){return[e]}})):u(f,{btnStatus:!1,classImgSize:"SMALL",tips:"buy"===this.type?"暂无购买记录":"暂无退款记录"},null),u(m,{show:this.timeStatus,"onUpdate:show":function(e){return n.timeStatus=e},position:"bottom",round:!0,closeOnPopstate:!0},{default:function(){return[u(O,{type:"year-month",modelValue:n.currentDate,"onUpdate:modelValue":function(e){return n.currentDate=e},formatter:p,onCancel:function(){n.timeStatus=!1},onConfirm:n.onConfirm},null)]}}),u(v,{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)])}});e("default",n({name:"tradeRecord",data:function(){return{active:"buy",height:44}},mounted:function(){T("交易记录")},render:function(){var e=this;return u("div",{class:D},[u(k,{position:"top",onBarHeight:function(t){e.height=t}},{default:function(){return[u(P,{isFixed:!1},null),u(y,{active:e.active,"onUpdate:active":function(t){return e.active=t},color:"var(--van-primary)",sticky:!0,lineWidth:28},{default:function(){return[u(g,{name:"buy",title:"购买记录"},null),u(g,{name:"refund",title:"退费记录"},null)]}})]}}),"buy"===this.active&&u(N,{height:this.height,key:"buy"},null),"refund"===this.active&&u(N,{height:this.height,type:"refund",key:"refund"},null)])}}))}}}))}();
|