!function(){function e(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(e);r&&(m=m.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,m)}return t}function r(r){for(var m=1;m=0?r:0}return e.salePrice},onSubmit:function(){var e=this;return n(regeneratorRuntime.mark((function t(){var n,i,o,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=e.selectMember,i=[{goodsId:n.id,goodsNum:1,goodsType:"VIP",paymentCashAmount:n.salePrice,paymentCouponAmount:0}],t.next=5,m.post("/api-student/userPaymentOrder/executeOrder",{data:{paymentType:e.paymentType,orderType:"VIP",paymentCashAmount:e.selectMember.salePrice||0,paymentCouponAmount:0,goodsInfos:i,orderName:"团练宝购买",orderDesc:"团练宝购买"}});case 5:return o=t.sent,a=o.data,console.log(a),t.next=10,m.get("/api-student/userPaymentOrder/detail/"+a.orderNo);case 10:"WAIT_PAY"!==(s=t.sent).data.status&&"PAYING"!==s.data.status?e.$router.push({path:"/payment-result",query:{orderNo:a.orderNo}}):e.$router.push({path:"/orderDetail",query:{config:JSON.stringify(r(r({},a.paymentConfig),{},{paymentType:a.paymentType})),orderNo:a.orderNo}}),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),console.log(t.t0);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})))()}},render:function(){var e,r=this;return o("div",{class:P["member-center"]},[o(a,{background:"#ffe5cc",border:!1},null),o("div",{class:P.member_container},[o(p,{class:[P.userMember,this.users.purchaseMemberRecord?P.purchaseMember:""],labelClass:P.timeRemaining,center:!0},{icon:function(){return o("div",{class:P.userImgSection},[o(d,{class:P.userImg,src:r.userInfo.avatar||u,fit:"cover"},null)])},title:function(){return o("div",{class:P.userInfo},[o("span",{class:P.name},[r.userInfo.username]),!!r.userInfo.isVip&&o(d,{class:P.level,src:"https://daya.ks3-cn-beijing.ksyun.com/202107/ScSTL1D.png"},null),r.userInfo.phone&&o("span",{class:P.phone,innerHTML:"(".concat(r.userInfo.phone,")")},null)])},label:function(){return o("div",{class:P.member_time},[r.users.purchaseMemberRecord?o("div",{class:P.beforeQuestion},[o(c,{name:R,class:P.iconQeustion,onClick:function(){return r.memberStatus=!0}},null),b("您有"),o("span",null,[b("待激活")]),b("乐团Ai学练工具")]):o(s,null,[r.userInfo.isVip?o("div",null,[b("乐团Ai学练工具有效期剩余"),o("span",{class:P.remaining},[r.userInfo.membershipDays]),b("天")]):o("div",null,[b("亲,您还不是会员哟")])])])}})]),o("div",{class:[P.memberContainer,this.users.purchaseMemberRecord?P.beforMemberContainer:""]},[o("div",{class:P.memberItem},[this.users.purchaseMemberRecord?"":o("div",{class:P["system-list"]},[o("div",{class:[P["system-item"],P.active]},[o("p",{class:[P.title,"van-hairline--bottom"]},[b("乐团Ai学练工具"),o("span",null,[b("(6个月)")])]),o("div",{class:P.priceGroup},[o("p",{class:P.price},[o("span",null,[b("¥")]),l(this.selectMember.salePrice)]),o("del",{class:P.originalPrice},[b("¥"),l(this.selectMember.originalPrice)])])])])]),o("div",{class:P.memberImgs},[o("img",{src:O},null),o("img",{src:Q},null)])]),this.users.purchaseMemberRecord?"":o("div",{class:P.btnGroup},[o("div",{class:P.priceSection},[b("支付金额:"),o("div",{class:P.price},[o("span",{class:P.priceUnit},[b("¥")]),o("span",{class:P.priceNum},[l(this.calcSalePrice(this.selectMember)||0)])]),1==(null===(e=this.selectMember)||void 0===e?void 0:e.discount)&&o("div",{class:[P.discountItem,P.discountBuy]},[o("img",{src:x},null)])]),this.userInfo.id?o(A,{color:"linear-gradient(220deg, #DFA164 0%, #FAC87E 100%)",round:!0,class:P.btn,onClick:this.onSubmit},{default:function(){return[r.userInfo.isVip?"立即续费":"立即开通"]}}):""]),o(g,{show:this.memberStatus,"onUpdate:show":function(e){return r.memberStatus=e},title:"待激活团练宝",message:"为让团员有效使用乐团学习工具,首次加入乐团且购买团练宝的团员,团练宝的生效时间为乐团首次训练之日,具体训练时间可查看课表。",messageAlign:"left",dialogMarginTop:"env(safe-area-inset-top)",confirmButtonText:"我知道了"},null)])}}))}}}))}();