You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__User__Detail__Order__pag...

2 lines
3.6 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3447],{75340:function(A,E,a){a.r(E),a.d(E,{default:function(){return b}});var i=a(59301),u={flex_box_center:"flex_box_center___cJIfw",flex_space_between:"flex_space_between___tjNZb",flex_box_vertical_center:"flex_box_vertical_center___Rm39J",flex_box_center_end:"flex_box_center_end___tNSRd",flex_box_column:"flex_box_column___VMXBG",information:"information___zSItT",bg:"bg___VfIGQ",content:"content___ASHZ6",header:"header___x8M2V",title:"title___OttIa",des:"des___S4eIV",main:"main___p_J1u",info:"info___ZucvQ",subject:"subject___PUwj6",img:"img___M0YwU",footer:"footer___T2kqC",d1:"d1___EyB5j",d2:"d2___WY8x3",d3:"d3___gtusP"},F=a(458),h=a(7939),v=a(49317),x=a(14185),f=a(44283),e=a(59301),p=(s,d,o)=>new Promise((m,c)=>{var t=l=>{try{r(o.next(l))}catch(n){c(n)}},_=l=>{try{r(o.throw(l))}catch(n){c(n)}},r=l=>l.done?m(l.value):Promise.resolve(l.value).then(t,_);r((o=o.apply(s,d)).next())}),b=({})=>{const s=(0,f.useParams)(),[d,o]=(0,i.useState)(!0),[m,c]=(0,i.useState)(!1),[t,_]=(0,i.useState)({});(0,i.useEffect)(()=>{r()},[s.courseId]);const r=()=>p(void 0,null,function*(){o(!0);const n=yield(0,v.ZP)("/api/subject_charges/detail.json",{method:"get",params:{subject_id:s.courseId}});n!=null&&n.detail&&(_(n==null?void 0:n.detail),o(!1))}),l=()=>p(void 0,null,function*(){c(!0);const n=yield(0,v.ZP)("/api/payments.json",{method:"POST",body:{subject_id:s.courseId,payment_method:"wechat_qr"}});n!=null&&n.num&&(c(!1),f.history.push(`/order/${s.courseId}/pay?order_num=${n==null?void 0:n.num}`))});return e.createElement("section",{className:u.information},e.createElement("aside",{className:u.bg}),e.createElement("div",{className:u.content},e.createElement("div",{className:u.header},e.createElement("div",{className:u.title},"\u786E\u8BA4\u8BA2\u5355\u4FE1\u606F"),e.createElement("div",{className:u.des},"\u6CE8\u610F\uFF1A\u8D2D\u4E70\u540E\u4E0D\u652F\u6301\u9000\u6B3E\u3001\u8F6C\u8BA9\uFF0C\u8BF7\u786E\u8BA4\u6709\u6548\u671F\u540E\u518D\u63D0\u4EA4\u8BA2\u5355")),e.createElement(F.Z,{loading:d,active:!0,paragraph:{rows:5}},e.createElement("div",{className:u.main},e.createElement("div",{className:u.info},"\u5546\u54C1\u4FE1\u606F"),e.createElement("div",{className:u.subject},e.createElement("span",{className:u.img},e.createElement("img",{src:`${x.Z.IMG_SERVER}/images/avatars/Subject/${t==null?void 0:t.subject_id}`,alt:"",width:160})),e.createElement("ul",null,e.createElement("li",null,t==null?void 0:t.name),e.createElement("li",null,"\u8BFE\u7A0B\u6709\u6548\u671F\uFF1A",(t==null?void 0:t.expiration)==="1"&&"\u6C38\u4E45\u6709\u6548",(t==null?void 0:t.expiration)==="2"&&`\u8D2D\u4E70\u540E${t==null?void 0:t.days}\u5929\u6709\u6548`,(t==null?void 0:t.expiration)==="3"&&`${t==null?void 0:t.start_at}\u5230${t==null?void 0:t.end_at}`)),e.createElement("div",null,e.createElement("span",null,"\uFFE5"),t==null?void 0:t.price))),e.createElement("div",{className:u.footer},!!(t!=null&&t.origin_price)&&e.createElement("div",{className:u.d1},"\u5546\u54C1\u91D1\u989D:",e.createElement("b",null,e.createElement("span",null,"\uFFE5"),t==null?void 0:t.origin_price)),e.createElement("div",{className:u.d2},"\u5E94\u4ED8\u91D1\u989D:",e.createElement("b",null,e.createElement("span",null,"\uFFE5"),t==null?void 0:t.price)),e.createElement("div",{className:u.d3},"\u63D0\u4EA4\u8BA2\u5355\u5219\u8868\u793A\u60A8\u540C\u610F",e.createElement("a",{href:"https://www.educoder.net/help/agreement"},"\u300A\u5934\u6B4CEduCoder\u670D\u52A1\u534F\u8BAE\u300B")),e.createElement(h.ZP,{loading:m,type:"primary",onClick:l},"\u63D0\u4EA4\u8BA2\u5355")))))}}}]);