diff --git a/public/p__admin__config__payment.async.js b/public/p__admin__config__payment.async.js index 14b03b9c..ecd8c8d4 100644 --- a/public/p__admin__config__payment.async.js +++ b/public/p__admin__config__payment.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[1],{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");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{l.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(r["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(r["c"])(e=>{var a=e.header;return{header:a}})(d);class h extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(p,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(h,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(u)},"cD2/":function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return u});var n=t("jehZ"),i=t.n(n),s=(t("BoS7"),t("Sdc0")),l=(t("+L6B"),t("2/Rp")),r=(t("miYZ"),t("tsqr")),c=t("p0pE"),o=t.n(c),m=t("q1tI"),d=t.n(m),p=t("Bl7J"),h=t("t3Un");class u extends d.a.Component{constructor(){super(...arguments),this.state={invite:{},site:{},pay:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(h["a"])("/admin/config").then(e=>{200===e.code&&this.setState(o()({},e.data,{loading:!1}))})}submit(e){Object(h["b"])("/admin/config/save",this.state[e]).then(e=>{200===e.code&&e.data&&(this.fetchData(),r["a"].success("\u4fdd\u5b58\u6210\u529f"))})}set(e,a,t){this.setState({[e]:o()({},this.state[e],{[a]:t})})}render(){return d.a.createElement(p["a"],i()({},this.props,{loading:this.state.loading}),d.a.createElement("main",{id:"main-container"},d.a.createElement("div",{className:"content content-full"},d.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u652f\u4ed8\u914d\u7f6e"),d.a.createElement("div",{className:"block block-rounded block-bordered"},d.a.createElement("div",{className:"block-header block-header-default"},d.a.createElement("h3",{className:"block-title"},"\u652f\u4ed8\u5b9d\u5f53\u9762\u4ed8"),d.a.createElement("div",{className:"block-options"},d.a.createElement(l["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),d.a.createElement("div",{className:"block-content"},d.a.createElement("div",{className:"row push"},d.a.createElement("div",{className:"col-lg-8 col-xl-5"},d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u542f\u7528"),d.a.createElement("div",null,d.a.createElement(s["a"],{checked:parseInt(this.state.pay.alipay_enable),onChange:e=>this.set("pay","alipay_enable",e?1:0)}))),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"APPID"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.alipay_appid,onChange:e=>this.set("pay","alipay_appid",parseInt(e.target.value))})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u516c\u94a5"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.alipay_pubkey,onChange:e=>this.set("pay","alipay_pubkey",e.target.value)})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u79c1\u94a5"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.alipay_privkey,onChange:e=>this.set("pay","alipay_privkey",e.target.value)})))))),d.a.createElement("div",{className:"block block-rounded block-bordered"},d.a.createElement("div",{className:"block-header block-header-default"},d.a.createElement("h3",{className:"block-title"},"Stripe"),d.a.createElement("div",{className:"block-options"},d.a.createElement(l["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),d.a.createElement("div",{className:"block-content"},d.a.createElement("div",{className:"row push"},d.a.createElement("div",{className:"col-lg-8 col-xl-5"},d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u542f\u7528\u652f\u4ed8\u5b9d\u6536\u6b3e"),d.a.createElement("div",null,d.a.createElement(s["a"],{checked:parseInt(this.state.pay.stripe_alipay_enable),onChange:e=>this.set("pay","stripe_alipay_enable",e?1:0)}))),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u542f\u7528\u5fae\u4fe1\u6536\u6b3e"),d.a.createElement("div",null,d.a.createElement(s["a"],{checked:parseInt(this.state.pay.stripe_wepay_enable),onChange:e=>this.set("pay","stripe_wepay_enable",e?1:0)}))),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"SK_LIVE"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.stripe_sk_live,onChange:e=>this.set("pay","stripe_sk_live",e.target.value)})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"PL_LIVE"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.stripe_pk_live,onChange:e=>this.set("pay","stripe_pk_live",e.target.value)})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"WebHook\u5bc6\u94a5\u7b7e\u540d"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.stripe_webhook_key,onChange:e=>this.set("pay","stripe_webhook_key",e.target.value)})))))))))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[1],{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");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{l.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(r["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(r["c"])(e=>{var a=e.header;return{header:a}})(d);class h extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(p,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(h,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(u)},"cD2/":function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return u});var n=t("jehZ"),i=t.n(n),s=(t("BoS7"),t("Sdc0")),l=(t("+L6B"),t("2/Rp")),r=(t("miYZ"),t("tsqr")),c=t("p0pE"),o=t.n(c),m=t("q1tI"),d=t.n(m),p=t("Bl7J"),h=t("t3Un");class u extends d.a.Component{constructor(){super(...arguments),this.state={invite:{},site:{},pay:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(h["a"])("/admin/config").then(e=>{200===e.code&&this.setState(o()({},e.data,{loading:!1}))})}submit(e){Object(h["b"])("/admin/config/save",this.state[e]).then(e=>{200===e.code&&e.data&&(this.fetchData(),r["a"].success("\u4fdd\u5b58\u6210\u529f"))})}set(e,a,t){this.setState({[e]:o()({},this.state[e],{[a]:t})})}render(){return d.a.createElement(p["a"],i()({},this.props,{loading:this.state.loading}),d.a.createElement("main",{id:"main-container"},d.a.createElement("div",{className:"content content-full"},d.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u652f\u4ed8\u914d\u7f6e"),d.a.createElement("div",{className:"block block-rounded block-bordered"},d.a.createElement("div",{className:"block-header block-header-default"},d.a.createElement("h3",{className:"block-title"},"\u652f\u4ed8\u5b9d\u5f53\u9762\u4ed8"),d.a.createElement("div",{className:"block-options"},d.a.createElement(l["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),d.a.createElement("div",{className:"block-content"},d.a.createElement("div",{className:"row push"},d.a.createElement("div",{className:"col-lg-8 col-xl-5"},d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u542f\u7528"),d.a.createElement("div",null,d.a.createElement(s["a"],{checked:parseInt(this.state.pay.alipay_enable),onChange:e=>this.set("pay","alipay_enable",e?1:0)}))),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"APPID"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.alipay_appid,onChange:e=>this.set("pay","alipay_appid",parseInt(e.target.value))})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u516c\u94a5"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.alipay_pubkey,onChange:e=>this.set("pay","alipay_pubkey",e.target.value)})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u79c1\u94a5"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.alipay_privkey,onChange:e=>this.set("pay","alipay_privkey",e.target.value)})))))),d.a.createElement("div",{className:"block block-rounded block-bordered"},d.a.createElement("div",{className:"block-header block-header-default"},d.a.createElement("h3",{className:"block-title"},"Stripe"),d.a.createElement("div",{className:"block-options"},d.a.createElement(l["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),d.a.createElement("div",{className:"block-content"},d.a.createElement("div",{className:"row push"},d.a.createElement("div",{className:"col-lg-8 col-xl-5"},d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u542f\u7528\u652f\u4ed8\u5b9d\u6536\u6b3e"),d.a.createElement("div",null,d.a.createElement(s["a"],{checked:parseInt(this.state.pay.stripe_alipay_enable),onChange:e=>this.set("pay","stripe_alipay_enable",e?1:0)}))),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u542f\u7528\u5fae\u4fe1\u6536\u6b3e"),d.a.createElement("div",null,d.a.createElement(s["a"],{checked:parseInt(this.state.pay.stripe_wepay_enable),onChange:e=>this.set("pay","stripe_wepay_enable",e?1:0)}))),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"SK_LIVE"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.stripe_sk_live,onChange:e=>this.set("pay","stripe_sk_live",e.target.value)})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"PL_LIVE"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.stripe_pk_live,onChange:e=>this.set("pay","stripe_pk_live",e.target.value)})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"WebHook\u5bc6\u94a5\u7b7e\u540d"),d.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.stripe_webhook_key,onChange:e=>this.set("pay","stripe_webhook_key",e.target.value)})))))))))}}}}]); \ No newline at end of file diff --git a/public/p__admin__config__site.async.js b/public/p__admin__config__site.async.js index d612ce42..9acf3e4e 100644 --- a/public/p__admin__config__site.async.js +++ b/public/p__admin__config__site.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[2],{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");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{l.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(r["c"])(e=>{var a=e.header;return{header:a}})(c),o=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(r["c"])(e=>{var a=e.header;return{header:a}})(d);class h extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class v extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(m,this.props),i.a.createElement(p,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(h,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(v)},L4tb:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return E});var n=t("jehZ"),i=t.n(n),s=(t("BoS7"),t("Sdc0")),l=(t("5Dmo"),t("3S7+")),r=(t("Pwec"),t("CtXQ")),c=(t("+L6B"),t("2/Rp")),m=(t("miYZ"),t("tsqr")),o=t("p0pE"),d=t.n(o),p=t("q1tI"),h=t.n(p),v=t("Bl7J"),u=t("t3Un");class E extends h.a.Component{constructor(){super(...arguments),this.state={invite:{},site:{},server:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(u["a"])("/admin/config").then(e=>{200===e.code&&this.setState(d()({},e.data,{loading:!1}))})}submit(e){Object(u["b"])("/admin/config/save",this.state[e]).then(e=>{200===e.code&&e.data&&(this.fetchData(),m["a"].success("\u4fdd\u5b58\u6210\u529f"))})}set(e,a,t){this.setState({[e]:d()({},this.state[e],{[a]:t})})}render(){return h.a.createElement(v["a"],i()({},this.props,{loading:this.state.loading}),h.a.createElement("main",{id:"main-container"},h.a.createElement("div",{className:"content content-full"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u7ad9\u70b9\u914d\u7f6e"),h.a.createElement("div",{className:"block block-rounded block-bordered"},h.a.createElement("div",{className:"block-header block-header-default"},h.a.createElement("h3",{className:"block-title"},"\u7ad9\u70b9"),h.a.createElement("div",{className:"block-options"},h.a.createElement(c["a"],{type:"primary",onClick:()=>this.submit("site")},"\u4fdd\u5b58"))),h.a.createElement("div",{className:"block-content"},h.a.createElement("div",{className:"row push"},h.a.createElement("div",{className:"col-lg-8 col-xl-5"},h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u7ad9\u70b9\u540d\u79f0"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.site.app_name,onChange:e=>this.set("site","app_name",e.target.value)})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u7ad9\u70b9URL ",h.a.createElement(l["a"],{placement:"top",title:"\u66f4\u6539\u7ad9\u70b9URL\u4f1a\u5f71\u54cd\u5230\u8ba2\u9605\u7b49\u6709\u7528\u5230\u5916\u90e8URL\u7684\u5730\u65b9\uff0c\u5176\u4ed6\u4e0d\u53d7\u5f71\u54cd"},h.a.createElement(r["a"],{type:"question-circle"}))),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.site.app_url,onChange:e=>this.set("site","app_url",e.target.value)})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u505c\u6b62\u65b0\u7528\u6237\u6ce8\u518c"),h.a.createElement("div",null,h.a.createElement(s["a"],{checked:parseInt(this.state.site.stop_register),onChange:e=>this.set("site","stop_register",e?1:0)}))),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u90ae\u7bb1\u9a8c\u8bc1"),h.a.createElement("div",null,h.a.createElement(s["a"],{checked:parseInt(this.state.site.email_verify),onChange:e=>this.set("site","email_verify",e?1:0)}))))))),h.a.createElement("div",{className:"block block-rounded block-bordered"},h.a.createElement("div",{className:"block-header block-header-default"},h.a.createElement("h3",{className:"block-title"},"\u9080\u8bf7"),h.a.createElement("div",{className:"block-options"},h.a.createElement(c["a"],{type:"primary",onClick:()=>this.submit("invite")},"\u4fdd\u5b58"))),h.a.createElement("div",{className:"block-content"},h.a.createElement("div",{className:"row push"},h.a.createElement("div",{className:"col-lg-8 col-xl-5"},h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u5f00\u542f\u5f3a\u5236\u9080\u8bf7"),h.a.createElement("div",null,h.a.createElement(s["a"],{checked:parseInt(this.state.invite.invite_force),onChange:e=>this.set("invite","invite_force",e?1:0)}))),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-email-input"},"\u9080\u8bf7\u4f63\u91d1\u767e\u5206\u6bd4"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.invite.invite_commission,onChange:e=>this.set("invite","invite_commission",parseInt(e.target.value))})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-email-input"},"\u7528\u6237\u53ef\u521b\u5efa\u9080\u8bf7\u7801\u4e0a\u9650"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.invite.invite_gen_limit,onChange:e=>this.set("invite","invite_gen_limit",parseInt(e.target.value))})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-email-input"},"\u9080\u8bf7\u7801\u6c38\u4e0d\u8fc7\u671f"),h.a.createElement("div",null,h.a.createElement(s["a"],{checked:parseInt(this.state.invite.invite_never_expire),onChange:e=>this.set("invite","invite_never_expire",e?1:0)}))))))),h.a.createElement("div",{className:"block block-rounded block-bordered"},h.a.createElement("div",{className:"block-header block-header-default"},h.a.createElement("h3",{className:"block-title"},"\u670d\u52a1\u7aef"),h.a.createElement("div",{className:"block-options"},h.a.createElement(c["a"],{type:"primary",onClick:()=>this.submit("server")},"\u4fdd\u5b58"))),h.a.createElement("div",{className:"block-content"},h.a.createElement("div",{className:"row push"},h.a.createElement("div",{className:"col-lg-8 col-xl-5"},h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u901a\u8baf\u5bc6\u94a5"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.server.server_token,onChange:e=>this.set("server","server_token",e.target.value)})))))))))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[2],{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");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{l.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(r["c"])(e=>{var a=e.header;return{header:a}})(c),o=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(r["c"])(e=>{var a=e.header;return{header:a}})(d);class h extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class v extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(m,this.props),i.a.createElement(p,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(h,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(v)},L4tb:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return E});var n=t("jehZ"),i=t.n(n),s=(t("BoS7"),t("Sdc0")),l=(t("5Dmo"),t("3S7+")),r=(t("Pwec"),t("CtXQ")),c=(t("+L6B"),t("2/Rp")),m=(t("miYZ"),t("tsqr")),o=t("p0pE"),d=t.n(o),p=t("q1tI"),h=t.n(p),v=t("Bl7J"),u=t("t3Un");class E extends h.a.Component{constructor(){super(...arguments),this.state={invite:{},site:{},server:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(u["a"])("/admin/config").then(e=>{200===e.code&&this.setState(d()({},e.data,{loading:!1}))})}submit(e){Object(u["b"])("/admin/config/save",this.state[e]).then(e=>{200===e.code&&e.data&&(this.fetchData(),m["a"].success("\u4fdd\u5b58\u6210\u529f"))})}set(e,a,t){this.setState({[e]:d()({},this.state[e],{[a]:t})})}render(){return h.a.createElement(v["a"],i()({},this.props,{loading:this.state.loading}),h.a.createElement("main",{id:"main-container"},h.a.createElement("div",{className:"content content-full"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u7ad9\u70b9\u914d\u7f6e"),h.a.createElement("div",{className:"block block-rounded block-bordered"},h.a.createElement("div",{className:"block-header block-header-default"},h.a.createElement("h3",{className:"block-title"},"\u7ad9\u70b9"),h.a.createElement("div",{className:"block-options"},h.a.createElement(c["a"],{type:"primary",onClick:()=>this.submit("site")},"\u4fdd\u5b58"))),h.a.createElement("div",{className:"block-content"},h.a.createElement("div",{className:"row push"},h.a.createElement("div",{className:"col-lg-8 col-xl-5"},h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u7ad9\u70b9\u540d\u79f0"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.site.app_name,onChange:e=>this.set("site","app_name",e.target.value)})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u7ad9\u70b9URL ",h.a.createElement(l["a"],{placement:"top",title:"\u66f4\u6539\u7ad9\u70b9URL\u4f1a\u5f71\u54cd\u5230\u8ba2\u9605\u7b49\u6709\u7528\u5230\u5916\u90e8URL\u7684\u5730\u65b9\uff0c\u5176\u4ed6\u4e0d\u53d7\u5f71\u54cd"},h.a.createElement(r["a"],{type:"question-circle"}))),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.site.app_url,onChange:e=>this.set("site","app_url",e.target.value)})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u505c\u6b62\u65b0\u7528\u6237\u6ce8\u518c"),h.a.createElement("div",null,h.a.createElement(s["a"],{checked:parseInt(this.state.site.stop_register),onChange:e=>this.set("site","stop_register",e?1:0)}))),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u90ae\u7bb1\u9a8c\u8bc1"),h.a.createElement("div",null,h.a.createElement(s["a"],{checked:parseInt(this.state.site.email_verify),onChange:e=>this.set("site","email_verify",e?1:0)}))))))),h.a.createElement("div",{className:"block block-rounded block-bordered"},h.a.createElement("div",{className:"block-header block-header-default"},h.a.createElement("h3",{className:"block-title"},"\u9080\u8bf7"),h.a.createElement("div",{className:"block-options"},h.a.createElement(c["a"],{type:"primary",onClick:()=>this.submit("invite")},"\u4fdd\u5b58"))),h.a.createElement("div",{className:"block-content"},h.a.createElement("div",{className:"row push"},h.a.createElement("div",{className:"col-lg-8 col-xl-5"},h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u5f00\u542f\u5f3a\u5236\u9080\u8bf7"),h.a.createElement("div",null,h.a.createElement(s["a"],{checked:parseInt(this.state.invite.invite_force),onChange:e=>this.set("invite","invite_force",e?1:0)}))),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-email-input"},"\u9080\u8bf7\u4f63\u91d1\u767e\u5206\u6bd4"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.invite.invite_commission,onChange:e=>this.set("invite","invite_commission",parseInt(e.target.value))})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-email-input"},"\u7528\u6237\u53ef\u521b\u5efa\u9080\u8bf7\u7801\u4e0a\u9650"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.invite.invite_gen_limit,onChange:e=>this.set("invite","invite_gen_limit",parseInt(e.target.value))})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-email-input"},"\u9080\u8bf7\u7801\u6c38\u4e0d\u8fc7\u671f"),h.a.createElement("div",null,h.a.createElement(s["a"],{checked:parseInt(this.state.invite.invite_never_expire),onChange:e=>this.set("invite","invite_never_expire",e?1:0)}))))))),h.a.createElement("div",{className:"block block-rounded block-bordered"},h.a.createElement("div",{className:"block-header block-header-default"},h.a.createElement("h3",{className:"block-title"},"\u670d\u52a1\u7aef"),h.a.createElement("div",{className:"block-options"},h.a.createElement(c["a"],{type:"primary",onClick:()=>this.submit("server")},"\u4fdd\u5b58"))),h.a.createElement("div",{className:"block-content"},h.a.createElement("div",{className:"row push"},h.a.createElement("div",{className:"col-lg-8 col-xl-5"},h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u901a\u8baf\u5bc6\u94a5"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.server.server_token,onChange:e=>this.set("server","server_token",e.target.value)})))))))))}}}}]); \ No newline at end of file diff --git a/public/p__admin__dashboard.async.js b/public/p__admin__dashboard.async.js index 2bdd1c0e..eb18bb3a 100644 --- a/public/p__admin__dashboard.async.js +++ b/public/p__admin__dashboard.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[3],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),s=t.n(n),l=t("3a4m"),m=t.n(l),c=t("/MKj");class r extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},a);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{m.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var i=Object(c["c"])(e=>{var a=e.header;return{header:a}})(r),o=t("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{m.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(c["c"])(e=>{var a=e.header;return{header:a}})(d);class b extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class v extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(i,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(b,null))}}a["a"]=Object(c["c"])(e=>{var a=e.header;return{header:a}})(v)},Cb5i:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return m});var n=t("q1tI"),s=t.n(n),l=t("Bl7J");class m extends s.a.Component{render(){return s.a.createElement(l["a"],this.props,s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u603b\u89c8"),s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear"},s.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},s.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},s.a.createElement("div",null,s.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"3"),s.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6211\u7684\u670d\u52a1"))))),s.a.createElement("div",{className:"col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},s.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},s.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},s.a.createElement("div",null,s.a.createElement("a",{className:"link-fx text-danger font-size-h1 font-w700",href:"javascript:void(0)"},"1"),s.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u4ed8\u8d26\u5355"))))),s.a.createElement("div",{className:"col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},s.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},s.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},s.a.createElement("div",null,s.a.createElement("a",{className:"link-fx text-warning font-size-h1 font-w700",href:"javascript:void(0)"},"1"),s.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u529e\u5de5\u5355"))))),s.a.createElement("div",{className:"col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},s.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},s.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},s.a.createElement("div",null,s.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"1"),s.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6211\u7684\u9080\u8bf7")))))),s.a.createElement("div",{className:"d-flex justify-content-between align-items-center mt-6 mb-3"},s.a.createElement("h2",{className:"font-w300 mb-0"},"\u6211\u7684\u670d\u52a1"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3"},"\u67e5\u770b\u66f4\u591a")),s.a.createElement("div",{className:"overflow-hidden"},s.a.createElement("div",{id:"dm-add-server",className:"block block-rounded bg-body-dark d-none animated fadeIn"},s.a.createElement("div",{className:"block-header bg-white-25"},s.a.createElement("h3",{className:"block-title"},"Add a new VPS"),s.a.createElement("div",{className:"block-options"},s.a.createElement("button",{type:"button",className:"btn-block-option"},s.a.createElement("i",{className:"si si-question"})),s.a.createElement("button",{type:"button",className:"btn-block-option","data-toggle":"block-option","data-action":"close"},s.a.createElement("i",{className:"si si-close"})))),s.a.createElement("div",{className:"block-content block-content-full"},s.a.createElement("form",{action:"db_hosting.html",method:"POST",onsubmit:"return false;"},s.a.createElement("div",{className:"form-group row gutters-tiny mb-0 items-push"},s.a.createElement("div",{className:"col-md-5"},s.a.createElement("div",{className:"input-group"},s.a.createElement("div",{className:"input-group-prepend"},s.a.createElement("span",{className:"input-group-text"},"vps158875_")),s.a.createElement("input",{type:"text",className:"form-control",id:"example-hosting-name",name:"example-hosting-name",placeholder:"Name.."}))),s.a.createElement("div",{className:"col-md-4"},s.a.createElement("select",{className:"custom-select",id:"example-hosting-vps",name:"example-hosting-vps"},s.a.createElement("option",{value:"0"},"Please select a config"),s.a.createElement("option",{value:"1"},"$19/m - 2GB RAM, 30GB Storage, Unlimited Domains"),s.a.createElement("option",{value:"2"},"$29/m - 4GB RAM, 60GB Storage, Unlimited Domains"),s.a.createElement("option",{value:"3"},"$49/m - 6GB RAM, 120GB Storage, Unlimited Domains"),s.a.createElement("option",{value:"4"},"$69/m - 8GB RAM, 240GB Storage, Unlimited Domains"))),s.a.createElement("div",{className:"col-md-3"},s.a.createElement("button",{type:"submit",className:"btn btn-success btn-block"},s.a.createElement("i",{className:"fa fa-plus mr-1"}),"Create"))))))),s.a.createElement("div",{className:"block block-rounded block-fx-pop mb-2 js-appear-enabled animated fadeIn","data-toggle":"appear"},s.a.createElement("div",{className:"block-content block-content-full border-left border-3x border-dark"},s.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},s.a.createElement("div",{className:"p-1 p-md-3 w-50"},s.a.createElement("h3",{className:"h4 font-w700 mb-1"},"vps158875_ny1"),s.a.createElement("p",{className:"font-size-sm text-muted"},s.a.createElement("i",{className:"fa fa-map-pin mr-1"}),"New York"),s.a.createElement("div",{className:"mb-0"},s.a.createElement("div",{className:"progress mb-1",style:{height:6}},s.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:"33%"},"aria-valuenow":"30","aria-valuemin":"0","aria-valuemax":"100"})),s.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},s.a.createElement("span",{className:"font-w700"},"1GB"),"of",s.a.createElement("span",{className:"font-w700"},"3GB"),"RAM"),s.a.createElement("div",{className:"progress mb-1",style:{height:6}},s.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-warning",role:"progressbar",style:{width:"80%"},"aria-valuenow":"30","aria-valuemin":"0","aria-valuemax":"100"})),s.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},s.a.createElement("span",{className:"font-w700"},"25GB"),"of",s.a.createElement("span",{className:"font-w700"},"50GB"),"Disk Space"))),s.a.createElement("div",{className:"p-1 p-md-3 text-md-right"},s.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-redo mr-1"}),"Restart"),s.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-wrench mr-1"}),"Manage"),s.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-times mr-1"}),"Delete"))))),s.a.createElement("div",{className:"d-flex justify-content-between align-items-center mt-6 mb-3"},s.a.createElement("h2",{className:"font-w300 mb-0"},"\u6211\u7684\u5de5\u5355"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3"},"\u67e5\u770b\u66f4\u591a")),s.a.createElement("div",{className:"overflow-hidden"},s.a.createElement("div",{id:"dm-add-domain",className:"block block-rounded d-none bg-body-dark animated fadeIn"},s.a.createElement("div",{className:"block-header bg-white-25"},s.a.createElement("h3",{className:"block-title"},"Add a new domain"),s.a.createElement("div",{className:"block-options"},s.a.createElement("button",{type:"button",className:"btn-block-option"},s.a.createElement("i",{className:"si si-question"})),s.a.createElement("button",{type:"button",className:"btn-block-option","data-toggle":"block-option","data-action":"close"},s.a.createElement("i",{className:"si si-close"})))),s.a.createElement("div",{className:"block-content block-content-full"},s.a.createElement("form",{action:"db_hosting.html",method:"POST",onsubmit:"return false;"},s.a.createElement("div",{className:"form-group row gutters-tiny mb-0 items-push"},s.a.createElement("div",{className:"col-md-6"},s.a.createElement("input",{type:"text",className:"form-control",id:"example-hosting-domain",name:"example-hosting-domain",placeholder:"example.com"})),s.a.createElement("div",{className:"col-md-3"},s.a.createElement("button",{type:"submit",className:"btn btn-secondary btn-block"},s.a.createElement("i",{className:"fa fa-arrows-alt-h mr-1"}),"Transfer")),s.a.createElement("div",{className:"col-md-3"},s.a.createElement("button",{type:"submit",className:"btn btn-success btn-block"},s.a.createElement("i",{className:"fa fa-plus mr-1"}),"Register"))))))),s.a.createElement("div",{className:"block block-rounded block-fx-pop mb-2 js-appear-enabled animated fadeIn","data-toggle":"appear"},s.a.createElement("div",{className:"block-content block-content-full border-left border-3x border-success"},s.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("h3",{className:"h4 font-w700 mb-1"},"example.com"),s.a.createElement("p",{className:"font-size-sm mb-2"},s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"DNS"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Visit"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"WebFTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"FTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Add IP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Email")),s.a.createElement("p",{className:"font-size-sm text-muted mb-0"},"Expires on 15th June, 2030")),s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-wrench mr-1"}),"Manage"),s.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-times mr-1"}),"Delete"))))),s.a.createElement("div",{className:"block block-rounded block-fx-pop mb-2 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},s.a.createElement("div",{className:"block-content block-content-full border-left border-3x border-success"},s.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("h3",{className:"h4 font-w700 mb-1"},"example.co.uk"),s.a.createElement("p",{className:"font-size-sm mb-2"},s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"DNS"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Visit"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"WebFTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"FTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Add IP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Email")),s.a.createElement("p",{className:"font-size-sm text-muted mb-0"},"Expires on 12th October, 2027")),s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-wrench mr-1"}),"Manage"),s.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-times mr-1"}),"Delete"))))),s.a.createElement("div",{className:"block block-rounded block-fx-pop mb-2 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},s.a.createElement("div",{className:"block-content block-content-full border-left border-3x border-warning"},s.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("h3",{className:"h4 font-w700 mb-1"},"example.io"),s.a.createElement("p",{className:"font-size-sm mb-2"},s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"DNS"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Visit"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"WebFTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"FTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Add IP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Email")),s.a.createElement("p",{className:"font-size-sm mb-0"},s.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"Expires in 1 week - Renew Today"))),s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-wrench mr-1"}),"Manage"),s.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-times mr-1"}),"Delete"))))))))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[3],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),s=t.n(n),l=t("3a4m"),m=t.n(l),c=t("/MKj");class r extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},a);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{m.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var i=Object(c["c"])(e=>{var a=e.header;return{header:a}})(r),o=t("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{m.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(c["c"])(e=>{var a=e.header;return{header:a}})(d);class b extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class v extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(i,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(b,null))}}a["a"]=Object(c["c"])(e=>{var a=e.header;return{header:a}})(v)},Cb5i:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return m});var n=t("q1tI"),s=t.n(n),l=t("Bl7J");class m extends s.a.Component{render(){return s.a.createElement(l["a"],this.props,s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u603b\u89c8"),s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear"},s.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},s.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},s.a.createElement("div",null,s.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"3"),s.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6211\u7684\u670d\u52a1"))))),s.a.createElement("div",{className:"col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},s.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},s.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},s.a.createElement("div",null,s.a.createElement("a",{className:"link-fx text-danger font-size-h1 font-w700",href:"javascript:void(0)"},"1"),s.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u4ed8\u8d26\u5355"))))),s.a.createElement("div",{className:"col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},s.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},s.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},s.a.createElement("div",null,s.a.createElement("a",{className:"link-fx text-warning font-size-h1 font-w700",href:"javascript:void(0)"},"1"),s.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u529e\u5de5\u5355"))))),s.a.createElement("div",{className:"col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},s.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},s.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},s.a.createElement("div",null,s.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"1"),s.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6211\u7684\u9080\u8bf7")))))),s.a.createElement("div",{className:"d-flex justify-content-between align-items-center mt-6 mb-3"},s.a.createElement("h2",{className:"font-w300 mb-0"},"\u6211\u7684\u670d\u52a1"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3"},"\u67e5\u770b\u66f4\u591a")),s.a.createElement("div",{className:"overflow-hidden"},s.a.createElement("div",{id:"dm-add-server",className:"block block-rounded bg-body-dark d-none animated fadeIn"},s.a.createElement("div",{className:"block-header bg-white-25"},s.a.createElement("h3",{className:"block-title"},"Add a new VPS"),s.a.createElement("div",{className:"block-options"},s.a.createElement("button",{type:"button",className:"btn-block-option"},s.a.createElement("i",{className:"si si-question"})),s.a.createElement("button",{type:"button",className:"btn-block-option","data-toggle":"block-option","data-action":"close"},s.a.createElement("i",{className:"si si-close"})))),s.a.createElement("div",{className:"block-content block-content-full"},s.a.createElement("form",{action:"db_hosting.html",method:"POST",onsubmit:"return false;"},s.a.createElement("div",{className:"form-group row gutters-tiny mb-0 items-push"},s.a.createElement("div",{className:"col-md-5"},s.a.createElement("div",{className:"input-group"},s.a.createElement("div",{className:"input-group-prepend"},s.a.createElement("span",{className:"input-group-text"},"vps158875_")),s.a.createElement("input",{type:"text",className:"form-control",id:"example-hosting-name",name:"example-hosting-name",placeholder:"Name.."}))),s.a.createElement("div",{className:"col-md-4"},s.a.createElement("select",{className:"custom-select",id:"example-hosting-vps",name:"example-hosting-vps"},s.a.createElement("option",{value:"0"},"Please select a config"),s.a.createElement("option",{value:"1"},"$19/m - 2GB RAM, 30GB Storage, Unlimited Domains"),s.a.createElement("option",{value:"2"},"$29/m - 4GB RAM, 60GB Storage, Unlimited Domains"),s.a.createElement("option",{value:"3"},"$49/m - 6GB RAM, 120GB Storage, Unlimited Domains"),s.a.createElement("option",{value:"4"},"$69/m - 8GB RAM, 240GB Storage, Unlimited Domains"))),s.a.createElement("div",{className:"col-md-3"},s.a.createElement("button",{type:"submit",className:"btn btn-success btn-block"},s.a.createElement("i",{className:"fa fa-plus mr-1"}),"Create"))))))),s.a.createElement("div",{className:"block block-rounded block-fx-pop mb-2 js-appear-enabled animated fadeIn","data-toggle":"appear"},s.a.createElement("div",{className:"block-content block-content-full border-left border-3x border-dark"},s.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},s.a.createElement("div",{className:"p-1 p-md-3 w-50"},s.a.createElement("h3",{className:"h4 font-w700 mb-1"},"vps158875_ny1"),s.a.createElement("p",{className:"font-size-sm text-muted"},s.a.createElement("i",{className:"fa fa-map-pin mr-1"}),"New York"),s.a.createElement("div",{className:"mb-0"},s.a.createElement("div",{className:"progress mb-1",style:{height:6}},s.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:"33%"},"aria-valuenow":"30","aria-valuemin":"0","aria-valuemax":"100"})),s.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},s.a.createElement("span",{className:"font-w700"},"1GB"),"of",s.a.createElement("span",{className:"font-w700"},"3GB"),"RAM"),s.a.createElement("div",{className:"progress mb-1",style:{height:6}},s.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-warning",role:"progressbar",style:{width:"80%"},"aria-valuenow":"30","aria-valuemin":"0","aria-valuemax":"100"})),s.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},s.a.createElement("span",{className:"font-w700"},"25GB"),"of",s.a.createElement("span",{className:"font-w700"},"50GB"),"Disk Space"))),s.a.createElement("div",{className:"p-1 p-md-3 text-md-right"},s.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-redo mr-1"}),"Restart"),s.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-wrench mr-1"}),"Manage"),s.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-times mr-1"}),"Delete"))))),s.a.createElement("div",{className:"d-flex justify-content-between align-items-center mt-6 mb-3"},s.a.createElement("h2",{className:"font-w300 mb-0"},"\u6211\u7684\u5de5\u5355"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3"},"\u67e5\u770b\u66f4\u591a")),s.a.createElement("div",{className:"overflow-hidden"},s.a.createElement("div",{id:"dm-add-domain",className:"block block-rounded d-none bg-body-dark animated fadeIn"},s.a.createElement("div",{className:"block-header bg-white-25"},s.a.createElement("h3",{className:"block-title"},"Add a new domain"),s.a.createElement("div",{className:"block-options"},s.a.createElement("button",{type:"button",className:"btn-block-option"},s.a.createElement("i",{className:"si si-question"})),s.a.createElement("button",{type:"button",className:"btn-block-option","data-toggle":"block-option","data-action":"close"},s.a.createElement("i",{className:"si si-close"})))),s.a.createElement("div",{className:"block-content block-content-full"},s.a.createElement("form",{action:"db_hosting.html",method:"POST",onsubmit:"return false;"},s.a.createElement("div",{className:"form-group row gutters-tiny mb-0 items-push"},s.a.createElement("div",{className:"col-md-6"},s.a.createElement("input",{type:"text",className:"form-control",id:"example-hosting-domain",name:"example-hosting-domain",placeholder:"example.com"})),s.a.createElement("div",{className:"col-md-3"},s.a.createElement("button",{type:"submit",className:"btn btn-secondary btn-block"},s.a.createElement("i",{className:"fa fa-arrows-alt-h mr-1"}),"Transfer")),s.a.createElement("div",{className:"col-md-3"},s.a.createElement("button",{type:"submit",className:"btn btn-success btn-block"},s.a.createElement("i",{className:"fa fa-plus mr-1"}),"Register"))))))),s.a.createElement("div",{className:"block block-rounded block-fx-pop mb-2 js-appear-enabled animated fadeIn","data-toggle":"appear"},s.a.createElement("div",{className:"block-content block-content-full border-left border-3x border-success"},s.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("h3",{className:"h4 font-w700 mb-1"},"example.com"),s.a.createElement("p",{className:"font-size-sm mb-2"},s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"DNS"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Visit"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"WebFTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"FTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Add IP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Email")),s.a.createElement("p",{className:"font-size-sm text-muted mb-0"},"Expires on 15th June, 2030")),s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-wrench mr-1"}),"Manage"),s.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-times mr-1"}),"Delete"))))),s.a.createElement("div",{className:"block block-rounded block-fx-pop mb-2 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},s.a.createElement("div",{className:"block-content block-content-full border-left border-3x border-success"},s.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("h3",{className:"h4 font-w700 mb-1"},"example.co.uk"),s.a.createElement("p",{className:"font-size-sm mb-2"},s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"DNS"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Visit"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"WebFTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"FTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Add IP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Email")),s.a.createElement("p",{className:"font-size-sm text-muted mb-0"},"Expires on 12th October, 2027")),s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-wrench mr-1"}),"Manage"),s.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-times mr-1"}),"Delete"))))),s.a.createElement("div",{className:"block block-rounded block-fx-pop mb-2 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},s.a.createElement("div",{className:"block-content block-content-full border-left border-3x border-warning"},s.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("h3",{className:"h4 font-w700 mb-1"},"example.io"),s.a.createElement("p",{className:"font-size-sm mb-2"},s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"DNS"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Visit"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"WebFTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"FTP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Add IP"),s.a.createElement("a",{className:"mr-1 mb-1",href:"javascript:void(0)"},"Email")),s.a.createElement("p",{className:"font-size-sm mb-0"},s.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"Expires in 1 week - Renew Today"))),s.a.createElement("div",{className:"p-1 p-md-3"},s.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-wrench mr-1"}),"Manage"),s.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)"},s.a.createElement("i",{className:"fa fa-times mr-1"}),"Delete"))))))))}}}}]); \ No newline at end of file diff --git a/public/p__admin__order.async.js b/public/p__admin__order.async.js index e60927d2..bd013daa 100644 --- a/public/p__admin__order.async.js +++ b/public/p__admin__order.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[4],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)},GSUD:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return f});var n=t("jehZ"),i=t.n(n),s=(t("g9YV"),t("wCAj")),r=(t("/zsF"),t("PArb")),l=(t("miYZ"),t("tsqr")),c=t("p0pE"),o=t.n(c),m=t("q1tI"),d=t.n(m),h=t("Bl7J"),p=t("t3Un"),u=t("LbTH"),g=t("wd/R"),v=t.n(g);class f extends d.a.Component{constructor(){super(...arguments),this.state={orders:[],pagination:{current:1,pageSize:10,total:0},trade_no:void 0,loading:!0}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=o()({},this.state.pagination),this.state.trade_no&&Object.assign(e,{trade_no:this.state.trade_no}),Object(p["a"])("/admin/order",e).then(e=>{200===e.code&&this.setState({orders:e.data,pagination:o()({},this.state.pagination,{total:e.total}),loading:!1})})}searchOnChange(e){this.inputDelayTimer&&clearTimeout(this.inputDelayTimer),this.inputDelayTimer=setTimeout(function(){this.inputDelayTimer=null,this.setState({trade_no:e},()=>{this.fetchData()})}.bind(this),400)}repair(e){Object(p["b"])("/admin/order/repair",{trade_no:e}).then(e=>{200===e.code&&e.data&&(l["a"].success("\u64cd\u4f5c\u6210\u529f"),this.fetchData())})}render(){var e=[{title:"# \u8ba2\u5355\u53f7",dataIndex:"trade_no",key:"trade_no"},{title:"\u8ba2\u9605\u8ba1\u5212",dataIndex:"plan_name",key:"plan_name"},{title:"\u5468\u671f",dataIndex:"cycle",key:"cycle",align:"center",render:(e,a)=>{return d.a.createElement("span",{className:"badge badge-pill badge-primary"},u["a"].cycleText[a.cycle])}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",render:e=>{return(e/100).toFixed(2)}},{title:"\u8ba2\u5355\u72b6\u6001",dataIndex:"status",key:"status",render:e=>{return u["a"].orderStatusText[e]}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return v()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return d.a.createElement("div",null,d.a.createElement("a",{disabled:0!==a.status,onClick:()=>this.repair(a.trade_no),href:"javascript:;"},"\u8865\u5355"),d.a.createElement(r["a"],{type:"vertical"}),d.a.createElement("a",{disabled:0!==a.status,href:"javascript:;"},"\u53d6\u6d88"))}}];return d.a.createElement(h["a"],i()({},this.props,{loading:this.state.loading,search:{placeholder:"\u901a\u8fc7\u8ba2\u5355\u53f7\u641c\u7d22",onChange:e=>this.searchOnChange(e)}}),d.a.createElement("main",{id:"main-container"},d.a.createElement("div",{className:"content content-full"},d.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u7ba1\u7406")),d.a.createElement("div",{className:"bg-white"},d.a.createElement(s["a"],{dataSource:this.state.orders,pagination:this.state.pagination,columns:e,scroll:{x:950},onChange:e=>this.paginationOnChange(e)})))))}}},LbTH:function(e,a,t){"use strict";a["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[4],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)},GSUD:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return f});var n=t("jehZ"),i=t.n(n),s=(t("g9YV"),t("wCAj")),r=(t("/zsF"),t("PArb")),l=(t("miYZ"),t("tsqr")),c=t("p0pE"),o=t.n(c),m=t("q1tI"),d=t.n(m),h=t("Bl7J"),p=t("t3Un"),u=t("LbTH"),g=t("wd/R"),v=t.n(g);class f extends d.a.Component{constructor(){super(...arguments),this.state={orders:[],pagination:{current:1,pageSize:10,total:0},trade_no:void 0,loading:!0}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=o()({},this.state.pagination),this.state.trade_no&&Object.assign(e,{trade_no:this.state.trade_no}),Object(p["a"])("/admin/order",e).then(e=>{200===e.code&&this.setState({orders:e.data,pagination:o()({},this.state.pagination,{total:e.total}),loading:!1})})}searchOnChange(e){this.inputDelayTimer&&clearTimeout(this.inputDelayTimer),this.inputDelayTimer=setTimeout(function(){this.inputDelayTimer=null,this.setState({trade_no:e},()=>{this.fetchData()})}.bind(this),400)}repair(e){Object(p["b"])("/admin/order/repair",{trade_no:e}).then(e=>{200===e.code&&e.data&&(l["a"].success("\u64cd\u4f5c\u6210\u529f"),this.fetchData())})}render(){var e=[{title:"# \u8ba2\u5355\u53f7",dataIndex:"trade_no",key:"trade_no"},{title:"\u8ba2\u9605\u8ba1\u5212",dataIndex:"plan_name",key:"plan_name"},{title:"\u5468\u671f",dataIndex:"cycle",key:"cycle",align:"center",render:(e,a)=>{return d.a.createElement("span",{className:"badge badge-pill badge-primary"},u["a"].cycleText[a.cycle])}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",render:e=>{return(e/100).toFixed(2)}},{title:"\u8ba2\u5355\u72b6\u6001",dataIndex:"status",key:"status",render:e=>{return u["a"].orderStatusText[e]}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return v()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return d.a.createElement("div",null,d.a.createElement("a",{disabled:0!==a.status,onClick:()=>this.repair(a.trade_no),href:"javascript:;"},"\u8865\u5355"),d.a.createElement(r["a"],{type:"vertical"}),d.a.createElement("a",{disabled:0!==a.status,href:"javascript:;"},"\u53d6\u6d88"))}}];return d.a.createElement(h["a"],i()({},this.props,{loading:this.state.loading,search:{placeholder:"\u901a\u8fc7\u8ba2\u5355\u53f7\u641c\u7d22",onChange:e=>this.searchOnChange(e)}}),d.a.createElement("main",{id:"main-container"},d.a.createElement("div",{className:"content content-full"},d.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u7ba1\u7406")),d.a.createElement("div",{className:"bg-white"},d.a.createElement(s["a"],{dataSource:this.state.orders,pagination:this.state.pagination,columns:e,scroll:{x:950},onChange:e=>this.paginationOnChange(e)})))))}}},LbTH:function(e,a,t){"use strict";a["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}}}]); \ No newline at end of file diff --git a/public/p__admin__plan.async.js b/public/p__admin__plan.async.js index 15282584..51a20d03 100644 --- a/public/p__admin__plan.async.js +++ b/public/p__admin__plan.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[5],{Bl7J:function(e,t,a){"use strict";var i=a("q1tI"),n=a.n(i),r=a("3a4m"),s=a.n(r),l=a("/MKj");class c extends n.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:n.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:n.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,i){switch(e){case"heading":return n.a.createElement("li",{className:"nav-main-heading"},t);case"item":return n.a.createElement("li",{className:"nav-main-item"},n.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{s.a.push(a),this.props.dispatch({type:"header/showNav"})}},i&&i,n.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return n.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},n.a.createElement("div",{className:"smini-visible-block"},n.a.createElement("div",{className:"content-header bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},"X"),n.a.createElement("span",{className:"text-white"},"H")))),n.a.createElement("div",{className:"smini-hidden"},n.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),n.a.createElement("div",{className:"d-lg-none"},n.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-times-circle"}))))),n.a.createElement("div",{className:"content-side content-side-full"},n.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(l["c"])(e=>{var t=e.header;return{header:t}})(c),o=a("t3Un");class d extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{s.a.push("/login")})}render(){return n.a.createElement("header",{id:"page-header"},n.a.createElement("div",{className:"content-header"},n.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},n.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&n.a.createElement("div",null,n.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),n.a.createElement("div",null,this.state.loading?n.a.createElement("div",{className:"spinner-grow text-primary"}):n.a.createElement("div",{className:"dropdown d-inline-block"},n.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},n.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),n.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),n.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),n.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},n.a.createElement("div",{className:"p-2"},n.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var t=e.header;return{header:t}})(d);class p extends n.a.Component{render(){return n.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},n.a.createElement("div",{className:"content py-0"},n.a.createElement("div",{className:"row font-size-sm"},n.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},n.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),n.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},n.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(m,this.props),n.a.createElement(h,{search:this.props.search}),this.props.loading?n.a.createElement("main",{id:"main-container"},n.a.createElement("div",{className:"content content-full"},n.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},n.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,n.a.createElement(p,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(u)},yjin:function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),r=(a("2qtc"),a("kLXV")),s=(a("OaEy"),a("2fM7")),l=(a("5NDa"),a("5rEg")),c=(a("g9YV"),a("wCAj")),m=(a("/zsF"),a("PArb")),o=(a("5Dmo"),a("3S7+")),d=(a("Pwec"),a("CtXQ")),h=(a("BoS7"),a("Sdc0")),p=(a("+BJd"),a("mr32")),u=a("p0pE"),v=a.n(u),g=a("q1tI"),b=a.n(g),E=a("Bl7J"),f=a("/MKj"),y=a("t3Un");class N extends b.a.Component{constructor(){super(...arguments),this.state={plan:[],group:[],visible:!1,submit:{show:0},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(y["a"])("/admin/server/group").then(e=>{200===e.code&&this.setState({group:e.data})}),Object(y["a"])("/admin/plan").then(e=>{200===e.code&&(e.data.map((t,a)=>{e.data[a].month_price=e.data[a].month_price/100,e.data[a].quarter_price=e.data[a].quarter_price/100,e.data[a].half_year_price=e.data[a].half_year_price/100,e.data[a].year_price=e.data[a].year_price/100}),this.setState({plan:e.data,loading:!1}))})}create(){Object(y["b"])("/admin/plan/save",v()({},this.state.submit,{month_price:this.state.submit.month_price?100*this.state.submit.month_price:void 0,quarter_price:this.state.submit.quarter_price?100*this.state.submit.quarter_price:void 0,half_year_price:this.state.submit.half_year_price?100*this.state.submit.half_year_price:void 0,year_price:this.state.submit.year_price?100*this.state.submit.year_price:void 0})).then(e=>{200===e.code&&(this.modalVisible(),this.fetchData())})}modalVisible(){this.setState({visible:!this.state.visible},()=>{this.setState({submit:{show:0}})})}getGroup(e){this.state.group.map(t=>{if(t.id===e)return t})}priceOnChange(e,t){this.setState({submit:v()({},this.state.submit,{[e]:t})})}drop(e){Object(y["b"])("/admin/plan/drop",{id:e}).then(e=>{200===e.code&&e.data&&this.fetchData()})}edit(e){this.setState({submit:v()({},this.state.plan[e]),visible:!0})}update(e,t,a){this.setState({[e+t+"_loading"]:!0},()=>{Object(y["b"])("/admin/plan/update",{id:e,[t]:a}).then(a=>{200===a.code&&(this.fetchData(),this.setState({[e+t+"_loading"]:!1}))})})}render(){var e=[{title:"\u5957\u9910\u540d\u79f0",dataIndex:"name",key:"name"},{title:"\u6743\u9650\u7ec4",dataIndex:"group_id",key:"group_id",render:(e,t)=>{t.ext_data;var a=[];return this.state.group.map(t=>{t.id===parseInt(e)&&a.push(b.a.createElement(p["a"],null,t.name))}),a}},{title:"\u6708\u4ed8\u552e\u4ef7",dataIndex:"month_price",key:"month_price",render:e=>{return e.toFixed(2)}},{title:"\u5b63\u4ed8\u552e\u4ef7",dataIndex:"quarter_price",key:"quarter_price",render:e=>{return e.toFixed(2)}},{title:"\u534a\u5e74\u4ed8\u552e\u4ef7",dataIndex:"half_year_price",key:"half_year_price",render:e=>{return e.toFixed(2)}},{title:"\u5e74\u4ed8\u552e\u4ef7",dataIndex:"year_price",key:"year_price",render:e=>{return e.toFixed(2)}},{title:"\u9500\u552e\u72b6\u6001",dataIndex:"show",key:"show",align:"center",render:(e,t)=>{return b.a.createElement(h["a"],{loading:this.state[t.id+"show_loading"],size:"small",checked:parseInt(e),onClick:()=>this.update(t.id,"show",parseInt(e)?0:1)})}},{title:b.a.createElement("span",null,"\u7eed\u8d39 ",b.a.createElement(o["a"],{placement:"top",title:"\u5728\u8ba2\u9605\u505c\u6b62\u9500\u552e\u65f6\uff0c\u5df2\u8d2d\u7528\u6237\u662f\u5426\u53ef\u4ee5\u7eed\u8d39"},b.a.createElement(d["a"],{type:"question-circle"}))),dataIndex:"renew",key:"renew",align:"center",render:(e,t)=>{return b.a.createElement(h["a"],{loading:this.state[t.id+"renew_loading"],size:"small",checked:parseInt(e),onClick:()=>this.update(t.id,"renew",parseInt(e)?0:1)})}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t,a)=>{return b.a.createElement("div",null,b.a.createElement("a",{href:"javascript:;",onClick:()=>this.edit(a)},"\u7f16\u8f91"),b.a.createElement(m["a"],{type:"vertical"}),b.a.createElement("a",{href:"javascript:;",onClick:()=>this.drop(t.id)},"\u5220\u9664"))}}];return b.a.createElement(E["a"],n()({},this.props,{loading:this.state.loading}),b.a.createElement("main",{id:"main-container"},b.a.createElement("div",{className:"content content-full"},b.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},b.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u9605\u7ba1\u7406"),b.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u65b0\u5efa\u5957\u9910")),b.a.createElement("div",{className:"bg-white"},b.a.createElement(c["a"],{dataSource:this.state.plan,columns:e,pagination:!1,scroll:{x:1e3}})))),b.a.createElement(r["a"],{title:"".concat(this.state.submit.id?"\u7f16\u8f91\u8ba2\u9605":"\u65b0\u5efa\u8ba2\u9605"),visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.create()},b.a.createElement("div",null,b.a.createElement("div",{className:"form-group"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u540d\u79f0"),b.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u5957\u9910\u540d\u79f0",value:this.state.submit.name,onChange:e=>{this.setState({submit:v()({},this.state.submit,{name:e.target.value})})}})),b.a.createElement("div",{className:"form-group"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u63cf\u8ff0"),b.a.createElement(l["a"].TextArea,{rows:4,value:this.state.submit.content,placeholder:"\u8bf7\u8f93\u5165\u5957\u9910\u63cf\u8ff0\uff0c\u652f\u6301HTML",onChange:e=>{this.setState({submit:v()({},this.state.submit,{content:e.target.value})})}})),b.a.createElement("div",{className:"row"},b.a.createElement("div",{className:"form-group col-3"},b.a.createElement("label",{for:"example-text-input-alt"},"\u6708\u4ed8"),b.a.createElement(l["a"],{placeholder:"0.00",value:this.state.submit.month_price,onChange:e=>this.priceOnChange("month_price",e.target.value)})),b.a.createElement("div",{className:"form-group col-3"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5b63\u4ed8"),b.a.createElement(l["a"],{placeholder:"0.00",value:this.state.submit.quarter_price,onChange:e=>this.priceOnChange("quarter_price",e.target.value)})),b.a.createElement("div",{className:"form-group col-3"},b.a.createElement("label",{for:"example-text-input-alt"},"\u534a\u5e74"),b.a.createElement(l["a"],{placeholder:"0.00",value:this.state.submit.half_year_price,onChange:e=>this.priceOnChange("half_year_price",e.target.value)})),b.a.createElement("div",{className:"form-group col-3"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5e74\u4ed8"),b.a.createElement(l["a"],{placeholder:"0.00",value:this.state.submit.year_price,onChange:e=>this.priceOnChange("year_price",e.target.value)}))),b.a.createElement("div",{className:"form-group"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u6d41\u91cf(GB)"),b.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u5957\u9910\u6d41\u91cf",value:this.state.submit.transfer_enable,onChange:e=>{this.setState({submit:v()({},this.state.submit,{transfer_enable:e.target.value})})}})),b.a.createElement("div",{className:"form-group"},b.a.createElement("label",{for:"example-text-input-alt"},"\u6743\u9650\u7ec4"),b.a.createElement(s["a"],{placeholder:"\u8bf7\u9009\u62e9\u6743\u9650\u7ec4",style:{width:"100%"},value:this.state.submit.group_id?["".concat(this.state.submit.group_id)]:void 0,onChange:e=>{this.setState({submit:v()({},this.state.submit,{group_id:e})})}},this.state.group.map(e=>{return b.a.createElement(s["a"].Option,{key:e.id},e.name)}))))))}}t["default"]=Object(f["c"])()(N)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[5],{Bl7J:function(e,t,a){"use strict";var i=a("q1tI"),n=a.n(i),r=a("3a4m"),s=a.n(r),l=a("/MKj");class c extends n.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:n.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:n.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,i){switch(e){case"heading":return n.a.createElement("li",{className:"nav-main-heading"},t);case"item":return n.a.createElement("li",{className:"nav-main-item"},n.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{s.a.push(a),this.props.dispatch({type:"header/showNav"})}},i&&i,n.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return n.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},n.a.createElement("div",{className:"smini-visible-block"},n.a.createElement("div",{className:"content-header bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},"X"),n.a.createElement("span",{className:"text-white"},"H")))),n.a.createElement("div",{className:"smini-hidden"},n.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),n.a.createElement("div",{className:"d-lg-none"},n.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-times-circle"}))))),n.a.createElement("div",{className:"content-side content-side-full"},n.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(l["c"])(e=>{var t=e.header;return{header:t}})(c),o=a("t3Un");class d extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{s.a.push("/login")})}render(){return n.a.createElement("header",{id:"page-header"},n.a.createElement("div",{className:"content-header"},n.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},n.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&n.a.createElement("div",null,n.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),n.a.createElement("div",null,this.state.loading?n.a.createElement("div",{className:"spinner-grow text-primary"}):n.a.createElement("div",{className:"dropdown d-inline-block"},n.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},n.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),n.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),n.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),n.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},n.a.createElement("div",{className:"p-2"},n.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var t=e.header;return{header:t}})(d);class p extends n.a.Component{render(){return n.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},n.a.createElement("div",{className:"content py-0"},n.a.createElement("div",{className:"row font-size-sm"},n.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},n.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),n.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},n.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(m,this.props),n.a.createElement(h,{search:this.props.search}),this.props.loading?n.a.createElement("main",{id:"main-container"},n.a.createElement("div",{className:"content content-full"},n.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},n.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,n.a.createElement(p,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(u)},yjin:function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),r=(a("2qtc"),a("kLXV")),s=(a("OaEy"),a("2fM7")),l=(a("5NDa"),a("5rEg")),c=(a("g9YV"),a("wCAj")),m=(a("/zsF"),a("PArb")),o=(a("5Dmo"),a("3S7+")),d=(a("Pwec"),a("CtXQ")),h=(a("BoS7"),a("Sdc0")),p=(a("+BJd"),a("mr32")),u=a("p0pE"),v=a.n(u),g=a("q1tI"),b=a.n(g),E=a("Bl7J"),f=a("/MKj"),y=a("t3Un");class N extends b.a.Component{constructor(){super(...arguments),this.state={plan:[],group:[],visible:!1,submit:{show:0},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(y["a"])("/admin/server/group").then(e=>{200===e.code&&this.setState({group:e.data})}),Object(y["a"])("/admin/plan").then(e=>{200===e.code&&(e.data.map((t,a)=>{e.data[a].month_price=e.data[a].month_price/100,e.data[a].quarter_price=e.data[a].quarter_price/100,e.data[a].half_year_price=e.data[a].half_year_price/100,e.data[a].year_price=e.data[a].year_price/100}),this.setState({plan:e.data,loading:!1}))})}create(){Object(y["b"])("/admin/plan/save",v()({},this.state.submit,{month_price:this.state.submit.month_price?100*this.state.submit.month_price:void 0,quarter_price:this.state.submit.quarter_price?100*this.state.submit.quarter_price:void 0,half_year_price:this.state.submit.half_year_price?100*this.state.submit.half_year_price:void 0,year_price:this.state.submit.year_price?100*this.state.submit.year_price:void 0})).then(e=>{200===e.code&&(this.modalVisible(),this.fetchData())})}modalVisible(){this.setState({visible:!this.state.visible},()=>{this.setState({submit:{show:0}})})}getGroup(e){this.state.group.map(t=>{if(t.id===e)return t})}priceOnChange(e,t){this.setState({submit:v()({},this.state.submit,{[e]:t})})}drop(e){Object(y["b"])("/admin/plan/drop",{id:e}).then(e=>{200===e.code&&e.data&&this.fetchData()})}edit(e){this.setState({submit:v()({},this.state.plan[e]),visible:!0})}update(e,t,a){this.setState({[e+t+"_loading"]:!0},()=>{Object(y["b"])("/admin/plan/update",{id:e,[t]:a}).then(a=>{200===a.code&&(this.fetchData(),this.setState({[e+t+"_loading"]:!1}))})})}render(){var e=[{title:"\u5957\u9910\u540d\u79f0",dataIndex:"name",key:"name"},{title:"\u6743\u9650\u7ec4",dataIndex:"group_id",key:"group_id",render:(e,t)=>{t.ext_data;var a=[];return this.state.group.map(t=>{t.id===parseInt(e)&&a.push(b.a.createElement(p["a"],null,t.name))}),a}},{title:"\u6708\u4ed8\u552e\u4ef7",dataIndex:"month_price",key:"month_price",render:e=>{return e.toFixed(2)}},{title:"\u5b63\u4ed8\u552e\u4ef7",dataIndex:"quarter_price",key:"quarter_price",render:e=>{return e.toFixed(2)}},{title:"\u534a\u5e74\u4ed8\u552e\u4ef7",dataIndex:"half_year_price",key:"half_year_price",render:e=>{return e.toFixed(2)}},{title:"\u5e74\u4ed8\u552e\u4ef7",dataIndex:"year_price",key:"year_price",render:e=>{return e.toFixed(2)}},{title:"\u9500\u552e\u72b6\u6001",dataIndex:"show",key:"show",align:"center",render:(e,t)=>{return b.a.createElement(h["a"],{loading:this.state[t.id+"show_loading"],size:"small",checked:parseInt(e),onClick:()=>this.update(t.id,"show",parseInt(e)?0:1)})}},{title:b.a.createElement("span",null,"\u7eed\u8d39 ",b.a.createElement(o["a"],{placement:"top",title:"\u5728\u8ba2\u9605\u505c\u6b62\u9500\u552e\u65f6\uff0c\u5df2\u8d2d\u7528\u6237\u662f\u5426\u53ef\u4ee5\u7eed\u8d39"},b.a.createElement(d["a"],{type:"question-circle"}))),dataIndex:"renew",key:"renew",align:"center",render:(e,t)=>{return b.a.createElement(h["a"],{loading:this.state[t.id+"renew_loading"],size:"small",checked:parseInt(e),onClick:()=>this.update(t.id,"renew",parseInt(e)?0:1)})}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t,a)=>{return b.a.createElement("div",null,b.a.createElement("a",{href:"javascript:;",onClick:()=>this.edit(a)},"\u7f16\u8f91"),b.a.createElement(m["a"],{type:"vertical"}),b.a.createElement("a",{href:"javascript:;",onClick:()=>this.drop(t.id)},"\u5220\u9664"))}}];return b.a.createElement(E["a"],n()({},this.props,{loading:this.state.loading}),b.a.createElement("main",{id:"main-container"},b.a.createElement("div",{className:"content content-full"},b.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},b.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u9605\u7ba1\u7406"),b.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u65b0\u5efa\u5957\u9910")),b.a.createElement("div",{className:"bg-white"},b.a.createElement(c["a"],{dataSource:this.state.plan,columns:e,pagination:!1,scroll:{x:1e3}})))),b.a.createElement(r["a"],{title:"".concat(this.state.submit.id?"\u7f16\u8f91\u8ba2\u9605":"\u65b0\u5efa\u8ba2\u9605"),visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.create()},b.a.createElement("div",null,b.a.createElement("div",{className:"form-group"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u540d\u79f0"),b.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u5957\u9910\u540d\u79f0",value:this.state.submit.name,onChange:e=>{this.setState({submit:v()({},this.state.submit,{name:e.target.value})})}})),b.a.createElement("div",{className:"form-group"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u63cf\u8ff0"),b.a.createElement(l["a"].TextArea,{rows:4,value:this.state.submit.content,placeholder:"\u8bf7\u8f93\u5165\u5957\u9910\u63cf\u8ff0\uff0c\u652f\u6301HTML",onChange:e=>{this.setState({submit:v()({},this.state.submit,{content:e.target.value})})}})),b.a.createElement("div",{className:"row"},b.a.createElement("div",{className:"form-group col-3"},b.a.createElement("label",{for:"example-text-input-alt"},"\u6708\u4ed8"),b.a.createElement(l["a"],{placeholder:"0.00",value:this.state.submit.month_price,onChange:e=>this.priceOnChange("month_price",e.target.value)})),b.a.createElement("div",{className:"form-group col-3"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5b63\u4ed8"),b.a.createElement(l["a"],{placeholder:"0.00",value:this.state.submit.quarter_price,onChange:e=>this.priceOnChange("quarter_price",e.target.value)})),b.a.createElement("div",{className:"form-group col-3"},b.a.createElement("label",{for:"example-text-input-alt"},"\u534a\u5e74"),b.a.createElement(l["a"],{placeholder:"0.00",value:this.state.submit.half_year_price,onChange:e=>this.priceOnChange("half_year_price",e.target.value)})),b.a.createElement("div",{className:"form-group col-3"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5e74\u4ed8"),b.a.createElement(l["a"],{placeholder:"0.00",value:this.state.submit.year_price,onChange:e=>this.priceOnChange("year_price",e.target.value)}))),b.a.createElement("div",{className:"form-group"},b.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u6d41\u91cf(GB)"),b.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u5957\u9910\u6d41\u91cf",value:this.state.submit.transfer_enable,onChange:e=>{this.setState({submit:v()({},this.state.submit,{transfer_enable:e.target.value})})}})),b.a.createElement("div",{className:"form-group"},b.a.createElement("label",{for:"example-text-input-alt"},"\u6743\u9650\u7ec4"),b.a.createElement(s["a"],{placeholder:"\u8bf7\u9009\u62e9\u6743\u9650\u7ec4",style:{width:"100%"},value:this.state.submit.group_id?["".concat(this.state.submit.group_id)]:void 0,onChange:e=>{this.setState({submit:v()({},this.state.submit,{group_id:e})})}},this.state.group.map(e=>{return b.a.createElement(s["a"].Option,{key:e.id},e.name)}))))))}}t["default"]=Object(f["c"])()(N)}}]); \ No newline at end of file diff --git a/public/p__admin__server.async.js b/public/p__admin__server.async.js index 8b8d8445..2a9b55a9 100644 --- a/public/p__admin__server.async.js +++ b/public/p__admin__server.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[6],{"6G7H":function(e,t,a){"use strict";a.r(t);var s=a("jehZ"),n=a.n(s),i=(a("2qtc"),a("kLXV")),r=(a("OaEy"),a("2fM7")),l=(a("5NDa"),a("5rEg")),c=(a("g9YV"),a("wCAj")),m=(a("/zsF"),a("PArb")),o=(a("BoS7"),a("Sdc0")),d=(a("+BJd"),a("mr32")),h=(a("Awhp"),a("KrTs")),p=(a("5Dmo"),a("3S7+")),u=(a("Pwec"),a("CtXQ")),v=a("p0pE"),g=a.n(v),b=a("q1tI"),E=a.n(b),f=a("Bl7J"),N=a("/MKj"),w=a("t3Un");class y extends E.a.Component{constructor(){super(...arguments),this.state={server:[],group:[],visible:!1,submit:{tls:0,rate:1,tags:[]},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(w["a"])("/admin/server",{group_id:this.props.location.query.group_id}).then(e=>{200===e.code&&this.setState({server:e.data,loading:!1})}),Object(w["a"])("/admin/server/group").then(e=>{200===e.code&&this.setState({group:e.data})})}modalVisible(){this.setState({visible:!this.state.visible}),this.state.visible&&this.setState({submit:{tls:0,rate:1}})}submit(){Object(w["b"])("/admin/server/save",this.state.submit).then(e=>{200===e.code&&(this.modalVisible(),this.fetchData())})}drop(e){Object(w["b"])("/admin/server/drop",{id:e}).then(e=>{this.fetchData()})}update(e,t,a){this.setState({[e+t+"_loading"]:!0},()=>{Object(w["b"])("/admin/server/update",{id:e,[t]:a}).then(a=>{200===a.code&&(this.fetchData(),this.setState({[e+t+"_loading"]:!1}))})})}edit(e){this.setState({submit:g()({},this.state.server[e]),visible:!0})}render(){var e=[{title:"\u8282\u70b9ID",dataIndex:"id",key:"id"},{title:E.a.createElement("span",null,"\u5728\u7ebf ",E.a.createElement(p["a"],{placement:"top",title:"\u4e94\u5206\u949f\u5185\u8282\u70b9\u5728\u7ebf\u60c5\u51b5"},E.a.createElement(u["a"],{type:"question-circle"}))),dataIndex:"last_check_at",key:"last_check_at",align:"center",render:e=>{return E.a.createElement(h["a"],{status:(new Date).getTime()/1e3-300>e?"error":"processing"})}},{title:"\u6743\u9650\u7ec4",dataIndex:"group_id",key:"group_id",render:(e,t)=>{var a=t.group_id,s=[];return a.map(e=>{this.state.group.map(t=>{if(t.id===parseInt(e))return s.push(E.a.createElement(d["a"],null,t.name))})}),s}},{title:"\u8282\u70b9\u540d\u79f0",dataIndex:"name",key:"name"},{title:"\u5730\u5740",dataIndex:"host",key:"host",render:(e,t)=>{return t.host+":"+t.port}},{title:"TLS",dataIndex:"tls",key:"tls",render:e=>{return 0===e?"\u4e0d\u652f\u6301":"\u652f\u6301"}},{title:"\u500d\u7387",dataIndex:"rate",key:"rate",render:e=>{return e+" x"}},{title:"\u663e\u9690",dataIndex:"show",key:"show",align:"center",render:(e,t)=>{return E.a.createElement(o["a"],{loading:this.state[t.id+"show_loading"],size:"small",checked:parseInt(e),onClick:()=>this.update(t.id,"show",parseInt(e)?0:1)})}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t,a)=>{return E.a.createElement("div",null,E.a.createElement("a",{href:"javascript:;",onClick:()=>this.edit(a)},"\u7f16\u8f91"),E.a.createElement(m["a"],{type:"vertical"}),E.a.createElement("a",{href:"javascript:;",onClick:()=>this.drop(t.id)},"\u5220\u9664"))}}];return E.a.createElement(f["a"],n()({},this.props,{loading:this.state.loading}),E.a.createElement("main",{id:"main-container"},E.a.createElement("div",{className:"content content-full"},E.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},E.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8282\u70b9\u7ba1\u7406"),E.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u6dfb\u52a0\u8282\u70b9")),E.a.createElement("div",{className:"bg-white"},E.a.createElement(c["a"],{dataSource:this.state.server,columns:e,pagination:!1,scroll:{x:1e3}})))),E.a.createElement(i["a"],{title:"\u65b0\u5efa\u8282\u70b9",visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.submit()},E.a.createElement("div",null,E.a.createElement("div",{className:"row"},E.a.createElement("div",{className:"form-group col-8"},E.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u540d\u79f0"),E.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u8282\u70b9\u540d\u79f0",value:this.state.submit.name,onChange:e=>{this.setState({submit:g()({},this.state.submit,{name:e.target.value})})}})),E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u500d\u7387"),E.a.createElement(l["a"],{addonAfter:"x",placeholder:"\u8bf7\u8f93\u5165\u8282\u70b9\u500d\u7387",value:this.state.submit.rate,onChange:e=>{this.setState({submit:g()({},this.state.submit,{rate:e.target.value})})}}))),E.a.createElement("div",{className:"form-group"},E.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u6807\u7b7e"),E.a.createElement(r["a"],{mode:"tags",value:this.state.submit.tags?this.state.submit.tags:[],style:{width:"100%"},placeholder:"\u8f93\u5165\u540e\u56de\u8f66\u6dfb\u52a0\u6807\u7b7e",onChange:e=>{this.setState({submit:g()({},this.state.submit,{tags:e})})}})),E.a.createElement("div",{className:"form-group"},E.a.createElement("label",{for:"example-text-input-alt"},"\u6743\u9650\u7ec4"),E.a.createElement(r["a"],{mode:"tags",value:this.state.submit.group_id,placeholder:"\u8bf7\u9009\u62e9\u6743\u9650\u7ec4",style:{width:"100%"},onChange:e=>{this.setState({submit:g()({},this.state.submit,{group_id:e})})}},this.state.group.map(e=>{return E.a.createElement(r["a"].Option,{key:e.id},e.name)}))),E.a.createElement("div",{className:"row"},E.a.createElement("div",{className:"form-group col-8"},E.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u5730\u5740"),E.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u8fde\u63a5\u5730\u5740",value:this.state.submit.host,onChange:e=>{this.setState({submit:g()({},this.state.submit,{host:e.target.value})})}})),E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u652f\u6301TLS"),E.a.createElement(r["a"],{value:parseInt(this.state.submit.tls)?["1"]:["0"],placeholder:"\u662f\u5426\u652f\u6301TLS",style:{width:"100%"},onChange:e=>{console.log(e),this.setState({submit:g()({},this.state.submit,{tls:e})})}},E.a.createElement(r["a"].Option,{key:0},"\u4e0d\u652f\u6301"),E.a.createElement(r["a"].Option,{key:1},"\u652f\u6301")))),E.a.createElement("div",{className:"row"},E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u8fde\u63a5\u7aef\u53e3"),E.a.createElement(l["a"],{placeholder:"\u7528\u6237\u8fde\u63a5\u7aef\u53e3",value:this.state.submit.port,onChange:e=>{this.setState({submit:g()({},this.state.submit,{port:e.target.value,server_port:e.target.value})})}})),E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u670d\u52a1\u7aef\u53e3"),E.a.createElement(l["a"],{placeholder:"\u975eNAT\u540c\u8fde\u63a5\u7aef\u53e3",value:this.state.submit.server_port,onChange:e=>{this.setState({submit:g()({},this.state.submit,{server_port:e.target.value})})}})),E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u4f20\u8f93\u534f\u8bae"),E.a.createElement(r["a"],{value:this.state.submit.network,placeholder:"\u9009\u62e9\u4f20\u8f93\u534f\u8bae",style:{width:"100%"},onChange:e=>{this.setState({submit:g()({},this.state.submit,{network:e})})}},E.a.createElement(r["a"].Option,{value:"tcp"},"TCP"),E.a.createElement(r["a"].Option,{value:"ws"},"WebSocket")))),E.a.createElement("div",{className:"form-group"},E.a.createElement("label",{for:"example-text-input-alt"},"\u534f\u8bae\u8be6\u7ec6\u914d\u7f6e ",E.a.createElement("a",{href:"https://www.v2ray.com/chapter_02/05_transport.html"},E.a.createElement(u["a"],{type:"link"}),"\u53c2\u8003")),E.a.createElement(l["a"].TextArea,{value:this.state.submit.settings,rows:4,onChange:e=>{this.setState({submit:g()({},this.state.submit,{settings:e.target.value})})},placeholder:"\u5982\u9700\u914d\u7f6e\u534f\u8bae\u8bbe\u7f6e\u8bf7\u5728\u6b64\u8f93\u5165json\u914d\u7f6e\u9879\uff0c\u4e0d\u4f1a\u586b\u5199\u53ef\u7559\u7a7a\uff0cQuantumult\u90e8\u5206\u8f6f\u4ef6\u9700\u8981\u5f3a\u5236\u914d\u7f6e"})))))}}t["default"]=Object(N["c"])()(y)},Bl7J:function(e,t,a){"use strict";var s=a("q1tI"),n=a.n(s),i=a("3a4m"),r=a.n(i),l=a("/MKj");class c extends n.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:n.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:n.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,s){switch(e){case"heading":return n.a.createElement("li",{className:"nav-main-heading"},t);case"item":return n.a.createElement("li",{className:"nav-main-item"},n.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{r.a.push(a),this.props.dispatch({type:"header/showNav"})}},s&&s,n.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return n.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},n.a.createElement("div",{className:"smini-visible-block"},n.a.createElement("div",{className:"content-header bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},"X"),n.a.createElement("span",{className:"text-white"},"H")))),n.a.createElement("div",{className:"smini-hidden"},n.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),n.a.createElement("div",{className:"d-lg-none"},n.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-times-circle"}))))),n.a.createElement("div",{className:"content-side content-side-full"},n.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(l["c"])(e=>{var t=e.header;return{header:t}})(c),o=a("t3Un");class d extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return n.a.createElement("header",{id:"page-header"},n.a.createElement("div",{className:"content-header"},n.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},n.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&n.a.createElement("div",null,n.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),n.a.createElement("div",null,this.state.loading?n.a.createElement("div",{className:"spinner-grow text-primary"}):n.a.createElement("div",{className:"dropdown d-inline-block"},n.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},n.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),n.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),n.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),n.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},n.a.createElement("div",{className:"p-2"},n.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var t=e.header;return{header:t}})(d);class p extends n.a.Component{render(){return n.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},n.a.createElement("div",{className:"content py-0"},n.a.createElement("div",{className:"row font-size-sm"},n.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},n.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),n.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},n.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(m,this.props),n.a.createElement(h,{search:this.props.search}),this.props.loading?n.a.createElement("main",{id:"main-container"},n.a.createElement("div",{className:"content content-full"},n.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},n.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,n.a.createElement(p,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(u)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[6],{"6G7H":function(e,t,a){"use strict";a.r(t);var s=a("jehZ"),n=a.n(s),i=(a("2qtc"),a("kLXV")),r=(a("OaEy"),a("2fM7")),l=(a("5NDa"),a("5rEg")),c=(a("g9YV"),a("wCAj")),m=(a("/zsF"),a("PArb")),o=(a("BoS7"),a("Sdc0")),d=(a("+BJd"),a("mr32")),h=(a("Awhp"),a("KrTs")),p=(a("5Dmo"),a("3S7+")),u=(a("Pwec"),a("CtXQ")),v=a("p0pE"),g=a.n(v),b=a("q1tI"),E=a.n(b),f=a("Bl7J"),N=a("/MKj"),w=a("t3Un");class y extends E.a.Component{constructor(){super(...arguments),this.state={server:[],group:[],visible:!1,submit:{tls:0,rate:1,tags:[]},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(w["a"])("/admin/server",{group_id:this.props.location.query.group_id}).then(e=>{200===e.code&&this.setState({server:e.data,loading:!1})}),Object(w["a"])("/admin/server/group").then(e=>{200===e.code&&this.setState({group:e.data})})}modalVisible(){this.setState({visible:!this.state.visible}),this.state.visible&&this.setState({submit:{tls:0,rate:1}})}submit(){Object(w["b"])("/admin/server/save",this.state.submit).then(e=>{200===e.code&&(this.modalVisible(),this.fetchData())})}drop(e){Object(w["b"])("/admin/server/drop",{id:e}).then(e=>{this.fetchData()})}update(e,t,a){this.setState({[e+t+"_loading"]:!0},()=>{Object(w["b"])("/admin/server/update",{id:e,[t]:a}).then(a=>{200===a.code&&(this.fetchData(),this.setState({[e+t+"_loading"]:!1}))})})}edit(e){this.setState({submit:g()({},this.state.server[e]),visible:!0})}render(){var e=[{title:"\u8282\u70b9ID",dataIndex:"id",key:"id"},{title:E.a.createElement("span",null,"\u5728\u7ebf ",E.a.createElement(p["a"],{placement:"top",title:"\u4e94\u5206\u949f\u5185\u8282\u70b9\u5728\u7ebf\u60c5\u51b5"},E.a.createElement(u["a"],{type:"question-circle"}))),dataIndex:"last_check_at",key:"last_check_at",align:"center",render:e=>{return E.a.createElement(h["a"],{status:(new Date).getTime()/1e3-300>e?"error":"processing"})}},{title:"\u6743\u9650\u7ec4",dataIndex:"group_id",key:"group_id",render:(e,t)=>{var a=t.group_id,s=[];return a.map(e=>{this.state.group.map(t=>{if(t.id===parseInt(e))return s.push(E.a.createElement(d["a"],null,t.name))})}),s}},{title:"\u8282\u70b9\u540d\u79f0",dataIndex:"name",key:"name"},{title:"\u5730\u5740",dataIndex:"host",key:"host",render:(e,t)=>{return t.host+":"+t.port}},{title:"TLS",dataIndex:"tls",key:"tls",render:e=>{return 0===e?"\u4e0d\u652f\u6301":"\u652f\u6301"}},{title:"\u500d\u7387",dataIndex:"rate",key:"rate",render:e=>{return e+" x"}},{title:"\u663e\u9690",dataIndex:"show",key:"show",align:"center",render:(e,t)=>{return E.a.createElement(o["a"],{loading:this.state[t.id+"show_loading"],size:"small",checked:parseInt(e),onClick:()=>this.update(t.id,"show",parseInt(e)?0:1)})}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t,a)=>{return E.a.createElement("div",null,E.a.createElement("a",{href:"javascript:;",onClick:()=>this.edit(a)},"\u7f16\u8f91"),E.a.createElement(m["a"],{type:"vertical"}),E.a.createElement("a",{href:"javascript:;",onClick:()=>this.drop(t.id)},"\u5220\u9664"))}}];return E.a.createElement(f["a"],n()({},this.props,{loading:this.state.loading}),E.a.createElement("main",{id:"main-container"},E.a.createElement("div",{className:"content content-full"},E.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},E.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8282\u70b9\u7ba1\u7406"),E.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u6dfb\u52a0\u8282\u70b9")),E.a.createElement("div",{className:"bg-white"},E.a.createElement(c["a"],{dataSource:this.state.server,columns:e,pagination:!1,scroll:{x:1e3}})))),E.a.createElement(i["a"],{title:"\u65b0\u5efa\u8282\u70b9",visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.submit()},E.a.createElement("div",null,E.a.createElement("div",{className:"row"},E.a.createElement("div",{className:"form-group col-8"},E.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u540d\u79f0"),E.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u8282\u70b9\u540d\u79f0",value:this.state.submit.name,onChange:e=>{this.setState({submit:g()({},this.state.submit,{name:e.target.value})})}})),E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u500d\u7387"),E.a.createElement(l["a"],{addonAfter:"x",placeholder:"\u8bf7\u8f93\u5165\u8282\u70b9\u500d\u7387",value:this.state.submit.rate,onChange:e=>{this.setState({submit:g()({},this.state.submit,{rate:e.target.value})})}}))),E.a.createElement("div",{className:"form-group"},E.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u6807\u7b7e"),E.a.createElement(r["a"],{mode:"tags",value:this.state.submit.tags?this.state.submit.tags:[],style:{width:"100%"},placeholder:"\u8f93\u5165\u540e\u56de\u8f66\u6dfb\u52a0\u6807\u7b7e",onChange:e=>{this.setState({submit:g()({},this.state.submit,{tags:e})})}})),E.a.createElement("div",{className:"form-group"},E.a.createElement("label",{for:"example-text-input-alt"},"\u6743\u9650\u7ec4"),E.a.createElement(r["a"],{mode:"tags",value:this.state.submit.group_id,placeholder:"\u8bf7\u9009\u62e9\u6743\u9650\u7ec4",style:{width:"100%"},onChange:e=>{this.setState({submit:g()({},this.state.submit,{group_id:e})})}},this.state.group.map(e=>{return E.a.createElement(r["a"].Option,{key:e.id},e.name)}))),E.a.createElement("div",{className:"row"},E.a.createElement("div",{className:"form-group col-8"},E.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u5730\u5740"),E.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u8fde\u63a5\u5730\u5740",value:this.state.submit.host,onChange:e=>{this.setState({submit:g()({},this.state.submit,{host:e.target.value})})}})),E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u652f\u6301TLS"),E.a.createElement(r["a"],{value:parseInt(this.state.submit.tls)?["1"]:["0"],placeholder:"\u662f\u5426\u652f\u6301TLS",style:{width:"100%"},onChange:e=>{console.log(e),this.setState({submit:g()({},this.state.submit,{tls:e})})}},E.a.createElement(r["a"].Option,{key:0},"\u4e0d\u652f\u6301"),E.a.createElement(r["a"].Option,{key:1},"\u652f\u6301")))),E.a.createElement("div",{className:"row"},E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u8fde\u63a5\u7aef\u53e3"),E.a.createElement(l["a"],{placeholder:"\u7528\u6237\u8fde\u63a5\u7aef\u53e3",value:this.state.submit.port,onChange:e=>{this.setState({submit:g()({},this.state.submit,{port:e.target.value,server_port:e.target.value})})}})),E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u670d\u52a1\u7aef\u53e3"),E.a.createElement(l["a"],{placeholder:"\u975eNAT\u540c\u8fde\u63a5\u7aef\u53e3",value:this.state.submit.server_port,onChange:e=>{this.setState({submit:g()({},this.state.submit,{server_port:e.target.value})})}})),E.a.createElement("div",{className:"form-group col-4"},E.a.createElement("label",{for:"example-text-input-alt"},"\u4f20\u8f93\u534f\u8bae"),E.a.createElement(r["a"],{value:this.state.submit.network,placeholder:"\u9009\u62e9\u4f20\u8f93\u534f\u8bae",style:{width:"100%"},onChange:e=>{this.setState({submit:g()({},this.state.submit,{network:e})})}},E.a.createElement(r["a"].Option,{value:"tcp"},"TCP"),E.a.createElement(r["a"].Option,{value:"ws"},"WebSocket")))),E.a.createElement("div",{className:"form-group"},E.a.createElement("label",{for:"example-text-input-alt"},"\u534f\u8bae\u8be6\u7ec6\u914d\u7f6e ",E.a.createElement("a",{href:"https://www.v2ray.com/chapter_02/05_transport.html"},E.a.createElement(u["a"],{type:"link"}),"\u53c2\u8003")),E.a.createElement(l["a"].TextArea,{value:this.state.submit.settings,rows:4,onChange:e=>{this.setState({submit:g()({},this.state.submit,{settings:e.target.value})})},placeholder:"\u5982\u9700\u914d\u7f6e\u534f\u8bae\u8bbe\u7f6e\u8bf7\u5728\u6b64\u8f93\u5165json\u914d\u7f6e\u9879\uff0c\u4e0d\u4f1a\u586b\u5199\u53ef\u7559\u7a7a\uff0cQuantumult\u90e8\u5206\u8f6f\u4ef6\u9700\u8981\u5f3a\u5236\u914d\u7f6e"})))))}}t["default"]=Object(N["c"])()(y)},Bl7J:function(e,t,a){"use strict";var s=a("q1tI"),n=a.n(s),i=a("3a4m"),r=a.n(i),l=a("/MKj");class c extends n.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:n.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:n.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,s){switch(e){case"heading":return n.a.createElement("li",{className:"nav-main-heading"},t);case"item":return n.a.createElement("li",{className:"nav-main-item"},n.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{r.a.push(a),this.props.dispatch({type:"header/showNav"})}},s&&s,n.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return n.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},n.a.createElement("div",{className:"smini-visible-block"},n.a.createElement("div",{className:"content-header bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},"X"),n.a.createElement("span",{className:"text-white"},"H")))),n.a.createElement("div",{className:"smini-hidden"},n.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),n.a.createElement("div",{className:"d-lg-none"},n.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-times-circle"}))))),n.a.createElement("div",{className:"content-side content-side-full"},n.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(l["c"])(e=>{var t=e.header;return{header:t}})(c),o=a("t3Un");class d extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return n.a.createElement("header",{id:"page-header"},n.a.createElement("div",{className:"content-header"},n.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},n.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&n.a.createElement("div",null,n.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),n.a.createElement("div",null,this.state.loading?n.a.createElement("div",{className:"spinner-grow text-primary"}):n.a.createElement("div",{className:"dropdown d-inline-block"},n.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},n.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),n.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),n.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),n.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},n.a.createElement("div",{className:"p-2"},n.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var t=e.header;return{header:t}})(d);class p extends n.a.Component{render(){return n.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},n.a.createElement("div",{className:"content py-0"},n.a.createElement("div",{className:"row font-size-sm"},n.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},n.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),n.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},n.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(m,this.props),n.a.createElement(h,{search:this.props.search}),this.props.loading?n.a.createElement("main",{id:"main-container"},n.a.createElement("div",{className:"content content-full"},n.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},n.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,n.a.createElement(p,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(u)}}]); \ No newline at end of file diff --git a/public/p__admin__server__group.async.js b/public/p__admin__server__group.async.js index d0e6f726..4f74e8e2 100644 --- a/public/p__admin__server__group.async.js +++ b/public/p__admin__server__group.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[7],{AWr6:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=(t("2qtc"),t("kLXV")),r=(t("5NDa"),t("5rEg")),l=(t("g9YV"),t("wCAj")),c=(t("/zsF"),t("PArb")),o=t("p0pE"),m=t.n(o),d=t("q1tI"),h=t.n(d),p=t("Bl7J"),u=t("/MKj"),v=t("t3Un");class g extends h.a.Component{constructor(){super(...arguments),this.state={group:[],loading:!0,submit:{},visible:!1}}componentDidMount(){this.fetchData()}fetchData(){Object(v["a"])("/admin/server/group").then(e=>{200===e.code&&this.setState({group:e.data,loading:!1})})}create(){Object(v["b"])("/admin/server/group/save",this.state.submit).then(e=>{200===e.code&&(this.modalVisible(),this.fetchData())})}drop(e){Object(v["b"])("/admin/server/group/drop",{id:e}).then(e=>{200===e.code&&this.fetchData()})}edit(e){this.setState({submit:m()({},this.state.group[e]),visible:!0})}modalVisible(){this.setState({visible:!this.state.visible}),this.state.visible&&this.setState({submit:{}})}render(){var e=[{title:"\u7ec4ID",dataIndex:"id",key:"id"},{title:"\u7ec4\u540d\u79f0",dataIndex:"name",key:"name"},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a,t)=>{return h.a.createElement("div",null,h.a.createElement("a",{href:"javascript:;",onClick:()=>this.edit(t)},"\u7f16\u8f91"),h.a.createElement(c["a"],{type:"vertical"}),h.a.createElement("a",{href:"javascript:;",onClick:()=>this.drop(a.id)},"\u5220\u9664"))}}];return h.a.createElement(p["a"],i()({},this.props,{loading:this.state.loading}),h.a.createElement("main",{id:"main-container"},h.a.createElement("div",{className:"content content-full"},h.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6743\u9650\u7ec4\u7ba1\u7406"),h.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u521b\u5efa\u7ec4")),h.a.createElement("div",{className:"bg-white"},h.a.createElement(l["a"],{columns:e,dataSource:this.state.group,pagination:!1})))),h.a.createElement(s["a"],{title:"".concat(this.state.submit.id?"\u7f16\u8f91\u7ec4":"\u521b\u5efa\u7ec4"),visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.create()},h.a.createElement("div",null,h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input-alt"},"\u7ec4\u540d"),h.a.createElement(r["a"],{placeholder:"\u8bf7\u8f93\u5165\u7ec4\u540d",value:this.state.submit.name,onChange:e=>{this.setState({submit:m()({},this.state.submit,{name:e.target.value})})}})))))}}a["default"]=Object(u["c"])()(g)},Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[7],{AWr6:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=(t("2qtc"),t("kLXV")),r=(t("5NDa"),t("5rEg")),l=(t("g9YV"),t("wCAj")),c=(t("/zsF"),t("PArb")),o=t("p0pE"),m=t.n(o),d=t("q1tI"),h=t.n(d),p=t("Bl7J"),u=t("/MKj"),v=t("t3Un");class g extends h.a.Component{constructor(){super(...arguments),this.state={group:[],loading:!0,submit:{},visible:!1}}componentDidMount(){this.fetchData()}fetchData(){Object(v["a"])("/admin/server/group").then(e=>{200===e.code&&this.setState({group:e.data,loading:!1})})}create(){Object(v["b"])("/admin/server/group/save",this.state.submit).then(e=>{200===e.code&&(this.modalVisible(),this.fetchData())})}drop(e){Object(v["b"])("/admin/server/group/drop",{id:e}).then(e=>{200===e.code&&this.fetchData()})}edit(e){this.setState({submit:m()({},this.state.group[e]),visible:!0})}modalVisible(){this.setState({visible:!this.state.visible}),this.state.visible&&this.setState({submit:{}})}render(){var e=[{title:"\u7ec4ID",dataIndex:"id",key:"id"},{title:"\u7ec4\u540d\u79f0",dataIndex:"name",key:"name"},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a,t)=>{return h.a.createElement("div",null,h.a.createElement("a",{href:"javascript:;",onClick:()=>this.edit(t)},"\u7f16\u8f91"),h.a.createElement(c["a"],{type:"vertical"}),h.a.createElement("a",{href:"javascript:;",onClick:()=>this.drop(a.id)},"\u5220\u9664"))}}];return h.a.createElement(p["a"],i()({},this.props,{loading:this.state.loading}),h.a.createElement("main",{id:"main-container"},h.a.createElement("div",{className:"content content-full"},h.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6743\u9650\u7ec4\u7ba1\u7406"),h.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u521b\u5efa\u7ec4")),h.a.createElement("div",{className:"bg-white"},h.a.createElement(l["a"],{columns:e,dataSource:this.state.group,pagination:!1})))),h.a.createElement(s["a"],{title:"".concat(this.state.submit.id?"\u7f16\u8f91\u7ec4":"\u521b\u5efa\u7ec4"),visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.create()},h.a.createElement("div",null,h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input-alt"},"\u7ec4\u540d"),h.a.createElement(r["a"],{placeholder:"\u8bf7\u8f93\u5165\u7ec4\u540d",value:this.state.submit.name,onChange:e=>{this.setState({submit:m()({},this.state.submit,{name:e.target.value})})}})))))}}a["default"]=Object(u["c"])()(g)},Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)}}]); \ No newline at end of file diff --git a/public/p__admin__user.async.js b/public/p__admin__user.async.js index 9d00c781..a4516de0 100644 --- a/public/p__admin__user.async.js +++ b/public/p__admin__user.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[8],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),i=a.n(n),s=a("3a4m"),r=a.n(s),l=a("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},t);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{r.a.push(a),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(l["c"])(e=>{var t=e.header;return{header:t}})(c),o=a("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var t=e.header;return{header:t}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(m,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(u)},LbTH:function(e,t,a){"use strict";t["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}},blCH:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return y});var n=a("jehZ"),i=a.n(n),s=(a("2qtc"),a("kLXV")),r=(a("OaEy"),a("2fM7")),l=(a("iQDF"),a("+eQT")),c=(a("5NDa"),a("5rEg")),m=(a("g9YV"),a("wCAj")),o=(a("Awhp"),a("KrTs")),d=(a("5Dmo"),a("3S7+")),h=(a("Pwec"),a("CtXQ")),p=a("p0pE"),u=a.n(p),g=a("q1tI"),v=a.n(g),f=a("Bl7J"),b=a("t3Un"),E=(a("LbTH"),a("wd/R")),N=a.n(E);class y extends v.a.Component{constructor(){super(...arguments),this.state={users:[],pagination:{current:1,pageSize:10,total:0},email:void 0,visible:!1,submit:{enable:1,banned:0,is_admin:0},loading:!0}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=u()({},this.state.pagination),this.state.email&&Object.assign(e,{email:this.state.email}),Object(b["a"])("/admin/user",e).then(e=>{200===e.code&&this.setState({users:e.data,pagination:u()({},this.state.pagination,{total:e.total}),loading:!1})})}searchOnChange(e){this.inputDelayTimer&&clearTimeout(this.inputDelayTimer),this.inputDelayTimer=setTimeout(function(){this.inputDelayTimer=null,this.setState({email:e},()=>{this.fetchData()})}.bind(this),400)}modalVisible(){this.setState({visible:!this.state.visible},()=>{this.setState({submit:{enable:1,banned:0,is_admin:0}})})}formChange(e,t){this.setState({submit:u()({},this.state.submit,{[e]:t})})}edit(e){this.setState({submit:u()({},this.state.users[e],{password:"",transfer_enable:(this.state.users[e].transfer_enable/1073741824).toFixed(2)}),visible:!0})}submit(){var e=this.state.submit.id?"/admin/user/update":"";Object(b["b"])(e,this.state.submit).then(e=>{this.modalVisible(),this.fetchData()})}render(){var e=[{title:"\u90ae\u7bb1",dataIndex:"email",key:"email"},{title:"\u8ba2\u9605",dataIndex:"plan_name",key:"plan_name",render:e=>{return e||"-"}},{title:v.a.createElement("span",null,"\u5728\u7ebf ",v.a.createElement(d["a"],{placement:"top",title:"\u7528\u6237\u534a\u5c0f\u65f6\u5185\u5728\u7ebf\u60c5\u51b5"},v.a.createElement(h["a"],{type:"question-circle"}))),dataIndex:"t",key:"t",align:"center",render:e=>{return v.a.createElement(o["a"],{status:(new Date).getTime()/1e3-1800>e?"default":"processing"})}},{title:"\u5df2\u7528\u6d41\u91cf(G)",dataIndex:"u",key:"u",render:(e,t)=>{return((t.u+t.d)/1073741824).toFixed(2)}},{title:"\u603b\u6d41\u91cf(G)",dataIndex:"transfer_enable",key:"transfer_enable",render:(e,t)=>{return(e/1073741824).toFixed(2)}},{title:"\u5230\u671f\u65f6\u95f4",dataIndex:"expired_at",key:"expired_at",render:e=>{return e?N()(1e3*e).format("YYYY/MM/DD HH:mm"):"-"}},{title:"\u52a0\u5165\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return N()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t,a)=>{return v.a.createElement("div",null,v.a.createElement("a",{onClick:()=>this.edit(a),href:"javascript:;"},"\u7f16\u8f91"))}}];return v.a.createElement(f["a"],i()({},this.props,{search:{placeholder:"\u901a\u8fc7\u90ae\u7bb1\u641c\u7d22",onChange:e=>this.searchOnChange(e)},loading:this.state.loading}),v.a.createElement("main",{id:"main-container"},v.a.createElement("div",{className:"content content-full"},v.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},v.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u7528\u6237\u7ba1\u7406")),v.a.createElement("div",{className:"bg-white"},v.a.createElement(m["a"],{dataSource:this.state.users,pagination:this.state.pagination,columns:e,scroll:{x:1e3},onChange:e=>this.paginationOnChange(e)})))),v.a.createElement(s["a"],{title:"".concat(this.state.submit.id?"\u7f16\u8f91\u7528\u6237":"\u65b0\u5efa\u7528\u6237"),visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.submit()},v.a.createElement("div",null,v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u90ae\u7bb1"),v.a.createElement(c["a"],{placeholder:"\u8bf7\u8f93\u5165\u90ae\u7bb1",value:this.state.submit.email,onChange:e=>this.formChange("email",e.target.value)})),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u5bc6\u7801"),v.a.createElement(c["a"],{value:this.state.submit.password,placeholder:"\u5982\u9700\u4fee\u6539\u5bc6\u7801\u8bf7\u8f93\u5165",onChange:e=>this.formChange("password",e.target.value)})),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u603b\u6d41\u91cf(G)"),v.a.createElement(c["a"],{value:this.state.submit.transfer_enable,placeholder:"\u8bf7\u8f93\u5165\u603b\u6d41\u91cf",onChange:e=>this.formChange("transfer_enable",e.target.value)})),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u5230\u671f\u65f6\u95f4"),v.a.createElement("div",null,v.a.createElement(l["a"],{value:this.state.submit.expired_at&&N()(1e3*this.state.submit.expired_at),style:{width:"100%"},onChange:e=>this.formChange("expired_at",e.format("X"))}))),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u5c01\u7981"),v.a.createElement(r["a"],{placeholder:"\u8bf7\u9009\u62e9\u5c01\u7981\u72b6\u6001",style:{width:"100%"},value:this.state.submit.banned?["1"]:["0"],onChange:e=>this.formChange("banned",e)},v.a.createElement(r["a"].Option,{key:1},"\u662f"),v.a.createElement(r["a"].Option,{key:0},"\u5426"))),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u7ba1\u7406\u5458"),v.a.createElement(r["a"],{placeholder:"\u8bf7\u9009\u62e9\u5c01\u7981\u72b6\u6001",style:{width:"100%"},value:this.state.submit.is_admin?["1"]:["0"],onChange:e=>this.formChange("is_admin",e)},v.a.createElement(r["a"].Option,{key:1},"\u662f"),v.a.createElement(r["a"].Option,{key:0},"\u5426"))))))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[8],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),o=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(m,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)},LbTH:function(e,a,t){"use strict";a["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}},blCH:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return y});var n=t("jehZ"),i=t.n(n),s=(t("2qtc"),t("kLXV")),r=(t("OaEy"),t("2fM7")),l=(t("iQDF"),t("+eQT")),c=(t("5NDa"),t("5rEg")),m=(t("g9YV"),t("wCAj")),o=(t("Awhp"),t("KrTs")),d=(t("5Dmo"),t("3S7+")),h=(t("Pwec"),t("CtXQ")),p=t("p0pE"),u=t.n(p),g=t("q1tI"),v=t.n(g),f=t("Bl7J"),b=t("t3Un"),E=(t("LbTH"),t("wd/R")),N=t.n(E);class y extends v.a.Component{constructor(){super(...arguments),this.state={users:[],pagination:{current:1,pageSize:10,total:0},email:void 0,visible:!1,submit:{enable:1,banned:0,is_admin:0},loading:!0}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=u()({},this.state.pagination),this.state.email&&Object.assign(e,{email:this.state.email}),Object(b["a"])("/admin/user",e).then(e=>{200===e.code&&this.setState({users:e.data,pagination:u()({},this.state.pagination,{total:e.total}),loading:!1})})}searchOnChange(e){this.inputDelayTimer&&clearTimeout(this.inputDelayTimer),this.inputDelayTimer=setTimeout(function(){this.inputDelayTimer=null,this.setState({email:e},()=>{this.fetchData()})}.bind(this),400)}modalVisible(){this.setState({visible:!this.state.visible},()=>{this.setState({submit:{enable:1,banned:0,is_admin:0}})})}formChange(e,a){this.setState({submit:u()({},this.state.submit,{[e]:a})})}edit(e){this.setState({submit:u()({},this.state.users[e],{password:"",transfer_enable:(this.state.users[e].transfer_enable/1073741824).toFixed(2)}),visible:!0})}submit(){var e=this.state.submit.id?"/admin/user/update":"";Object(b["b"])(e,this.state.submit).then(e=>{this.modalVisible(),this.fetchData()})}render(){var e=[{title:"\u90ae\u7bb1",dataIndex:"email",key:"email"},{title:"\u8ba2\u9605",dataIndex:"plan_name",key:"plan_name",render:e=>{return e||"-"}},{title:v.a.createElement("span",null,"\u5728\u7ebf ",v.a.createElement(d["a"],{placement:"top",title:"\u7528\u6237\u534a\u5c0f\u65f6\u5185\u5728\u7ebf\u60c5\u51b5"},v.a.createElement(h["a"],{type:"question-circle"}))),dataIndex:"t",key:"t",align:"center",render:e=>{return v.a.createElement(o["a"],{status:(new Date).getTime()/1e3-1800>e?"default":"processing"})}},{title:"\u5df2\u7528\u6d41\u91cf(G)",dataIndex:"u",key:"u",render:(e,a)=>{return((a.u+a.d)/1073741824).toFixed(2)}},{title:"\u603b\u6d41\u91cf(G)",dataIndex:"transfer_enable",key:"transfer_enable",render:(e,a)=>{return(e/1073741824).toFixed(2)}},{title:"\u5230\u671f\u65f6\u95f4",dataIndex:"expired_at",key:"expired_at",render:e=>{return e?N()(1e3*e).format("YYYY/MM/DD HH:mm"):"-"}},{title:"\u52a0\u5165\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return N()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a,t)=>{return v.a.createElement("div",null,v.a.createElement("a",{onClick:()=>this.edit(t),href:"javascript:;"},"\u7f16\u8f91"))}}];return v.a.createElement(f["a"],i()({},this.props,{search:{placeholder:"\u901a\u8fc7\u90ae\u7bb1\u641c\u7d22",onChange:e=>this.searchOnChange(e)},loading:this.state.loading}),v.a.createElement("main",{id:"main-container"},v.a.createElement("div",{className:"content content-full"},v.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},v.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u7528\u6237\u7ba1\u7406")),v.a.createElement("div",{className:"bg-white"},v.a.createElement(m["a"],{dataSource:this.state.users,pagination:this.state.pagination,columns:e,scroll:{x:1e3},onChange:e=>this.paginationOnChange(e)})))),v.a.createElement(s["a"],{title:"".concat(this.state.submit.id?"\u7f16\u8f91\u7528\u6237":"\u65b0\u5efa\u7528\u6237"),visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.submit()},v.a.createElement("div",null,v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u90ae\u7bb1"),v.a.createElement(c["a"],{placeholder:"\u8bf7\u8f93\u5165\u90ae\u7bb1",value:this.state.submit.email,onChange:e=>this.formChange("email",e.target.value)})),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u5bc6\u7801"),v.a.createElement(c["a"],{value:this.state.submit.password,placeholder:"\u5982\u9700\u4fee\u6539\u5bc6\u7801\u8bf7\u8f93\u5165",onChange:e=>this.formChange("password",e.target.value)})),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u603b\u6d41\u91cf(G)"),v.a.createElement(c["a"],{value:this.state.submit.transfer_enable,placeholder:"\u8bf7\u8f93\u5165\u603b\u6d41\u91cf",onChange:e=>this.formChange("transfer_enable",e.target.value)})),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u5230\u671f\u65f6\u95f4"),v.a.createElement("div",null,v.a.createElement(l["a"],{value:this.state.submit.expired_at&&N()(1e3*this.state.submit.expired_at),style:{width:"100%"},onChange:e=>this.formChange("expired_at",e.format("X"))}))),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u5c01\u7981"),v.a.createElement(r["a"],{placeholder:"\u8bf7\u9009\u62e9\u5c01\u7981\u72b6\u6001",style:{width:"100%"},value:this.state.submit.banned?["1"]:["0"],onChange:e=>this.formChange("banned",e)},v.a.createElement(r["a"].Option,{key:1},"\u662f"),v.a.createElement(r["a"].Option,{key:0},"\u5426"))),v.a.createElement("div",{className:"form-group"},v.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u7ba1\u7406\u5458"),v.a.createElement(r["a"],{placeholder:"\u8bf7\u9009\u62e9\u5c01\u7981\u72b6\u6001",style:{width:"100%"},value:this.state.submit.is_admin?["1"]:["0"],onChange:e=>this.formChange("is_admin",e)},v.a.createElement(r["a"].Option,{key:1},"\u662f"),v.a.createElement(r["a"].Option,{key:0},"\u5426"))))))}}}}]); \ No newline at end of file diff --git a/public/p__dashboard.async.js b/public/p__dashboard.async.js index 19d436a8..167f44c8 100644 --- a/public/p__dashboard.async.js +++ b/public/p__dashboard.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[9],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),s=t.n(n),i=t("3a4m"),r=t.n(i),l=t("/MKj");class c extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},a);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class u extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class h extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(o,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(u,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(h)},sFYk:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return w});var n=t("jehZ"),s=t.n(n),i=(t("miYZ"),t("tsqr")),r=(t("qVdP"),t("jsC+")),l=(t("lUTK"),t("BvKs")),c=t("p0pE"),o=t.n(c),m=t("q1tI"),d=t.n(m),p=t("Bl7J"),u=t("t3Un"),h=t("yWgo"),f=t("3a4m"),b=t.n(f),v=t("+QRC"),E=t.n(v),g=t("wd/R"),N=t.n(g);class w extends d.a.Component{constructor(){super(...arguments),this.state={user:{plan:{}},stat:[],loading:!0}}componentDidMount(){Object(u["a"])("/user/dashboard").then(e=>{200===e.code&&this.setState(o()({},e.data,{loading:!1}))})}render(){return d.a.createElement(p["a"],s()({},this.props,{loading:this.state.loading}),d.a.createElement("main",{id:"main-container"},d.a.createElement("div",{className:"content content-full"},d.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u603b\u89c8"),d.a.createElement("div",{className:"row"},d.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},d.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},d.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},d.a.createElement("div",null,d.a.createElement("a",{className:"link-fx text-danger font-size-h1 font-w700",onClick:()=>b.a.push("/order")},this.state.stat[0]),d.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u4ed8\u8ba2\u5355"))))),d.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},d.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},d.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},d.a.createElement("div",null,d.a.createElement("a",{className:"link-fx text-warning font-size-h1 font-w700"},this.state.stat[1]),d.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u529e\u5de5\u5355"))))),d.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},d.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},d.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},d.a.createElement("div",null,d.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",onClick:()=>b.a.push("/invite")},this.state.stat[2]),d.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6211\u7684\u9080\u8bf7")))))),d.a.createElement("div",{className:"d-flex justify-content-between align-items-center mt-6 mb-3"},d.a.createElement("h2",{className:"font-w300 mb-0"},"\u6211\u7684\u8ba2\u9605")),this.state.user.plan_id?d.a.createElement("div",{className:"block block-rounded mb-2 block-fx-pop animated fadeIn","data-toggle":"appear"},d.a.createElement("div",{className:"block-content block-content-full"},d.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},d.a.createElement("div",{className:"p-1 p-md-3 w-50"},d.a.createElement("h3",{className:"h4 font-w700 mb-1"},this.state.user.plan.name),d.a.createElement("p",{className:"font-size-sm text-muted"},this.state.user.expired_at<(new Date).getTime()/1e3?d.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"\u5df2\u8fc7\u671f"):d.a.createElement("span",null,"\u4e8e ",N()().format("YYYY/MM/DD")," \u5230\u671f\uff0c\u8ddd\u79bb\u5230\u671f\u8fd8\u6709 ",((this.state.user.expired_at-N()().format("X"))/86400).toFixed(0)," \u5929")),d.a.createElement("div",{className:"mb-0"},d.a.createElement("div",{className:"progress mb-1",style:{height:6}},d.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:Object(h["b"])(this.state.user.u+this.state.user.d,this.state.user.transfer_enable)+"%"}})),d.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},d.a.createElement("span",{className:"font-w700"},((this.state.user.u+this.state.user.d)/1073741824).toFixed(2)," GB")," / ",d.a.createElement("span",{className:"font-w700"},(this.state.user.transfer_enable/1073741824).toFixed(2)," GB")))),d.a.createElement("div",{className:"p-1 p-md-3 text-md-right"},Object(h["c"])()?d.a.createElement(r["a"],{trigger:["click"],overlay:d.a.createElement(l["a"],null,d.a.createElement(l["a"].Item,{key:"0",onClick:()=>window.location.href="quantumult://configuration?server="+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},d.a.createElement("a",null,"Quantumult")),d.a.createElement(l["a"].Item,{key:"1",onClick:()=>window.location.href="quantumult-x:///update-configuration?remote-resource="+encodeURI(JSON.stringify({server_remote:[this.state.user.subscribe_url+", tag="+window.v2board.title]}))},d.a.createElement("a",null,"QuantumultX")),d.a.createElement(l["a"].Item,{key:"2",onClick:()=>window.location.href="shadowrocket://add/sub://"+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")+"?remark="+window.v2board.title},d.a.createElement("a",null,"Shadowrocket")))},d.a.createElement("a",{className:"btn btn-sm btn-primary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},d.a.createElement("i",{className:"fa fa-rss mr-1"}),"\u4e00\u952e\u8ba2\u9605")):d.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>{E()(this.state.user.subscribe_url),i["a"].success("\u590d\u5236\u6210\u529f")}},d.a.createElement("i",{className:"fa fa-copy mr-1"}),"\u590d\u5236\u8ba2\u9605\u5730\u5740"),d.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>b.a.push("/subscribe")},d.a.createElement("i",{className:"fa fa-cog mr-1"}),"\u67e5\u770b\u8ba2\u9605"),d.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)",onClick:()=>b.a.push("/plan/"+this.state.user.plan_id)},d.a.createElement("i",{className:"fa fa-redo mr-1"}),"\u7eed\u8d39"))))):d.a.createElement("a",{className:"block block-rounded mb-2 block-link-pop animated fadeIn",onClick:()=>b.a.push("/plan")},d.a.createElement("div",{className:"block-content block-content-full"},d.a.createElement("div",{className:"text-center align-items-md-center py-5"},d.a.createElement("div",null,d.a.createElement("i",{className:"fa fa-plus fa-2x"})),d.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted pt-2"},"\u6dfb\u52a0\u8ba2\u9605")))))))}}},yWgo:function(e,a,t){"use strict";function n(e,a,t,n,s){var i="chacha20-poly1305:".concat(e,"@").concat(a,":").concat(t);return"vmess://".concat(window.btoa(i),"?remarks=").concat(encodeURI(n),"&obfs=none").concat(s?"&tls=1":"")}function s(e,a){return e/a*100}function i(){return-1!==window.navigator.userAgent.toLowerCase().indexOf("iphone")}t.d(a,"a",function(){return n}),t.d(a,"b",function(){return s}),t.d(a,"c",function(){return i})}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[9],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),s=t.n(n),i=t("3a4m"),r=t.n(i),l=t("/MKj");class c extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},a);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class u extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class h extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(o,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(u,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(h)},sFYk:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return w});var n=t("jehZ"),s=t.n(n),i=(t("miYZ"),t("tsqr")),r=(t("qVdP"),t("jsC+")),l=(t("lUTK"),t("BvKs")),c=t("p0pE"),o=t.n(c),m=t("q1tI"),d=t.n(m),p=t("Bl7J"),u=t("t3Un"),h=t("yWgo"),f=t("3a4m"),b=t.n(f),v=t("+QRC"),E=t.n(v),g=t("wd/R"),N=t.n(g);class w extends d.a.Component{constructor(){super(...arguments),this.state={user:{plan:{}},stat:[],loading:!0}}componentDidMount(){Object(u["a"])("/user/dashboard").then(e=>{200===e.code&&this.setState(o()({},e.data,{loading:!1}))})}render(){return d.a.createElement(p["a"],s()({},this.props,{loading:this.state.loading}),d.a.createElement("main",{id:"main-container"},d.a.createElement("div",{className:"content content-full"},d.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u603b\u89c8"),d.a.createElement("div",{className:"row"},d.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},d.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},d.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},d.a.createElement("div",null,d.a.createElement("a",{className:"link-fx text-danger font-size-h1 font-w700",onClick:()=>b.a.push("/order")},this.state.stat[0]),d.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u4ed8\u8ba2\u5355"))))),d.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},d.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},d.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},d.a.createElement("div",null,d.a.createElement("a",{className:"link-fx text-warning font-size-h1 font-w700"},this.state.stat[1]),d.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u529e\u5de5\u5355"))))),d.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},d.a.createElement("div",{className:"block block-rounded block-fx-pop text-center"},d.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},d.a.createElement("div",null,d.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",onClick:()=>b.a.push("/invite")},this.state.stat[2]),d.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6211\u7684\u9080\u8bf7")))))),d.a.createElement("div",{className:"d-flex justify-content-between align-items-center mt-6 mb-3"},d.a.createElement("h2",{className:"font-w300 mb-0"},"\u6211\u7684\u8ba2\u9605")),this.state.user.plan_id?d.a.createElement("div",{className:"block block-rounded mb-2 block-fx-pop animated fadeIn","data-toggle":"appear"},d.a.createElement("div",{className:"block-content block-content-full"},d.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},d.a.createElement("div",{className:"p-1 p-md-3 w-50"},d.a.createElement("h3",{className:"h4 font-w700 mb-1"},this.state.user.plan.name),d.a.createElement("p",{className:"font-size-sm text-muted"},this.state.user.expired_at<(new Date).getTime()/1e3?d.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"\u5df2\u8fc7\u671f"):d.a.createElement("span",null,"\u4e8e ",N()().format("YYYY/MM/DD")," \u5230\u671f\uff0c\u8ddd\u79bb\u5230\u671f\u8fd8\u6709 ",((this.state.user.expired_at-N()().format("X"))/86400).toFixed(0)," \u5929")),d.a.createElement("div",{className:"mb-0"},d.a.createElement("div",{className:"progress mb-1",style:{height:6}},d.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:Object(h["b"])(this.state.user.u+this.state.user.d,this.state.user.transfer_enable)+"%"}})),d.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},d.a.createElement("span",{className:"font-w700"},((this.state.user.u+this.state.user.d)/1073741824).toFixed(2)," GB")," / ",d.a.createElement("span",{className:"font-w700"},(this.state.user.transfer_enable/1073741824).toFixed(2)," GB")))),d.a.createElement("div",{className:"p-1 p-md-3 text-md-right"},Object(h["c"])()?d.a.createElement(r["a"],{trigger:["click"],overlay:d.a.createElement(l["a"],null,d.a.createElement(l["a"].Item,{key:"0",onClick:()=>window.location.href="quantumult://configuration?server="+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},d.a.createElement("a",null,"Quantumult")),d.a.createElement(l["a"].Item,{key:"1",onClick:()=>window.location.href="quantumult-x:///update-configuration?remote-resource="+encodeURI(JSON.stringify({server_remote:[this.state.user.subscribe_url+", tag="+window.v2board.title]}))},d.a.createElement("a",null,"QuantumultX")),d.a.createElement(l["a"].Item,{key:"2",onClick:()=>window.location.href="shadowrocket://add/sub://"+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")+"?remark="+window.v2board.title},d.a.createElement("a",null,"Shadowrocket")))},d.a.createElement("a",{className:"btn btn-sm btn-primary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},d.a.createElement("i",{className:"fa fa-rss mr-1"}),"\u4e00\u952e\u8ba2\u9605")):d.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>{E()(this.state.user.subscribe_url),i["a"].success("\u590d\u5236\u6210\u529f")}},d.a.createElement("i",{className:"fa fa-copy mr-1"}),"\u590d\u5236\u8ba2\u9605\u5730\u5740"),d.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>b.a.push("/subscribe")},d.a.createElement("i",{className:"fa fa-cog mr-1"}),"\u67e5\u770b\u8ba2\u9605"),d.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)",onClick:()=>b.a.push("/plan/"+this.state.user.plan_id)},d.a.createElement("i",{className:"fa fa-redo mr-1"}),"\u7eed\u8d39"))))):d.a.createElement("a",{className:"block block-rounded mb-2 block-link-pop animated fadeIn",onClick:()=>b.a.push("/plan")},d.a.createElement("div",{className:"block-content block-content-full"},d.a.createElement("div",{className:"text-center align-items-md-center py-5"},d.a.createElement("div",null,d.a.createElement("i",{className:"fa fa-plus fa-2x"})),d.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted pt-2"},"\u6dfb\u52a0\u8ba2\u9605")))))))}}},yWgo:function(e,a,t){"use strict";function n(e,a,t,n,s){var i="chacha20-poly1305:".concat(e,"@").concat(a,":").concat(t);return"vmess://".concat(window.btoa(i),"?remarks=").concat(encodeURI(n),"&obfs=none").concat(s?"&tls=1":"")}function s(e,a){return e/a*100}function i(){return-1!==window.navigator.userAgent.toLowerCase().indexOf("iphone")}t.d(a,"a",function(){return n}),t.d(a,"b",function(){return s}),t.d(a,"c",function(){return i})}}]); \ No newline at end of file diff --git a/public/p__index.async.js b/public/p__index.async.js index a0999d85..205ca916 100644 --- a/public/p__index.async.js +++ b/public/p__index.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class v extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(v)},RXBc:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return l});var n=t("q1tI"),i=t.n(n),s=(t("Bl7J"),t("3a4m")),r=t.n(s);class l extends i.a.Component{componentDidMount(){r.a.push("/login")}render(){return i.a.createElement("div",{style:{textAlign:"center",paddingTop:50}},i.a.createElement("a",{href:"https://github.com/v2board/v2board"},"v2board")," is best.")}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class v extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(v)},RXBc:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return l});var n=t("q1tI"),i=t.n(n),s=(t("Bl7J"),t("3a4m")),r=t.n(s);class l extends i.a.Component{componentDidMount(){r.a.push("/login")}render(){return i.a.createElement("div",{style:{textAlign:"center",paddingTop:50}},i.a.createElement("a",{href:"https://github.com/v2board/v2board"},"v2board")," is best.")}}}}]); \ No newline at end of file diff --git a/public/p__invite.async.js b/public/p__invite.async.js index 4b179041..f7bd97d7 100644 --- a/public/p__invite.async.js +++ b/public/p__invite.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),s=a.n(n),i=a("3a4m"),c=a.n(i),l=a("/MKj");class r extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},t);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{c.a.push(a),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var t=e.header;return{header:t}})(r),m=a("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{c.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(l["c"])(e=>{var t=e.header;return{header:t}})(d);class h extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(o,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(h,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(u)},kdhn:function(e,t,a){"use strict";a.r(t);var n=a("jehZ"),s=a.n(n),i=(a("g9YV"),a("wCAj")),c=(a("miYZ"),a("tsqr")),l=a("p0pE"),r=a.n(l),o=a("q1tI"),m=a.n(o),d=a("Bl7J"),p=a("/MKj"),h=a("t3Un"),u=a("+QRC"),v=a.n(u),f=a("wd/R"),E=a.n(f);class g extends m.a.Component{constructor(){super(...arguments),this.state={codes:[],stat:[0,0,0,0],loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(h["a"])("/user/invite").then(e=>{200===e.code&&this.setState(r()({},e.data,{loading:!1}))})}genInviteCode(){Object(h["a"])("/user/invite/save").then(e=>{200===e.code&&e.data&&(this.fetchData(),c["a"].success("\u5df2\u751f\u6210"))})}render(){var e=[{title:"\u9080\u8bf7\u7801",dataIndex:"code",key:"code"},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t)=>{return m.a.createElement("div",null,m.a.createElement("a",{href:"javascript:;",onClick:()=>{v()(window.location.origin+"/#/register?code="+t.code),c["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236\u94fe\u63a5"))}}];return m.a.createElement(d["a"],s()({},this.props,{loading:this.state.loading}),m.a.createElement("main",{id:"main-container"},m.a.createElement("div",{className:"content content-full"},m.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},m.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9080\u8bf7\u603b\u89c8")),m.a.createElement("div",{className:"row"},m.a.createElement("div",{className:"col-6 col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},m.a.createElement("div",null,m.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},this.state.stat[0]),m.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5df2\u6ce8\u518c\u7528\u6237\u6570"))))),m.a.createElement("div",{className:"col-6 col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},m.a.createElement("div",null,m.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"\xa5 ",this.state.stat[1]/100),m.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6709\u6548\u7684\u4f63\u91d1"))))),m.a.createElement("div",{className:"col-6 col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},m.a.createElement("div",null,m.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"\xa5 ",this.state.stat[2]/100),m.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u786e\u8ba4\u4e2d\u7684\u4f63\u91d1"))))),m.a.createElement("div",{className:"col-6 col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},m.a.createElement("div",null,m.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"\xa5 ",this.state.stat[3]/100),m.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5df2\u63d0\u73b0\u603b\u989d")))))),m.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},m.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9080\u8bf7\u7801\u7ba1\u7406"),m.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.genInviteCode()},"\u751f\u6210\u9080\u8bf7\u7801")),m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full p-0"},m.a.createElement(i["a"],{scroll:{x:700},columns:e,dataSource:this.state.codes,pagination:!1}))))))}}t["default"]=Object(p["c"])()(g)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),s=a.n(n),i=a("3a4m"),c=a.n(i),l=a("/MKj");class r extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},t);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{c.a.push(a),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var t=e.header;return{header:t}})(r),m=a("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{c.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(l["c"])(e=>{var t=e.header;return{header:t}})(d);class h extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(o,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(h,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(u)},kdhn:function(e,t,a){"use strict";a.r(t);var n=a("jehZ"),s=a.n(n),i=(a("g9YV"),a("wCAj")),c=(a("miYZ"),a("tsqr")),l=a("p0pE"),r=a.n(l),o=a("q1tI"),m=a.n(o),d=a("Bl7J"),p=a("/MKj"),h=a("t3Un"),u=a("+QRC"),v=a.n(u),f=a("wd/R"),E=a.n(f);class g extends m.a.Component{constructor(){super(...arguments),this.state={codes:[],stat:[0,0,0,0],loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(h["a"])("/user/invite").then(e=>{200===e.code&&this.setState(r()({},e.data,{loading:!1}))})}genInviteCode(){Object(h["a"])("/user/invite/save").then(e=>{200===e.code&&e.data&&(this.fetchData(),c["a"].success("\u5df2\u751f\u6210"))})}render(){var e=[{title:"\u9080\u8bf7\u7801",dataIndex:"code",key:"code"},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t)=>{return m.a.createElement("div",null,m.a.createElement("a",{href:"javascript:;",onClick:()=>{v()(window.location.origin+"/#/register?code="+t.code),c["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236\u94fe\u63a5"))}}];return m.a.createElement(d["a"],s()({},this.props,{loading:this.state.loading}),m.a.createElement("main",{id:"main-container"},m.a.createElement("div",{className:"content content-full"},m.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},m.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9080\u8bf7\u603b\u89c8")),m.a.createElement("div",{className:"row"},m.a.createElement("div",{className:"col-6 col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},m.a.createElement("div",null,m.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},this.state.stat[0]),m.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5df2\u6ce8\u518c\u7528\u6237\u6570"))))),m.a.createElement("div",{className:"col-6 col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},m.a.createElement("div",null,m.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"\xa5 ",this.state.stat[1]/100),m.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6709\u6548\u7684\u4f63\u91d1"))))),m.a.createElement("div",{className:"col-6 col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},m.a.createElement("div",null,m.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"\xa5 ",this.state.stat[2]/100),m.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u786e\u8ba4\u4e2d\u7684\u4f63\u91d1"))))),m.a.createElement("div",{className:"col-6 col-sm-6 col-lg-3 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full aspect-ratio-16-9 d-flex justify-content-center align-items-center"},m.a.createElement("div",null,m.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"\xa5 ",this.state.stat[3]/100),m.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5df2\u63d0\u73b0\u603b\u989d")))))),m.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},m.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9080\u8bf7\u7801\u7ba1\u7406"),m.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.genInviteCode()},"\u751f\u6210\u9080\u8bf7\u7801")),m.a.createElement("div",{className:"block block-rounded text-center"},m.a.createElement("div",{className:"block-content block-content-full p-0"},m.a.createElement(i["a"],{scroll:{x:700},columns:e,dataSource:this.state.codes,pagination:!1}))))))}}t["default"]=Object(p["c"])()(g)}}]); \ No newline at end of file diff --git a/public/p__order.async.js b/public/p__order.async.js index 36b4b359..266826f4 100644 --- a/public/p__order.async.js +++ b/public/p__order.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[14],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)},LbTH:function(e,a,t){"use strict";a["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}},pi3A:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=(t("g9YV"),t("wCAj")),r=t("q1tI"),l=t.n(r),c=t("Bl7J"),o=t("/MKj"),m=t("t3Un"),d=t("3a4m"),h=t.n(d),p=t("LbTH"),u=t("wd/R"),v=t.n(u);class g extends l.a.Component{constructor(){super(...arguments),this.state={order:[],loading:!0}}componentDidMount(){Object(m["a"])("/user/order").then(e=>{200===e.code&&this.setState({order:e.data,loading:!1})})}render(){var e=[{title:"# \u8ba2\u5355\u53f7",dataIndex:"trade_no",key:"trade_no"},{title:"\u5468\u671f",dataIndex:"cycle",key:"cycle",align:"center",render:(e,a)=>{return l.a.createElement("span",{class:"badge badge-pill badge-primary"},p["a"].cycleText[a.cycle])}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",render:e=>{return(e/100).toFixed(2)}},{title:"\u8ba2\u5355\u72b6\u6001",dataIndex:"status",key:"status",render:e=>{return p["a"].orderStatusText[e]}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return v()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return l.a.createElement("div",null,l.a.createElement("a",{disabled:2===a.status,href:"javascript:;",onClick:()=>h.a.push("/order/"+a.trade_no)},"\u67e5\u770b\u8be6\u60c5"))}}];return l.a.createElement(c["a"],i()({},this.props,{loading:this.state.loading}),l.a.createElement("main",{id:"main-container"},l.a.createElement("div",{className:"content content-full"},l.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},l.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u7ba1\u7406")),l.a.createElement("div",{className:"bg-white"},l.a.createElement(s["a"],{dataSource:this.state.order,columns:e,pagination:!1,scroll:{x:900}})))))}}a["default"]=Object(o["c"])()(g)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[14],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),l=t("/MKj");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)},LbTH:function(e,a,t){"use strict";a["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}},pi3A:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=(t("g9YV"),t("wCAj")),r=t("q1tI"),l=t.n(r),c=t("Bl7J"),o=t("/MKj"),m=t("t3Un"),d=t("3a4m"),h=t.n(d),p=t("LbTH"),u=t("wd/R"),v=t.n(u);class g extends l.a.Component{constructor(){super(...arguments),this.state={order:[],loading:!0}}componentDidMount(){Object(m["a"])("/user/order").then(e=>{200===e.code&&this.setState({order:e.data,loading:!1})})}render(){var e=[{title:"# \u8ba2\u5355\u53f7",dataIndex:"trade_no",key:"trade_no"},{title:"\u5468\u671f",dataIndex:"cycle",key:"cycle",align:"center",render:(e,a)=>{return l.a.createElement("span",{class:"badge badge-pill badge-primary"},p["a"].cycleText[a.cycle])}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",render:e=>{return(e/100).toFixed(2)}},{title:"\u8ba2\u5355\u72b6\u6001",dataIndex:"status",key:"status",render:e=>{return p["a"].orderStatusText[e]}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return v()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return l.a.createElement("div",null,l.a.createElement("a",{disabled:2===a.status,href:"javascript:;",onClick:()=>h.a.push("/order/"+a.trade_no)},"\u67e5\u770b\u8be6\u60c5"))}}];return l.a.createElement(c["a"],i()({},this.props,{loading:this.state.loading}),l.a.createElement("main",{id:"main-container"},l.a.createElement("div",{className:"content content-full"},l.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},l.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u7ba1\u7406")),l.a.createElement("div",{className:"bg-white"},l.a.createElement(s["a"],{dataSource:this.state.order,columns:e,pagination:!1,scroll:{x:900}})))))}}a["default"]=Object(o["c"])()(g)}}]); \ No newline at end of file diff --git a/public/p__order__$trade_no.async.js b/public/p__order__$trade_no.async.js index 6adc2720..a480b207 100644 --- a/public/p__order__$trade_no.async.js +++ b/public/p__order__$trade_no.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[15],{Bl7J:function(e,t,a){"use strict";var s=a("q1tI"),n=a.n(s),i=a("3a4m"),l=a.n(i),r=a("/MKj");class c extends n.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:n.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:n.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,s){switch(e){case"heading":return n.a.createElement("li",{className:"nav-main-heading"},t);case"item":return n.a.createElement("li",{className:"nav-main-item"},n.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{l.a.push(a),this.props.dispatch({type:"header/showNav"})}},s&&s,n.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return n.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},n.a.createElement("div",{className:"smini-visible-block"},n.a.createElement("div",{className:"content-header bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},"X"),n.a.createElement("span",{className:"text-white"},"H")))),n.a.createElement("div",{className:"smini-hidden"},n.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),n.a.createElement("div",{className:"d-lg-none"},n.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-times-circle"}))))),n.a.createElement("div",{className:"content-side content-side-full"},n.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(r["c"])(e=>{var t=e.header;return{header:t}})(c),m=a("t3Un");class d extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return n.a.createElement("header",{id:"page-header"},n.a.createElement("div",{className:"content-header"},n.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},n.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&n.a.createElement("div",null,n.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),n.a.createElement("div",null,this.state.loading?n.a.createElement("div",{className:"spinner-grow text-primary"}):n.a.createElement("div",{className:"dropdown d-inline-block"},n.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},n.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),n.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),n.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),n.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},n.a.createElement("div",{className:"p-2"},n.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(r["c"])(e=>{var t=e.header;return{header:t}})(d);class p extends n.a.Component{render(){return n.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},n.a.createElement("div",{className:"content py-0"},n.a.createElement("div",{className:"row font-size-sm"},n.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},n.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),n.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},n.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(o,this.props),n.a.createElement(h,{search:this.props.search}),this.props.loading?n.a.createElement("main",{id:"main-container"},n.a.createElement("div",{className:"content content-full"},n.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},n.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,n.a.createElement(p,null))}}t["a"]=Object(r["c"])(e=>{var t=e.header;return{header:t}})(u)},GPI8:function(e,t,a){"use strict";a.r(t);var s=a("jehZ"),n=a.n(s),i=(a("2qtc"),a("kLXV")),l=(a("7Kak"),a("9yH6")),r=(a("Pwec"),a("CtXQ")),c=(a("miYZ"),a("tsqr")),o=a("p0pE"),m=a.n(o),d=a("q1tI"),h=a.n(d),p=a("Bl7J"),u=a("/MKj"),v=a("t3Un"),E=a("LbTH");class b extends h.a.Component{constructor(){super(...arguments),this.state={loading:!1,plan:{ext_data:{}},layout_login:!0,method:void 0,modalVisible:!1,paymentMethod:[]}}componentDidMount(){this.fetchData(),this.getPaymentMethod()}fetchData(){Object(v["a"])("/user/order/details",{trade_no:this.props.match.params.trade_no}).then(e=>{200===e.code&&(this.setState(m()({},e.data,{layout_login:!1})),0===e.data.status&&this.check())})}getPaymentMethod(){Object(v["a"])("/user/order/getPaymentMethod").then(e=>{200===e.code&&this.setState({paymentMethod:e.data,method:e.data.length>0?e.data[0].method:void 0})})}submit(){if(void 0===this.state.method)return c["a"].error("\u8bf7\u9009\u62e9\u652f\u4ed8\u65b9\u5f0f");this.setState({loading:!0},()=>{Object(v["b"])("/user/order/checkout",{trade_no:this.props.match.params.trade_no,method:this.state.method}).then(e=>{if(200!==e.code)return this.setState({loading:!1});this.setState({payUrl:e.data,payType:e.type},()=>{this.setState({loading:!1}),1===this.state.payType&&(window.location.href=this.state.payUrl,c["a"].info("\u6b63\u5728\u524d\u5f80\u6536\u94f6\u53f0")),0===this.state.payType&&this.setState({modalVisible:!0})})})})}check(){setTimeout(()=>{Object(v["a"])("/user/order/check?trade_no="+this.props.match.params.trade_no).then(e=>{if(200===e.code)return 1===e.data?(this.setState({modalVisible:!1}),void this.fetchData()):void this.check()})},3e3)}render(){return h.a.createElement(p["a"],n()({},this.props,{loading:this.state.layout_login}),h.a.createElement("main",{id:"main-container"},h.a.createElement("div",{className:"content content-full"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u8be6\u60c5"),h.a.createElement("div",{className:"row",id:"cashier"},h.a.createElement("div",{className:0===this.state.status?"col-md-8 col-sm-12":"col-12"},h.a.createElement("div",{className:"block block-fx-shadow block-rounded"},h.a.createElement("div",{className:"block-header block-header-default"},h.a.createElement("h3",{className:"block-title"},"# ",this.state.trade_no)),h.a.createElement("div",{className:"block-content"},h.a.createElement("div",{className:""},h.a.createElement("div",{className:"table-responsive push"},h.a.createElement("table",{className:"table table-bordered"},h.a.createElement("thead",{className:"bg-body"},h.a.createElement("tr",null,h.a.createElement("th",null,"\u4ea7\u54c1"),h.a.createElement("th",{className:"text-center",style:{width:120}},"\u7c7b\u578b/\u5468\u671f"),h.a.createElement("th",{className:"text-right",style:{width:120}},"\u91d1\u989d"))),h.a.createElement("tbody",null,h.a.createElement("tr",null,h.a.createElement("td",null,h.a.createElement("p",{className:"font-w600 mb-1"},this.state.plan.name),h.a.createElement("div",{className:"text-muted"},"- \u6d41\u91cf\uff1a",this.state.plan.transfer_enable," GB")),h.a.createElement("td",{className:"text-center"},h.a.createElement("span",{className:"badge badge-pill badge-primary"},0===this.state.type?"\u4e00\u6b21\u6027":E["a"].cycleText[this.state.cycle])),h.a.createElement("td",{className:"text-right"},(this.state.total_amount/100).toFixed(2)))))),h.a.createElement("p",{className:"text-muted text-center my-5"},"Thank you for doing business with us.")))),0===this.state.status&&h.a.createElement("h3",{className:"font-w300 mt-4 mb-3"},"\u652f\u4ed8\u65b9\u5f0f"),0===this.state.status&&h.a.createElement("div",{className:"mb-4"},h.a.createElement(l["a"].Group,{onChange:e=>this.setState({method:e.target.value}),size:"large",defaultValue:this.state.method},this.state.paymentMethod.map(e=>{return h.a.createElement(l["a"].Button,{value:e.method},h.a.createElement(r["a"],{type:e.icon,style:{fontSize:27,color:"alipay"===e.icon?"#419FE3":"#4FA938"}})," ",e.name)})))),0===this.state.status&&h.a.createElement("div",{className:"col-md-4 col-sm-12"},h.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 text-light",style:{background:"#35383D"}},h.a.createElement("h5",{className:"text-light mb-3"},"\u8ba2\u5355\u603b\u989d"),h.a.createElement("div",{className:"row no-gutters pb-3",style:{borderBottom:"1px solid #646669"}},h.a.createElement("div",{className:"col-8"},this.state.plan.name," x ",E["a"].cycleText[this.state.cycle]),h.a.createElement("div",{className:"col-4 text-right"},"\xa5",(this.state.total_amount/100).toFixed(2))),h.a.createElement("div",{className:"pt-3",style:{color:"#646669"}},"\u603b\u8ba1"),h.a.createElement("h1",{className:"text-light mt-3 mb-3"},"\xa5 ",(this.state.total_amount/100).toFixed(2)," CNY"),h.a.createElement("button",{type:"button",className:"btn btn-block btn-primary",disabled:this.state.loading,onClick:()=>this.submit()},this.state.loading?h.a.createElement(r["a"],{type:"loading"}):h.a.createElement("span",null,h.a.createElement("i",{className:"far fa-check-circle"})," \u7ed3\u8d26"))))))),h.a.createElement(i["a"],{maskClosable:!0,closable:!1,centered:!0,onCancel:()=>this.setState({modalVisible:!1,payType:void 0,payUrl:void 0}),width:300,visible:this.state.modalVisible,footer:h.a.createElement("div",{style:{textAlign:"center"}},"\u7b49\u5f85\u652f\u4ed8\u4e2d")},h.a.createElement("img",{width:"100%",src:"https://www.zhihu.com/qrcode?url="+this.state.payUrl})))}}t["default"]=Object(u["c"])()(b)},LbTH:function(e,t,a){"use strict";t["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[15],{Bl7J:function(e,t,a){"use strict";var s=a("q1tI"),n=a.n(s),i=a("3a4m"),l=a.n(i),r=a("/MKj");class c extends n.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:n.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:n.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],t=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:t}):this.setState({nav:e})}renderMenu(e,t,a,s){switch(e){case"heading":return n.a.createElement("li",{className:"nav-main-heading"},t);case"item":return n.a.createElement("li",{className:"nav-main-item"},n.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===a&&"active"),onClick:()=>{l.a.push(a),this.props.dispatch({type:"header/showNav"})}},s&&s,n.a.createElement("span",{className:"nav-main-link-name"},t)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return n.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},n.a.createElement("div",{className:"smini-visible-block"},n.a.createElement("div",{className:"content-header bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},"X"),n.a.createElement("span",{className:"text-white"},"H")))),n.a.createElement("div",{className:"smini-hidden"},n.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},n.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},n.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),n.a.createElement("div",{className:"d-lg-none"},n.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-times-circle"}))))),n.a.createElement("div",{className:"content-side content-side-full"},n.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(r["c"])(e=>{var t=e.header;return{header:t}})(c),m=a("t3Un");class d extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(t){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return n.a.createElement("header",{id:"page-header"},n.a.createElement("div",{className:"content-header"},n.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},n.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},n.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&n.a.createElement("div",null,n.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),n.a.createElement("div",null,this.state.loading?n.a.createElement("div",{className:"spinner-grow text-primary"}):n.a.createElement("div",{className:"dropdown d-inline-block"},n.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},n.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),n.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),n.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),n.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},n.a.createElement("div",{className:"p-2"},n.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(r["c"])(e=>{var t=e.header;return{header:t}})(d);class p extends n.a.Component{render(){return n.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},n.a.createElement("div",{className:"content py-0"},n.a.createElement("div",{className:"row font-size-sm"},n.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},n.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),n.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},n.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(o,this.props),n.a.createElement(h,{search:this.props.search}),this.props.loading?n.a.createElement("main",{id:"main-container"},n.a.createElement("div",{className:"content content-full"},n.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},n.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,n.a.createElement(p,null))}}t["a"]=Object(r["c"])(e=>{var t=e.header;return{header:t}})(u)},GPI8:function(e,t,a){"use strict";a.r(t);var s=a("jehZ"),n=a.n(s),i=(a("2qtc"),a("kLXV")),l=(a("7Kak"),a("9yH6")),r=(a("Pwec"),a("CtXQ")),c=(a("miYZ"),a("tsqr")),o=a("p0pE"),m=a.n(o),d=a("q1tI"),h=a.n(d),p=a("Bl7J"),u=a("/MKj"),v=a("t3Un"),E=a("LbTH");class b extends h.a.Component{constructor(){super(...arguments),this.state={loading:!1,plan:{ext_data:{}},layout_login:!0,method:void 0,modalVisible:!1,paymentMethod:[]}}componentDidMount(){this.fetchData(),this.getPaymentMethod()}fetchData(){Object(v["a"])("/user/order/details",{trade_no:this.props.match.params.trade_no}).then(e=>{200===e.code&&(this.setState(m()({},e.data,{layout_login:!1})),0===e.data.status&&this.check())})}getPaymentMethod(){Object(v["a"])("/user/order/getPaymentMethod").then(e=>{200===e.code&&this.setState({paymentMethod:e.data,method:e.data.length>0?e.data[0].method:void 0})})}submit(){if(void 0===this.state.method)return c["a"].error("\u8bf7\u9009\u62e9\u652f\u4ed8\u65b9\u5f0f");this.setState({loading:!0},()=>{Object(v["b"])("/user/order/checkout",{trade_no:this.props.match.params.trade_no,method:this.state.method}).then(e=>{if(200!==e.code)return this.setState({loading:!1});this.setState({payUrl:e.data,payType:e.type},()=>{this.setState({loading:!1}),1===this.state.payType&&(window.location.href=this.state.payUrl,c["a"].info("\u6b63\u5728\u524d\u5f80\u6536\u94f6\u53f0")),0===this.state.payType&&this.setState({modalVisible:!0})})})})}check(){setTimeout(()=>{Object(v["a"])("/user/order/check?trade_no="+this.props.match.params.trade_no).then(e=>{if(200===e.code)return 1===e.data?(this.setState({modalVisible:!1}),void this.fetchData()):void this.check()})},3e3)}render(){return h.a.createElement(p["a"],n()({},this.props,{loading:this.state.layout_login}),h.a.createElement("main",{id:"main-container"},h.a.createElement("div",{className:"content content-full"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u8be6\u60c5"),h.a.createElement("div",{className:"row",id:"cashier"},h.a.createElement("div",{className:0===this.state.status?"col-md-8 col-sm-12":"col-12"},h.a.createElement("div",{className:"block block-fx-shadow block-rounded"},h.a.createElement("div",{className:"block-header block-header-default"},h.a.createElement("h3",{className:"block-title"},"# ",this.state.trade_no)),h.a.createElement("div",{className:"block-content"},h.a.createElement("div",{className:""},h.a.createElement("div",{className:"table-responsive push"},h.a.createElement("table",{className:"table table-bordered"},h.a.createElement("thead",{className:"bg-body"},h.a.createElement("tr",null,h.a.createElement("th",null,"\u4ea7\u54c1"),h.a.createElement("th",{className:"text-center",style:{width:120}},"\u7c7b\u578b/\u5468\u671f"),h.a.createElement("th",{className:"text-right",style:{width:120}},"\u91d1\u989d"))),h.a.createElement("tbody",null,h.a.createElement("tr",null,h.a.createElement("td",null,h.a.createElement("p",{className:"font-w600 mb-1"},this.state.plan.name),h.a.createElement("div",{className:"text-muted"},"- \u6d41\u91cf\uff1a",this.state.plan.transfer_enable," GB")),h.a.createElement("td",{className:"text-center"},h.a.createElement("span",{className:"badge badge-pill badge-primary"},0===this.state.type?"\u4e00\u6b21\u6027":E["a"].cycleText[this.state.cycle])),h.a.createElement("td",{className:"text-right"},(this.state.total_amount/100).toFixed(2)))))),h.a.createElement("p",{className:"text-muted text-center my-5"},"Thank you for doing business with us.")))),0===this.state.status&&h.a.createElement("h3",{className:"font-w300 mt-4 mb-3"},"\u652f\u4ed8\u65b9\u5f0f"),0===this.state.status&&h.a.createElement("div",{className:"mb-4"},h.a.createElement(l["a"].Group,{onChange:e=>this.setState({method:e.target.value}),size:"large",defaultValue:this.state.method},this.state.paymentMethod.map(e=>{return h.a.createElement(l["a"].Button,{value:e.method},h.a.createElement(r["a"],{type:e.icon,style:{fontSize:27,color:"alipay"===e.icon?"#419FE3":"#4FA938"}})," ",e.name)})))),0===this.state.status&&h.a.createElement("div",{className:"col-md-4 col-sm-12"},h.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 text-light",style:{background:"#35383D"}},h.a.createElement("h5",{className:"text-light mb-3"},"\u8ba2\u5355\u603b\u989d"),h.a.createElement("div",{className:"row no-gutters pb-3",style:{borderBottom:"1px solid #646669"}},h.a.createElement("div",{className:"col-8"},this.state.plan.name," x ",E["a"].cycleText[this.state.cycle]),h.a.createElement("div",{className:"col-4 text-right"},"\xa5",(this.state.total_amount/100).toFixed(2))),h.a.createElement("div",{className:"pt-3",style:{color:"#646669"}},"\u603b\u8ba1"),h.a.createElement("h1",{className:"text-light mt-3 mb-3"},"\xa5 ",(this.state.total_amount/100).toFixed(2)," CNY"),h.a.createElement("button",{type:"button",className:"btn btn-block btn-primary",disabled:this.state.loading,onClick:()=>this.submit()},this.state.loading?h.a.createElement(r["a"],{type:"loading"}):h.a.createElement("span",null,h.a.createElement("i",{className:"far fa-check-circle"})," \u7ed3\u8d26"))))))),h.a.createElement(i["a"],{maskClosable:!0,closable:!1,centered:!0,onCancel:()=>this.setState({modalVisible:!1,payType:void 0,payUrl:void 0}),width:300,visible:this.state.modalVisible,footer:h.a.createElement("div",{style:{textAlign:"center"}},"\u7b49\u5f85\u652f\u4ed8\u4e2d")},h.a.createElement("img",{width:"100%",src:"https://www.zhihu.com/qrcode?url="+this.state.payUrl})))}}t["default"]=Object(u["c"])()(b)},LbTH:function(e,t,a){"use strict";t["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}}}]); \ No newline at end of file diff --git a/public/p__plan.async.js b/public/p__plan.async.js index 383df3a5..3f92cc55 100644 --- a/public/p__plan.async.js +++ b/public/p__plan.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{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");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{l.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(r["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(r["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class v extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(v)},ih8c:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=t("q1tI"),l=t.n(s),r=t("Bl7J"),c=t("/MKj"),o=t("t3Un"),m=t("3a4m"),d=t.n(m);class h extends l.a.Component{constructor(){super(...arguments),this.state={plan:[],loading:!0}}componentDidMount(){Object(o["a"])("/guest/plan").then(e=>{this.setState({plan:e.data,loading:!1})})}render(){return l.a.createElement(r["a"],i()({},this.props,{loading:this.state.loading}),l.a.createElement("main",{id:"main-container"},l.a.createElement("div",{className:"content content-full"},l.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9009\u62e9\u8ba2\u9605"),l.a.createElement("div",{className:"row"},this.state.plan.map(e=>{return l.a.createElement("div",{className:"col-md-6 col-xl-4 animated fadeInUp"},l.a.createElement("a",{className:"block block-link-pop block-rounded block-bordered text-center",href:"javascript:void(0)",onClick:()=>d.a.push("/plan/".concat(e.id))},l.a.createElement("div",{className:"block-header"},l.a.createElement("h3",{className:"block-title"},e.name)),l.a.createElement("div",{className:"block-content bg-body-light"},l.a.createElement("div",{className:"py-2"},l.a.createElement("p",{className:"h1 font-w700 mb-2"},"\xa5 ",(e.month_price/100).toFixed(2)),l.a.createElement("p",{className:"h6 text-muted"},"\u6bcf\u6708"))),l.a.createElement("div",{className:"block-content"},l.a.createElement("div",{className:"py-2",dangerouslySetInnerHTML:{__html:e.content}})),l.a.createElement("div",{className:"block-content block-content-full bg-body-light"},l.a.createElement("span",{className:"btn btn-hero-primary px-4"},l.a.createElement("i",{className:"fa fa-thumbs-up mr-1"}),"\u7acb\u5373\u8ba2\u9605"))))})))))}}a["default"]=Object(c["c"])()(h)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{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");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{l.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(r["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(r["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(u)},ih8c:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=t("q1tI"),l=t.n(s),r=t("Bl7J"),c=t("/MKj"),o=t("t3Un"),m=t("3a4m"),d=t.n(m);class h extends l.a.Component{constructor(){super(...arguments),this.state={plan:[],loading:!0}}componentDidMount(){Object(o["a"])("/guest/plan").then(e=>{this.setState({plan:e.data,loading:!1})})}render(){return l.a.createElement(r["a"],i()({},this.props,{loading:this.state.loading}),l.a.createElement("main",{id:"main-container"},l.a.createElement("div",{className:"content content-full"},l.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9009\u62e9\u8ba2\u9605"),l.a.createElement("div",{className:"row"},this.state.plan.map(e=>{return l.a.createElement("div",{className:"col-md-6 col-xl-4 animated fadeInUp"},l.a.createElement("a",{className:"block block-link-pop block-rounded block-bordered text-center",href:"javascript:void(0)",onClick:()=>d.a.push("/plan/".concat(e.id))},l.a.createElement("div",{className:"block-header"},l.a.createElement("h3",{className:"block-title"},e.name)),l.a.createElement("div",{className:"block-content bg-body-light"},l.a.createElement("div",{className:"py-2"},l.a.createElement("p",{className:"h1 font-w700 mb-2"},"\xa5 ",(e.month_price/100).toFixed(2)),l.a.createElement("p",{className:"h6 text-muted"},"\u6bcf\u6708"))),l.a.createElement("div",{className:"block-content"},l.a.createElement("div",{className:"py-2",dangerouslySetInnerHTML:{__html:e.content}})),l.a.createElement("div",{className:"block-content block-content-full bg-body-light"},l.a.createElement("span",{className:"btn btn-hero-primary px-4"},l.a.createElement("i",{className:"fa fa-thumbs-up mr-1"}),"\u7acb\u5373\u8ba2\u9605"))))})))))}}a["default"]=Object(c["c"])()(h)}}]); \ No newline at end of file diff --git a/public/p__plan__$plan_id.async.js b/public/p__plan__$plan_id.async.js index e087db87..5e060ce4 100644 --- a/public/p__plan__$plan_id.async.js +++ b/public/p__plan__$plan_id.async.js @@ -1 +1 @@ -(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");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{l.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(r["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(r["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(u)},LbTH:function(e,a,t){"use strict";a["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}}}]); \ No newline at end of file +(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");class c 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:"/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return i.a.createElement("li",{className:"nav-main-heading"},a);case"item":return i.a.createElement("li",{className:"nav-main-item"},i.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{l.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,i.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return i.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},i.a.createElement("div",{className:"smini-visible-block"},i.a.createElement("div",{className:"content-header bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},"X"),i.a.createElement("span",{className:"text-white"},"H")))),i.a.createElement("div",{className:"smini-hidden"},i.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},i.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},i.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),i.a.createElement("div",{className:"d-lg-none"},i.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-times-circle"}))))),i.a.createElement("div",{className:"content-side content-side-full"},i.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(r["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{l.a.push("/login")})}render(){return i.a.createElement("header",{id:"page-header"},i.a.createElement("div",{className:"content-header"},i.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},i.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},i.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&i.a.createElement("div",null,i.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),i.a.createElement("div",null,this.state.loading?i.a.createElement("div",{className:"spinner-grow text-primary"}):i.a.createElement("div",{className:"dropdown d-inline-block"},i.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},i.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),i.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),i.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),i.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},i.a.createElement("div",{className:"p-2"},i.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var h=Object(r["c"])(e=>{var a=e.header;return{header:a}})(d);class p extends i.a.Component{render(){return i.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},i.a.createElement("div",{className:"content py-0"},i.a.createElement("div",{className:"row font-size-sm"},i.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},i.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),i.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},i.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(o,this.props),i.a.createElement(h,{search:this.props.search}),this.props.loading?i.a.createElement("main",{id:"main-container"},i.a.createElement("div",{className:"content content-full"},i.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},i.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,i.a.createElement(p,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(u)},LbTH:function(e,a,t){"use strict";a["a"]={cycleText:{month_price:"\u6708\u4ed8",quarter_price:"\u5b63\u4ed8",half_year_price:"\u534a\u5e74\u4ed8",year_price:"\u5e74\u4ed8"},orderStatusText:["\u5f85\u652f\u4ed8","\u5f00\u901a\u4e2d","\u5df2\u53d6\u6d88","\u5df2\u5b8c\u6210"]}}}]); \ No newline at end of file diff --git a/public/p__profile.async.js b/public/p__profile.async.js index 982ae251..63e0ee83 100644 --- a/public/p__profile.async.js +++ b/public/p__profile.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[18],{"9Emu":function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return u});var n=t("jehZ"),s=t.n(n),i=(t("BoS7"),t("Sdc0")),r=(t("+L6B"),t("2/Rp")),l=(t("miYZ"),t("tsqr")),c=t("q1tI"),o=t.n(c),m=t("Bl7J"),d=t("t3Un"),p=t("3a4m"),h=t.n(p);class u extends o.a.Component{constructor(){super(...arguments),this.state={info:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(d["a"])("/user/info").then(e=>{200===e.code&&this.setState({info:e.data,loading:!1})})}changePassword(){if(this.refs.re_password.value!==this.refs.new_password.value)return l["a"].error("\u4e24\u6b21\u65b0\u5bc6\u7801\u8f93\u5165\u4e0d\u540c");Object(d["b"])("/user/changePassword",{old_password:this.refs.old_password.value,new_password:this.refs.new_password.value}).then(e=>{200===e.code&&(l["a"].success("\u4fee\u6539\u6210\u529f\uff0c\u8bf7\u91cd\u65b0\u767b\u9646"),h.a.push("/login"))})}update(e,a){this.setState({[e+"_loading"]:!0},()=>{Object(d["b"])("/user/update",{[e]:a}).then(a=>{200===a.code&&(this.fetchData(),this.setState({[e+"_loading"]:!1}))})})}render(){return o.a.createElement(m["a"],s()({},this.props,{loading:this.state.loading}),o.a.createElement("main",{id:"main-container"},o.a.createElement("div",{className:"content content-full"},o.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u4e2a\u4eba\u4e2d\u5fc3"),o.a.createElement("div",{className:"block block-rounded block-bordered"},o.a.createElement("div",{className:"block-header block-header-default"},o.a.createElement("h3",{className:"block-title"},"\u4fee\u6539\u5bc6\u7801"),o.a.createElement("div",{className:"block-options"},o.a.createElement(r["a"],{type:"primary",onClick:()=>this.changePassword()},"\u4fdd\u5b58"))),o.a.createElement("div",{className:"block-content"},o.a.createElement("div",{className:"row push"},o.a.createElement("div",{className:"col-lg-8 col-xl-5"},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u65e7\u5bc6\u7801"),o.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u65e7\u5bc6\u7801",ref:"old_password"})),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u65b0\u5bc6\u7801"),o.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801",ref:"new_password"})),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u65b0\u5bc6\u7801"),o.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u786e\u8ba4\u65b0\u5bc6\u7801",ref:"re_password"})))))),o.a.createElement("div",{className:"block block-rounded block-bordered"},o.a.createElement("div",{className:"block-header block-header-default"},o.a.createElement("h3",{className:"block-title"},"\u901a\u77e5")),o.a.createElement("div",{className:"block-content"},o.a.createElement("div",{className:"row push"},o.a.createElement("div",{className:"col-lg-8 col-xl-5"},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u5230\u671f\u90ae\u4ef6\u63d0\u9192"),o.a.createElement("div",null,o.a.createElement(i["a"],{loading:this.state.remind_expire_loading,checked:this.state.info.remind_expire,onChange:e=>this.update("remind_expire",e?1:0)}))),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u6d41\u91cf\u90ae\u4ef6\u63d0\u9192"),o.a.createElement("div",null,o.a.createElement(i["a"],{loading:this.state.remind_traffic_loading,checked:this.state.info.remind_traffic,onChange:e=>this.update("remind_traffic",e?1:0)}))))))))))}}},Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),s=t.n(n),i=t("3a4m"),r=t.n(i),l=t("/MKj");class c extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},a);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class h extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(o,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(h,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[18],{"9Emu":function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return u});var n=t("jehZ"),s=t.n(n),i=(t("BoS7"),t("Sdc0")),r=(t("+L6B"),t("2/Rp")),l=(t("miYZ"),t("tsqr")),c=t("q1tI"),o=t.n(c),m=t("Bl7J"),d=t("t3Un"),p=t("3a4m"),h=t.n(p);class u extends o.a.Component{constructor(){super(...arguments),this.state={info:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(d["a"])("/user/info").then(e=>{200===e.code&&this.setState({info:e.data,loading:!1})})}changePassword(){if(this.refs.re_password.value!==this.refs.new_password.value)return l["a"].error("\u4e24\u6b21\u65b0\u5bc6\u7801\u8f93\u5165\u4e0d\u540c");Object(d["b"])("/user/changePassword",{old_password:this.refs.old_password.value,new_password:this.refs.new_password.value}).then(e=>{200===e.code&&(l["a"].success("\u4fee\u6539\u6210\u529f\uff0c\u8bf7\u91cd\u65b0\u767b\u9646"),h.a.push("/login"))})}update(e,a){this.setState({[e+"_loading"]:!0},()=>{Object(d["b"])("/user/update",{[e]:a}).then(a=>{200===a.code&&(this.fetchData(),this.setState({[e+"_loading"]:!1}))})})}render(){return o.a.createElement(m["a"],s()({},this.props,{loading:this.state.loading}),o.a.createElement("main",{id:"main-container"},o.a.createElement("div",{className:"content content-full"},o.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u4e2a\u4eba\u4e2d\u5fc3"),o.a.createElement("div",{className:"block block-rounded block-bordered"},o.a.createElement("div",{className:"block-header block-header-default"},o.a.createElement("h3",{className:"block-title"},"\u4fee\u6539\u5bc6\u7801"),o.a.createElement("div",{className:"block-options"},o.a.createElement(r["a"],{type:"primary",onClick:()=>this.changePassword()},"\u4fdd\u5b58"))),o.a.createElement("div",{className:"block-content"},o.a.createElement("div",{className:"row push"},o.a.createElement("div",{className:"col-lg-8 col-xl-5"},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u65e7\u5bc6\u7801"),o.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u65e7\u5bc6\u7801",ref:"old_password"})),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u65b0\u5bc6\u7801"),o.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801",ref:"new_password"})),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u65b0\u5bc6\u7801"),o.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u786e\u8ba4\u65b0\u5bc6\u7801",ref:"re_password"})))))),o.a.createElement("div",{className:"block block-rounded block-bordered"},o.a.createElement("div",{className:"block-header block-header-default"},o.a.createElement("h3",{className:"block-title"},"\u901a\u77e5")),o.a.createElement("div",{className:"block-content"},o.a.createElement("div",{className:"row push"},o.a.createElement("div",{className:"col-lg-8 col-xl-5"},o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u5230\u671f\u90ae\u4ef6\u63d0\u9192"),o.a.createElement("div",null,o.a.createElement(i["a"],{loading:this.state.remind_expire_loading,checked:this.state.info.remind_expire,onChange:e=>this.update("remind_expire",e?1:0)}))),o.a.createElement("div",{className:"form-group"},o.a.createElement("label",{for:"example-text-input"},"\u6d41\u91cf\u90ae\u4ef6\u63d0\u9192"),o.a.createElement("div",null,o.a.createElement(i["a"],{loading:this.state.remind_traffic_loading,checked:this.state.info.remind_traffic,onChange:e=>this.update("remind_traffic",e?1:0)}))))))))))}}},Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),s=t.n(n),i=t("3a4m"),r=t.n(i),l=t("/MKj");class c extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},a);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{r.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var o=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),m=t("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(m["a"])("/user/logout").then(e=>{r.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class h extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(o,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(h,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)}}]); \ No newline at end of file diff --git a/public/p__subscribe.async.js b/public/p__subscribe.async.js index e299c3af..a75dc2a7 100644 --- a/public/p__subscribe.async.js +++ b/public/p__subscribe.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[20],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),s=t.n(n),r=t("3a4m"),i=t.n(r),l=t("/MKj");class c extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},a);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{i.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),o=t("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{i.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class h extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(m,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(h,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)},o5uR:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),s=t.n(n),r=(t("g9YV"),t("wCAj")),i=(t("qVdP"),t("jsC+")),l=(t("lUTK"),t("BvKs")),c=(t("Pwec"),t("CtXQ")),m=(t("miYZ"),t("tsqr")),o=t("p0pE"),d=t.n(o),p=t("q1tI"),h=t.n(p),u=t("Bl7J"),v=t("/MKj"),E=t("t3Un"),f=t("+QRC"),g=t.n(f),b=t("3a4m"),N=t.n(b),w=t("yWgo"),k=t("wd/R"),y=t.n(k);class x extends h.a.Component{constructor(){super(...arguments),this.state={user:{plan:{}},server:[],loading:!0,show:!1}}componentDidMount(){this.fetchData()}fetchData(){Object(E["a"])("/user/subscribe").then(e=>{200===e.code&&this.setState(d()({},e.data,{loading:!1}))})}getTags(e){if(e)return e=JSON.parse(e),e}resetUUID(){Object(E["a"])("/user/resetUUID").then(e=>{200===e.code&&(m["a"].success("UUID \u91cd\u7f6e\u6210\u529f"),this.fetchData())})}isExpire(){return this.state.user.expired_at<(new Date).getTime()/1e3}render(){var e=[{title:"\u540d\u79f0",dataIndex:"name",key:"name"},{title:"\u670d\u52a1\u5668",dataIndex:"host",key:"host",render:e=>{return h.a.createElement("a",{href:"javascript:;",onClick:()=>{g()(e),m["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236")}},{title:"\u7aef\u53e3",dataIndex:"port",key:"port",render:e=>{return h.a.createElement("a",{href:"javascript:;",onClick:()=>{g()(e),m["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236")}},{title:"\u500d\u7387",dataIndex:"rate",key:"rate",align:"right",render:e=>{return e+" x"}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return h.a.createElement("div",null,h.a.createElement(i["a"],{trigger:["click"],overlay:h.a.createElement(l["a"],null,h.a.createElement(l["a"].Item,{key:"0",onClick:()=>{g()(Object(w["a"])(this.state.user.v2ray_uuid,a.host,a.port,a.name,a.tls)),m["a"].success("\u590d\u5236\u6210\u529f")}},h.a.createElement(c["a"],{type:"link"}),"\u590d\u5236\u94fe\u63a5"))},h.a.createElement("a",{href:"javascript:;"},"\u66f4\u591a\u64cd\u4f5c ",h.a.createElement(c["a"],{type:"caret-down"}))))}}];return h.a.createElement(u["a"],s()({},this.props,{loading:this.state.loading}),h.a.createElement("main",{id:"main-container"},h.a.createElement("div",{className:"content content-full"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8ba2\u9605"),this.state.user.plan_id?h.a.createElement("div",{className:"block block-rounded mb-2 animated fadeIn","data-toggle":"appear"},h.a.createElement("div",{className:"block-content block-content-full"},h.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},h.a.createElement("div",{className:"p-1 p-md-3 w-50"},h.a.createElement("h3",{className:"h4 font-w700 mb-1"},this.state.user.plan.name),h.a.createElement("p",{className:"font-size-sm text-muted"},this.isExpire()?h.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"\u5df2\u8fc7\u671f"):h.a.createElement("span",null,"\u4e8e ",y()().format("YYYY/MM/DD")," \u5230\u671f\uff0c\u8ddd\u79bb\u5230\u671f\u8fd8\u6709 ",((this.state.user.expired_at-y()().format("X"))/86400).toFixed(0)," \u5929")),h.a.createElement("div",{className:"mb-0"},h.a.createElement("div",{className:"progress mb-1",style:{height:6}},h.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:Object(w["b"])(this.state.user.u+this.state.user.d,this.state.user.transfer_enable)+"%"}})),h.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},h.a.createElement("span",{className:"font-w700"},((this.state.user.u+this.state.user.d)/1073741824).toFixed(2)," GB")," / ",h.a.createElement("span",{className:"font-w700"},(this.state.user.transfer_enable/1073741824).toFixed(2)," GB")))),h.a.createElement("div",{className:"p-1 p-md-3 text-md-right"},h.a.createElement(i["a"],{trigger:["click"],overlay:h.a.createElement(l["a"],null,h.a.createElement(l["a"].Item,{key:"0"},h.a.createElement("a",{onClick:()=>{g()(this.state.user.v2ray_uuid),m["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236 UUID")),h.a.createElement(l["a"].Item,{key:"1"},h.a.createElement("a",{onClick:()=>this.resetUUID()},"\u91cd\u7f6e UUID")))},h.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},h.a.createElement("i",{className:"fa fa-bullseye mr-1"}),"UUID")),Object(w["c"])()?h.a.createElement(i["a"],{trigger:["click"],overlay:h.a.createElement(l["a"],null,h.a.createElement(l["a"].Item,{key:"0",onClick:()=>window.location.href="quantumult://configuration?server="+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},h.a.createElement("a",null,"Quantumult")),h.a.createElement(l["a"].Item,{key:"1",onClick:()=>window.location.href="quantumult-x:///update-configuration?remote-resource="+encodeURI(JSON.stringify({server_remote:[this.state.user.subscribe_url+", tag="+window.v2board.title]}))},h.a.createElement("a",null,"QuantumultX")),h.a.createElement(l["a"].Item,{key:"2",onClick:()=>window.location.href="shadowrocket://add/sub://"+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")+"?remark="+window.v2board.title},h.a.createElement("a",null,"Shadowrocket")))},h.a.createElement("a",{className:"btn btn-sm btn-primary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},h.a.createElement("i",{className:"fa fa-rss mr-1"}),"\u4e00\u952e\u8ba2\u9605")):h.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>{g()(this.state.user.subscribe_url),m["a"].success("\u590d\u5236\u6210\u529f")}},h.a.createElement("i",{className:"fa fa-copy mr-1"}),"\u590d\u5236\u8ba2\u9605\u5730\u5740"),h.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)",onClick:()=>N.a.push("/plan/"+this.state.user.plan_id)},h.a.createElement("i",{className:"fa fa-redo mr-1"}),"\u7eed\u8d39"))))):h.a.createElement("a",{className:"block block-rounded mb-2 block-link-pop animated fadeIn",onClick:()=>N.a.push("/plan")},h.a.createElement("div",{className:"block-content block-content-full"},h.a.createElement("div",{className:"text-center align-items-md-center py-5"},h.a.createElement("div",null,h.a.createElement("i",{className:"fa fa-plus fa-2x"})),h.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted pt-2"},"\u6dfb\u52a0\u8ba2\u9605")))),h.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8282\u70b9")),this.state.server.length>0||!this.isExpire()?h.a.createElement("div",{className:"bg-white"},h.a.createElement(r["a"],{dataSource:this.state.server,columns:e,pagination:!1,scroll:{x:900}})):h.a.createElement("div",{className:"alert alert-dark",role:"alert"},h.a.createElement("p",{className:"mb-0"},"\u6ca1\u6709\u53ef\u7528\u8282\u70b9\uff0c\u5982\u679c\u60a8\u672a\u8ba2\u9605\u6216\u5df2\u8fc7\u671f\u8bf7 ",this.state.user.plan_id?h.a.createElement("a",{className:"alert-link",href:"javascript:void(0)",onClick:()=>N.a.push("/plan/"+this.state.user.plan_id)},"\u7eed\u8d39"):h.a.createElement("a",{className:"alert-link",href:"javascript:void(0)",onClick:()=>N.a.push("/plan")},"\u8ba2\u9605"),"\u3002")))))}}a["default"]=Object(v["c"])()(x)},yWgo:function(e,a,t){"use strict";function n(e,a,t,n,s){var r="chacha20-poly1305:".concat(e,"@").concat(a,":").concat(t);return"vmess://".concat(window.btoa(r),"?remarks=").concat(encodeURI(n),"&obfs=none").concat(s?"&tls=1":"")}function s(e,a){return e/a*100}function r(){return-1!==window.navigator.userAgent.toLowerCase().indexOf("iphone")}t.d(a,"a",function(){return n}),t.d(a,"b",function(){return s}),t.d(a,"c",function(){return r})}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[20],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),s=t.n(n),r=t("3a4m"),i=t.n(r),l=t("/MKj");class c extends s.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:s.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:s.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u7528\u6237",type:"heading"},{title:"\u4e2a\u4eba\u4e2d\u5fc3",type:"item",href:"/profile",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7ad9\u70b9\u914d\u7f6e",type:"item",href:"/admin/config/site",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-credit-card"})},{title:"\u670d\u52a1\u5668",type:"heading"},{title:"\u8282\u70b9\u7ba1\u7406",type:"item",href:"/admin/server",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-wrench"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u8ba2\u9605\u7ba1\u7406",type:"item",href:"/admin/plan",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-users"})}];this.props.header.userInfo.is_admin&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})}),this.isAdmin()?this.setState({nav:a}):this.setState({nav:e})}renderMenu(e,a,t,n){switch(e){case"heading":return s.a.createElement("li",{className:"nav-main-heading"},a);case"item":return s.a.createElement("li",{className:"nav-main-item"},s.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{i.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,s.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return s.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},s.a.createElement("div",{className:"smini-visible-block"},s.a.createElement("div",{className:"content-header bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},"X"),s.a.createElement("span",{className:"text-white"},"H")))),s.a.createElement("div",{className:"smini-hidden"},s.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},s.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},s.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),s.a.createElement("div",{className:"d-lg-none"},s.a.createElement("a",{className:"text-white ml-2","data-toggle":"layout","data-action":"sidebar_close",href:"javascript:void(0)",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-times-circle"}))))),s.a.createElement("div",{className:"content-side content-side-full"},s.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var m=Object(l["c"])(e=>{var a=e.header;return{header:a}})(c),o=t("t3Un");class d extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1}}componentDidMount(){var e=this;this.props.header.userInfo.email||this.setState({loading:!0},()=>{this.props.dispatch({type:"header/getUserInfo",complete:()=>e.setState({loading:!1})})})}showAvatarMenu(){var e=this;this.setState({showAvatarMenu:!this.state.showAvatarMenu},()=>{document.onclick=function(a){e.state.showAvatarMenu&&e.setState({showAvatarMenu:!1}),document.onclick=void 0}})}logout(){Object(o["a"])("/user/logout").then(e=>{i.a.push("/login")})}render(){return s.a.createElement("header",{id:"page-header"},s.a.createElement("div",{className:"content-header"},s.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"none":"block"}},s.a.createElement("button",{type:"button",className:"btn btn-dual mr-1 d-lg-none","data-toggle":"layout","data-action":"sidebar_toggle",onClick:()=>this.props.dispatch({type:"header/showNav"})},s.a.createElement("i",{className:"fa fa-fw fa-bars"}))),this.props.search&&s.a.createElement("div",null,s.a.createElement("input",{type:"text",className:"form-control rounded-lg px-4",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value)})),s.a.createElement("div",null,this.state.loading?s.a.createElement("div",{className:"spinner-grow text-primary"}):s.a.createElement("div",{className:"dropdown d-inline-block"},s.a.createElement("button",{type:"button",className:"btn btn-dual",id:"page-header-user-dropdown","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:()=>this.showAvatarMenu()},s.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),s.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),s.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),s.a.createElement("div",{className:"dropdown-menu dropdown-menu-right dropdown-menu-lg p-0 ".concat(this.state.showAvatarMenu&&"show"),"aria-labelledby":"page-header-user-dropdown"},s.a.createElement("div",{className:"p-2"},s.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:;",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))))}}var p=Object(l["c"])(e=>{var a=e.header;return{header:a}})(d);class h extends s.a.Component{render(){return s.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},s.a.createElement("div",{className:"content py-0"},s.a.createElement("div",{className:"row font-size-sm"},s.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},s.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),s.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},s.a.createElement("a",{className:"font-w600",href:"/",target:"_blank"},"V2Board v0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class u extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o sidebar-dark side-scroll page-header-fixed main-content-boxed side-trans-enabled ".concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(m,this.props),s.a.createElement(p,{search:this.props.search}),this.props.loading?s.a.createElement("main",{id:"main-container"},s.a.createElement("div",{className:"content content-full"},s.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},s.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,s.a.createElement(h,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(u)},o5uR:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),s=t.n(n),r=(t("g9YV"),t("wCAj")),i=(t("qVdP"),t("jsC+")),l=(t("lUTK"),t("BvKs")),c=(t("Pwec"),t("CtXQ")),m=(t("miYZ"),t("tsqr")),o=t("p0pE"),d=t.n(o),p=t("q1tI"),h=t.n(p),u=t("Bl7J"),v=t("/MKj"),E=t("t3Un"),f=t("+QRC"),b=t.n(f),g=t("3a4m"),N=t.n(g),w=t("yWgo"),k=t("wd/R"),y=t.n(k);class x extends h.a.Component{constructor(){super(...arguments),this.state={user:{plan:{}},server:[],loading:!0,show:!1}}componentDidMount(){this.fetchData()}fetchData(){Object(E["a"])("/user/subscribe").then(e=>{200===e.code&&this.setState(d()({},e.data,{loading:!1}))})}getTags(e){if(e)return e=JSON.parse(e),e}resetUUID(){Object(E["a"])("/user/resetUUID").then(e=>{200===e.code&&(m["a"].success("UUID \u91cd\u7f6e\u6210\u529f"),this.fetchData())})}isExpire(){return this.state.user.expired_at<(new Date).getTime()/1e3}render(){var e=[{title:"\u540d\u79f0",dataIndex:"name",key:"name"},{title:"\u670d\u52a1\u5668",dataIndex:"host",key:"host",render:e=>{return h.a.createElement("a",{href:"javascript:;",onClick:()=>{b()(e),m["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236")}},{title:"\u7aef\u53e3",dataIndex:"port",key:"port",render:e=>{return h.a.createElement("a",{href:"javascript:;",onClick:()=>{b()(e),m["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236")}},{title:"\u500d\u7387",dataIndex:"rate",key:"rate",align:"right",render:e=>{return e+" x"}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return h.a.createElement("div",null,h.a.createElement(i["a"],{trigger:["click"],overlay:h.a.createElement(l["a"],null,h.a.createElement(l["a"].Item,{key:"0",onClick:()=>{b()(Object(w["a"])(this.state.user.v2ray_uuid,a.host,a.port,a.name,a.tls)),m["a"].success("\u590d\u5236\u6210\u529f")}},h.a.createElement(c["a"],{type:"link"}),"\u590d\u5236\u94fe\u63a5"))},h.a.createElement("a",{href:"javascript:;"},"\u66f4\u591a\u64cd\u4f5c ",h.a.createElement(c["a"],{type:"caret-down"}))))}}];return h.a.createElement(u["a"],s()({},this.props,{loading:this.state.loading}),h.a.createElement("main",{id:"main-container"},h.a.createElement("div",{className:"content content-full"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8ba2\u9605"),this.state.user.plan_id?h.a.createElement("div",{className:"block block-rounded mb-2 animated fadeIn","data-toggle":"appear"},h.a.createElement("div",{className:"block-content block-content-full"},h.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},h.a.createElement("div",{className:"p-1 p-md-3 w-50"},h.a.createElement("h3",{className:"h4 font-w700 mb-1"},this.state.user.plan.name),h.a.createElement("p",{className:"font-size-sm text-muted"},this.isExpire()?h.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"\u5df2\u8fc7\u671f"):h.a.createElement("span",null,"\u4e8e ",y()().format("YYYY/MM/DD")," \u5230\u671f\uff0c\u8ddd\u79bb\u5230\u671f\u8fd8\u6709 ",((this.state.user.expired_at-y()().format("X"))/86400).toFixed(0)," \u5929")),h.a.createElement("div",{className:"mb-0"},h.a.createElement("div",{className:"progress mb-1",style:{height:6}},h.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:Object(w["b"])(this.state.user.u+this.state.user.d,this.state.user.transfer_enable)+"%"}})),h.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},h.a.createElement("span",{className:"font-w700"},((this.state.user.u+this.state.user.d)/1073741824).toFixed(2)," GB")," / ",h.a.createElement("span",{className:"font-w700"},(this.state.user.transfer_enable/1073741824).toFixed(2)," GB")))),h.a.createElement("div",{className:"p-1 p-md-3 text-md-right"},h.a.createElement(i["a"],{trigger:["click"],overlay:h.a.createElement(l["a"],null,h.a.createElement(l["a"].Item,{key:"0"},h.a.createElement("a",{onClick:()=>{b()(this.state.user.v2ray_uuid),m["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236 UUID")),h.a.createElement(l["a"].Item,{key:"1"},h.a.createElement("a",{onClick:()=>this.resetUUID()},"\u91cd\u7f6e UUID")))},h.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},h.a.createElement("i",{className:"fa fa-bullseye mr-1"}),"UUID")),Object(w["c"])()?h.a.createElement(i["a"],{trigger:["click"],overlay:h.a.createElement(l["a"],null,h.a.createElement(l["a"].Item,{key:"0",onClick:()=>window.location.href="quantumult://configuration?server="+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},h.a.createElement("a",null,"Quantumult")),h.a.createElement(l["a"].Item,{key:"1",onClick:()=>window.location.href="quantumult-x:///update-configuration?remote-resource="+encodeURI(JSON.stringify({server_remote:[this.state.user.subscribe_url+", tag="+window.v2board.title]}))},h.a.createElement("a",null,"QuantumultX")),h.a.createElement(l["a"].Item,{key:"2",onClick:()=>window.location.href="shadowrocket://add/sub://"+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")+"?remark="+window.v2board.title},h.a.createElement("a",null,"Shadowrocket")))},h.a.createElement("a",{className:"btn btn-sm btn-primary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},h.a.createElement("i",{className:"fa fa-rss mr-1"}),"\u4e00\u952e\u8ba2\u9605")):h.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>{b()(this.state.user.subscribe_url),m["a"].success("\u590d\u5236\u6210\u529f")}},h.a.createElement("i",{className:"fa fa-copy mr-1"}),"\u590d\u5236\u8ba2\u9605\u5730\u5740"),h.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)",onClick:()=>N.a.push("/plan/"+this.state.user.plan_id)},h.a.createElement("i",{className:"fa fa-redo mr-1"}),"\u7eed\u8d39"))))):h.a.createElement("a",{className:"block block-rounded mb-2 block-link-pop animated fadeIn",onClick:()=>N.a.push("/plan")},h.a.createElement("div",{className:"block-content block-content-full"},h.a.createElement("div",{className:"text-center align-items-md-center py-5"},h.a.createElement("div",null,h.a.createElement("i",{className:"fa fa-plus fa-2x"})),h.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted pt-2"},"\u6dfb\u52a0\u8ba2\u9605")))),h.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8282\u70b9")),this.state.server.length>0||!this.isExpire()?h.a.createElement("div",{className:"bg-white"},h.a.createElement(r["a"],{dataSource:this.state.server,columns:e,pagination:!1,scroll:{x:900}})):h.a.createElement("div",{className:"alert alert-dark",role:"alert"},h.a.createElement("p",{className:"mb-0"},"\u6ca1\u6709\u53ef\u7528\u8282\u70b9\uff0c\u5982\u679c\u60a8\u672a\u8ba2\u9605\u6216\u5df2\u8fc7\u671f\u8bf7 ",this.state.user.plan_id?h.a.createElement("a",{className:"alert-link",href:"javascript:void(0)",onClick:()=>N.a.push("/plan/"+this.state.user.plan_id)},"\u7eed\u8d39"):h.a.createElement("a",{className:"alert-link",href:"javascript:void(0)",onClick:()=>N.a.push("/plan")},"\u8ba2\u9605"),"\u3002")))))}}a["default"]=Object(v["c"])()(x)},yWgo:function(e,a,t){"use strict";function n(e,a,t,n,s){var r="chacha20-poly1305:".concat(e,"@").concat(a,":").concat(t);return"vmess://".concat(window.btoa(r),"?remarks=").concat(encodeURI(n),"&obfs=none").concat(s?"&tls=1":"")}function s(e,a){return e/a*100}function r(){return-1!==window.navigator.userAgent.toLowerCase().indexOf("iphone")}t.d(a,"a",function(){return n}),t.d(a,"b",function(){return s}),t.d(a,"c",function(){return r})}}]); \ No newline at end of file