12345 |
- <<<<<<<< HEAD:dist/assets/index-197c57c4.js
- import{d as u,D as i,Q as l,a as t,S as p,F as d,A as n,P as a,C as _}from"./index-cbe68a28.js";import{O as b}from"./index-ef784470.js";import{u as y,a as h}from"./index-e16b4296.js";import{C as g}from"./index-42da8e6b.js";import{I as c}from"./index-311c1272.js";const f="_member_container_wy4ei_10",w="_level_wy4ei_13",I="_userMember_wy4ei_17",v="_userImgSection_wy4ei_22",P="_userImg_wy4ei_22",F="_userInfo_wy4ei_35",C="_name_wy4ei_41",S="_phone_wy4ei_50",N="_timeRemaining_wy4ei_53",D="_remaining_wy4ei_58",A="_member_time_wy4ei_62",M="_memberImgs_wy4ei_68",T="_memberContainer_wy4ei_72",E="_memberItem_wy4ei_77",G="_title_wy4ei_86",O="_priceGroup_wy4ei_101",U="_price_wy4ei_101",k="_originalPrice_wy4ei_115",x="_btnGroup_wy4ei_123",B="_btn_wy4ei_123",V="_priceSection_wy4ei_144",L="_priceUnit_wy4ei_156",R="_memberDiscount_wy4ei_159",q="_discountAvatar_wy4ei_171",$="_discountName_wy4ei_179",H="_discountGift_wy4ei_186",r={"member-center":"_member-center_wy4ei_1",member_container:f,level:w,userMember:I,userImgSection:v,userImg:P,userInfo:F,name:C,phone:S,timeRemaining:N,remaining:D,member_time:A,memberImgs:M,memberContainer:T,memberItem:E,title:G,priceGroup:O,price:U,originalPrice:k,btnGroup:x,btn:B,priceSection:V,priceUnit:L,memberDiscount:R,discountAvatar:q,discountName:$,discountGift:H},J=""+new URL("icon-student-4155aac2.png",import.meta.url).href,W=""+new URL("member-1-06a91547.png",import.meta.url).href,Y=""+new URL("member-2-b3b0f0d4.png",import.meta.url).href,Z=u({name:"MemberCenter",data(){return this.$route.query,{functionList:[],selectMember:{},users:{},memberStatus:!1,background:"transparent",color:"#fff"}},computed:{userInfo(){const e=this.users;return{username:(e==null?void 0:e.nickname)||"",phone:(e==null?void 0:e.phone)||"",avatar:e==null?void 0:e.avatar,id:e==null?void 0:e.id,isVip:e==null?void 0:e.vipMember,membershipDays:e==null?void 0:e.membershipDays,membershipEndTime:e==null?void 0:e.membershipEndTime}}},async mounted(){y(document,"scroll",()=>{const{y:e}=h();e.value>52?(this.background="#fff",this.color="#323333"):(this.background="transparent",this.color="#fff")});try{const e=await i.get("/edu-app/student/member");this.users=e.data||{};const{data:s}=await i.post("/edu-app/cityFeeSetting/member");this.selectMember=s,this.paymentOrderUnpaid()}catch(e){}},methods:{async paymentOrderUnpaid(){try{const{data:e}=await i.get("/edu-app/userPaymentOrder/unpaid",{requestType:"form",params:{paymentType:"VIP"}});e.id&&l({message:"您有待支付的订单,是否继续支付",cancelButtonText:"取消订单",confirmButtonText:"继续支付"}).then(()=>{const s=e.paymentConfig;this.$router.push({path:"/order-detail",query:{config:JSON.stringify(s.paymentConfig),orderNo:s.orderNo}})}).catch(async()=>{try{await i.post("/edu-app/userPaymentOrder/cancelPayment/"+e.orderNo)}catch(s){}})}catch(e){}},calcSalePrice(e){if(e.discount===1){const s=Number((e.salePrice-e.discountPrice).toFixed(2));return s>=0?s:0}return e.salePrice},async onSubmit(){try{const e=this.selectMember,s=[{goodsId:e.id,goodsNum:1,goodsType:"VIP",paymentCashAmount:e.salePrice,paymentCouponAmount:0}],{data:o}=await i.post("/edu-app/userPaymentOrder/executeOrder",{data:{orderType:"VIP",paymentCashAmount:this.selectMember.salePrice||0,paymentCouponAmount:0,goodsInfos:s,orderName:"数字化乐器学练工具",orderDesc:"数字化乐器学练工具"}}),m=await i.get("/edu-app/userPaymentOrder/detail/"+o.orderNo);m.data.status!=="WAIT_PAY"&&m.data.status!=="PAYING"?this.$router.push({path:"/payment-result",query:{orderNo:o.orderNo}}):this.$router.push({path:"/order-detail",query:{config:JSON.stringify(o.paymentConfig),orderNo:o.orderNo}})}catch(e){console.log(e)}}},render(){return t("div",{class:r["member-center"]},[t(p,{background:this.background,color:this.color,border:!1},null),t("div",{class:r.member_container},[t(g,{class:[r.userMember],labelClass:r.timeRemaining,center:!0},{icon:()=>t("div",{class:r.userImgSection},[t(c,{class:r.userImg,src:this.userInfo.avatar||J,fit:"cover"},null)]),title:()=>t("div",{class:r.userInfo},[t("span",{class:r.name},[this.userInfo.username]),!!this.userInfo.isVip&&t(c,{class:r.level,src:"https://daya.ks3-cn-beijing.ksyun.com/202107/ScSTL1D.png"},null),this.userInfo.phone&&t("span",{class:r.phone,innerHTML:`(${this.userInfo.phone})`},null)]),label:()=>t("div",{class:r.member_time},[t(d,null,[this.userInfo.isVip?t("div",null,[n("使用有效期剩余"),t("span",{class:r.remaining},[this.userInfo.membershipDays]),n("天")]):t("div",null,[n("亲,您还不是会员哟")])])])})]),t("div",{class:[r.memberContainer]},[t("div",{class:r.memberItem},[t("p",{class:[r.title]},[t("strong",null,[n("数字化")]),n("乐器学练工具"),t("span",null,[n("12个月")])]),t("div",{class:r.priceGroup},[t("p",{class:r.price},[t("span",null,[n("¥")]),a(this.selectMember.salePrice)]),t("del",{class:r.originalPrice},[n("¥"),a(this.selectMember.originalPrice)])])]),t("div",{class:r.memberImgs},[t("img",{src:W},null),t("img",{src:Y},null)])]),t("div",{class:r.btnGroup},[t("div",{class:r.priceSection},[n("支付金额:"),t("div",{class:r.price},[t("span",{class:r.priceUnit},[n("¥")]),t("span",{class:r.priceNum},[a(this.calcSalePrice(this.selectMember)||0)])])]),this.userInfo.id?t(_,{round:!0,class:r.btn,onClick:this.onSubmit},{default:()=>[n("立即领取")]}):""]),t(b,{show:this.memberStatus,"onUpdate:show":e=>this.memberStatus=e,title:"待激活团练宝",message:"为让团员有效使用乐团学习工具,首次加入乐团且购买团练宝的团员,团练宝的生效时间为乐团首次训练之日,具体训练时间可查看课表。",messageAlign:"left",dialogMarginTop:"env(safe-area-inset-top)",confirmButtonText:"我知道了"},null)])}});export{Z as default};
- ========
- import{d as u,D as i,Q as l,a as t,S as p,F as d,A as n,P as a,C as _}from"./index-9ef2d9ca.js";import{O as b}from"./index-4eeec8bb.js";import{u as y,a as h}from"./index-eb6e0375.js";import{C as g}from"./index-4c3d257c.js";import{I as c}from"./index-6427748f.js";const f="_member_container_wy4ei_10",w="_level_wy4ei_13",I="_userMember_wy4ei_17",v="_userImgSection_wy4ei_22",P="_userImg_wy4ei_22",F="_userInfo_wy4ei_35",C="_name_wy4ei_41",S="_phone_wy4ei_50",N="_timeRemaining_wy4ei_53",D="_remaining_wy4ei_58",A="_member_time_wy4ei_62",M="_memberImgs_wy4ei_68",T="_memberContainer_wy4ei_72",E="_memberItem_wy4ei_77",G="_title_wy4ei_86",O="_priceGroup_wy4ei_101",U="_price_wy4ei_101",k="_originalPrice_wy4ei_115",x="_btnGroup_wy4ei_123",B="_btn_wy4ei_123",V="_priceSection_wy4ei_144",L="_priceUnit_wy4ei_156",R="_memberDiscount_wy4ei_159",q="_discountAvatar_wy4ei_171",$="_discountName_wy4ei_179",H="_discountGift_wy4ei_186",r={"member-center":"_member-center_wy4ei_1",member_container:f,level:w,userMember:I,userImgSection:v,userImg:P,userInfo:F,name:C,phone:S,timeRemaining:N,remaining:D,member_time:A,memberImgs:M,memberContainer:T,memberItem:E,title:G,priceGroup:O,price:U,originalPrice:k,btnGroup:x,btn:B,priceSection:V,priceUnit:L,memberDiscount:R,discountAvatar:q,discountName:$,discountGift:H},J=""+new URL("icon-student-4155aac2.png",import.meta.url).href,W=""+new URL("member-1-06a91547.png",import.meta.url).href,Y=""+new URL("member-2-b3b0f0d4.png",import.meta.url).href,Z=u({name:"MemberCenter",data(){return this.$route.query,{functionList:[],selectMember:{},users:{},memberStatus:!1,background:"transparent",color:"#fff"}},computed:{userInfo(){const e=this.users;return{username:(e==null?void 0:e.nickname)||"",phone:(e==null?void 0:e.phone)||"",avatar:e==null?void 0:e.avatar,id:e==null?void 0:e.id,isVip:e==null?void 0:e.vipMember,membershipDays:e==null?void 0:e.membershipDays,membershipEndTime:e==null?void 0:e.membershipEndTime}}},async mounted(){y(document,"scroll",()=>{const{y:e}=h();e.value>52?(this.background="#fff",this.color="#323333"):(this.background="transparent",this.color="#fff")});try{const e=await i.get("/edu-app/student/member");this.users=e.data||{};const{data:s}=await i.post("/edu-app/cityFeeSetting/member");this.selectMember=s,this.paymentOrderUnpaid()}catch(e){}},methods:{async paymentOrderUnpaid(){try{const{data:e}=await i.get("/edu-app/userPaymentOrder/unpaid",{requestType:"form",params:{paymentType:"VIP"}});e.id&&l({message:"您有待支付的订单,是否继续支付",cancelButtonText:"取消订单",confirmButtonText:"继续支付"}).then(()=>{const s=e.paymentConfig;this.$router.push({path:"/order-detail",query:{config:JSON.stringify(s.paymentConfig),orderNo:s.orderNo}})}).catch(async()=>{try{await i.post("/edu-app/userPaymentOrder/cancelPayment/"+e.orderNo)}catch(s){}})}catch(e){}},calcSalePrice(e){if(e.discount===1){const s=Number((e.salePrice-e.discountPrice).toFixed(2));return s>=0?s:0}return e.salePrice},async onSubmit(){try{const e=this.selectMember,s=[{goodsId:e.id,goodsNum:1,goodsType:"VIP",paymentCashAmount:e.salePrice,paymentCouponAmount:0}],{data:o}=await i.post("/edu-app/userPaymentOrder/executeOrder",{data:{orderType:"VIP",paymentCashAmount:this.selectMember.salePrice||0,paymentCouponAmount:0,goodsInfos:s,orderName:"数字化乐器学练工具",orderDesc:"数字化乐器学练工具"}}),m=await i.get("/edu-app/userPaymentOrder/detail/"+o.orderNo);m.data.status!=="WAIT_PAY"&&m.data.status!=="PAYING"?this.$router.push({path:"/payment-result",query:{orderNo:o.orderNo}}):this.$router.push({path:"/order-detail",query:{config:JSON.stringify(o.paymentConfig),orderNo:o.orderNo}})}catch(e){console.log(e)}}},render(){return t("div",{class:r["member-center"]},[t(p,{background:this.background,color:this.color,border:!1},null),t("div",{class:r.member_container},[t(g,{class:[r.userMember],labelClass:r.timeRemaining,center:!0},{icon:()=>t("div",{class:r.userImgSection},[t(c,{class:r.userImg,src:this.userInfo.avatar||J,fit:"cover"},null)]),title:()=>t("div",{class:r.userInfo},[t("span",{class:r.name},[this.userInfo.username]),!!this.userInfo.isVip&&t(c,{class:r.level,src:"https://daya.ks3-cn-beijing.ksyun.com/202107/ScSTL1D.png"},null),this.userInfo.phone&&t("span",{class:r.phone,innerHTML:`(${this.userInfo.phone})`},null)]),label:()=>t("div",{class:r.member_time},[t(d,null,[this.userInfo.isVip?t("div",null,[n("使用有效期剩余"),t("span",{class:r.remaining},[this.userInfo.membershipDays]),n("天")]):t("div",null,[n("亲,您还不是会员哟")])])])})]),t("div",{class:[r.memberContainer]},[t("div",{class:r.memberItem},[t("p",{class:[r.title]},[t("strong",null,[n("数字化")]),n("乐器学练工具"),t("span",null,[n("12个月")])]),t("div",{class:r.priceGroup},[t("p",{class:r.price},[t("span",null,[n("¥")]),a(this.selectMember.salePrice)]),t("del",{class:r.originalPrice},[n("¥"),a(this.selectMember.originalPrice)])])]),t("div",{class:r.memberImgs},[t("img",{src:W},null),t("img",{src:Y},null)])]),t("div",{class:r.btnGroup},[t("div",{class:r.priceSection},[n("支付金额:"),t("div",{class:r.price},[t("span",{class:r.priceUnit},[n("¥")]),t("span",{class:r.priceNum},[a(this.calcSalePrice(this.selectMember)||0)])])]),this.userInfo.id?t(_,{round:!0,class:r.btn,onClick:this.onSubmit},{default:()=>[n("立即领取")]}):""]),t(b,{show:this.memberStatus,"onUpdate:show":e=>this.memberStatus=e,title:"待激活团练宝",message:"为让团员有效使用乐团学习工具,首次加入乐团且购买团练宝的团员,团练宝的生效时间为乐团首次训练之日,具体训练时间可查看课表。",messageAlign:"left",dialogMarginTop:"env(safe-area-inset-top)",confirmButtonText:"我知道了"},null)])}});export{Z as default};
- >>>>>>>> master:dist/assets/index-feab8951.js
|