2019-11-18 20:31:58 +08:00
|
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[17],{"+URf":function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=(t("Pwec"),t("CtXQ")),l=(t("7Kak"),t("9yH6")),r=t("p0pE"),c=t.n(r),o=t("q1tI"),m=t.n(o),d=t("Bl7J"),h=t("/MKj"),p=t("t3Un"),u=t("LbTH"),v=t("3a4m"),b=t.n(v);class g extends m.a.Component{constructor(){super(...arguments),this.state={submit:{plan_id:this.props.match.params.plan_id,cycle:"month_price"},loading:!1,layout_login:!0}}componentDidMount(){Object(p["b"])("/user/plan/info",{plan_id:this.props.match.params.plan_id}).then(e=>{200===e.code&&this.setState(c()({},e.data,{layout_login:!1}))})}submit(){this.setState({loading:!0},()=>{Object(p["b"])("/user/order/save",this.state.submit).then(e=>{if(200!==e.code)return this.setState({loading:!1});this.setState({loading:!1}),b.a.push("/order/"+e.data)})})}submitOnChange(e,a){this.setState({submit:c()({},this.state.submit,{[e]:a})})}render(){return m.a.createElement(d["a"],i()({},this.props,{loading:this.state.layout_login}),m.a.createElement("main",{id:"main-container"},m.a.createElement("div",{className:"content content-full"},m.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u914d\u7f6e\u8ba2\u9605"),m.a.createElement("div",{className:"row",id:"cashier"},m.a.createElement("div",{className:"col-md-8 col-sm-12"},m.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 block-fx-shadow"},m.a.createElement("h4",null,this.state.name),m.a.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.content}})),m.a.createElement("h3",{className:"font-w300 mt-4 mb-3"},"\u4ed8\u6b3e\u5468\u671f"),m.a.createElement("div",{className:"mb-3"},m.a.createElement(l["a"].Group,{defaultValue:this.state.submit.cycle,size:"large",onChange:e=>this.submitOnChange("cycle",e.target.value)},m.a.createElement(l["a"].Button,{value:"month_price"},"\u6708\u4ed8"),m.a.createElement(l["a"].Button,{value:"quarter_price"},"\u5b63\u4ed8"),m.a.createElement(l["a"].Button,{value:"half_year_price"},"\u534a\u5e74\u4ed8"),m.a.createElement(l["a"].Button,{value:"year_price"},"\u5e74\u4ed8")))),m.a.createElement("div",{className:"col-md-4 col-sm-12"},m.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 text-light",style:{background:"#35383D"}},m.a.createElement("h5",{className:"text-light mb-3"},"\u8ba2\u5355\u603b\u989d"),m.a.createElement("div",{className:"row no-gutters pb-3",style:{borderBottom:"1px solid #646669"}},m.a.createElement("div",{className:"col-8"},this.state.name," x ",u["a"].cycleText[this.state.submit.cycle]),m.a.createElement("div",{className:"col-4 text-right"},"\xa5",0===this.state.type?(this.state.price/100).toFixed(2):(this.state[this.state.submit.cycle]/100).toFixed(2))),m.a.createElement("div",{className:"pt-3",style:{color:"#646669"}},"\u603b\u8ba1"),m.a.createElement("h1",{className:"text-light mt-3 mb-3"},"\xa5 ",(this.state[this.state.submit.cycle]/100).toFixed(2)," CNY"),m.a.createElement("button",{type:"button",className:"btn btn-block btn-primary",disabled:this.state.loading,onClick:()=>this.submit()},this.state.loading?m.a.createElement(s["a"],{type:"loading"}):m.a.createElement("span",null,m.a.createElement("i",{className:"far fa-check-circle"})," \u4e0b\u5355"))))))))}}a["default"]=Object(h["c"])()(g)},Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),l=t.n(s),r=t("/MKj"),c=t("20nU"),o=t("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/ord
|