diff --git a/public/p__admin__commission.async.js b/public/p__admin__commission.async.js index 7a2fca1e..7ac887e4 100644 --- a/public/p__admin__commission.async.js +++ b/public/p__admin__commission.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[1],{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"),c=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class E 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.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 ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(E,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(v)},I0co:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return k});var n=a("jehZ"),i=a.n(n),s=(a("g9YV"),a("wCAj")),r=(a("qVdP"),a("jsC+")),l=(a("Awhp"),a("KrTs")),c=(a("lUTK"),a("BvKs")),o=(a("5Dmo"),a("3S7+")),m=(a("Pwec"),a("CtXQ")),d=(a("miYZ"),a("tsqr")),h=a("p0pE"),p=a.n(h),u=a("q1tI"),E=a.n(u),v=a("Bl7J"),g=a("t3Un"),f=a("LbTH"),y=a("wd/R"),b=a.n(y),N=a("p8mO");class k extends E.a.Component{constructor(){super(...arguments),this.state={orders:[],pagination:{current:1,pageSize:10,total:0},id:void 0,loading:!0,selectOrder:void 0}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=p()({},this.state.pagination,{is_commission:!0}),this.state.id&&Object.assign(e,{id:this.state.id}),Object(g["a"])("/admin/order/fetch",e).then(e=>{200===e.code&&this.setState({orders:e.data,pagination:p()({},this.state.pagination,{total:e.total}),loading:!1})})}searchOnChange(e){this.inputDelayTimer&&clearTimeout(this.inputDelayTimer),this.inputDelayTimer=setTimeout(function(){this.inputDelayTimer=null,this.setState({id:e,pagination:p()({},this.state.pagination,{current:1})},()=>{this.fetchData()})}.bind(this),400)}update(e,t){Object(g["b"])("/admin/order/update",{trade_no:e,commission_status:t}).then(e=>{200===e.code&&e.data&&(d["a"].success("\u64cd\u4f5c\u6210\u529f"),this.fetchData())})}render(){var e=[{title:"# \u5e8f\u53f7",dataIndex:"id",key:"id"},{title:"\u8ba2\u5355\u53f7",dataIndex:"trade_no",key:"trade_no",render:(e,t)=>{return E.a.createElement("a",{onClick:()=>this.setState({selectOrder:t}),href:"javascript:void(0)"},e)}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",align:"right",render:e=>{return(e/100).toFixed(2)}},{title:"\u4f63\u91d1\u91d1\u989d",dataIndex:"commission_balance",key:"commission_balance",align:"right",render:e=>{return(e/100).toFixed(2)}},{title:E.a.createElement("span",null,"\u4f63\u91d1\u72b6\u6001 ",E.a.createElement(o["a"],{placement:"top",title:"\u6807\u8bb0\u4e3a[\u5df2\u786e\u8ba4]\u540e\u5c06\u4f1a\u7531\u7cfb\u7edf\u5904\u7406\u540e\u53d1\u653e\u5230\u7528\u6237\u5e76\u5b8c\u6210"},E.a.createElement(m["a"],{type:"question-circle"}))),dataIndex:"commission_status",key:"commission_status",render:(e,t)=>{var a=["processing","success","success"];return E.a.createElement("div",null,E.a.createElement(r["a"],{trigger:["click"],overlay:E.a.createElement(c["a"],null,E.a.createElement(c["a"].Item,{key:"0",disabled:0===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u786e\u8ba4\u4e2d"),E.a.createElement(c["a"].Item,{key:"1",disabled:1===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u786e\u8ba4"),E.a.createElement(c["a"].Item,{key:"2",disabled:2===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u5b8c\u6210"))},E.a.createElement("div",null,E.a.createElement(l["a"],{status:a[e]}),E.a.createElement("span",null,f["a"].commissionStatusText[e]," "),E.a.createElement("a",{href:"javascript:void(0)"},"\u6807\u8bb0\u4e3a ",E.a.createElement(m["a"],{type:"caret-down"})))))}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",align:"right",render:e=>{return b()(1e3*e).format("YYYY/MM/DD HH:mm")}}];return E.a.createElement(v["a"],i()({},this.props,{loading:this.state.loading,search:{placeholder:"\u901a\u8fc7ID\u5e8f\u53f7\u641c\u7d22",onChange:e=>this.searchOnChange(e)}}),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"},"\u4f63\u91d1\u7ba1\u7406")),E.a.createElement("div",{className:"bg-white"},E.a.createElement(s["a"],{dataSource:this.state.orders,pagination:p()({},this.state.pagination,{size:"small"}),columns:e,scroll:{x:850},onChange:e=>this.paginationOnChange(e)})))),E.a.createElement(N["a"],{order:this.state.selectOrder,onClose:()=>this.setState({selectOrder:void 0})}))}}},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},p8mO:function(e,t,a){"use strict";a.d(t,"a",function(){return v});a("2qtc");var n=a("kLXV"),i=(a("Pwec"),a("CtXQ")),s=(a("/zsF"),a("PArb")),r=(a("14J3"),a("BMrR")),l=(a("jCWc"),a("kPKH")),c=a("q1tI"),o=a.n(c),m=a("t3Un"),d=a("LbTH"),h=a("wd/R"),p=a.n(h),u=a("3a4m"),E=a.n(u);class v extends o.a.Component{constructor(){super(...arguments),this.state={order:{},user:{},invite_user:{}}}componentDidUpdate(){this.getUserInfo()}getUserInfo(){this.state.user.email||this.props.order&&(Object(m["a"])("/admin/user/id2UserInfo/"+this.props.order.user_id).then(e=>{200===e.code&&this.setState({user:e.data,order:this.props.order})}),this.props.order.invite_user_id&&Object(m["a"])("/admin/user/id2UserInfo/"+this.props.order.invite_user_id).then(e=>{this.setState({invite_user:e.data})}))}render(){var e={marginBottom:10};return console.log(this.props,this.state),o.a.createElement(n["a"],{visible:this.props.order,title:"\u8ba2\u5355\u4fe1\u606f",onCancel:()=>{this.setState({order:{},user:{}}),this.props.onClose()},footer:!1},this.state.user.email?o.a.createElement("div",null,o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u90ae\u7bb1"),o.a.createElement(l["a"],{span:18},o.a.createElement("a",{onClick:()=>E.a.push("/admin/user?email="+this.state.user.email),href:"javascript:void(0)"},this.state.user.email))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u53f7"),o.a.createElement(l["a"],{span:18},this.state.order.trade_no)),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u91d1\u989d"),o.a.createElement(l["a"],{span:18},(this.state.order.total_amount/100).toFixed(2))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u5468\u671f"),o.a.createElement(l["a"],{span:18},d["a"].cycleText[this.state.order.cycle])),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u72b6\u6001"),o.a.createElement(l["a"],{span:18},d["a"].orderStatusText[this.state.order.status])),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u9605\u8ba1\u5212"),o.a.createElement(l["a"],{span:18},this.state.order.plan_name)),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u7f51\u5173\u5355\u53f7"),o.a.createElement(l["a"],{span:18},this.state.order.callback_no?this.state.order.callback_no:"-")),o.a.createElement(s["a"],null),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u521b\u5efa\u65f6\u95f4"),o.a.createElement(l["a"],{span:18},p()(1e3*this.state.order.created_at).format("YYYY/MM/DD HH:mm:ss"))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u66f4\u65b0\u65f6\u95f4"),o.a.createElement(l["a"],{span:18},p()(1e3*this.state.order.updated_at).format("YYYY/MM/DD HH:mm:ss"))),this.state.order.invite_user_id&&o.a.createElement("div",null,o.a.createElement(s["a"],null),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u9080\u8bf7\u4eba"),o.a.createElement(l["a"],{span:18},o.a.createElement("a",{onClick:()=>E.a.push("/admin/user?email="+this.state.invite_user.email),href:"javascript:void(0)"},this.state.invite_user.email))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u4f63\u91d1\u91d1\u989d"),o.a.createElement(l["a"],{span:18},(this.state.order.commission_balance/100).toFixed(2))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u4f63\u91d1\u72b6\u6001"),o.a.createElement(l["a"],{span:18},d["a"].commissionStatusText[this.state.order.commission_status])))):o.a.createElement(i["a"],{type:"loading",style:{fontSize:24,color:"#415A94"}}))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[1],{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"),c=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class E 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),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 ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(E,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(v)},I0co:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return k});var n=a("jehZ"),i=a.n(n),s=(a("g9YV"),a("wCAj")),r=(a("qVdP"),a("jsC+")),l=(a("Awhp"),a("KrTs")),c=(a("lUTK"),a("BvKs")),o=(a("5Dmo"),a("3S7+")),m=(a("Pwec"),a("CtXQ")),d=(a("miYZ"),a("tsqr")),h=a("p0pE"),p=a.n(h),u=a("q1tI"),E=a.n(u),v=a("Bl7J"),g=a("t3Un"),f=a("LbTH"),y=a("wd/R"),b=a.n(y),N=a("p8mO");class k extends E.a.Component{constructor(){super(...arguments),this.state={orders:[],pagination:{current:1,pageSize:10,total:0},id:void 0,loading:!0,selectOrder:void 0}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=p()({},this.state.pagination,{is_commission:!0}),this.state.id&&Object.assign(e,{id:this.state.id}),Object(g["a"])("/admin/order/fetch",e).then(e=>{200===e.code&&this.setState({orders:e.data,pagination:p()({},this.state.pagination,{total:e.total}),loading:!1})})}searchOnChange(e){this.inputDelayTimer&&clearTimeout(this.inputDelayTimer),this.inputDelayTimer=setTimeout(function(){this.inputDelayTimer=null,this.setState({id:e,pagination:p()({},this.state.pagination,{current:1})},()=>{this.fetchData()})}.bind(this),400)}update(e,t){Object(g["b"])("/admin/order/update",{trade_no:e,commission_status:t}).then(e=>{200===e.code&&e.data&&(d["a"].success("\u64cd\u4f5c\u6210\u529f"),this.fetchData())})}render(){var e=[{title:"# \u5e8f\u53f7",dataIndex:"id",key:"id"},{title:"\u8ba2\u5355\u53f7",dataIndex:"trade_no",key:"trade_no",render:(e,t)=>{return E.a.createElement("a",{onClick:()=>this.setState({selectOrder:t}),href:"javascript:void(0)"},e)}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",align:"right",render:e=>{return(e/100).toFixed(2)}},{title:"\u4f63\u91d1\u91d1\u989d",dataIndex:"commission_balance",key:"commission_balance",align:"right",render:e=>{return(e/100).toFixed(2)}},{title:E.a.createElement("span",null,"\u4f63\u91d1\u72b6\u6001 ",E.a.createElement(o["a"],{placement:"top",title:"\u6807\u8bb0\u4e3a[\u5df2\u786e\u8ba4]\u540e\u5c06\u4f1a\u7531\u7cfb\u7edf\u5904\u7406\u540e\u53d1\u653e\u5230\u7528\u6237\u5e76\u5b8c\u6210"},E.a.createElement(m["a"],{type:"question-circle"}))),dataIndex:"commission_status",key:"commission_status",render:(e,t)=>{var a=["processing","success","success"];return E.a.createElement("div",null,E.a.createElement(r["a"],{trigger:["click"],overlay:E.a.createElement(c["a"],null,E.a.createElement(c["a"].Item,{key:"0",disabled:0===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u786e\u8ba4\u4e2d"),E.a.createElement(c["a"].Item,{key:"1",disabled:1===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u786e\u8ba4"),E.a.createElement(c["a"].Item,{key:"2",disabled:2===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u5b8c\u6210"))},E.a.createElement("div",null,E.a.createElement(l["a"],{status:a[e]}),E.a.createElement("span",null,f["a"].commissionStatusText[e]," "),E.a.createElement("a",{href:"javascript:void(0)"},"\u6807\u8bb0\u4e3a ",E.a.createElement(m["a"],{type:"caret-down"})))))}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",align:"right",render:e=>{return b()(1e3*e).format("YYYY/MM/DD HH:mm")}}];return E.a.createElement(v["a"],i()({},this.props,{loading:this.state.loading,search:{placeholder:"\u901a\u8fc7ID\u5e8f\u53f7\u641c\u7d22",onChange:e=>this.searchOnChange(e)}}),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"},"\u4f63\u91d1\u7ba1\u7406")),E.a.createElement("div",{className:"bg-white"},E.a.createElement(s["a"],{dataSource:this.state.orders,pagination:p()({},this.state.pagination,{size:"small"}),columns:e,scroll:{x:850},onChange:e=>this.paginationOnChange(e)})))),E.a.createElement(N["a"],{order:this.state.selectOrder,onClose:()=>this.setState({selectOrder:void 0})}))}}},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},p8mO:function(e,t,a){"use strict";a.d(t,"a",function(){return v});a("2qtc");var n=a("kLXV"),i=(a("Pwec"),a("CtXQ")),s=(a("/zsF"),a("PArb")),r=(a("14J3"),a("BMrR")),l=(a("jCWc"),a("kPKH")),c=a("q1tI"),o=a.n(c),m=a("t3Un"),d=a("LbTH"),h=a("wd/R"),p=a.n(h),u=a("3a4m"),E=a.n(u);class v extends o.a.Component{constructor(){super(...arguments),this.state={order:{},user:{},invite_user:{}}}componentDidUpdate(){this.getUserInfo()}getUserInfo(){this.state.user.email||this.props.order&&(Object(m["a"])("/admin/user/id2UserInfo/"+this.props.order.user_id).then(e=>{200===e.code&&this.setState({user:e.data,order:this.props.order})}),this.props.order.invite_user_id&&Object(m["a"])("/admin/user/id2UserInfo/"+this.props.order.invite_user_id).then(e=>{this.setState({invite_user:e.data})}))}render(){var e={marginBottom:10};return console.log(this.props,this.state),o.a.createElement(n["a"],{visible:this.props.order,title:"\u8ba2\u5355\u4fe1\u606f",onCancel:()=>{this.setState({order:{},user:{}}),this.props.onClose()},footer:!1},this.state.user.email?o.a.createElement("div",null,o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u90ae\u7bb1"),o.a.createElement(l["a"],{span:18},o.a.createElement("a",{onClick:()=>E.a.push("/admin/user?email="+this.state.user.email),href:"javascript:void(0)"},this.state.user.email))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u53f7"),o.a.createElement(l["a"],{span:18},this.state.order.trade_no)),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u91d1\u989d"),o.a.createElement(l["a"],{span:18},(this.state.order.total_amount/100).toFixed(2))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u5468\u671f"),o.a.createElement(l["a"],{span:18},d["a"].cycleText[this.state.order.cycle])),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u72b6\u6001"),o.a.createElement(l["a"],{span:18},d["a"].orderStatusText[this.state.order.status])),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u9605\u8ba1\u5212"),o.a.createElement(l["a"],{span:18},this.state.order.plan_name)),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u7f51\u5173\u5355\u53f7"),o.a.createElement(l["a"],{span:18},this.state.order.callback_no?this.state.order.callback_no:"-")),o.a.createElement(s["a"],null),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u521b\u5efa\u65f6\u95f4"),o.a.createElement(l["a"],{span:18},p()(1e3*this.state.order.created_at).format("YYYY/MM/DD HH:mm:ss"))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u66f4\u65b0\u65f6\u95f4"),o.a.createElement(l["a"],{span:18},p()(1e3*this.state.order.updated_at).format("YYYY/MM/DD HH:mm:ss"))),this.state.order.invite_user_id&&o.a.createElement("div",null,o.a.createElement(s["a"],null),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u9080\u8bf7\u4eba"),o.a.createElement(l["a"],{span:18},o.a.createElement("a",{onClick:()=>E.a.push("/admin/user?email="+this.state.invite_user.email),href:"javascript:void(0)"},this.state.invite_user.email))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u4f63\u91d1\u91d1\u989d"),o.a.createElement(l["a"],{span:18},(this.state.order.commission_balance/100).toFixed(2))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u4f63\u91d1\u72b6\u6001"),o.a.createElement(l["a"],{span:18},d["a"].commissionStatusText[this.state.order.commission_status])))):o.a.createElement(i["a"],{type:"loading",style:{fontSize:24,color:"#415A94"}}))}}}}]); \ No newline at end of file diff --git a/public/p__admin__config__payment.async.js b/public/p__admin__config__payment.async.js index 99d0b9fe..3409a420 100644 --- a/public/p__admin__config__payment.async.js +++ b/public/p__admin__config__payment.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[2],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),l=t.n(n),i=t("3a4m"),s=t.n(i),r=t("/MKj"),c=t("20nU"),m=t("yWgo");class o extends l.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-user"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("is_admin")&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:l.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 l.a.createElement("li",{className:"nav-main-heading"},a);case"item":return l.a.createElement("li",{className:"nav-main-item"},l.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{s.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,l.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return l.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},l.a.createElement("div",{className:"smini-visible-block"},l.a.createElement("div",{className:"content-header bg-black-10"},l.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},l.a.createElement("span",{className:"text-white-75"},"X"),l.a.createElement("span",{className:"text-white"},"H")))),l.a.createElement("div",{className:"smini-hidden ".concat(1===c["a"].theme?"":"bg-header-dark")},l.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},l.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},l.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),l.a.createElement("div",{className:"d-lg-none"},l.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"})},l.a.createElement("i",{className:"fa fa-times-circle"}))))),l.a.createElement("div",{className:"content-side content-side-full"},l.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var p=Object(r["c"])(e=>{var a=e.header;return{header:a}})(o),d=t("t3Un");class h extends l.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(d["a"])("/user/logout").then(e=>{s.a.push("/login")})}render(){return l.a.createElement("header",{id:"page-header"},l.a.createElement("div",{className:"content-header"},l.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"block":"none"}},l.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"})},l.a.createElement("i",{className:"fa fa-fw fa-bars"})),this.props.search&&l.a.createElement("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},l.a.createElement("i",{className:"fa fa-fw fa-search"})," ",l.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),l.a.createElement("div",null),l.a.createElement("div",null,this.state.loading?l.a.createElement("div",{className:"spinner-grow text-primary"}):l.a.createElement("div",{className:"dropdown d-inline-block"},l.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()},l.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),l.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),l.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),l.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"},l.a.createElement("div",{className:"p-2"},l.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",l.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&l.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},l.a.createElement("div",{className:"content-header bg-dark"},l.a.createElement("div",{className:"w-100"},l.a.createElement("div",{className:"input-group"},l.a.createElement("div",{className:"input-group-prepend"},l.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},l.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),l.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(r["c"])(e=>{var a=e.header;return{header:a}})(h);class v extends l.a.Component{render(){return l.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},l.a.createElement("div",{className:"content py-0"},l.a.createElement("div",{className:"row font-size-sm"},l.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},l.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),l.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},l.a.createElement("a",{className:"font-w600",href:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),l.a.createElement("span",{"data-toggle":"year-copy"})))))}}class E extends l.a.Component{render(){return l.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},l.a.createElement(p,this.props),l.a.createElement(u,{search:this.props.search}),this.props.loading?l.a.createElement("main",{id:"main-container"},l.a.createElement("div",{className:"content content-full"},l.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},l.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,l.a.createElement(v,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(E)},"cD2/":function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return u});var n=t("jehZ"),l=t.n(n),i=(t("BoS7"),t("Sdc0")),s=(t("+L6B"),t("2/Rp")),r=(t("miYZ"),t("tsqr")),c=t("p0pE"),m=t.n(c),o=t("q1tI"),p=t.n(o),d=t("Bl7J"),h=t("t3Un");class u extends p.a.Component{constructor(){super(...arguments),this.state={invite:{},site:{},pay:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(h["a"])("/admin/config/fetch").then(e=>{200===e.code&&this.setState(m()({},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]:m()({},this.state[e],{[a]:t})})}render(){return p.a.createElement(d["a"],l()({},this.props,{loading:this.state.loading}),p.a.createElement("main",{id:"main-container"},p.a.createElement("div",{className:"content content-full"},p.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u652f\u4ed8\u914d\u7f6e"),p.a.createElement("div",{className:"block block-rounded block-bordered"},p.a.createElement("div",{className:"block-header block-header-default"},p.a.createElement("h3",{className:"block-title"},"\u652f\u4ed8\u5b9d\u5f53\u9762\u4ed8"),p.a.createElement("div",{className:"block-options"},p.a.createElement(s["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),p.a.createElement("div",{className:"block-content"},p.a.createElement("div",{className:"row push"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u542f\u7528"),p.a.createElement("div",null,p.a.createElement(i["a"],{checked:parseInt(this.state.pay.alipay_enable),onChange:e=>this.set("pay","alipay_enable",e?1:0)}))),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"APPID"),p.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))})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u516c\u94a5"),p.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)})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u79c1\u94a5"),p.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)})))))),p.a.createElement("div",{className:"block block-rounded block-bordered"},p.a.createElement("div",{className:"block-header block-header-default"},p.a.createElement("h3",{className:"block-title"},"Stripe"),p.a.createElement("div",{className:"block-options"},p.a.createElement(s["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),p.a.createElement("div",{className:"block-content"},p.a.createElement("div",{className:"row"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"alert alert-primary",role:"alert"},p.a.createElement("p",{class:"mb-0"},"Stripe\u7684Webhook\u8def\u5f84\u4e3a\uff1a ",p.a.createElement("a",{className:"alert-link",href:"javascript:void(0)"},"/api/v1/guest/order/stripeNotify"))))),p.a.createElement("div",{className:"row push"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u542f\u7528\u652f\u4ed8\u5b9d\u6536\u6b3e"),p.a.createElement("div",null,p.a.createElement(i["a"],{checked:parseInt(this.state.pay.stripe_alipay_enable),onChange:e=>this.set("pay","stripe_alipay_enable",e?1:0)}))),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u542f\u7528\u5fae\u4fe1\u6536\u6b3e"),p.a.createElement("div",null,p.a.createElement(i["a"],{checked:parseInt(this.state.pay.stripe_wepay_enable),onChange:e=>this.set("pay","stripe_wepay_enable",e?1:0)}))),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"SK_LIVE"),p.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)})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"PK_LIVE"),p.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)})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"WebHook\u5bc6\u94a5\u7b7e\u540d"),p.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)})))))),p.a.createElement("div",{className:"block block-rounded block-bordered"},p.a.createElement("div",{className:"block-header block-header-default"},p.a.createElement("h3",{className:"block-title"},"BitpayX"),p.a.createElement("div",{className:"block-options"},p.a.createElement(s["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),p.a.createElement("div",{className:"block-content"},p.a.createElement("div",{className:"row"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"alert alert-primary",role:"alert"},p.a.createElement("p",{class:"mb-0"},"\u5982\u679c\u4f60\u6ca1\u6709BitpayX\u7684\u4fe1\u606f\uff0c\u8bf7 ",p.a.createElement("a",{className:"alert-link",href:"https://merchants.mugglepay.com/user/register?ref=MP8F751FACEDB8"},"\u7533\u8bf7"),"\u3002")))),p.a.createElement("div",{className:"row push"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u542f\u7528"),p.a.createElement("div",null,p.a.createElement(i["a"],{checked:parseInt(this.state.pay.bitpayx_enable),onChange:e=>this.set("pay","bitpayx_enable",e?1:0)}))),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"AppSecret"),p.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.bitpayx_appsecret,onChange:e=>this.set("pay","bitpayx_appsecret",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"),l=t.n(n),i=t("3a4m"),s=t.n(i),r=t("/MKj"),c=t("20nU"),m=t("yWgo");class o extends l.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-user"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("is_admin")&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:l.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 l.a.createElement("li",{className:"nav-main-heading"},a);case"item":return l.a.createElement("li",{className:"nav-main-item"},l.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{s.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,l.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return l.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},l.a.createElement("div",{className:"smini-visible-block"},l.a.createElement("div",{className:"content-header bg-black-10"},l.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},l.a.createElement("span",{className:"text-white-75"},"X"),l.a.createElement("span",{className:"text-white"},"H")))),l.a.createElement("div",{className:"smini-hidden ".concat(1===c["a"].theme?"":"bg-header-dark")},l.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},l.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},l.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),l.a.createElement("div",{className:"d-lg-none"},l.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"})},l.a.createElement("i",{className:"fa fa-times-circle"}))))),l.a.createElement("div",{className:"content-side content-side-full"},l.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var p=Object(r["c"])(e=>{var a=e.header;return{header:a}})(o),d=t("t3Un");class h extends l.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(d["a"])("/user/logout").then(e=>{s.a.push("/login")})}render(){return l.a.createElement("header",{id:"page-header"},l.a.createElement("div",{className:"content-header"},l.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"block":"none"}},l.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"})},l.a.createElement("i",{className:"fa fa-fw fa-bars"})),this.props.search&&l.a.createElement("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},l.a.createElement("i",{className:"fa fa-fw fa-search"})," ",l.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),l.a.createElement("div",null),l.a.createElement("div",null,this.state.loading?l.a.createElement("div",{className:"spinner-grow text-primary"}):l.a.createElement("div",{className:"dropdown d-inline-block"},l.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()},l.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),l.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),l.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),l.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"},l.a.createElement("div",{className:"p-2"},l.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",l.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&l.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},l.a.createElement("div",{className:"content-header bg-dark"},l.a.createElement("div",{className:"w-100"},l.a.createElement("div",{className:"input-group"},l.a.createElement("div",{className:"input-group-prepend"},l.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},l.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),l.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(r["c"])(e=>{var a=e.header;return{header:a}})(h);class v extends l.a.Component{render(){return l.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},l.a.createElement("div",{className:"content py-0"},l.a.createElement("div",{className:"row font-size-sm"},l.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},l.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),l.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},l.a.createElement("a",{className:"font-w600",href:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),l.a.createElement("span",{"data-toggle":"year-copy"})))))}}class E extends l.a.Component{render(){return l.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},l.a.createElement(p,this.props),l.a.createElement(u,{search:this.props.search}),this.props.loading?l.a.createElement("main",{id:"main-container"},l.a.createElement("div",{className:"content content-full"},l.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},l.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,l.a.createElement(v,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(E)},"cD2/":function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return u});var n=t("jehZ"),l=t.n(n),i=(t("BoS7"),t("Sdc0")),s=(t("+L6B"),t("2/Rp")),r=(t("miYZ"),t("tsqr")),c=t("p0pE"),m=t.n(c),o=t("q1tI"),p=t.n(o),d=t("Bl7J"),h=t("t3Un");class u extends p.a.Component{constructor(){super(...arguments),this.state={invite:{},site:{},pay:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(h["a"])("/admin/config/fetch").then(e=>{200===e.code&&this.setState(m()({},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]:m()({},this.state[e],{[a]:t})})}render(){return p.a.createElement(d["a"],l()({},this.props,{loading:this.state.loading}),p.a.createElement("main",{id:"main-container"},p.a.createElement("div",{className:"content content-full"},p.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u652f\u4ed8\u914d\u7f6e"),p.a.createElement("div",{className:"block block-rounded block-bordered"},p.a.createElement("div",{className:"block-header block-header-default"},p.a.createElement("h3",{className:"block-title"},"\u652f\u4ed8\u5b9d\u5f53\u9762\u4ed8"),p.a.createElement("div",{className:"block-options"},p.a.createElement(s["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),p.a.createElement("div",{className:"block-content"},p.a.createElement("div",{className:"row push"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u542f\u7528"),p.a.createElement("div",null,p.a.createElement(i["a"],{checked:parseInt(this.state.pay.alipay_enable),onChange:e=>this.set("pay","alipay_enable",e?1:0)}))),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"APPID"),p.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))})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u516c\u94a5"),p.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)})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u79c1\u94a5"),p.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)})))))),p.a.createElement("div",{className:"block block-rounded block-bordered"},p.a.createElement("div",{className:"block-header block-header-default"},p.a.createElement("h3",{className:"block-title"},"Stripe"),p.a.createElement("div",{className:"block-options"},p.a.createElement(s["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),p.a.createElement("div",{className:"block-content"},p.a.createElement("div",{className:"row"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"alert alert-primary",role:"alert"},p.a.createElement("p",{class:"mb-0"},"Stripe\u7684Webhook\u8def\u5f84\u4e3a\uff1a ",p.a.createElement("a",{className:"alert-link",href:"javascript:void(0)"},"/api/v1/guest/order/stripeNotify"))))),p.a.createElement("div",{className:"row push"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u542f\u7528\u652f\u4ed8\u5b9d\u6536\u6b3e"),p.a.createElement("div",null,p.a.createElement(i["a"],{checked:parseInt(this.state.pay.stripe_alipay_enable),onChange:e=>this.set("pay","stripe_alipay_enable",e?1:0)}))),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u542f\u7528\u5fae\u4fe1\u6536\u6b3e"),p.a.createElement("div",null,p.a.createElement(i["a"],{checked:parseInt(this.state.pay.stripe_wepay_enable),onChange:e=>this.set("pay","stripe_wepay_enable",e?1:0)}))),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"SK_LIVE"),p.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)})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"PK_LIVE"),p.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)})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"WebHook\u5bc6\u94a5\u7b7e\u540d"),p.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)})))))),p.a.createElement("div",{className:"block block-rounded block-bordered"},p.a.createElement("div",{className:"block-header block-header-default"},p.a.createElement("h3",{className:"block-title"},"BitpayX"),p.a.createElement("div",{className:"block-options"},p.a.createElement(s["a"],{type:"primary",onClick:()=>this.submit("pay")},"\u4fdd\u5b58"))),p.a.createElement("div",{className:"block-content"},p.a.createElement("div",{className:"row"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"alert alert-primary",role:"alert"},p.a.createElement("p",{class:"mb-0"},"\u5982\u679c\u4f60\u6ca1\u6709BitpayX\u7684\u4fe1\u606f\uff0c\u8bf7 ",p.a.createElement("a",{className:"alert-link",href:"https://merchants.mugglepay.com/user/register?ref=MP8F751FACEDB8"},"\u7533\u8bf7"),"\u3002")))),p.a.createElement("div",{className:"row push"},p.a.createElement("div",{className:"col-lg-8 col-xl-5"},p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"\u542f\u7528"),p.a.createElement("div",null,p.a.createElement(i["a"],{checked:parseInt(this.state.pay.bitpayx_enable),onChange:e=>this.set("pay","bitpayx_enable",e?1:0)}))),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input"},"AppSecret"),p.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.pay.bitpayx_appsecret,onChange:e=>this.set("pay","bitpayx_appsecret",e.target.value)})))))))))}}}}]); \ No newline at end of file diff --git a/public/p__admin__config__system.async.js b/public/p__admin__config__system.async.js index 6cf92bc2..90c1e018 100644 --- a/public/p__admin__config__system.async.js +++ b/public/p__admin__config__system.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[3],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),l=t("3a4m"),s=t.n(l),r=t("/MKj"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{s.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(r["c"])(e=>{var a=e.header;return{header:a}})(o),p=t("t3Un");class h extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["a"])("/user/logout").then(e=>{s.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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(r["c"])(e=>{var a=e.header;return{header:a}})(h);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class E extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(E)},CqPd:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return E});var n=t("jehZ"),i=t.n(n),l=(t("BoS7"),t("Sdc0")),s=(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),u=t("Bl7J"),v=t("t3Un");class E extends h.a.Component{constructor(){super(...arguments),this.state={invite:{},site:{},server:{},tutorial:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(v["a"])("/admin/config/fetch").then(e=>{200===e.code&&this.setState(d()({},e.data,{loading:!1}))})}submit(e){Object(v["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(u["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"},"\u7cfb\u7edf\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\u7ad9\u70b9\u540d\u79f0",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("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u7ad9\u70b9URL\uff0c\u672b\u5c3e\u4e0d\u8981/",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"},"\u8ba2\u9605URL ",h.a.createElement(s["a"],{placement:"top",title:"\u7528\u4e8e\u8ba2\u9605\u6240\u4f7f\u7528\uff0c\u7559\u7a7a\u5219\u4e3a\u7ad9\u70b9URL\u3002"},h.a.createElement(r["a"],{type:"question-circle"}))),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u8ba2\u9605URL\uff0c\u672b\u5c3e\u4e0d\u8981/",defaultValue:this.state.site.subscribe_url,onChange:e=>this.set("site","subscribe_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(l["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(l["a"],{checked:parseInt(this.state.site.email_verify),onChange:e=>this.set("site","email_verify",e?1:0)}))),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u662f\u5426\u5141\u8bb8\u7528\u6237\u66f4\u6539\u8ba2\u9605"),h.a.createElement("div",null,h.a.createElement(l["a"],{checked:parseInt(this.state.site.plan_is_update),onChange:e=>this.set("site","plan_is_update",e?1:0)}))),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u66f4\u6539\u8ba2\u9605\u624b\u7eed\u8d39 ",h.a.createElement(s["a"],{placement:"top",title:"\u5347\u7ea7\u6216\u964d\u7ea7\u8ba2\u9605\u5c06\u6309\u7167\u5269\u4f59\u5929\u6570\u4e58\u4ee5\u624b\u7eed\u8d39\u8fdb\u884c\u5dee\u4ef7\u8ba1\u7b97\u3002"},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.plan_update_fee,onChange:e=>this.set("site","plan_update_fee",e.target.value)})))))),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&\u4f63\u91d1"),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(l["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\u5931\u6548 ",h.a.createElement(s["a"],{placement:"top",title:"\u5f00\u542f\u540e\u9080\u8bf7\u7801\u88ab\u4f7f\u7528\u540e\u5c06\u4e0d\u4f1a\u5931\u6548\uff0c\u5426\u5219\u4f7f\u7528\u8fc7\u540e\u5373\u5931\u6548\u3002"},h.a.createElement(r["a"],{type:"question-circle"}))),h.a.createElement("div",null,h.a.createElement(l["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)})))))),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"},"\u6559\u7a0b ",h.a.createElement(s["a"],{placement:"top",title:"\u4e3a\u7528\u6237\u63d0\u4f9bApple ID\uff0c\u8be5\u4fe1\u606f\u5c06\u4f1a\u5728\u6559\u7a0b\u5904\u4f53\u73b0\uff0c\u975e\u4ed8\u8d39\u7528\u6237\u5c06\u65e0\u6cd5\u770b\u5230\u3002"},h.a.createElement(r["a"],{type:"question-circle"}))),h.a.createElement("div",{className:"block-options"},h.a.createElement(c["a"],{type:"primary",onClick:()=>this.submit("tutorial")},"\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"},"Apple ID \u8d26\u53f7"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.tutorial.apple_id,onChange:e=>this.set("tutorial","apple_id",e.target.value)})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"Apple ID \u5bc6\u7801"),h.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.tutorial.apple_id_password,onChange:e=>this.set("tutorial","apple_id_password",e.target.value)})))))))))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[3],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),l=t("3a4m"),s=t.n(l),r=t("/MKj"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{s.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(r["c"])(e=>{var a=e.header;return{header:a}})(o),p=t("t3Un");class h extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["a"])("/user/logout").then(e=>{s.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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(r["c"])(e=>{var a=e.header;return{header:a}})(h);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class E extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(r["c"])(e=>{var a=e.header;return{header:a}})(E)},CqPd:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return E});var n=t("jehZ"),i=t.n(n),l=(t("BoS7"),t("Sdc0")),s=(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),u=t("Bl7J"),v=t("t3Un");class E extends h.a.Component{constructor(){super(...arguments),this.state={invite:{},site:{},server:{},tutorial:{},loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(v["a"])("/admin/config/fetch").then(e=>{200===e.code&&this.setState(d()({},e.data,{loading:!1}))})}submit(e){Object(v["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(u["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"},"\u7cfb\u7edf\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\u7ad9\u70b9\u540d\u79f0",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("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u7ad9\u70b9URL\uff0c\u672b\u5c3e\u4e0d\u8981/",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"},"\u8ba2\u9605URL ",h.a.createElement(s["a"],{placement:"top",title:"\u7528\u4e8e\u8ba2\u9605\u6240\u4f7f\u7528\uff0c\u7559\u7a7a\u5219\u4e3a\u7ad9\u70b9URL\u3002"},h.a.createElement(r["a"],{type:"question-circle"}))),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u8ba2\u9605URL\uff0c\u672b\u5c3e\u4e0d\u8981/",defaultValue:this.state.site.subscribe_url,onChange:e=>this.set("site","subscribe_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(l["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(l["a"],{checked:parseInt(this.state.site.email_verify),onChange:e=>this.set("site","email_verify",e?1:0)}))),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u662f\u5426\u5141\u8bb8\u7528\u6237\u66f4\u6539\u8ba2\u9605"),h.a.createElement("div",null,h.a.createElement(l["a"],{checked:parseInt(this.state.site.plan_is_update),onChange:e=>this.set("site","plan_is_update",e?1:0)}))),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"\u66f4\u6539\u8ba2\u9605\u624b\u7eed\u8d39 ",h.a.createElement(s["a"],{placement:"top",title:"\u5347\u7ea7\u6216\u964d\u7ea7\u8ba2\u9605\u5c06\u6309\u7167\u5269\u4f59\u5929\u6570\u4e58\u4ee5\u624b\u7eed\u8d39\u8fdb\u884c\u5dee\u4ef7\u8ba1\u7b97\u3002"},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.plan_update_fee,onChange:e=>this.set("site","plan_update_fee",e.target.value)})))))),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&\u4f63\u91d1"),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(l["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\u5931\u6548 ",h.a.createElement(s["a"],{placement:"top",title:"\u5f00\u542f\u540e\u9080\u8bf7\u7801\u88ab\u4f7f\u7528\u540e\u5c06\u4e0d\u4f1a\u5931\u6548\uff0c\u5426\u5219\u4f7f\u7528\u8fc7\u540e\u5373\u5931\u6548\u3002"},h.a.createElement(r["a"],{type:"question-circle"}))),h.a.createElement("div",null,h.a.createElement(l["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)})))))),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"},"\u6559\u7a0b ",h.a.createElement(s["a"],{placement:"top",title:"\u4e3a\u7528\u6237\u63d0\u4f9bApple ID\uff0c\u8be5\u4fe1\u606f\u5c06\u4f1a\u5728\u6559\u7a0b\u5904\u4f53\u73b0\uff0c\u975e\u4ed8\u8d39\u7528\u6237\u5c06\u65e0\u6cd5\u770b\u5230\u3002"},h.a.createElement(r["a"],{type:"question-circle"}))),h.a.createElement("div",{className:"block-options"},h.a.createElement(c["a"],{type:"primary",onClick:()=>this.submit("tutorial")},"\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"},"Apple ID \u8d26\u53f7"),h.a.createElement("input",{type:"text",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.tutorial.apple_id,onChange:e=>this.set("tutorial","apple_id",e.target.value)})),h.a.createElement("div",{className:"form-group"},h.a.createElement("label",{for:"example-text-input"},"Apple ID \u5bc6\u7801"),h.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165",defaultValue:this.state.tutorial.apple_id_password,onChange:e=>this.set("tutorial","apple_id_password",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 9fbb7b96..ff66fc47 100644 --- a/public/p__admin__dashboard.async.js +++ b/public/p__admin__dashboard.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"),l=t.n(s),c=t("/MKj"),r=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===r["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var v=Object(c["c"])(e=>{var a=e.header;return{header:a}})(p);class u 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===r["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(v,{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(u,null))}}a["a"]=Object(c["c"])(e=>{var a=e.header;return{header:a}})(f)},Cb5i:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return d});var n=t("p0pE"),i=t.n(n),s=t("q1tI"),l=t.n(s),c=t("Bl7J"),r=t("t3Un"),m=t("3a4m"),o=t.n(m);class d extends l.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(r["a"])("/admin/stat/getOverride").then(e=>{200===e.code&&(console.log(e),this.setState(i()({},e.data)))})}render(){return l.a.createElement(c["a"],this.props,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"},"\u603b\u89c8"),l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:"col-md-6 col-xl-3"},l.a.createElement("a",{className:"block block-rounded block-link-pop",href:"javascript:void(0)"},l.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},l.a.createElement("div",null,l.a.createElement("i",{className:"far si fa-2x si-wallet text-primary"})),l.a.createElement("div",{className:"ml-3 text-right"},l.a.createElement("p",{className:"font-size-h3 font-w300 mb-0"},this.state.month_income?(this.state.month_income/100).toFixed(2):"-"),l.a.createElement("p",{className:"text-muted mb-0"},"\u672c\u6708\u6536\u5165"))))),l.a.createElement("div",{className:"col-md-6 col-xl-3"},l.a.createElement("a",{className:"block block-rounded block-link-pop",href:"javascript:void(0)"},l.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},l.a.createElement("div",null,l.a.createElement("i",{className:"far si fa-2x si-users text-primary"})),l.a.createElement("div",{className:"ml-3 text-right"},l.a.createElement("p",{className:"font-size-h3 font-w300 mb-0"},this.state.month_register_total?this.state.month_register_total:"-"),l.a.createElement("p",{className:"text-muted mb-0"},"\u672c\u6708\u65b0\u589e\u7528\u6237"))))),l.a.createElement("div",{className:"col-md-6 col-xl-3"},l.a.createElement("a",{className:"block block-rounded block-link-pop",href:"javascript:void(0)",onClick:()=>o.a.push("/admin/ticket")},l.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},l.a.createElement("div",null,l.a.createElement("i",{className:"far si fa-2x si-support text-primary"})),l.a.createElement("div",{className:"ml-3 text-right"},l.a.createElement("p",{className:"font-size-h3 font-w300 mb-0"},this.state.ticket_pendding_total?this.state.ticket_pendding_total:"-"),l.a.createElement("p",{className:"text-muted mb-0"},"\u4ee3\u529e\u5de5\u5355"))))),l.a.createElement("div",{className:"col-md-6 col-xl-3"},l.a.createElement("a",{className:"block block-rounded block-link-pop",href:"javascript:void(0)",onClick:()=>o.a.push("/admin/commission")},l.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},l.a.createElement("div",null,l.a.createElement("i",{className:"far si fa-2x si-user-following text-primary"})),l.a.createElement("div",{className:"ml-3 text-right"},l.a.createElement("p",{className:"font-size-h3 font-w300 mb-0"},this.state.commission_pendding_total?this.state.commission_pendding_total:"-"),l.a.createElement("p",{className:"text-muted mb-0"},"\u4f63\u91d1\u5f85\u786e\u8ba4")))))))))}}}}]); \ 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"),l=t.n(s),c=t("/MKj"),r=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===r["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var v=Object(c["c"])(e=>{var a=e.header;return{header:a}})(p);class u 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===r["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(v,{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(u,null))}}a["a"]=Object(c["c"])(e=>{var a=e.header;return{header:a}})(f)},Cb5i:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return d});var n=t("p0pE"),i=t.n(n),s=t("q1tI"),l=t.n(s),c=t("Bl7J"),r=t("t3Un"),m=t("3a4m"),o=t.n(m);class d extends l.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(r["a"])("/admin/stat/getOverride").then(e=>{200===e.code&&(console.log(e),this.setState(i()({},e.data)))})}render(){return l.a.createElement(c["a"],this.props,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"},"\u603b\u89c8"),l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:"col-md-6 col-xl-3"},l.a.createElement("a",{className:"block block-rounded block-link-pop",href:"javascript:void(0)"},l.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},l.a.createElement("div",null,l.a.createElement("i",{className:"far si fa-2x si-wallet text-primary"})),l.a.createElement("div",{className:"ml-3 text-right"},l.a.createElement("p",{className:"font-size-h3 font-w300 mb-0"},this.state.month_income?(this.state.month_income/100).toFixed(2):"-"),l.a.createElement("p",{className:"text-muted mb-0"},"\u672c\u6708\u6536\u5165"))))),l.a.createElement("div",{className:"col-md-6 col-xl-3"},l.a.createElement("a",{className:"block block-rounded block-link-pop",href:"javascript:void(0)"},l.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},l.a.createElement("div",null,l.a.createElement("i",{className:"far si fa-2x si-users text-primary"})),l.a.createElement("div",{className:"ml-3 text-right"},l.a.createElement("p",{className:"font-size-h3 font-w300 mb-0"},this.state.month_register_total?this.state.month_register_total:"-"),l.a.createElement("p",{className:"text-muted mb-0"},"\u672c\u6708\u65b0\u589e\u7528\u6237"))))),l.a.createElement("div",{className:"col-md-6 col-xl-3"},l.a.createElement("a",{className:"block block-rounded block-link-pop",href:"javascript:void(0)",onClick:()=>o.a.push("/admin/ticket")},l.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},l.a.createElement("div",null,l.a.createElement("i",{className:"far si fa-2x si-support text-primary"})),l.a.createElement("div",{className:"ml-3 text-right"},l.a.createElement("p",{className:"font-size-h3 font-w300 mb-0"},this.state.ticket_pendding_total?this.state.ticket_pendding_total:"-"),l.a.createElement("p",{className:"text-muted mb-0"},"\u4ee3\u529e\u5de5\u5355"))))),l.a.createElement("div",{className:"col-md-6 col-xl-3"},l.a.createElement("a",{className:"block block-rounded block-link-pop",href:"javascript:void(0)",onClick:()=>o.a.push("/admin/commission")},l.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},l.a.createElement("div",null,l.a.createElement("i",{className:"far si fa-2x si-user-following text-primary"})),l.a.createElement("div",{className:"ml-3 text-right"},l.a.createElement("p",{className:"font-size-h3 font-w300 mb-0"},this.state.commission_pendding_total?this.state.commission_pendding_total:"-"),l.a.createElement("p",{className:"text-muted mb-0"},"\u4f63\u91d1\u5f85\u786e\u8ba4")))))))))}}}}]); \ No newline at end of file diff --git a/public/p__admin__notice.async.js b/public/p__admin__notice.async.js index 2a752cbc..83dd20ab 100644 --- a/public/p__admin__notice.async.js +++ b/public/p__admin__notice.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),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},Yzce:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return f});var i=a("jehZ"),n=a.n(i),s=(a("2qtc"),a("kLXV")),r=(a("5NDa"),a("5rEg")),l=a("p0pE"),c=a.n(l),m=(a("g9YV"),a("wCAj")),o=(a("Pwec"),a("CtXQ")),d=(a("/zsF"),a("PArb")),h=a("q1tI"),p=a.n(h),u=a("Bl7J"),v=a("t3Un"),b=(a("LbTH"),a("wd/R")),E=a.n(b);class f extends p.a.Component{constructor(){super(...arguments),this.state={visible:!1,submit:{},notices:[],loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(v["a"])("/admin/notice/fetch").then(e=>{200===e.code&&this.setState({notices:e.data,loading:!1})})}modalVisible(){this.setState({visible:!this.state.visible},()=>{this.state.visible||this.setState({submit:{}})})}save(){var e="/admin/notice/save";this.state.submit.id&&(e="/admin/notice/update"),Object(v["b"])(e,this.state.submit).then(e=>{200===e.code&&(this.modalVisible(),this.fetchData())})}drop(e){Object(v["b"])("/admin/notice/drop",{id:e.id}).then(e=>{200===e.code&&this.fetchData()})}render(){var e=[{title:"#",dataIndex:"id",key:"id"},{title:"\u6807\u9898",dataIndex:"title",key:"title"},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",align:"right",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t,a)=>{return p.a.createElement("div",null,p.a.createElement("a",{onClick:()=>this.setState({submit:this.state.notices[a]},()=>this.modalVisible()),href:"javascript:void(0)"},"\u7f16\u8f91"),p.a.createElement(d["a"],{type:"vertical"}),p.a.createElement("a",{onClick:()=>this.drop(t),href:"javascript:void(0)"},"\u5220\u9664"))}}];return p.a.createElement(u["a"],n()({},this.props,{loading:this.state.loading}),p.a.createElement("main",{id:"main-container"},p.a.createElement("div",{className:"content content-full"},p.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},p.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u516c\u544a\u7ba1\u7406"),p.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},p.a.createElement(o["a"],{type:"plus"})," \u65b0\u5efa\u516c\u544a")),p.a.createElement("div",{className:"bg-white"},p.a.createElement(m["a"],{dataSource:this.state.notices,pagination:!1,columns:e,scroll:{x:950}})))),p.a.createElement(s["a"],{title:"".concat(this.state.submit.id?"\u7f16\u8f91\u516c\u544a":"\u65b0\u5efa\u516c\u544a"),visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.save()},p.a.createElement("div",null,p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input-alt"},"\u6807\u9898"),p.a.createElement(r["a"],{placeholder:"\u8bf7\u8f93\u5165\u516c\u544a\u6807\u9898",value:this.state.submit.title,onChange:e=>{this.setState({submit:c()({},this.state.submit,{title:e.target.value})})}})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input-alt"},"\u516c\u544a\u5185\u5bb9"),p.a.createElement(r["a"].TextArea,{rows:12,value:this.state.submit.content,placeholder:"\u8bf7\u8f93\u5165\u516c\u544a\u5185\u5bb9",onChange:e=>{this.setState({submit:c()({},this.state.submit,{content:e.target.value})})}})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input-alt"},"\u56fe\u7247URL"),p.a.createElement(r["a"],{placeholder:"\u8bf7\u8f93\u5165\u56fe\u7247URL",value:this.state.submit.img_url,onChange:e=>{this.setState({submit:c()({},this.state.submit,{img_url:e.target.value})})}})))))}}}}]); \ 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),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},Yzce:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return f});var i=a("jehZ"),n=a.n(i),s=(a("2qtc"),a("kLXV")),r=(a("5NDa"),a("5rEg")),l=a("p0pE"),c=a.n(l),m=(a("g9YV"),a("wCAj")),o=(a("Pwec"),a("CtXQ")),d=(a("/zsF"),a("PArb")),h=a("q1tI"),p=a.n(h),u=a("Bl7J"),v=a("t3Un"),b=(a("LbTH"),a("wd/R")),E=a.n(b);class f extends p.a.Component{constructor(){super(...arguments),this.state={visible:!1,submit:{},notices:[],loading:!0}}componentDidMount(){this.fetchData()}fetchData(){Object(v["a"])("/admin/notice/fetch").then(e=>{200===e.code&&this.setState({notices:e.data,loading:!1})})}modalVisible(){this.setState({visible:!this.state.visible},()=>{this.state.visible||this.setState({submit:{}})})}save(){var e="/admin/notice/save";this.state.submit.id&&(e="/admin/notice/update"),Object(v["b"])(e,this.state.submit).then(e=>{200===e.code&&(this.modalVisible(),this.fetchData())})}drop(e){Object(v["b"])("/admin/notice/drop",{id:e.id}).then(e=>{200===e.code&&this.fetchData()})}render(){var e=[{title:"#",dataIndex:"id",key:"id"},{title:"\u6807\u9898",dataIndex:"title",key:"title"},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",align:"right",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t,a)=>{return p.a.createElement("div",null,p.a.createElement("a",{onClick:()=>this.setState({submit:this.state.notices[a]},()=>this.modalVisible()),href:"javascript:void(0)"},"\u7f16\u8f91"),p.a.createElement(d["a"],{type:"vertical"}),p.a.createElement("a",{onClick:()=>this.drop(t),href:"javascript:void(0)"},"\u5220\u9664"))}}];return p.a.createElement(u["a"],n()({},this.props,{loading:this.state.loading}),p.a.createElement("main",{id:"main-container"},p.a.createElement("div",{className:"content content-full"},p.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},p.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u516c\u544a\u7ba1\u7406"),p.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},p.a.createElement(o["a"],{type:"plus"})," \u65b0\u5efa\u516c\u544a")),p.a.createElement("div",{className:"bg-white"},p.a.createElement(m["a"],{dataSource:this.state.notices,pagination:!1,columns:e,scroll:{x:950}})))),p.a.createElement(s["a"],{title:"".concat(this.state.submit.id?"\u7f16\u8f91\u516c\u544a":"\u65b0\u5efa\u516c\u544a"),visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.save()},p.a.createElement("div",null,p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input-alt"},"\u6807\u9898"),p.a.createElement(r["a"],{placeholder:"\u8bf7\u8f93\u5165\u516c\u544a\u6807\u9898",value:this.state.submit.title,onChange:e=>{this.setState({submit:c()({},this.state.submit,{title:e.target.value})})}})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input-alt"},"\u516c\u544a\u5185\u5bb9"),p.a.createElement(r["a"].TextArea,{rows:12,value:this.state.submit.content,placeholder:"\u8bf7\u8f93\u5165\u516c\u544a\u5185\u5bb9",onChange:e=>{this.setState({submit:c()({},this.state.submit,{content:e.target.value})})}})),p.a.createElement("div",{className:"form-group"},p.a.createElement("label",{for:"example-text-input-alt"},"\u56fe\u7247URL"),p.a.createElement(r["a"],{placeholder:"\u8bf7\u8f93\u5165\u56fe\u7247URL",value:this.state.submit.img_url,onChange:e=>{this.setState({submit:c()({},this.state.submit,{img_url:e.target.value})})}})))))}}}}]); \ No newline at end of file diff --git a/public/p__admin__order.async.js b/public/p__admin__order.async.js index 3e22042f..db360b69 100644 --- a/public/p__admin__order.async.js +++ b/public/p__admin__order.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[6],{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"),c=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class E 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.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 ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(E,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(v)},GSUD:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return k});var n=a("jehZ"),i=a.n(n),s=(a("g9YV"),a("wCAj")),r=(a("qVdP"),a("jsC+")),l=(a("Awhp"),a("KrTs")),c=(a("lUTK"),a("BvKs")),o=(a("5Dmo"),a("3S7+")),m=(a("Pwec"),a("CtXQ")),d=(a("miYZ"),a("tsqr")),h=a("p0pE"),p=a.n(h),u=a("q1tI"),E=a.n(u),v=a("Bl7J"),g=a("t3Un"),f=a("LbTH"),y=a("wd/R"),b=a.n(y),N=a("p8mO");class k extends E.a.Component{constructor(){super(...arguments),this.state={orders:[],pagination:{current:1,pageSize:10,total:0},trade_no:void 0,loading:!0,selectOrder:void 0}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=p()({},this.state.pagination),this.state.trade_no&&Object.assign(e,{trade_no:this.state.trade_no}),Object(g["a"])("/admin/order/fetch",e).then(e=>{200===e.code&&this.setState({orders:e.data,pagination:p()({},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,pagination:p()({},this.state.pagination,{current:1})},()=>{this.fetchData()})}.bind(this),400)}update(e,t){Object(g["b"])("/admin/order/update",{trade_no:e,status:t}).then(e=>{200===e.code&&e.data&&(d["a"].success("\u64cd\u4f5c\u6210\u529f"),this.fetchData())})}render(){var e=[{title:"# \u8ba2\u5355\u53f7",dataIndex:"trade_no",key:"trade_no",render:(e,t)=>{return E.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.setState({selectOrder:t})},e)}},{title:"\u8ba2\u9605\u8ba1\u5212",dataIndex:"plan_name",key:"plan_name"},{title:"\u5468\u671f",dataIndex:"cycle",key:"cycle",align:"center",render:(e,t)=>{return E.a.createElement("span",{className:"badge badge-pill badge-primary"},f["a"].cycleText[t.cycle])}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",align:"right",render:e=>{return(e/100).toFixed(2)}},{title:E.a.createElement("span",null,"\u8ba2\u5355\u72b6\u6001 ",E.a.createElement(o["a"],{placement:"top",title:"\u6807\u8bb0\u4e3a[\u5df2\u652f\u4ed8]\u540e\u5c06\u4f1a\u7531\u7cfb\u7edf\u8fdb\u884c\u5f00\u901a\u540e\u5e76\u5b8c\u6210"},E.a.createElement(m["a"],{type:"question-circle"}))),dataIndex:"status",key:"status",render:(e,t)=>{var a=["error","processing","default","success"];return E.a.createElement("div",null,E.a.createElement(r["a"],{trigger:["click"],overlay:E.a.createElement(c["a"],null,E.a.createElement(c["a"].Item,{key:"0",disabled:0===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u672a\u652f\u4ed8"),E.a.createElement(c["a"].Item,{key:"1",disabled:1===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u652f\u4ed8"),E.a.createElement(c["a"].Item,{key:"2",disabled:2===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u53d6\u6d88"),E.a.createElement(c["a"].Item,{key:"3",disabled:3===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u5b8c\u6210"))},E.a.createElement("div",null,E.a.createElement(l["a"],{status:a[e]}),E.a.createElement("span",null,f["a"].orderStatusText[e]," "),E.a.createElement("a",{href:"javascript:void(0)"},"\u6807\u8bb0\u4e3a ",E.a.createElement(m["a"],{type:"caret-down"})))))}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",align:"right",render:e=>{return b()(1e3*e).format("YYYY/MM/DD HH:mm")}}];return E.a.createElement(v["a"],i()({},this.props,{loading:this.state.loading,search:{placeholder:"\u901a\u8fc7\u8ba2\u5355\u53f7\u641c\u7d22",onChange:e=>this.searchOnChange(e)}}),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"},"\u8ba2\u5355\u7ba1\u7406")),E.a.createElement("div",{className:"bg-white"},E.a.createElement(s["a"],{dataSource:this.state.orders,pagination:p()({},this.state.pagination,{size:"small"}),columns:e,scroll:{x:1050},onChange:e=>this.paginationOnChange(e)})))),E.a.createElement(N["a"],{order:this.state.selectOrder,onClose:()=>this.setState({selectOrder:void 0})}))}}},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},p8mO:function(e,t,a){"use strict";a.d(t,"a",function(){return v});a("2qtc");var n=a("kLXV"),i=(a("Pwec"),a("CtXQ")),s=(a("/zsF"),a("PArb")),r=(a("14J3"),a("BMrR")),l=(a("jCWc"),a("kPKH")),c=a("q1tI"),o=a.n(c),m=a("t3Un"),d=a("LbTH"),h=a("wd/R"),p=a.n(h),u=a("3a4m"),E=a.n(u);class v extends o.a.Component{constructor(){super(...arguments),this.state={order:{},user:{},invite_user:{}}}componentDidUpdate(){this.getUserInfo()}getUserInfo(){this.state.user.email||this.props.order&&(Object(m["a"])("/admin/user/id2UserInfo/"+this.props.order.user_id).then(e=>{200===e.code&&this.setState({user:e.data,order:this.props.order})}),this.props.order.invite_user_id&&Object(m["a"])("/admin/user/id2UserInfo/"+this.props.order.invite_user_id).then(e=>{this.setState({invite_user:e.data})}))}render(){var e={marginBottom:10};return console.log(this.props,this.state),o.a.createElement(n["a"],{visible:this.props.order,title:"\u8ba2\u5355\u4fe1\u606f",onCancel:()=>{this.setState({order:{},user:{}}),this.props.onClose()},footer:!1},this.state.user.email?o.a.createElement("div",null,o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u90ae\u7bb1"),o.a.createElement(l["a"],{span:18},o.a.createElement("a",{onClick:()=>E.a.push("/admin/user?email="+this.state.user.email),href:"javascript:void(0)"},this.state.user.email))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u53f7"),o.a.createElement(l["a"],{span:18},this.state.order.trade_no)),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u91d1\u989d"),o.a.createElement(l["a"],{span:18},(this.state.order.total_amount/100).toFixed(2))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u5468\u671f"),o.a.createElement(l["a"],{span:18},d["a"].cycleText[this.state.order.cycle])),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u72b6\u6001"),o.a.createElement(l["a"],{span:18},d["a"].orderStatusText[this.state.order.status])),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u9605\u8ba1\u5212"),o.a.createElement(l["a"],{span:18},this.state.order.plan_name)),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u7f51\u5173\u5355\u53f7"),o.a.createElement(l["a"],{span:18},this.state.order.callback_no?this.state.order.callback_no:"-")),o.a.createElement(s["a"],null),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u521b\u5efa\u65f6\u95f4"),o.a.createElement(l["a"],{span:18},p()(1e3*this.state.order.created_at).format("YYYY/MM/DD HH:mm:ss"))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u66f4\u65b0\u65f6\u95f4"),o.a.createElement(l["a"],{span:18},p()(1e3*this.state.order.updated_at).format("YYYY/MM/DD HH:mm:ss"))),this.state.order.invite_user_id&&o.a.createElement("div",null,o.a.createElement(s["a"],null),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u9080\u8bf7\u4eba"),o.a.createElement(l["a"],{span:18},o.a.createElement("a",{onClick:()=>E.a.push("/admin/user?email="+this.state.invite_user.email),href:"javascript:void(0)"},this.state.invite_user.email))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u4f63\u91d1\u91d1\u989d"),o.a.createElement(l["a"],{span:18},(this.state.order.commission_balance/100).toFixed(2))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u4f63\u91d1\u72b6\u6001"),o.a.createElement(l["a"],{span:18},d["a"].commissionStatusText[this.state.order.commission_status])))):o.a.createElement(i["a"],{type:"loading",style:{fontSize:24,color:"#415A94"}}))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[6],{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"),c=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class E 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),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 ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(E,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(v)},GSUD:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return k});var n=a("jehZ"),i=a.n(n),s=(a("g9YV"),a("wCAj")),r=(a("qVdP"),a("jsC+")),l=(a("Awhp"),a("KrTs")),c=(a("lUTK"),a("BvKs")),o=(a("5Dmo"),a("3S7+")),m=(a("Pwec"),a("CtXQ")),d=(a("miYZ"),a("tsqr")),h=a("p0pE"),p=a.n(h),u=a("q1tI"),E=a.n(u),v=a("Bl7J"),g=a("t3Un"),f=a("LbTH"),y=a("wd/R"),b=a.n(y),N=a("p8mO");class k extends E.a.Component{constructor(){super(...arguments),this.state={orders:[],pagination:{current:1,pageSize:10,total:0},trade_no:void 0,loading:!0,selectOrder:void 0}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=p()({},this.state.pagination),this.state.trade_no&&Object.assign(e,{trade_no:this.state.trade_no}),Object(g["a"])("/admin/order/fetch",e).then(e=>{200===e.code&&this.setState({orders:e.data,pagination:p()({},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,pagination:p()({},this.state.pagination,{current:1})},()=>{this.fetchData()})}.bind(this),400)}update(e,t){Object(g["b"])("/admin/order/update",{trade_no:e,status:t}).then(e=>{200===e.code&&e.data&&(d["a"].success("\u64cd\u4f5c\u6210\u529f"),this.fetchData())})}render(){var e=[{title:"# \u8ba2\u5355\u53f7",dataIndex:"trade_no",key:"trade_no",render:(e,t)=>{return E.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.setState({selectOrder:t})},e)}},{title:"\u8ba2\u9605\u8ba1\u5212",dataIndex:"plan_name",key:"plan_name"},{title:"\u5468\u671f",dataIndex:"cycle",key:"cycle",align:"center",render:(e,t)=>{return E.a.createElement("span",{className:"badge badge-pill badge-primary"},f["a"].cycleText[t.cycle])}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",align:"right",render:e=>{return(e/100).toFixed(2)}},{title:E.a.createElement("span",null,"\u8ba2\u5355\u72b6\u6001 ",E.a.createElement(o["a"],{placement:"top",title:"\u6807\u8bb0\u4e3a[\u5df2\u652f\u4ed8]\u540e\u5c06\u4f1a\u7531\u7cfb\u7edf\u8fdb\u884c\u5f00\u901a\u540e\u5e76\u5b8c\u6210"},E.a.createElement(m["a"],{type:"question-circle"}))),dataIndex:"status",key:"status",render:(e,t)=>{var a=["error","processing","default","success"];return E.a.createElement("div",null,E.a.createElement(r["a"],{trigger:["click"],overlay:E.a.createElement(c["a"],null,E.a.createElement(c["a"].Item,{key:"0",disabled:0===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u672a\u652f\u4ed8"),E.a.createElement(c["a"].Item,{key:"1",disabled:1===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u652f\u4ed8"),E.a.createElement(c["a"].Item,{key:"2",disabled:2===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u53d6\u6d88"),E.a.createElement(c["a"].Item,{key:"3",disabled:3===e,onClick:e=>{this.update(t.trade_no,e.key)}},"\u5df2\u5b8c\u6210"))},E.a.createElement("div",null,E.a.createElement(l["a"],{status:a[e]}),E.a.createElement("span",null,f["a"].orderStatusText[e]," "),E.a.createElement("a",{href:"javascript:void(0)"},"\u6807\u8bb0\u4e3a ",E.a.createElement(m["a"],{type:"caret-down"})))))}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",align:"right",render:e=>{return b()(1e3*e).format("YYYY/MM/DD HH:mm")}}];return E.a.createElement(v["a"],i()({},this.props,{loading:this.state.loading,search:{placeholder:"\u901a\u8fc7\u8ba2\u5355\u53f7\u641c\u7d22",onChange:e=>this.searchOnChange(e)}}),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"},"\u8ba2\u5355\u7ba1\u7406")),E.a.createElement("div",{className:"bg-white"},E.a.createElement(s["a"],{dataSource:this.state.orders,pagination:p()({},this.state.pagination,{size:"small"}),columns:e,scroll:{x:1050},onChange:e=>this.paginationOnChange(e)})))),E.a.createElement(N["a"],{order:this.state.selectOrder,onClose:()=>this.setState({selectOrder:void 0})}))}}},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},p8mO:function(e,t,a){"use strict";a.d(t,"a",function(){return v});a("2qtc");var n=a("kLXV"),i=(a("Pwec"),a("CtXQ")),s=(a("/zsF"),a("PArb")),r=(a("14J3"),a("BMrR")),l=(a("jCWc"),a("kPKH")),c=a("q1tI"),o=a.n(c),m=a("t3Un"),d=a("LbTH"),h=a("wd/R"),p=a.n(h),u=a("3a4m"),E=a.n(u);class v extends o.a.Component{constructor(){super(...arguments),this.state={order:{},user:{},invite_user:{}}}componentDidUpdate(){this.getUserInfo()}getUserInfo(){this.state.user.email||this.props.order&&(Object(m["a"])("/admin/user/id2UserInfo/"+this.props.order.user_id).then(e=>{200===e.code&&this.setState({user:e.data,order:this.props.order})}),this.props.order.invite_user_id&&Object(m["a"])("/admin/user/id2UserInfo/"+this.props.order.invite_user_id).then(e=>{this.setState({invite_user:e.data})}))}render(){var e={marginBottom:10};return console.log(this.props,this.state),o.a.createElement(n["a"],{visible:this.props.order,title:"\u8ba2\u5355\u4fe1\u606f",onCancel:()=>{this.setState({order:{},user:{}}),this.props.onClose()},footer:!1},this.state.user.email?o.a.createElement("div",null,o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u90ae\u7bb1"),o.a.createElement(l["a"],{span:18},o.a.createElement("a",{onClick:()=>E.a.push("/admin/user?email="+this.state.user.email),href:"javascript:void(0)"},this.state.user.email))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u53f7"),o.a.createElement(l["a"],{span:18},this.state.order.trade_no)),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u91d1\u989d"),o.a.createElement(l["a"],{span:18},(this.state.order.total_amount/100).toFixed(2))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u5468\u671f"),o.a.createElement(l["a"],{span:18},d["a"].cycleText[this.state.order.cycle])),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u5355\u72b6\u6001"),o.a.createElement(l["a"],{span:18},d["a"].orderStatusText[this.state.order.status])),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u8ba2\u9605\u8ba1\u5212"),o.a.createElement(l["a"],{span:18},this.state.order.plan_name)),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u7f51\u5173\u5355\u53f7"),o.a.createElement(l["a"],{span:18},this.state.order.callback_no?this.state.order.callback_no:"-")),o.a.createElement(s["a"],null),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u521b\u5efa\u65f6\u95f4"),o.a.createElement(l["a"],{span:18},p()(1e3*this.state.order.created_at).format("YYYY/MM/DD HH:mm:ss"))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u66f4\u65b0\u65f6\u95f4"),o.a.createElement(l["a"],{span:18},p()(1e3*this.state.order.updated_at).format("YYYY/MM/DD HH:mm:ss"))),this.state.order.invite_user_id&&o.a.createElement("div",null,o.a.createElement(s["a"],null),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u9080\u8bf7\u4eba"),o.a.createElement(l["a"],{span:18},o.a.createElement("a",{onClick:()=>E.a.push("/admin/user?email="+this.state.invite_user.email),href:"javascript:void(0)"},this.state.invite_user.email))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u4f63\u91d1\u91d1\u989d"),o.a.createElement(l["a"],{span:18},(this.state.order.commission_balance/100).toFixed(2))),o.a.createElement(r["a"],{gutter:[16,16],style:e},o.a.createElement(l["a"],{span:6},"\u4f63\u91d1\u72b6\u6001"),o.a.createElement(l["a"],{span:18},d["a"].commissionStatusText[this.state.order.commission_status])))):o.a.createElement(i["a"],{type:"loading",style:{fontSize:24,color:"#415A94"}}))}}}}]); \ No newline at end of file diff --git a/public/p__admin__plan.async.js b/public/p__admin__plan.async.js index 6d08b44f..4be851bd 100644 --- a/public/p__admin__plan.async.js +++ b/public/p__admin__plan.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[7],{Bl7J:function(e,t,a){"use strict";var i=a("q1tI"),n=a.n(i),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(b)},yjin:function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),s=(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("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),b=a("q1tI"),g=a.n(b),E=a("Bl7J"),f=a("/MKj"),y=a("t3Un");class N extends g.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/fetch").then(e=>{200===e.code&&this.setState({group:e.data})}),Object(y["a"])("/admin/plan/fetch").then(e=>{200===e.code&&(e.data.map((t,a)=>{e.data[a].month_price=null!==e.data[a].month_price?e.data[a].month_price/100:null,e.data[a].quarter_price=null!==e.data[a].quarter_price?e.data[a].quarter_price/100:null,e.data[a].half_year_price=null!==e.data[a].half_year_price?e.data[a].half_year_price/100:null,e.data[a].year_price=null!==e.data[a].year_price?e.data[a].year_price/100:null}),this.setState({plan:e.data,loading:!1}))})}create(){console.log(this.state),Object(y["b"])("/admin/plan/save",v()({},this.state.submit,{month_price:null!==this.state.submit.month_price?100*this.state.submit.month_price:null,quarter_price:null!==this.state.submit.quarter_price?100*this.state.submit.quarter_price:null,half_year_price:null!==this.state.submit.half_year_price?100*this.state.submit.half_year_price:null,year_price:null!==this.state.submit.year_price?100*this.state.submit.year_price:null})).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?t:null})})}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(g.a.createElement(p["a"],null,t.name))}),a}},{title:"\u6708\u4ed8\u552e\u4ef7",dataIndex:"month_price",key:"month_price",render:e=>{return null!==e?e.toFixed(2):"-"}},{title:"\u5b63\u4ed8\u552e\u4ef7",dataIndex:"quarter_price",key:"quarter_price",render:e=>{return console.log(e),null!==e?e.toFixed(2):"-"}},{title:"\u534a\u5e74\u4ed8\u552e\u4ef7",dataIndex:"half_year_price",key:"half_year_price",render:e=>{return null!==e?e.toFixed(2):"-"}},{title:"\u5e74\u4ed8\u552e\u4ef7",dataIndex:"year_price",key:"year_price",render:e=>{return null!==e?e.toFixed(2):"-"}},{title:"\u9500\u552e\u72b6\u6001",dataIndex:"show",key:"show",align:"center",render:(e,t)=>{return g.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:g.a.createElement("span",null,"\u7eed\u8d39 ",g.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"},g.a.createElement(d["a"],{type:"question-circle"}))),dataIndex:"renew",key:"renew",align:"center",render:(e,t)=>{return g.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 g.a.createElement("div",null,g.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.edit(a)},"\u7f16\u8f91"),g.a.createElement(m["a"],{type:"vertical"}),g.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.drop(t.id)},"\u5220\u9664"))}}];return g.a.createElement(E["a"],n()({},this.props,{loading:this.state.loading}),g.a.createElement("main",{id:"main-container"},g.a.createElement("div",{className:"content content-full"},g.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},g.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u9605\u7ba1\u7406"),g.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},g.a.createElement(d["a"],{type:"plus"})," \u65b0\u5efa\u5957\u9910")),g.a.createElement("div",{className:"bg-white"},g.a.createElement(c["a"],{dataSource:this.state.plan,columns:e,pagination:!1,scroll:{x:1e3}})))),g.a.createElement(s["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()},g.a.createElement("div",null,g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u540d\u79f0"),g.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})})}})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u63cf\u8ff0"),g.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})})}})),g.a.createElement(m["a"],{orientation:"center"},"\u552e\u4ef7\u8bbe\u7f6e ",g.a.createElement(o["a"],{placement:"top",title:"\u5c06\u91d1\u989d\u7559\u7a7a\u5219\u4e0d\u4f1a\u8fdb\u884c\u51fa\u552e"},g.a.createElement(d["a"],{type:"info-circle"}))),g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"form-group col-3"},g.a.createElement("label",{for:"example-text-input-alt"},"\u6708\u4ed8"),g.a.createElement(l["a"],{value:null!==this.state.submit.month_price?this.state.submit.month_price:void 0,onChange:e=>this.priceOnChange("month_price",e.target.value)})),g.a.createElement("div",{className:"form-group col-3"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5b63\u4ed8"),g.a.createElement(l["a"],{value:null!==this.state.submit.quarter_price?this.state.submit.quarter_price:void 0,onChange:e=>this.priceOnChange("quarter_price",e.target.value)})),g.a.createElement("div",{className:"form-group col-3"},g.a.createElement("label",{for:"example-text-input-alt"},"\u534a\u5e74"),g.a.createElement(l["a"],{value:null!==this.state.submit.half_year_price?this.state.submit.half_year_price:void 0,onChange:e=>this.priceOnChange("half_year_price",e.target.value)})),g.a.createElement("div",{className:"form-group col-3"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5e74\u4ed8"),g.a.createElement(l["a"],{value:null!==this.state.submit.year_price?this.state.submit.year_price:void 0,onChange:e=>this.priceOnChange("year_price",e.target.value)}))),g.a.createElement(m["a"],null),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u6d41\u91cf(GB)"),g.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})})}})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u6743\u9650\u7ec4"),g.a.createElement(r["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 g.a.createElement(r["a"].Option,{key:e.id},e.name)}))))))}}t["default"]=Object(f["c"])()(N)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[7],{Bl7J:function(e,t,a){"use strict";var i=a("q1tI"),n=a.n(i),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(b)},yjin:function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),s=(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("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),b=a("q1tI"),g=a.n(b),E=a("Bl7J"),f=a("/MKj"),y=a("t3Un");class N extends g.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/fetch").then(e=>{200===e.code&&this.setState({group:e.data})}),Object(y["a"])("/admin/plan/fetch").then(e=>{200===e.code&&(e.data.map((t,a)=>{e.data[a].month_price=null!==e.data[a].month_price?e.data[a].month_price/100:null,e.data[a].quarter_price=null!==e.data[a].quarter_price?e.data[a].quarter_price/100:null,e.data[a].half_year_price=null!==e.data[a].half_year_price?e.data[a].half_year_price/100:null,e.data[a].year_price=null!==e.data[a].year_price?e.data[a].year_price/100:null}),this.setState({plan:e.data,loading:!1}))})}create(){console.log(this.state),Object(y["b"])("/admin/plan/save",v()({},this.state.submit,{month_price:null!==this.state.submit.month_price?100*this.state.submit.month_price:null,quarter_price:null!==this.state.submit.quarter_price?100*this.state.submit.quarter_price:null,half_year_price:null!==this.state.submit.half_year_price?100*this.state.submit.half_year_price:null,year_price:null!==this.state.submit.year_price?100*this.state.submit.year_price:null})).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?t:null})})}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(g.a.createElement(p["a"],null,t.name))}),a}},{title:"\u6708\u4ed8\u552e\u4ef7",dataIndex:"month_price",key:"month_price",render:e=>{return null!==e?e.toFixed(2):"-"}},{title:"\u5b63\u4ed8\u552e\u4ef7",dataIndex:"quarter_price",key:"quarter_price",render:e=>{return console.log(e),null!==e?e.toFixed(2):"-"}},{title:"\u534a\u5e74\u4ed8\u552e\u4ef7",dataIndex:"half_year_price",key:"half_year_price",render:e=>{return null!==e?e.toFixed(2):"-"}},{title:"\u5e74\u4ed8\u552e\u4ef7",dataIndex:"year_price",key:"year_price",render:e=>{return null!==e?e.toFixed(2):"-"}},{title:"\u9500\u552e\u72b6\u6001",dataIndex:"show",key:"show",align:"center",render:(e,t)=>{return g.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:g.a.createElement("span",null,"\u7eed\u8d39 ",g.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"},g.a.createElement(d["a"],{type:"question-circle"}))),dataIndex:"renew",key:"renew",align:"center",render:(e,t)=>{return g.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 g.a.createElement("div",null,g.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.edit(a)},"\u7f16\u8f91"),g.a.createElement(m["a"],{type:"vertical"}),g.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.drop(t.id)},"\u5220\u9664"))}}];return g.a.createElement(E["a"],n()({},this.props,{loading:this.state.loading}),g.a.createElement("main",{id:"main-container"},g.a.createElement("div",{className:"content content-full"},g.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},g.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u9605\u7ba1\u7406"),g.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},g.a.createElement(d["a"],{type:"plus"})," \u65b0\u5efa\u5957\u9910")),g.a.createElement("div",{className:"bg-white"},g.a.createElement(c["a"],{dataSource:this.state.plan,columns:e,pagination:!1,scroll:{x:1e3}})))),g.a.createElement(s["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()},g.a.createElement("div",null,g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u540d\u79f0"),g.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})})}})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u63cf\u8ff0"),g.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})})}})),g.a.createElement(m["a"],{orientation:"center"},"\u552e\u4ef7\u8bbe\u7f6e ",g.a.createElement(o["a"],{placement:"top",title:"\u5c06\u91d1\u989d\u7559\u7a7a\u5219\u4e0d\u4f1a\u8fdb\u884c\u51fa\u552e"},g.a.createElement(d["a"],{type:"info-circle"}))),g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"form-group col-3"},g.a.createElement("label",{for:"example-text-input-alt"},"\u6708\u4ed8"),g.a.createElement(l["a"],{value:null!==this.state.submit.month_price?this.state.submit.month_price:void 0,onChange:e=>this.priceOnChange("month_price",e.target.value)})),g.a.createElement("div",{className:"form-group col-3"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5b63\u4ed8"),g.a.createElement(l["a"],{value:null!==this.state.submit.quarter_price?this.state.submit.quarter_price:void 0,onChange:e=>this.priceOnChange("quarter_price",e.target.value)})),g.a.createElement("div",{className:"form-group col-3"},g.a.createElement("label",{for:"example-text-input-alt"},"\u534a\u5e74"),g.a.createElement(l["a"],{value:null!==this.state.submit.half_year_price?this.state.submit.half_year_price:void 0,onChange:e=>this.priceOnChange("half_year_price",e.target.value)})),g.a.createElement("div",{className:"form-group col-3"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5e74\u4ed8"),g.a.createElement(l["a"],{value:null!==this.state.submit.year_price?this.state.submit.year_price:void 0,onChange:e=>this.priceOnChange("year_price",e.target.value)}))),g.a.createElement(m["a"],null),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5957\u9910\u6d41\u91cf(GB)"),g.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})})}})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u6743\u9650\u7ec4"),g.a.createElement(r["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 g.a.createElement(r["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 130bb444..dffa71bc 100644 --- a/public/p__admin__server.async.js +++ b/public/p__admin__server.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[8],{"6G7H":function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),s=(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"),b=a.n(v),E=a("q1tI"),g=a.n(E),f=a("Bl7J"),N=a("/MKj"),w=a("t3Un");class y extends g.a.Component{constructor(){super(...arguments),this.state={server:[],group:[],visible:!1,submit:{tls:0,rate:1,tags:[]},loading:!0},this.moveRow=((e,t)=>{console.log(e,t)})}componentDidMount(){this.fetchData()}fetchData(){Object(w["a"])("/admin/server/fetch",{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/fetch").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:b()({},this.state.server[e]),visible:!0})}render(){var e=[{title:"\u8282\u70b9ID",dataIndex:"id",key:"id"},{title:g.a.createElement("span",null,"\u5728\u7ebf ",g.a.createElement(p["a"],{placement:"top",title:"\u4e94\u5206\u949f\u5185\u8282\u70b9\u5728\u7ebf\u60c5\u51b5"},g.a.createElement(u["a"],{type:"question-circle"}))),dataIndex:"last_check_at",key:"last_check_at",align:"center",render:e=>{return g.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,i=[];return a.map(e=>{this.state.group.map(t=>{if(t.id===parseInt(e))return i.push(g.a.createElement(d["a"],null,t.name))})}),i}},{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:g.a.createElement(p["a"],{placement:"top",title:"\u4f7f\u7528\u7684\u6d41\u91cf\u5c06\u4e58\u4ee5\u500d\u7387\u8fdb\u884c\u6263\u9664"},"\u500d\u7387 ",g.a.createElement(u["a"],{type:"question-circle"})),dataIndex:"rate",key:"rate",align:"center",render:e=>{return g.a.createElement(d["a"],{color:"blue",style:{minWidth:60}},e+" x")}},{title:"\u663e\u9690",dataIndex:"show",key:"show",align:"center",render:(e,t)=>{return g.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 g.a.createElement("div",null,g.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.edit(a)},"\u7f16\u8f91"),g.a.createElement(m["a"],{type:"vertical"}),g.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.drop(t.id)},"\u5220\u9664"))}}];return g.a.createElement(f["a"],n()({},this.props,{loading:this.state.loading}),g.a.createElement("main",{id:"main-container"},g.a.createElement("div",{className:"content content-full"},g.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},g.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8282\u70b9\u7ba1\u7406"),g.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u6dfb\u52a0\u8282\u70b9")),g.a.createElement("div",{className:"bg-white"},g.a.createElement(c["a"],{dataSource:this.state.server,columns:e,pagination:!1,scroll:{x:1e3},onRow:(e,t)=>({index:t,moveRow:this.moveRow})})))),g.a.createElement(s["a"],{title:"\u65b0\u5efa\u8282\u70b9",visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.submit()},g.a.createElement("div",null,g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"form-group col-8"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u540d\u79f0"),g.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u8282\u70b9\u540d\u79f0",value:this.state.submit.name,onChange:e=>{this.setState({submit:b()({},this.state.submit,{name:e.target.value})})}})),g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u500d\u7387"),g.a.createElement(l["a"],{addonAfter:"x",placeholder:"\u8bf7\u8f93\u5165\u8282\u70b9\u500d\u7387",value:this.state.submit.rate,onChange:e=>{this.setState({submit:b()({},this.state.submit,{rate:e.target.value})})}}))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u6807\u7b7e"),g.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:b()({},this.state.submit,{tags:e})})}})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u6743\u9650\u7ec4"),g.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:b()({},this.state.submit,{group_id:e})})}},this.state.group.map(e=>{return g.a.createElement(r["a"].Option,{key:e.id},e.name)}))),g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"form-group col-8"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u5730\u5740"),g.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u8fde\u63a5\u5730\u5740",value:this.state.submit.host,onChange:e=>{this.setState({submit:b()({},this.state.submit,{host:e.target.value})})}})),g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u652f\u6301TLS"),g.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:b()({},this.state.submit,{tls:e})})}},g.a.createElement(r["a"].Option,{key:0},"\u4e0d\u652f\u6301"),g.a.createElement(r["a"].Option,{key:1},"\u652f\u6301")))),g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8fde\u63a5\u7aef\u53e3"),g.a.createElement(l["a"],{placeholder:"\u7528\u6237\u8fde\u63a5\u7aef\u53e3",value:this.state.submit.port,onChange:e=>{this.setState({submit:b()({},this.state.submit,{port:e.target.value,server_port:e.target.value})})}})),g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u670d\u52a1\u7aef\u53e3"),g.a.createElement(l["a"],{placeholder:"\u975eNAT\u540c\u8fde\u63a5\u7aef\u53e3",value:this.state.submit.server_port,onChange:e=>{this.setState({submit:b()({},this.state.submit,{server_port:e.target.value})})}})),g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u4f20\u8f93\u534f\u8bae"),g.a.createElement(r["a"],{value:this.state.submit.network,placeholder:"\u9009\u62e9\u4f20\u8f93\u534f\u8bae",style:{width:"100%"},onChange:e=>{this.setState({submit:b()({},this.state.submit,{network:e})})}},g.a.createElement(r["a"].Option,{value:"tcp"},"TCP"),g.a.createElement(r["a"].Option,{value:"ws"},"WebSocket")))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u534f\u8bae\u8be6\u7ec6\u914d\u7f6e ",g.a.createElement("a",{href:"https://www.v2ray.com/chapter_02/05_transport.html"},g.a.createElement(u["a"],{type:"link"}),"\u53c2\u8003")),g.a.createElement(l["a"].TextArea,{value:this.state.submit.settings,rows:4,onChange:e=>{this.setState({submit:b()({},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 i=a("q1tI"),n=a.n(i),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(b)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[8],{"6G7H":function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),s=(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"),b=a.n(v),E=a("q1tI"),g=a.n(E),f=a("Bl7J"),N=a("/MKj"),w=a("t3Un");class y extends g.a.Component{constructor(){super(...arguments),this.state={server:[],group:[],visible:!1,submit:{tls:0,rate:1,tags:[]},loading:!0},this.moveRow=((e,t)=>{console.log(e,t)})}componentDidMount(){this.fetchData()}fetchData(){Object(w["a"])("/admin/server/fetch",{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/fetch").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:b()({},this.state.server[e]),visible:!0})}render(){var e=[{title:"\u8282\u70b9ID",dataIndex:"id",key:"id"},{title:g.a.createElement("span",null,"\u5728\u7ebf ",g.a.createElement(p["a"],{placement:"top",title:"\u4e94\u5206\u949f\u5185\u8282\u70b9\u5728\u7ebf\u60c5\u51b5"},g.a.createElement(u["a"],{type:"question-circle"}))),dataIndex:"last_check_at",key:"last_check_at",align:"center",render:e=>{return g.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,i=[];return a.map(e=>{this.state.group.map(t=>{if(t.id===parseInt(e))return i.push(g.a.createElement(d["a"],null,t.name))})}),i}},{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:g.a.createElement(p["a"],{placement:"top",title:"\u4f7f\u7528\u7684\u6d41\u91cf\u5c06\u4e58\u4ee5\u500d\u7387\u8fdb\u884c\u6263\u9664"},"\u500d\u7387 ",g.a.createElement(u["a"],{type:"question-circle"})),dataIndex:"rate",key:"rate",align:"center",render:e=>{return g.a.createElement(d["a"],{color:"blue",style:{minWidth:60}},e+" x")}},{title:"\u663e\u9690",dataIndex:"show",key:"show",align:"center",render:(e,t)=>{return g.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 g.a.createElement("div",null,g.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.edit(a)},"\u7f16\u8f91"),g.a.createElement(m["a"],{type:"vertical"}),g.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.drop(t.id)},"\u5220\u9664"))}}];return g.a.createElement(f["a"],n()({},this.props,{loading:this.state.loading}),g.a.createElement("main",{id:"main-container"},g.a.createElement("div",{className:"content content-full"},g.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},g.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8282\u70b9\u7ba1\u7406"),g.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u6dfb\u52a0\u8282\u70b9")),g.a.createElement("div",{className:"bg-white"},g.a.createElement(c["a"],{dataSource:this.state.server,columns:e,pagination:!1,scroll:{x:1e3},onRow:(e,t)=>({index:t,moveRow:this.moveRow})})))),g.a.createElement(s["a"],{title:"\u65b0\u5efa\u8282\u70b9",visible:this.state.visible,onCancel:()=>this.modalVisible(),onOk:()=>this.submit()},g.a.createElement("div",null,g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"form-group col-8"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u540d\u79f0"),g.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u8282\u70b9\u540d\u79f0",value:this.state.submit.name,onChange:e=>{this.setState({submit:b()({},this.state.submit,{name:e.target.value})})}})),g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u500d\u7387"),g.a.createElement(l["a"],{addonAfter:"x",placeholder:"\u8bf7\u8f93\u5165\u8282\u70b9\u500d\u7387",value:this.state.submit.rate,onChange:e=>{this.setState({submit:b()({},this.state.submit,{rate:e.target.value})})}}))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u6807\u7b7e"),g.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:b()({},this.state.submit,{tags:e})})}})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u6743\u9650\u7ec4"),g.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:b()({},this.state.submit,{group_id:e})})}},this.state.group.map(e=>{return g.a.createElement(r["a"].Option,{key:e.id},e.name)}))),g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"form-group col-8"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8282\u70b9\u5730\u5740"),g.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u8fde\u63a5\u5730\u5740",value:this.state.submit.host,onChange:e=>{this.setState({submit:b()({},this.state.submit,{host:e.target.value})})}})),g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u652f\u6301TLS"),g.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:b()({},this.state.submit,{tls:e})})}},g.a.createElement(r["a"].Option,{key:0},"\u4e0d\u652f\u6301"),g.a.createElement(r["a"].Option,{key:1},"\u652f\u6301")))),g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8fde\u63a5\u7aef\u53e3"),g.a.createElement(l["a"],{placeholder:"\u7528\u6237\u8fde\u63a5\u7aef\u53e3",value:this.state.submit.port,onChange:e=>{this.setState({submit:b()({},this.state.submit,{port:e.target.value,server_port:e.target.value})})}})),g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u670d\u52a1\u7aef\u53e3"),g.a.createElement(l["a"],{placeholder:"\u975eNAT\u540c\u8fde\u63a5\u7aef\u53e3",value:this.state.submit.server_port,onChange:e=>{this.setState({submit:b()({},this.state.submit,{server_port:e.target.value})})}})),g.a.createElement("div",{className:"form-group col-4"},g.a.createElement("label",{for:"example-text-input-alt"},"\u4f20\u8f93\u534f\u8bae"),g.a.createElement(r["a"],{value:this.state.submit.network,placeholder:"\u9009\u62e9\u4f20\u8f93\u534f\u8bae",style:{width:"100%"},onChange:e=>{this.setState({submit:b()({},this.state.submit,{network:e})})}},g.a.createElement(r["a"].Option,{value:"tcp"},"TCP"),g.a.createElement(r["a"].Option,{value:"ws"},"WebSocket")))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u534f\u8bae\u8be6\u7ec6\u914d\u7f6e ",g.a.createElement("a",{href:"https://www.v2ray.com/chapter_02/05_transport.html"},g.a.createElement(u["a"],{type:"link"}),"\u53c2\u8003")),g.a.createElement(l["a"].TextArea,{value:this.state.submit.settings,rows:4,onChange:e=>{this.setState({submit:b()({},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 i=a("q1tI"),n=a.n(i),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(b)}}]); \ 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 3d2b3c87..8ccb0f09 100644 --- a/public/p__admin__server__group.async.js +++ b/public/p__admin__server__group.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[9],{AWr6:function(e,a,t){"use strict";t.r(a);var i=t("jehZ"),n=t.n(i),s=(t("2qtc"),t("kLXV")),r=(t("5NDa"),t("5rEg")),l=(t("g9YV"),t("wCAj")),c=(t("/zsF"),t("PArb")),m=t("p0pE"),o=t.n(m),d=t("q1tI"),h=t.n(d),p=t("Bl7J"),u=t("/MKj"),v=t("t3Un");class b 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/fetch").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:o()({},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:void(0)",onClick:()=>this.edit(t)},"\u7f16\u8f91"),h.a.createElement(c["a"],{type:"vertical"}),h.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.drop(a.id)},"\u5220\u9664"))}}];return h.a.createElement(p["a"],n()({},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:o()({},this.state.submit,{name:e.target.value})})}})))))}}a["default"]=Object(u["c"])()(b)},Bl7J:function(e,a,t){"use strict";var i=t("q1tI"),n=t.n(i),s=t("3a4m"),r=t.n(s),l=t("/MKj"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],a=[{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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:a}):this.setState({nav:e})}renderMenu(e,a,t,i){switch(e){case"heading":return n.a.createElement("li",{className:"nav-main-heading"},a);case"item":return n.a.createElement("li",{className:"nav-main-item"},n.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"})}},i&&i,n.a.createElement("span",{className:"nav-main-link-name"},a)))}}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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(b)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[9],{AWr6:function(e,a,t){"use strict";t.r(a);var i=t("jehZ"),n=t.n(i),s=(t("2qtc"),t("kLXV")),r=(t("5NDa"),t("5rEg")),l=(t("g9YV"),t("wCAj")),c=(t("/zsF"),t("PArb")),m=t("p0pE"),o=t.n(m),d=t("q1tI"),h=t.n(d),p=t("Bl7J"),u=t("/MKj"),v=t("t3Un");class b 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/fetch").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:o()({},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:void(0)",onClick:()=>this.edit(t)},"\u7f16\u8f91"),h.a.createElement(c["a"],{type:"vertical"}),h.a.createElement("a",{href:"javascript:void(0)",onClick:()=>this.drop(a.id)},"\u5220\u9664"))}}];return h.a.createElement(p["a"],n()({},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:o()({},this.state.submit,{name:e.target.value})})}})))))}}a["default"]=Object(u["c"])()(b)},Bl7J:function(e,a,t){"use strict";var i=t("q1tI"),n=t.n(i),s=t("3a4m"),r=t.n(s),l=t("/MKj"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],a=[{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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:a}):this.setState({nav:e})}renderMenu(e,a,t,i){switch(e){case"heading":return n.a.createElement("li",{className:"nav-main-heading"},a);case"item":return n.a.createElement("li",{className:"nav-main-item"},n.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"})}},i&&i,n.a.createElement("span",{className:"nav-main-link-name"},a)))}}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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(b)}}]); \ No newline at end of file diff --git a/public/p__admin__ticket.async.js b/public/p__admin__ticket.async.js index 2dda20e5..a4cf91f5 100644 --- a/public/p__admin__ticket.async.js +++ b/public/p__admin__ticket.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[10],{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"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class E extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(E)},kcgX:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=(t("g9YV"),t("wCAj")),r=(t("/zsF"),t("PArb")),l=(t("Awhp"),t("KrTs")),c=t("q1tI"),m=t.n(c),o=t("Bl7J"),d=t("/MKj"),h=t("t3Un"),p=t("3a4m"),u=t.n(p),v=t("wd/R"),E=t.n(v);class f extends m.a.Component{constructor(){super(...arguments),this.state={tickets:[],loading:!0,visible:!1,submit:{level:1}}}componentDidMount(){this.fetchData()}fetchData(){Object(h["a"])("/admin/ticket/fetch").then(e=>{200===e.code&&this.setState({tickets:e.data,loading:!1})})}close(e){Object(h["b"])("/admin/ticket/close",{id:e}).then(e=>{200===e.code&&this.fetchData()})}render(){var e=["\u4f4e","\u4e2d","\u9ad8"],a=[{title:"#",dataIndex:"id",key:"id"},{title:"\u4e3b\u9898",dataIndex:"subject",key:"subject"},{title:"\u5de5\u5355\u7ea7\u522b",dataIndex:"level",key:"level",render:a=>{return e[a]}},{title:"\u5de5\u5355\u72b6\u6001",dataIndex:"reply_status",key:"reply_status",render:(e,a)=>{return 1===a.status?m.a.createElement("span",null,m.a.createElement(l["a"],{status:"success"}),"\u5df2\u5173\u95ed"):m.a.createElement("span",null,m.a.createElement(l["a"],{status:e?"processing":"error"}),e?"\u5df2\u56de\u590d":"\u5f85\u56de\u590d")}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u6700\u540e\u56de\u590d",dataIndex:"updated_at",key:"updated_at",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return m.a.createElement("div",null,m.a.createElement("a",{href:"javascript:void(0)",onClick:()=>u.a.push("/admin/ticket/"+a.id)},"\u67e5\u770b"),m.a.createElement(r["a"],{type:"vertical"}),m.a.createElement("a",{disabled:a.status,href:"javascript:void(0)",onClick:()=>this.close(a.id)},"\u5173\u95ed"))}}];return m.a.createElement(o["a"],i()({},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"},"\u5de5\u5355\u7ba1\u7406")),m.a.createElement("div",{className:"bg-white"},m.a.createElement(s["a"],{dataSource:this.state.tickets,columns:a,pagination:!1,scroll:{x:900}})))))}}a["default"]=Object(d["c"])()(f)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[10],{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"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class E extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(E)},kcgX:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=(t("g9YV"),t("wCAj")),r=(t("/zsF"),t("PArb")),l=(t("Awhp"),t("KrTs")),c=t("q1tI"),m=t.n(c),o=t("Bl7J"),d=t("/MKj"),h=t("t3Un"),p=t("3a4m"),u=t.n(p),v=t("wd/R"),E=t.n(v);class f extends m.a.Component{constructor(){super(...arguments),this.state={tickets:[],loading:!0,visible:!1,submit:{level:1}}}componentDidMount(){this.fetchData()}fetchData(){Object(h["a"])("/admin/ticket/fetch").then(e=>{200===e.code&&this.setState({tickets:e.data,loading:!1})})}close(e){Object(h["b"])("/admin/ticket/close",{id:e}).then(e=>{200===e.code&&this.fetchData()})}render(){var e=["\u4f4e","\u4e2d","\u9ad8"],a=[{title:"#",dataIndex:"id",key:"id"},{title:"\u4e3b\u9898",dataIndex:"subject",key:"subject"},{title:"\u5de5\u5355\u7ea7\u522b",dataIndex:"level",key:"level",render:a=>{return e[a]}},{title:"\u5de5\u5355\u72b6\u6001",dataIndex:"reply_status",key:"reply_status",render:(e,a)=>{return 1===a.status?m.a.createElement("span",null,m.a.createElement(l["a"],{status:"success"}),"\u5df2\u5173\u95ed"):m.a.createElement("span",null,m.a.createElement(l["a"],{status:e?"processing":"error"}),e?"\u5df2\u56de\u590d":"\u5f85\u56de\u590d")}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u6700\u540e\u56de\u590d",dataIndex:"updated_at",key:"updated_at",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return m.a.createElement("div",null,m.a.createElement("a",{href:"javascript:void(0)",onClick:()=>u.a.push("/admin/ticket/"+a.id)},"\u67e5\u770b"),m.a.createElement(r["a"],{type:"vertical"}),m.a.createElement("a",{disabled:a.status,href:"javascript:void(0)",onClick:()=>this.close(a.id)},"\u5173\u95ed"))}}];return m.a.createElement(o["a"],i()({},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"},"\u5de5\u5355\u7ba1\u7406")),m.a.createElement("div",{className:"bg-white"},m.a.createElement(s["a"],{dataSource:this.state.tickets,columns:a,pagination:!1,scroll:{x:900}})))))}}a["default"]=Object(d["c"])()(f)}}]); \ No newline at end of file diff --git a/public/p__admin__ticket__$ticket_id.async.js b/public/p__admin__ticket__$ticket_id.async.js index 745f7bbf..43abb48c 100644 --- a/public/p__admin__ticket__$ticket_id.async.js +++ b/public/p__admin__ticket__$ticket_id.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),i=a.n(n),s=a("3a4m"),r=a.n(s),c=a("/MKj"),l=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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 ".concat(1===l["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(c["c"])(e=>{var t=e.header;return{header:t}})(p);class f 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.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 ".concat(1===l["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(f,null))}}t["a"]=Object(c["c"])(e=>{var t=e.header;return{header:t}})(v)},Lre1:function(e,t,a){"use strict";a.r(t);var n,i=a("jehZ"),s=a.n(i),r=(a("miYZ"),a("tsqr")),c=a("p0pE"),l=a.n(c),o=a("q1tI"),m=a.n(o),d=a("Bl7J"),h=a("/MKj"),p=a("t3Un"),u=(a("yWgo"),a("yW/I"));class f extends m.a.Component{constructor(){super(...arguments),this.state={message:[],loading:!0,submit:{},sendLoading:!1,user:{}}}componentDidMount(){this.fetchData(e=>{this.id2UserInfo(e.user_id)}),n=(()=>setTimeout(()=>{this.fetchData(),"function"===typeof n&&n()},5e3)),n()}componentWillUnmount(){n=void 0}id2UserInfo(e){Object(p["a"])("/admin/user/id2UserInfo/"+e).then(e=>{200===e.code&&this.setState({user:e.data})})}fetchData(e){Object(p["a"])("/admin/ticket/fetch",{id:this.props.match.params.ticket_id}).then(t=>{200===t.code&&this.setState(l()({},t.data,{loading:!1}),()=>{"function"===typeof e&&e(t.data)})})}reply(e){this.setState({sendLoading:!0},()=>{r["a"].loading("\u53d1\u9001\u4e2d"),Object(p["b"])("/admin/ticket/reply",l()({id:this.props.match.params.ticket_id},this.state.submit)).then(t=>{r["a"].destroy(),this.setState({sendLoading:!1}),200===t.code&&(r["a"].success("\u53d1\u9001\u6210\u529f"),this.fetchData(),this.setState({submit:{}},()=>{e()}))})})}render(){return console.log(this.state),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"},"# \u5de5\u5355",this.props.match.params.ticket_id)),m.a.createElement(u["a"],{title:this.state.user.email,description:"\u7528\u6237",message:this.state.message,onKeyDown:(e,t)=>{13!==e.keyCode||this.state.sendLoading||this.reply(t)},onChange:e=>{this.setState({submit:{message:e.target.value}})}}))))}}t["default"]=Object(h["c"])()(f)},"yW/I":function(e,t,a){"use strict";a.d(t,"a",function(){return c});var n=a("q1tI"),i=a.n(n),s=a("wd/R"),r=a.n(s);class c extends i.a.Component{constructor(){super(...arguments),this.state={},this.chatCount=0}componentDidMount(){this.chatScroll()}componentDidUpdate(){this.chatCount!==this.props.message.length&&(this.chatCount=this.props.message.length,this.chatScroll())}chatScroll(){this.refs.chat&&this.refs.chat.scrollTo(0,this.refs.chat.scrollHeight)}render(){return i.a.createElement("div",{className:"block block-rounded"},i.a.createElement("div",{className:"block-content block-content-full bg-primary"},i.a.createElement("p",{className:"font-size-lg font-w600 text-white mt-0 mb-0"},this.props.title),i.a.createElement("p",{className:"text-white-75 mb-0"},this.props.description)),i.a.createElement("div",{className:"js-chat-messages block-content block-content-full text-wrap-break-word overflow-y-auto",style:{height:window.innerHeight-450},ref:"chat"},this.props.message.map(e=>{return e.is_me?i.a.createElement("div",null,i.a.createElement("div",{className:"font-size-sm font-italic text-muted animated fadeIn my-2 text-right"},r()(1e3*e.created_at).format("YYYY/MM/DD HH:mm")),i.a.createElement("div",{className:"text-right ml-4"},i.a.createElement("div",{className:"d-inline-block font-w600 animated fadeIn bg-body-light border-3x px-3 py-2 mb-2 shadow-sm mw-100 border-right border-primary rounded-left text-left"},e.message))):i.a.createElement("div",null,i.a.createElement("div",{className:"font-size-sm font-italic text-muted animated fadeIn my-2"},r()(1e3*e.created_at).format("YYYY/MM/DD HH:mm")),i.a.createElement("div",{className:"mr-4"},i.a.createElement("div",{className:"d-inline-block font-w600 animated fadeIn bg-body-light border-3x px-3 py-2 mb-2 shadow-sm mw-100 border-left border-dark rounded-right"},e.message)))})),i.a.createElement("div",{className:"js-chat-form block-content p-2 bg-body-dark"},i.a.createElement("input",{onKeyDown:e=>this.props.onKeyDown(e,()=>{this.refs.message&&(this.refs.message.value="")}),ref:"message",type:"text",className:"js-chat-input form-control form-control-alt",placeholder:"\u8f93\u5165\u5185\u5bb9\u56de\u590d\u5de5\u5355...",onChange:e=>this.props.onChange(e)})))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),i=a.n(n),s=a("3a4m"),r=a.n(s),c=a("/MKj"),l=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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 ".concat(1===l["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(c["c"])(e=>{var t=e.header;return{header:t}})(p);class f 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),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 ".concat(1===l["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(f,null))}}t["a"]=Object(c["c"])(e=>{var t=e.header;return{header:t}})(v)},Lre1:function(e,t,a){"use strict";a.r(t);var n,i=a("jehZ"),s=a.n(i),r=(a("miYZ"),a("tsqr")),c=a("p0pE"),l=a.n(c),o=a("q1tI"),m=a.n(o),d=a("Bl7J"),h=a("/MKj"),p=a("t3Un"),u=(a("yWgo"),a("yW/I"));class f extends m.a.Component{constructor(){super(...arguments),this.state={message:[],loading:!0,submit:{},sendLoading:!1,user:{}}}componentDidMount(){this.fetchData(e=>{this.id2UserInfo(e.user_id)}),n=(()=>setTimeout(()=>{this.fetchData(),"function"===typeof n&&n()},5e3)),n()}componentWillUnmount(){n=void 0}id2UserInfo(e){Object(p["a"])("/admin/user/id2UserInfo/"+e).then(e=>{200===e.code&&this.setState({user:e.data})})}fetchData(e){Object(p["a"])("/admin/ticket/fetch",{id:this.props.match.params.ticket_id}).then(t=>{200===t.code&&this.setState(l()({},t.data,{loading:!1}),()=>{"function"===typeof e&&e(t.data)})})}reply(e){this.setState({sendLoading:!0},()=>{r["a"].loading("\u53d1\u9001\u4e2d"),Object(p["b"])("/admin/ticket/reply",l()({id:this.props.match.params.ticket_id},this.state.submit)).then(t=>{r["a"].destroy(),this.setState({sendLoading:!1}),200===t.code&&(r["a"].success("\u53d1\u9001\u6210\u529f"),this.fetchData(),this.setState({submit:{}},()=>{e()}))})})}render(){return console.log(this.state),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"},"# \u5de5\u5355",this.props.match.params.ticket_id)),m.a.createElement(u["a"],{title:this.state.user.email,description:"\u7528\u6237",message:this.state.message,onKeyDown:(e,t)=>{13!==e.keyCode||this.state.sendLoading||this.reply(t)},onChange:e=>{this.setState({submit:{message:e.target.value}})}}))))}}t["default"]=Object(h["c"])()(f)},"yW/I":function(e,t,a){"use strict";a.d(t,"a",function(){return c});var n=a("q1tI"),i=a.n(n),s=a("wd/R"),r=a.n(s);class c extends i.a.Component{constructor(){super(...arguments),this.state={},this.chatCount=0}componentDidMount(){this.chatScroll()}componentDidUpdate(){this.chatCount!==this.props.message.length&&(this.chatCount=this.props.message.length,this.chatScroll())}chatScroll(){this.refs.chat&&this.refs.chat.scrollTo(0,this.refs.chat.scrollHeight)}render(){return i.a.createElement("div",{className:"block block-rounded"},i.a.createElement("div",{className:"block-content block-content-full bg-primary"},i.a.createElement("p",{className:"font-size-lg font-w600 text-white mt-0 mb-0"},this.props.title),i.a.createElement("p",{className:"text-white-75 mb-0"},this.props.description)),i.a.createElement("div",{className:"js-chat-messages block-content block-content-full text-wrap-break-word overflow-y-auto",style:{height:window.innerHeight-450},ref:"chat"},this.props.message.map(e=>{return e.is_me?i.a.createElement("div",null,i.a.createElement("div",{className:"font-size-sm font-italic text-muted animated fadeIn my-2 text-right"},r()(1e3*e.created_at).format("YYYY/MM/DD HH:mm")),i.a.createElement("div",{className:"text-right ml-4"},i.a.createElement("div",{className:"d-inline-block font-w600 animated fadeIn bg-body-light border-3x px-3 py-2 mb-2 shadow-sm mw-100 border-right border-primary rounded-left text-left"},e.message))):i.a.createElement("div",null,i.a.createElement("div",{className:"font-size-sm font-italic text-muted animated fadeIn my-2"},r()(1e3*e.created_at).format("YYYY/MM/DD HH:mm")),i.a.createElement("div",{className:"mr-4"},i.a.createElement("div",{className:"d-inline-block font-w600 animated fadeIn bg-body-light border-3x px-3 py-2 mb-2 shadow-sm mw-100 border-left border-dark rounded-right"},e.message)))})),i.a.createElement("div",{className:"js-chat-form block-content p-2 bg-body-dark"},i.a.createElement("input",{onKeyDown:e=>this.props.onKeyDown(e,()=>{this.refs.message&&(this.refs.message.value="")}),ref:"message",type:"text",className:"js-chat-input form-control form-control-alt",placeholder:"\u8f93\u5165\u5185\u5bb9\u56de\u590d\u5de5\u5355...",onChange:e=>this.props.onChange(e)})))}}}}]); \ No newline at end of file diff --git a/public/p__admin__user.async.js b/public/p__admin__user.async.js index 35684c32..19c35e30 100644 --- a/public/p__admin__user.async.js +++ b/public/p__admin__user.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{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"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class g extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(g)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},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),v=t("q1tI"),g=t.n(v),f=t("Bl7J"),b=t("t3Un"),E=(t("LbTH"),t("wd/R")),N=t.n(E);class y extends g.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,plan:[]}}componentDidMount(){this.fetchData(),this.getPlan(),this.props.location.query.email&&this.searchOnChange(this.props.location.query.email)}getPlan(){Object(b["a"])("/admin/plan/fetch").then(e=>{200===e.code&&this.setState({plan:e.data})})}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/fetch",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,pagination:u()({},this.state.pagination,{current:1})},()=>{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(){console.log(this.props.location.query.email);var e=[{title:"#",dataIndex:"id",key:"id"},{title:"\u90ae\u7bb1",dataIndex:"email",key:"email"},{title:"\u8ba2\u9605",dataIndex:"plan_name",key:"plan_name",render:e=>{return e||"-"}},{title:g.a.createElement("span",null,"\u5728\u7ebf ",g.a.createElement(d["a"],{placement:"top",title:"\u7528\u6237\u534a\u5c0f\u65f6\u5185\u5728\u7ebf\u60c5\u51b5"},g.a.createElement(h["a"],{type:"question-circle"}))),dataIndex:"t",key:"t",align:"center",render:e=>{return g.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:"\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 g.a.createElement("div",null,g.a.createElement("a",{onClick:()=>this.edit(t),href:"javascript:void(0)"},"\u7f16\u8f91"))}}];return g.a.createElement(f["a"],i()({},this.props,{search:{placeholder:"\u901a\u8fc7\u90ae\u7bb1\u641c\u7d22",onChange:e=>this.searchOnChange(e),defaultValue:this.state.email},loading:this.state.loading}),g.a.createElement("main",{id:"main-container"},g.a.createElement("div",{className:"content content-full"},g.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},g.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u7528\u6237\u7ba1\u7406")),g.a.createElement("div",{className:"bg-white"},g.a.createElement(m["a"],{dataSource:this.state.users,pagination:u()({},this.state.pagination,{size:"small"}),columns:e,scroll:{x:1100},onChange:e=>this.paginationOnChange(e)})))),g.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()},g.a.createElement("div",null,g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u90ae\u7bb1"),g.a.createElement(c["a"],{placeholder:"\u8bf7\u8f93\u5165\u90ae\u7bb1",value:this.state.submit.email,onChange:e=>this.formChange("email",e.target.value)})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5bc6\u7801"),g.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)})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u6d41\u91cf"),g.a.createElement(c["a"],{addonAfter:"GiB",value:this.state.submit.transfer_enable,placeholder:"\u8bf7\u8f93\u5165\u6d41\u91cf",onChange:e=>this.formChange("transfer_enable",e.target.value)})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5230\u671f\u65f6\u95f4"),g.a.createElement("div",null,g.a.createElement(l["a"],{placeholder:"\u8bf7\u9009\u62e9\u7528\u6237\u5230\u671f\u65e5\u671f",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"))}))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8ba2\u9605\u8ba1\u5212"),g.a.createElement(r["a"],{placeholder:"\u8bf7\u9009\u62e9\u7528\u6237\u8ba2\u9605\u8ba1\u5212",style:{width:"100%"},value:this.state.submit.plan_id?["".concat(this.state.submit.plan_id)]:void 0,onChange:e=>this.formChange("plan_id",e)},this.state.plan.map(e=>{return g.a.createElement(r["a"].Option,{key:e.id},e.name)}))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u5c01\u7981"),g.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)},g.a.createElement(r["a"].Option,{key:1},"\u662f"),g.a.createElement(r["a"].Option,{key:0},"\u5426"))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u63a8\u8350\u8fd4\u5229\u6bd4\u4f8b"),g.a.createElement(c["a"],{addonAfter:"%",value:this.state.submit.commission_rate,placeholder:"\u8bf7\u8f93\u5165\u63a8\u8350\u8fd4\u5229\u6bd4\u4f8b(\u4e3a\u7a7a\u5219\u8ddf\u968f\u7ad9\u70b9\u8bbe\u7f6e\u8fd4\u5229\u6bd4\u4f8b)",onChange:e=>this.formChange("commission_rate",e.target.value)})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u7ba1\u7406\u5458"),g.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)},g.a.createElement(r["a"].Option,{key:1},"\u662f"),g.a.createElement(r["a"].Option,{key:0},"\u5426"))))))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{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"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class g extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(g)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},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),v=t("q1tI"),g=t.n(v),f=t("Bl7J"),b=t("t3Un"),E=(t("LbTH"),t("wd/R")),N=t.n(E);class y extends g.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,plan:[]}}componentDidMount(){this.fetchData(),this.getPlan(),this.props.location.query.email&&this.searchOnChange(this.props.location.query.email)}getPlan(){Object(b["a"])("/admin/plan/fetch").then(e=>{200===e.code&&this.setState({plan:e.data})})}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/fetch",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,pagination:u()({},this.state.pagination,{current:1})},()=>{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(){console.log(this.props.location.query.email);var e=[{title:"#",dataIndex:"id",key:"id"},{title:"\u90ae\u7bb1",dataIndex:"email",key:"email"},{title:"\u8ba2\u9605",dataIndex:"plan_name",key:"plan_name",render:e=>{return e||"-"}},{title:g.a.createElement("span",null,"\u5728\u7ebf ",g.a.createElement(d["a"],{placement:"top",title:"\u7528\u6237\u534a\u5c0f\u65f6\u5185\u5728\u7ebf\u60c5\u51b5"},g.a.createElement(h["a"],{type:"question-circle"}))),dataIndex:"t",key:"t",align:"center",render:e=>{return g.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:"\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 g.a.createElement("div",null,g.a.createElement("a",{onClick:()=>this.edit(t),href:"javascript:void(0)"},"\u7f16\u8f91"))}}];return g.a.createElement(f["a"],i()({},this.props,{search:{placeholder:"\u901a\u8fc7\u90ae\u7bb1\u641c\u7d22",onChange:e=>this.searchOnChange(e),defaultValue:this.state.email},loading:this.state.loading}),g.a.createElement("main",{id:"main-container"},g.a.createElement("div",{className:"content content-full"},g.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},g.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u7528\u6237\u7ba1\u7406")),g.a.createElement("div",{className:"bg-white"},g.a.createElement(m["a"],{dataSource:this.state.users,pagination:u()({},this.state.pagination,{size:"small"}),columns:e,scroll:{x:1100},onChange:e=>this.paginationOnChange(e)})))),g.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()},g.a.createElement("div",null,g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u90ae\u7bb1"),g.a.createElement(c["a"],{placeholder:"\u8bf7\u8f93\u5165\u90ae\u7bb1",value:this.state.submit.email,onChange:e=>this.formChange("email",e.target.value)})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5bc6\u7801"),g.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)})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u6d41\u91cf"),g.a.createElement(c["a"],{addonAfter:"GiB",value:this.state.submit.transfer_enable,placeholder:"\u8bf7\u8f93\u5165\u6d41\u91cf",onChange:e=>this.formChange("transfer_enable",e.target.value)})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u5230\u671f\u65f6\u95f4"),g.a.createElement("div",null,g.a.createElement(l["a"],{placeholder:"\u8bf7\u9009\u62e9\u7528\u6237\u5230\u671f\u65e5\u671f",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"))}))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u8ba2\u9605\u8ba1\u5212"),g.a.createElement(r["a"],{placeholder:"\u8bf7\u9009\u62e9\u7528\u6237\u8ba2\u9605\u8ba1\u5212",style:{width:"100%"},value:this.state.submit.plan_id?["".concat(this.state.submit.plan_id)]:void 0,onChange:e=>this.formChange("plan_id",e)},this.state.plan.map(e=>{return g.a.createElement(r["a"].Option,{key:e.id},e.name)}))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u5c01\u7981"),g.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)},g.a.createElement(r["a"].Option,{key:1},"\u662f"),g.a.createElement(r["a"].Option,{key:0},"\u5426"))),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u63a8\u8350\u8fd4\u5229\u6bd4\u4f8b"),g.a.createElement(c["a"],{addonAfter:"%",value:this.state.submit.commission_rate,placeholder:"\u8bf7\u8f93\u5165\u63a8\u8350\u8fd4\u5229\u6bd4\u4f8b(\u4e3a\u7a7a\u5219\u8ddf\u968f\u7ad9\u70b9\u8bbe\u7f6e\u8fd4\u5229\u6bd4\u4f8b)",onChange:e=>this.formChange("commission_rate",e.target.value)})),g.a.createElement("div",{className:"form-group"},g.a.createElement("label",{for:"example-text-input-alt"},"\u662f\u5426\u7ba1\u7406\u5458"),g.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)},g.a.createElement(r["a"].Option,{key:1},"\u662f"),g.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 6f91d03d..51dcaaf5 100644 --- a/public/p__dashboard.async.js +++ b/public/p__dashboard.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[13],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),s=a.n(n),i=a("3a4m"),l=a.n(i),c=a("/MKj"),r=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{l.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 ".concat(1===r["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var t=e.header;return{header:t}})(o),p=a("t3Un");class h extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["a"])("/user/logout").then(e=>{l.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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},s.a.createElement("i",{className:"fa fa-fw fa-search"})," ",s.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),s.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&s.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},s.a.createElement("div",{className:"content-header bg-dark"},s.a.createElement("div",{className:"w-100"},s.a.createElement("div",{className:"input-group"},s.a.createElement("div",{className:"input-group-prepend"},s.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},s.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),s.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(c["c"])(e=>{var t=e.header;return{header:t}})(h);class f 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===r["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(d,this.props),s.a.createElement(u,{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(f,null))}}t["a"]=Object(c["c"])(e=>{var t=e.header;return{header:t}})(b)},sFYk:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return N});var n=a("jehZ"),s=a.n(n),i=(a("2qtc"),a("kLXV")),l=(a("miYZ"),a("tsqr")),c=(a("qVdP"),a("jsC+")),r=(a("lUTK"),a("BvKs")),m=a("q1tI"),o=a.n(m),d=a("Bl7J"),p=a("t3Un"),h=a("yWgo"),u=a("3a4m"),f=a.n(u),b=a("+QRC"),v=a.n(b),E=a("wd/R"),g=a.n(E);class N extends o.a.Component{constructor(){super(...arguments),this.state={user:{plan:{}},stat:[],loading:!0,visible:!1}}componentDidMount(){Object(p["a"])("/user/getSubscribe").then(e=>{200===e.code&&this.setState({user:e.data,loading:!1})}),Object(p["a"])("/user/getStat").then(e=>{200===e.code&&this.setState({stat:e.data})}),Object(p["a"])("/user/notice/fetch").then(e=>{200===e.code&&this.setState({notice:e.data})})}modalVisible(){this.setState({visible:!this.state.visible})}render(){return o.a.createElement(d["a"],s()({},this.props,{loading:this.state.loading}),o.a.createElement("main",{id:"main-container"},o.a.createElement("div",{className:"content content-full"},this.state.notice&&o.a.createElement("a",{className:"block block-rounded bg-image",onClick:()=>this.modalVisible(),style:{backgroundImage:"url(".concat(this.state.notice.img_url,")")},href:"javascript:void(0)"},o.a.createElement("div",{className:"block-content bg-black-50"},o.a.createElement("div",{className:"mb-4 mb-sm-4 d-sm-flex justify-content-sm-between align-items-sm-center"},o.a.createElement("p",null,o.a.createElement("span",{className:"badge badge-danger font-w700 p-2 text-uppercase"},"\u516c\u544a")),o.a.createElement("p",null,o.a.createElement("span",{className:"text-white font-w600 mr-1",style:{fontSize:26}},g()(1e3*this.state.notice.created_at).format("DD"),"/"),o.a.createElement("span",{className:"text-white"},g()(1e3*this.state.notice.created_at).format("MM")))),o.a.createElement("p",{className:"font-size-lg font-w700 text-white mb-7 text-center"},this.state.notice.title))),o.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u603b\u89c8"),o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},o.a.createElement("div",{className:"block block-rounded text-center"},o.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},o.a.createElement("div",null,o.a.createElement("a",{className:"link-fx text-danger font-size-h1 font-w700",onClick:()=>f.a.push("/order")},this.state.stat[0]),o.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u4ed8\u8ba2\u5355"))))),o.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},o.a.createElement("div",{className:"block block-rounded text-center"},o.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},o.a.createElement("div",null,o.a.createElement("a",{className:"link-fx text-warning font-size-h1 font-w700"},this.state.stat[1]),o.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u529e\u5de5\u5355"))))),o.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},o.a.createElement("div",{className:"block block-rounded text-center"},o.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},o.a.createElement("div",null,o.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",onClick:()=>f.a.push("/invite")},this.state.stat[2]),o.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6211\u7684\u9080\u8bf7")))))),o.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},o.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8ba2\u9605")),this.state.user.plan_id?o.a.createElement("div",{className:"block block-rounded mb-2 animated fadeIn","data-toggle":"appear"},o.a.createElement("div",{className:"block-content block-content-full"},o.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},o.a.createElement("div",{className:"p-1 p-md-3 col-md-6 col-xs-12"},o.a.createElement("h3",{className:"h4 font-w700 mb-1"},this.state.user.plan.name),o.a.createElement("p",{className:"font-size-sm text-muted"},this.state.user.expired_at<(new Date).getTime()/1e3?o.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"\u5df2\u8fc7\u671f"):o.a.createElement("span",null,"\u4e8e ",g()(1e3*this.state.user.expired_at).format("YYYY/MM/DD")," \u5230\u671f\uff0c\u8ddd\u79bb\u5230\u671f\u8fd8\u6709 ",((this.state.user.expired_at-g()().format("X"))/86400).toFixed(0)," \u5929")),o.a.createElement("div",{className:"mb-0"},o.a.createElement("div",{className:"progress mb-1",style:{height:6}},o.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:Object(h["d"])(this.state.user.u+this.state.user.d,this.state.user.transfer_enable)+"%"}})),o.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},o.a.createElement("span",{className:"font-w700"},((this.state.user.u+this.state.user.d)/1073741824).toFixed(2)," GB")," / ",o.a.createElement("span",{className:"font-w700"},(this.state.user.transfer_enable/1073741824).toFixed(2)," GB")))),o.a.createElement("div",{className:"p-1 p-md-3 col-md-6 col-xs-12 text-md-right"},Object(h["f"])()?o.a.createElement(c["a"],{trigger:["click"],overlay:o.a.createElement(r["a"],null,o.a.createElement(r["a"].Item,{key:"0",onClick:()=>window.location.href="quantumult://configuration?server="+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},o.a.createElement("a",null,"Quantumult")),o.a.createElement(r["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]}))},o.a.createElement("a",null,"QuantumultX")),o.a.createElement(r["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},o.a.createElement("a",null,"Shadowrocket")))},o.a.createElement("a",{className:"btn btn-sm btn-primary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},o.a.createElement("i",{className:"fa fa-rss mr-1"}),"\u4e00\u952e\u8ba2\u9605")):o.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>{v()(this.state.user.subscribe_url),l["a"].success("\u590d\u5236\u6210\u529f")}},o.a.createElement("i",{className:"fa fa-copy mr-1"}),"\u590d\u5236\u8ba2\u9605\u5730\u5740"),o.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>f.a.push("/subscribe")},o.a.createElement("i",{className:"fa fa-cog mr-1"}),"\u67e5\u770b\u8ba2\u9605"),o.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)",onClick:()=>f.a.push("/plan/"+this.state.user.plan_id)},o.a.createElement("i",{className:"fa fa-redo mr-1"}),"\u7eed\u8d39"))))):o.a.createElement("a",{className:"block block-rounded mb-2 block-link-pop animated fadeIn",onClick:()=>f.a.push("/plan")},o.a.createElement("div",{className:"block-content block-content-full"},o.a.createElement("div",{className:"text-center align-items-md-center py-5"},o.a.createElement("div",null,o.a.createElement("i",{className:"fa fa-plus fa-2x"})),o.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted pt-2"},"\u6dfb\u52a0\u8ba2\u9605")))))),this.state.notice&&o.a.createElement(i["a"],{title:this.state.notice.title,visible:this.state.visible,maskClosable:!0,footer:!1,onCancel:()=>this.modalVisible(),centered:!0},this.state.notice.content.split("\n").map(e=>{return o.a.createElement("p",null,e)})))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[13],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),s=a.n(n),i=a("3a4m"),l=a.n(i),c=a("/MKj"),r=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{l.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 ".concat(1===r["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var t=e.header;return{header:t}})(o),p=a("t3Un");class h extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["a"])("/user/logout").then(e=>{l.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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},s.a.createElement("i",{className:"fa fa-fw fa-search"})," ",s.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),s.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&s.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},s.a.createElement("div",{className:"content-header bg-dark"},s.a.createElement("div",{className:"w-100"},s.a.createElement("div",{className:"input-group"},s.a.createElement("div",{className:"input-group-prepend"},s.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},s.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),s.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(c["c"])(e=>{var t=e.header;return{header:t}})(h);class f 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===r["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(d,this.props),s.a.createElement(u,{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(f,null))}}t["a"]=Object(c["c"])(e=>{var t=e.header;return{header:t}})(b)},sFYk:function(e,t,a){"use strict";a.r(t),a.d(t,"default",function(){return N});var n=a("jehZ"),s=a.n(n),i=(a("2qtc"),a("kLXV")),l=(a("miYZ"),a("tsqr")),c=(a("qVdP"),a("jsC+")),r=(a("lUTK"),a("BvKs")),m=a("q1tI"),o=a.n(m),d=a("Bl7J"),p=a("t3Un"),h=a("yWgo"),u=a("3a4m"),f=a.n(u),b=a("+QRC"),v=a.n(b),E=a("wd/R"),g=a.n(E);class N extends o.a.Component{constructor(){super(...arguments),this.state={user:{plan:{}},stat:[],loading:!0,visible:!1}}componentDidMount(){Object(p["a"])("/user/getSubscribe").then(e=>{200===e.code&&this.setState({user:e.data,loading:!1})}),Object(p["a"])("/user/getStat").then(e=>{200===e.code&&this.setState({stat:e.data})}),Object(p["a"])("/user/notice/fetch").then(e=>{200===e.code&&this.setState({notice:e.data})})}modalVisible(){this.setState({visible:!this.state.visible})}render(){return o.a.createElement(d["a"],s()({},this.props,{loading:this.state.loading}),o.a.createElement("main",{id:"main-container"},o.a.createElement("div",{className:"content content-full"},this.state.notice&&o.a.createElement("a",{className:"block block-rounded bg-image",onClick:()=>this.modalVisible(),style:{backgroundImage:"url(".concat(this.state.notice.img_url,")")},href:"javascript:void(0)"},o.a.createElement("div",{className:"block-content bg-black-50"},o.a.createElement("div",{className:"mb-4 mb-sm-4 d-sm-flex justify-content-sm-between align-items-sm-center"},o.a.createElement("p",null,o.a.createElement("span",{className:"badge badge-danger font-w700 p-2 text-uppercase"},"\u516c\u544a")),o.a.createElement("p",null,o.a.createElement("span",{className:"text-white font-w600 mr-1",style:{fontSize:26}},g()(1e3*this.state.notice.created_at).format("DD"),"/"),o.a.createElement("span",{className:"text-white"},g()(1e3*this.state.notice.created_at).format("MM")))),o.a.createElement("p",{className:"font-size-lg font-w700 text-white mb-7 text-center"},this.state.notice.title))),o.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u603b\u89c8"),o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},o.a.createElement("div",{className:"block block-rounded text-center"},o.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},o.a.createElement("div",null,o.a.createElement("a",{className:"link-fx text-danger font-size-h1 font-w700",onClick:()=>f.a.push("/order")},this.state.stat[0]),o.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u4ed8\u8ba2\u5355"))))),o.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"150"},o.a.createElement("div",{className:"block block-rounded text-center"},o.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},o.a.createElement("div",null,o.a.createElement("a",{className:"link-fx text-warning font-size-h1 font-w700"},this.state.stat[1]),o.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u5f85\u529e\u5de5\u5355"))))),o.a.createElement("div",{className:"col-sm-4 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},o.a.createElement("div",{className:"block block-rounded text-center"},o.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},o.a.createElement("div",null,o.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",onClick:()=>f.a.push("/invite")},this.state.stat[2]),o.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted mt-1"},"\u6211\u7684\u9080\u8bf7")))))),o.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},o.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8ba2\u9605")),this.state.user.plan_id?o.a.createElement("div",{className:"block block-rounded mb-2 animated fadeIn","data-toggle":"appear"},o.a.createElement("div",{className:"block-content block-content-full"},o.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},o.a.createElement("div",{className:"p-1 p-md-3 col-md-6 col-xs-12"},o.a.createElement("h3",{className:"h4 font-w700 mb-1"},this.state.user.plan.name),o.a.createElement("p",{className:"font-size-sm text-muted"},this.state.user.expired_at<(new Date).getTime()/1e3?o.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"\u5df2\u8fc7\u671f"):o.a.createElement("span",null,"\u4e8e ",g()(1e3*this.state.user.expired_at).format("YYYY/MM/DD")," \u5230\u671f\uff0c\u8ddd\u79bb\u5230\u671f\u8fd8\u6709 ",((this.state.user.expired_at-g()().format("X"))/86400).toFixed(0)," \u5929")),o.a.createElement("div",{className:"mb-0"},o.a.createElement("div",{className:"progress mb-1",style:{height:6}},o.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:Object(h["d"])(this.state.user.u+this.state.user.d,this.state.user.transfer_enable)+"%"}})),o.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},o.a.createElement("span",{className:"font-w700"},((this.state.user.u+this.state.user.d)/1073741824).toFixed(2)," GB")," / ",o.a.createElement("span",{className:"font-w700"},(this.state.user.transfer_enable/1073741824).toFixed(2)," GB")))),o.a.createElement("div",{className:"p-1 p-md-3 col-md-6 col-xs-12 text-md-right"},Object(h["f"])()?o.a.createElement(c["a"],{trigger:["click"],overlay:o.a.createElement(r["a"],null,o.a.createElement(r["a"].Item,{key:"0",onClick:()=>window.location.href="quantumult://configuration?server="+window.btoa(this.state.user.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},o.a.createElement("a",null,"Quantumult")),o.a.createElement(r["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]}))},o.a.createElement("a",null,"QuantumultX")),o.a.createElement(r["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},o.a.createElement("a",null,"Shadowrocket")))},o.a.createElement("a",{className:"btn btn-sm btn-primary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},o.a.createElement("i",{className:"fa fa-rss mr-1"}),"\u4e00\u952e\u8ba2\u9605")):o.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>{v()(this.state.user.subscribe_url),l["a"].success("\u590d\u5236\u6210\u529f")}},o.a.createElement("i",{className:"fa fa-copy mr-1"}),"\u590d\u5236\u8ba2\u9605\u5730\u5740"),o.a.createElement("a",{className:"btn btn-sm btn-outline-secondary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>f.a.push("/subscribe")},o.a.createElement("i",{className:"fa fa-cog mr-1"}),"\u67e5\u770b\u8ba2\u9605"),o.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)",onClick:()=>f.a.push("/plan/"+this.state.user.plan_id)},o.a.createElement("i",{className:"fa fa-redo mr-1"}),"\u7eed\u8d39"))))):o.a.createElement("a",{className:"block block-rounded mb-2 block-link-pop animated fadeIn",onClick:()=>f.a.push("/plan")},o.a.createElement("div",{className:"block-content block-content-full"},o.a.createElement("div",{className:"text-center align-items-md-center py-5"},o.a.createElement("div",null,o.a.createElement("i",{className:"fa fa-plus fa-2x"})),o.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted pt-2"},"\u6dfb\u52a0\u8ba2\u9605")))))),this.state.notice&&o.a.createElement(i["a"],{title:this.state.notice.title,visible:this.state.visible,maskClosable:!0,footer:!1,onCancel:()=>this.modalVisible(),centered:!0},this.state.notice.content.split("\n").map(e=>{return o.a.createElement("p",null,e)})))}}}}]); \ No newline at end of file diff --git a/public/p__index.async.js b/public/p__index.async.js index d6d4b1c5..f4fa55fc 100644 --- a/public/p__index.async.js +++ b/public/p__index.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[15],{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"),c=t("20nU"),o=t("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(m),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var v=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class u 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(v,{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(u,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(f)},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([[15],{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"),c=t("20nU"),o=t("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(m),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var v=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class u 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(v,{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(u,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(f)},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 1335909a..f7ef9473 100644 --- a/public/p__invite.async.js +++ b/public/p__invite.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),i=a.n(n),s=a("3a4m"),c=a.n(s),l=a("/MKj"),r=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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:()=>{c.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 ".concat(1===r["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["a"])("/user/logout").then(e=>{c.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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===r["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(f)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},kdhn:function(e,t,a){"use strict";a.r(t);var n=a("jehZ"),i=a.n(n),s=(a("g9YV"),a("wCAj")),c=(a("5Dmo"),a("3S7+")),l=(a("Pwec"),a("CtXQ")),r=(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"),f=a("+QRC"),E=a.n(f),b=a("LbTH"),g=a("wd/R"),N=a.n(g);class k extends h.a.Component{constructor(){super(...arguments),this.state={codes:[],stat:[0,0,0,0],loading:!0,orders:[]}}componentDidMount(){this.getCommissionDetails(),this.fetchData()}getCommissionDetails(){Object(v["a"])("/user/invite/details").then(e=>{200===e.code&&this.setState({orders:e.data})})}fetchData(){Object(v["a"])("/user/invite/fetch").then(e=>{200===e.code&&this.setState(m()({},e.data,{loading:!1}))})}genInviteCode(){Object(v["a"])("/user/invite/save").then(e=>{200===e.code&&e.data&&(this.fetchData(),r["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 N()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t)=>{return h.a.createElement("div",null,h.a.createElement("a",{href:"javascript:void(0)",onClick:()=>{E()(window.location.origin+"/#/register?code="+t.code),r["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236\u94fe\u63a5"))}}],t=[{title:"#",dataIndex:"id",key:"id"},{title:"\u5b8c\u6210\u65f6\u95f4",dataIndex:"updated_at",key:"updated_at",render:e=>{return N()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u4f63\u91d1",dataIndex:"commission_balance",key:"commission_balance",render:e=>{return(e/100).toFixed(2)}},{title:"\u4f63\u91d1\u72b6\u6001",dataIndex:"commission_status",key:"commission_status",align:"right",render:e=>{return b["a"].commissionStatusText[e]}}];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"},"\u9080\u8bf7\u603b\u89c8")),h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"col-12 col-sm-12 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},h.a.createElement("div",null,h.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},this.state.stat[0]),h.a.createElement("div",{className:"font-size-sm text-uppercase text-muted mt-1"},"\u5df2\u6ce8\u518c\u7528\u6237\u6570"))))),h.a.createElement("div",{className:"col-12 col-sm-12 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},h.a.createElement("div",null,h.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},this.state.stat[3],"%"),h.a.createElement("div",{className:"font-size-sm text-uppercase text-muted mt-1"},"\u4f63\u91d1\u6bd4\u4f8b"))))),h.a.createElement("div",{className:"col-12 col-sm-12 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},h.a.createElement("div",null,h.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"\xa5 ",this.state.stat[2]/100),h.a.createElement("div",{className:"font-size-sm text-uppercase text-muted mt-1"},"\u786e\u8ba4\u4e2d\u7684\u4f63\u91d1 ",h.a.createElement(c["a"],{placement:"top",title:"\u4f63\u91d1\u5c06\u4f1a\u5728\u786e\u8ba4\u540e\u4f1a\u5230\u8fbe\u4f60\u7684\u4f63\u91d1\u8d26\u6237\u3002"},h.a.createElement(l["a"],{type:"question-circle"})))))))),h.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9080\u8bf7\u7801\u7ba1\u7406"),h.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")),h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full p-0"},h.a.createElement(s["a"],{scroll:{x:700},columns:e,dataSource:this.state.codes,pagination:!1}))),h.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9080\u8bf7\u660e\u7ec6")),h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full p-0"},h.a.createElement(s["a"],{scroll:{x:700},columns:t,dataSource:this.state.orders,pagination:!1}))))))}}t["default"]=Object(u["c"])()(k)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),i=a.n(n),s=a("3a4m"),c=a.n(s),l=a("/MKj"),r=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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:()=>{c.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 ".concat(1===r["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["a"])("/user/logout").then(e=>{c.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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===r["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(f)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},kdhn:function(e,t,a){"use strict";a.r(t);var n=a("jehZ"),i=a.n(n),s=(a("g9YV"),a("wCAj")),c=(a("5Dmo"),a("3S7+")),l=(a("Pwec"),a("CtXQ")),r=(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"),f=a("+QRC"),E=a.n(f),b=a("LbTH"),g=a("wd/R"),N=a.n(g);class k extends h.a.Component{constructor(){super(...arguments),this.state={codes:[],stat:[0,0,0,0],loading:!0,orders:[]}}componentDidMount(){this.getCommissionDetails(),this.fetchData()}getCommissionDetails(){Object(v["a"])("/user/invite/details").then(e=>{200===e.code&&this.setState({orders:e.data})})}fetchData(){Object(v["a"])("/user/invite/fetch").then(e=>{200===e.code&&this.setState(m()({},e.data,{loading:!1}))})}genInviteCode(){Object(v["a"])("/user/invite/save").then(e=>{200===e.code&&e.data&&(this.fetchData(),r["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 N()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t)=>{return h.a.createElement("div",null,h.a.createElement("a",{href:"javascript:void(0)",onClick:()=>{E()(window.location.origin+"/#/register?code="+t.code),r["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236\u94fe\u63a5"))}}],t=[{title:"#",dataIndex:"id",key:"id"},{title:"\u5b8c\u6210\u65f6\u95f4",dataIndex:"updated_at",key:"updated_at",render:e=>{return N()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u4f63\u91d1",dataIndex:"commission_balance",key:"commission_balance",render:e=>{return(e/100).toFixed(2)}},{title:"\u4f63\u91d1\u72b6\u6001",dataIndex:"commission_status",key:"commission_status",align:"right",render:e=>{return b["a"].commissionStatusText[e]}}];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"},"\u9080\u8bf7\u603b\u89c8")),h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"col-12 col-sm-12 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"300"},h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},h.a.createElement("div",null,h.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},this.state.stat[0]),h.a.createElement("div",{className:"font-size-sm text-uppercase text-muted mt-1"},"\u5df2\u6ce8\u518c\u7528\u6237\u6570"))))),h.a.createElement("div",{className:"col-12 col-sm-12 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},h.a.createElement("div",null,h.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},this.state.stat[3],"%"),h.a.createElement("div",{className:"font-size-sm text-uppercase text-muted mt-1"},"\u4f63\u91d1\u6bd4\u4f8b"))))),h.a.createElement("div",{className:"col-12 col-sm-12 col-lg-4 js-appear-enabled animated fadeIn","data-toggle":"appear","data-timeout":"450"},h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full d-flex justify-content-center align-items-center"},h.a.createElement("div",null,h.a.createElement("a",{className:"link-fx text-success font-size-h1 font-w700",href:"javascript:void(0)"},"\xa5 ",this.state.stat[2]/100),h.a.createElement("div",{className:"font-size-sm text-uppercase text-muted mt-1"},"\u786e\u8ba4\u4e2d\u7684\u4f63\u91d1 ",h.a.createElement(c["a"],{placement:"top",title:"\u4f63\u91d1\u5c06\u4f1a\u5728\u786e\u8ba4\u540e\u4f1a\u5230\u8fbe\u4f60\u7684\u4f63\u91d1\u8d26\u6237\u3002"},h.a.createElement(l["a"],{type:"question-circle"})))))))),h.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9080\u8bf7\u7801\u7ba1\u7406"),h.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")),h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full p-0"},h.a.createElement(s["a"],{scroll:{x:700},columns:e,dataSource:this.state.codes,pagination:!1}))),h.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},h.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9080\u8bf7\u660e\u7ec6")),h.a.createElement("div",{className:"block block-rounded text-center"},h.a.createElement("div",{className:"block-content block-content-full p-0"},h.a.createElement(s["a"],{scroll:{x:700},columns:t,dataSource:this.state.orders,pagination:!1}))))))}}t["default"]=Object(u["c"])()(k)}}]); \ No newline at end of file diff --git a/public/p__login.async.js b/public/p__login.async.js index c15dd967..b2156652 100644 --- a/public/p__login.async.js +++ b/public/p__login.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[17],{SGa5:function(e,t,a){"use strict";a.r(t);a("/zsF");var o=a("PArb"),n=(a("Pwec"),a("CtXQ")),s=a("q1tI"),r=a.n(s),l=a("/MKj"),i=a("3a4m"),c=a.n(i),d=a("t3Un");class m extends r.a.Component{constructor(e){super(e),this.state={loading:!1},this.keyDown=this.keyDown.bind(this)}keyDown(e){13===e.keyCode&&this.onLogin()}componentDidMount(){Object(d["a"])("/passport/check").then(e=>{if(200===e.code)return e.data?c.a.push("dashboard"):void 0}),window.addEventListener("keydown",this.keyDown,!1)}componentWillUnmount(){window.removeEventListener("keydown",this.keyDown,!1)}onLogin(){this.setState({loading:!0}),this.props.dispatch({type:"auth/login",action:{email:this.refs.email.value,password:this.refs.password.value},complete:e=>{if(console.log(e.code),200!==e.code)return this.setState({loading:!1});e.data&&(this.setState({loading:!1}),c.a.push("/dashboard"),this.props.dispatch({type:"header/getUserInfo"}))}})}render(){return r.a.createElement("div",{id:"page-container"},r.a.createElement("main",{id:"main-container",className:"v2board-background",style:{backgroundImage:window.v2board.background&&"url(".concat(window.v2board.background,")")}},r.a.createElement("div",{className:"no-gutters",style:{height:"100%"}},r.a.createElement("div",{className:"",style:{maxWidth:450,top:"calc(50% - 182.5px)",position:"absolute",right:0,left:0,margin:"auto"}},r.a.createElement("div",{className:"block block-rounded block-transparent block-fx-pop w-100 mb-0 overflow-hidden bg-image",style:{boxShadow:"0 0.5rem 2rem #0000000d"}},r.a.createElement("div",{className:"row no-gutters"},r.a.createElement("div",{className:"col-md-12 order-md-1 bg-white"},r.a.createElement("div",{className:"block-content block-content-full px-lg-4 py-md-4 py-lg-4"},r.a.createElement("div",{className:"mb-2 text-center"},r.a.createElement("a",{className:"link-fx font-w700 font-size-h1",href:"javascript:void(0)"},r.a.createElement("span",{className:"text-dark"},window.v2board.title?window.v2board.title:"V2Board")),r.a.createElement("p",{className:"text-uppercase font-w700 font-size-sm text-muted"},"\u8be5\u9875\u9762\u662f\u88ab\u52a0\u5bc6\u7684")),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"text",className:"form-control form-control-alt",placeholder:"\u90ae\u7bb1",ref:"email"})),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"password",className:"form-control form-control-alt",placeholder:"\u5bc6\u7801",ref:"password"})),r.a.createElement("div",{className:"form-group"},r.a.createElement("button",{disabled:this.state.loading,type:"submit",className:"btn btn-block btn-hero-primary",onClick:()=>this.onLogin()},this.state.loading?r.a.createElement(n["a"],{type:"loading"}):r.a.createElement("span",null,r.a.createElement("i",{className:"si si-login mr-1"}),"\u767b\u9646")),r.a.createElement("div",{className:"text-center mt-3"},r.a.createElement("a",{className:"font-w700 font-size-sm text-muted",href:"javascript:void(0)",onClick:()=>c.a.push("/register")},"\u6ce8\u518c"),r.a.createElement(o["a"],{type:"vertical"}),r.a.createElement("a",{className:"font-w700 font-size-sm text-muted",href:"javascript:void(0)",onClick:()=>c.a.push("/forgetpassword")},"\u5fd8\u8bb0\u5bc6\u7801")))))))))))}}t["default"]=Object(l["c"])()(m)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[17],{SGa5:function(e,t,a){"use strict";a.r(t);a("/zsF");var o=a("PArb"),n=(a("Pwec"),a("CtXQ")),s=a("q1tI"),r=a.n(s),i=a("/MKj"),c=a("3a4m"),l=a.n(c),d=a("t3Un");class m extends r.a.Component{constructor(e){super(e),this.state={loading:!1},this.keyDown=this.keyDown.bind(this)}keyDown(e){13===e.keyCode&&this.onLogin()}componentDidMount(){var e=this.props.location.query.verify,t=this.props.location.query.redirect;e&&Object(d["a"])("/passport/token2Login",{verify:e}).then(e=>{if(200===e.code)return e.data?l.a.push(t||"dashboard"):void 0}),Object(d["a"])("/passport/check").then(e=>{if(200===e.code)return e.data?l.a.push(t||"dashboard"):void 0}),window.addEventListener("keydown",this.keyDown,!1)}componentWillUnmount(){window.removeEventListener("keydown",this.keyDown,!1)}onLogin(){this.setState({loading:!0}),this.props.dispatch({type:"auth/login",action:{email:this.refs.email.value,password:this.refs.password.value},complete:e=>{if(console.log(e.code),200!==e.code)return this.setState({loading:!1});e.data&&(this.setState({loading:!1}),l.a.push("/dashboard"),this.props.dispatch({type:"header/getUserInfo"}))}})}render(){return r.a.createElement("div",{id:"page-container"},r.a.createElement("main",{id:"main-container",className:"v2board-background",style:{backgroundImage:window.v2board.background&&"url(".concat(window.v2board.background,")")}},r.a.createElement("div",{className:"no-gutters",style:{height:"100%"}},r.a.createElement("div",{className:"",style:{maxWidth:450,top:"calc(50% - 182.5px)",position:"absolute",right:0,left:0,margin:"auto"}},r.a.createElement("div",{className:"block block-rounded block-transparent block-fx-pop w-100 mb-0 overflow-hidden bg-image",style:{boxShadow:"0 0.5rem 2rem #0000000d"}},r.a.createElement("div",{className:"row no-gutters"},r.a.createElement("div",{className:"col-md-12 order-md-1 bg-white"},r.a.createElement("div",{className:"block-content block-content-full px-lg-4 py-md-4 py-lg-4"},r.a.createElement("div",{className:"mb-2 text-center"},r.a.createElement("a",{className:"link-fx font-w700 font-size-h1",href:"javascript:void(0)"},r.a.createElement("span",{className:"text-dark"},window.v2board.title?window.v2board.title:"V2Board")),r.a.createElement("p",{className:"text-uppercase font-w700 font-size-sm text-muted"},"\u8be5\u9875\u9762\u662f\u88ab\u52a0\u5bc6\u7684")),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"text",className:"form-control form-control-alt",placeholder:"\u90ae\u7bb1",ref:"email"})),r.a.createElement("div",{className:"form-group"},r.a.createElement("input",{type:"password",className:"form-control form-control-alt",placeholder:"\u5bc6\u7801",ref:"password"})),r.a.createElement("div",{className:"form-group"},r.a.createElement("button",{disabled:this.state.loading,type:"submit",className:"btn btn-block btn-hero-primary",onClick:()=>this.onLogin()},this.state.loading?r.a.createElement(n["a"],{type:"loading"}):r.a.createElement("span",null,r.a.createElement("i",{className:"si si-login mr-1"}),"\u767b\u9646")),r.a.createElement("div",{className:"text-center mt-3"},r.a.createElement("a",{className:"font-w700 font-size-sm text-muted",href:"javascript:void(0)",onClick:()=>l.a.push("/register")},"\u6ce8\u518c"),r.a.createElement(o["a"],{type:"vertical"}),r.a.createElement("a",{className:"font-w700 font-size-sm text-muted",href:"javascript:void(0)",onClick:()=>l.a.push("/forgetpassword")},"\u5fd8\u8bb0\u5bc6\u7801")))))))))))}}t["default"]=Object(i["c"])()(m)}}]); \ No newline at end of file diff --git a/public/p__order.async.js b/public/p__order.async.js index e559adcf..c5d39469 100644 --- a/public/p__order.async.js +++ b/public/p__order.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[18],{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"),c=t("20nU"),o=t("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(m),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(f)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},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("Awhp"),t("KrTs")),l=t("q1tI"),c=t.n(l),o=t("Bl7J"),m=t("/MKj"),d=t("t3Un"),h=t("3a4m"),p=t.n(h),u=t("LbTH"),v=t("wd/R"),f=t.n(v);class g extends c.a.Component{constructor(){super(...arguments),this.state={order:[],loading:!0}}componentDidMount(){Object(d["a"])("/user/order/fetch").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 c.a.createElement("span",{class:"badge badge-pill badge-primary"},u["a"].cycleText[a.cycle])}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",align:"right",render:e=>{return(e/100).toFixed(2)}},{title:"\u8ba2\u5355\u72b6\u6001",dataIndex:"status",key:"status",render:e=>{var a=["error","processing","default","success"];return c.a.createElement("div",null,c.a.createElement(r["a"],{status:a[e]}),u["a"].orderStatusText[e])}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return f()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return c.a.createElement("div",null,c.a.createElement("a",{disabled:2===a.status,href:"javascript:void(0)",onClick:()=>p.a.push("/order/"+a.trade_no)},"\u67e5\u770b\u8be6\u60c5"))}}];return c.a.createElement(o["a"],i()({},this.props,{loading:this.state.loading}),c.a.createElement("main",{id:"main-container"},c.a.createElement("div",{className:"content content-full"},c.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},c.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u7ba1\u7406")),c.a.createElement("div",{className:"bg-white"},c.a.createElement(s["a"],{dataSource:this.state.order,columns:e,pagination:!1,scroll:{x:900}})))))}}a["default"]=Object(m["c"])()(g)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[18],{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"),c=t("20nU"),o=t("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(m),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(f)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},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("Awhp"),t("KrTs")),l=t("q1tI"),c=t.n(l),o=t("Bl7J"),m=t("/MKj"),d=t("t3Un"),h=t("3a4m"),p=t.n(h),u=t("LbTH"),v=t("wd/R"),f=t.n(v);class g extends c.a.Component{constructor(){super(...arguments),this.state={order:[],loading:!0}}componentDidMount(){Object(d["a"])("/user/order/fetch").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 c.a.createElement("span",{class:"badge badge-pill badge-primary"},u["a"].cycleText[a.cycle])}},{title:"\u8ba2\u5355\u91d1\u989d",dataIndex:"total_amount",key:"total_amount",align:"right",render:e=>{return(e/100).toFixed(2)}},{title:"\u8ba2\u5355\u72b6\u6001",dataIndex:"status",key:"status",render:e=>{var a=["error","processing","default","success"];return c.a.createElement("div",null,c.a.createElement(r["a"],{status:a[e]}),u["a"].orderStatusText[e])}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return f()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return c.a.createElement("div",null,c.a.createElement("a",{disabled:2===a.status,href:"javascript:void(0)",onClick:()=>p.a.push("/order/"+a.trade_no)},"\u67e5\u770b\u8be6\u60c5"))}}];return c.a.createElement(o["a"],i()({},this.props,{loading:this.state.loading}),c.a.createElement("main",{id:"main-container"},c.a.createElement("div",{className:"content content-full"},c.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},c.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u7ba1\u7406")),c.a.createElement("div",{className:"bg-white"},c.a.createElement(s["a"],{dataSource:this.state.order,columns:e,pagination:!1,scroll:{x:900}})))))}}a["default"]=Object(m["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 562363b2..4d8d643a 100644 --- a/public/p__order__$trade_no.async.js +++ b/public/p__order__$trade_no.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[19],{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"),c=a("20nU"),o=a("yWgo");class m 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(r["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(r["c"])(e=>{var t=e.header;return{header:t}})(p);class E 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(E,null))}}t["a"]=Object(r["c"])(e=>{var t=e.header;return{header:t}})(b)},GPI8:function(e,t,a){"use strict";a.r(t);var s,n=a("jehZ"),i=a.n(n),l=(a("2qtc"),a("kLXV")),r=(a("7Kak"),a("9yH6")),c=(a("miYZ"),a("tsqr")),o=(a("Pwec"),a("CtXQ")),m=a("p0pE"),d=a.n(m),h=a("q1tI"),p=a.n(h),u=a("Bl7J"),E=a("/MKj"),b=a("t3Un"),v=a("LbTH"),N=a("yWgo");class y extends p.a.Component{constructor(){super(...arguments),this.state={loading:!1,plan:{ext_data:{}},layout_login:!0,method:0,modalVisible:!1,paymentMethod:[]}}componentDidMount(){this.fetchData(),this.getPaymentMethod(),this.props.dispatch({type:"header/getUserInfo",complete:()=>{}})}componentWillUnmount(){s=void 0}fetchData(){Object(b["a"])("/user/order/details",{trade_no:this.props.match.params.trade_no}).then(e=>{200===e.code&&(this.setState(d()({},e.data,{layout_login:!1})),0===e.data.status&&this.check())})}getPaymentMethod(){Object(b["a"])("/user/order/getPaymentMethod").then(e=>{200===e.code&&this.setState({paymentMethod:e.data,method:e.data.length>0?e.data[0].method:0})})}getPaymentIcon(e){switch(e){case"alipay":return p.a.createElement(o["a"],{className:"v2board-payment-icon",type:"alipay",style:{color:"#419FE3"}});case"wechat":return p.a.createElement(o["a"],{className:"v2board-payment-icon",type:"wechat",style:{color:"#4FA938"}});case"bitcoin":return p.a.createElement("i",{className:"v2board-payment-icon fab fa-bitcoin",style:{color:"#EA973D"}})}}submit(){if(void 0===this.state.method)return c["a"].error("\u8bf7\u9009\u62e9\u652f\u4ed8\u65b9\u5f0f");this.setState({loading:!0},()=>{Object(b["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(){s=(()=>setTimeout(()=>{Object(b["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("function"===typeof s&&s())})},3e3)),s()}render(){return p.a.createElement(u["a"],i()({},this.props,{loading:this.state.layout_login}),p.a.createElement("main",{id:"main-container"},p.a.createElement("div",{className:"content content-full"},p.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u8be6\u60c5"),p.a.createElement("div",{className:"row",id:"cashier"},p.a.createElement("div",{className:0===this.state.status?"col-md-8 col-sm-12":"col-12"},p.a.createElement("div",{className:"block block-fx-shadow block-rounded"},p.a.createElement("div",{className:"block-header block-header-default"},p.a.createElement("h3",{className:"block-title"},"# ",this.state.trade_no)),p.a.createElement("div",{className:"block-content"},p.a.createElement("div",{className:""},p.a.createElement("div",{className:"table-responsive push"},p.a.createElement("table",{className:"table table-bordered"},p.a.createElement("thead",{className:"bg-body"},p.a.createElement("tr",null,p.a.createElement("th",null,"\u4ea7\u54c1"),p.a.createElement("th",{className:"text-center",style:{width:120}},"\u7c7b\u578b/\u5468\u671f"),p.a.createElement("th",{className:"text-right",style:{width:120}},"\u91d1\u989d"))),p.a.createElement("tbody",null,p.a.createElement("tr",null,p.a.createElement("td",null,p.a.createElement("p",{className:"font-w600 mb-1"},this.state.plan.name),p.a.createElement("div",{className:"text-muted"},"- \u6d41\u91cf\uff1a",this.state.plan.transfer_enable," GB")),p.a.createElement("td",{className:"text-center"},p.a.createElement("span",{className:"badge badge-pill badge-primary"},v["a"].cycleText[this.state.cycle])),p.a.createElement("td",{className:"text-right"},(this.state.plan[this.state.cycle]/100).toFixed(2))),3===this.state.type?p.a.createElement("tr",null,p.a.createElement("td",null,p.a.createElement("p",{className:"font-w600 mb-1"},"\u66f4\u6539\u8ba2\u9605\u624b\u7eed\u8d39"),p.a.createElement("div",{className:"text-muted"},"- ",Object(N["e"])(this.props.header.userInfo.expired_at)," * ",this.state.update_fee)),p.a.createElement("td",{className:"text-center"},p.a.createElement("span",{className:"badge badge-pill badge-primary"},"\u4e00\u6b21\u6027")),p.a.createElement("td",{className:"text-right"},(Object(N["e"])(this.props.header.userInfo.expired_at)*this.state.update_fee).toFixed(2))):""))),p.a.createElement("p",{className:"text-muted text-center my-5"},"Thank you for doing business with us.")))),0===this.state.status&&p.a.createElement("h3",{className:"font-w300 mt-4 mb-3"},"\u652f\u4ed8\u65b9\u5f0f"),0===this.state.status&&p.a.createElement("div",{className:"mb-4"},p.a.createElement(r["a"].Group,{onChange:e=>this.setState({method:e.target.value}),size:"large",defaultValue:this.state.method},this.state.paymentMethod.map(e=>{return p.a.createElement(r["a"].Button,{value:e.method},this.getPaymentIcon(e.icon)," ",e.name)})))),0===this.state.status&&p.a.createElement("div",{className:"col-md-4 col-sm-12"},p.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 text-light",style:{background:"#35383D"}},p.a.createElement("h5",{className:"text-light mb-3"},"\u8ba2\u5355\u603b\u989d"),p.a.createElement("div",{className:"row no-gutters pb-3",style:{borderBottom:"1px solid #646669"}},p.a.createElement("div",{className:"col-8"},this.state.plan.name," x ",v["a"].cycleText[this.state.cycle]),p.a.createElement("div",{className:"col-4 text-right"},"\xa5",(this.state.plan[this.state.cycle]/100).toFixed(2))),3===this.state.type?p.a.createElement("div",{className:"row no-gutters py-3",style:{borderBottom:"1px solid #646669"}},p.a.createElement("div",{className:"col-8"},"\u66f4\u6539\u8ba2\u9605\u624b\u7eed\u8d39"),p.a.createElement("div",{className:"col-4 text-right"},"\xa5",(Object(N["e"])(this.props.header.userInfo.expired_at)*this.state.update_fee).toFixed(2))):"",p.a.createElement("div",{className:"pt-3",style:{color:"#646669"}},"\u603b\u8ba1"),p.a.createElement("h1",{className:"text-light mt-3 mb-3"},"\xa5 ",(this.state.total_amount/100).toFixed(2)," CNY"),p.a.createElement("button",{type:"button",className:"btn btn-block btn-primary",disabled:this.state.loading,onClick:()=>this.submit()},this.state.loading?p.a.createElement(o["a"],{type:"loading"}):p.a.createElement("span",null,p.a.createElement("i",{className:"far fa-check-circle"})," \u7ed3\u8d26"))))))),p.a.createElement(l["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:p.a.createElement("div",{style:{textAlign:"center"}},"\u7b49\u5f85\u652f\u4ed8\u4e2d")},p.a.createElement("img",{width:"100%",src:"https://www.zhihu.com/qrcode?url="+this.state.payUrl})))}}t["default"]=Object(E["c"])(e=>{var t=e.header;return{header:t}})(y)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[19],{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"),c=a("20nU"),o=a("yWgo");class m 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(r["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(r["c"])(e=>{var t=e.header;return{header:t}})(p);class E 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(E,null))}}t["a"]=Object(r["c"])(e=>{var t=e.header;return{header:t}})(b)},GPI8:function(e,t,a){"use strict";a.r(t);var s,n=a("jehZ"),i=a.n(n),l=(a("2qtc"),a("kLXV")),r=(a("7Kak"),a("9yH6")),c=(a("miYZ"),a("tsqr")),o=(a("Pwec"),a("CtXQ")),m=a("p0pE"),d=a.n(m),h=a("q1tI"),p=a.n(h),u=a("Bl7J"),E=a("/MKj"),b=a("t3Un"),v=a("LbTH"),N=a("yWgo");class y extends p.a.Component{constructor(){super(...arguments),this.state={loading:!1,plan:{ext_data:{}},layout_login:!0,method:0,modalVisible:!1,paymentMethod:[]}}componentDidMount(){this.fetchData(),this.getPaymentMethod(),this.props.dispatch({type:"header/getUserInfo",complete:()=>{}})}componentWillUnmount(){s=void 0}fetchData(){Object(b["a"])("/user/order/details",{trade_no:this.props.match.params.trade_no}).then(e=>{200===e.code&&(this.setState(d()({},e.data,{layout_login:!1})),0===e.data.status&&this.check())})}getPaymentMethod(){Object(b["a"])("/user/order/getPaymentMethod").then(e=>{200===e.code&&this.setState({paymentMethod:e.data,method:e.data.length>0?e.data[0].method:0})})}getPaymentIcon(e){switch(e){case"alipay":return p.a.createElement(o["a"],{className:"v2board-payment-icon",type:"alipay",style:{color:"#419FE3"}});case"wechat":return p.a.createElement(o["a"],{className:"v2board-payment-icon",type:"wechat",style:{color:"#4FA938"}});case"bitcoin":return p.a.createElement("i",{className:"v2board-payment-icon fab fa-bitcoin",style:{color:"#EA973D"}})}}submit(){if(void 0===this.state.method)return c["a"].error("\u8bf7\u9009\u62e9\u652f\u4ed8\u65b9\u5f0f");this.setState({loading:!0},()=>{Object(b["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(){s=(()=>setTimeout(()=>{Object(b["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("function"===typeof s&&s())})},3e3)),s()}render(){return p.a.createElement(u["a"],i()({},this.props,{loading:this.state.layout_login}),p.a.createElement("main",{id:"main-container"},p.a.createElement("div",{className:"content content-full"},p.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u8ba2\u5355\u8be6\u60c5"),p.a.createElement("div",{className:"row",id:"cashier"},p.a.createElement("div",{className:0===this.state.status?"col-md-8 col-sm-12":"col-12"},p.a.createElement("div",{className:"block block-fx-shadow block-rounded"},p.a.createElement("div",{className:"block-header block-header-default"},p.a.createElement("h3",{className:"block-title"},"# ",this.state.trade_no)),p.a.createElement("div",{className:"block-content"},p.a.createElement("div",{className:""},p.a.createElement("div",{className:"table-responsive push"},p.a.createElement("table",{className:"table table-bordered"},p.a.createElement("thead",{className:"bg-body"},p.a.createElement("tr",null,p.a.createElement("th",null,"\u4ea7\u54c1"),p.a.createElement("th",{className:"text-center",style:{width:120}},"\u7c7b\u578b/\u5468\u671f"),p.a.createElement("th",{className:"text-right",style:{width:120}},"\u91d1\u989d"))),p.a.createElement("tbody",null,p.a.createElement("tr",null,p.a.createElement("td",null,p.a.createElement("p",{className:"font-w600 mb-1"},this.state.plan.name),p.a.createElement("div",{className:"text-muted"},"- \u6d41\u91cf\uff1a",this.state.plan.transfer_enable," GB")),p.a.createElement("td",{className:"text-center"},p.a.createElement("span",{className:"badge badge-pill badge-primary"},v["a"].cycleText[this.state.cycle])),p.a.createElement("td",{className:"text-right"},(this.state.plan[this.state.cycle]/100).toFixed(2))),3===this.state.type?p.a.createElement("tr",null,p.a.createElement("td",null,p.a.createElement("p",{className:"font-w600 mb-1"},"\u66f4\u6539\u8ba2\u9605\u624b\u7eed\u8d39"),p.a.createElement("div",{className:"text-muted"},"- ",Object(N["e"])(this.props.header.userInfo.expired_at)," * ",this.state.update_fee)),p.a.createElement("td",{className:"text-center"},p.a.createElement("span",{className:"badge badge-pill badge-primary"},"\u4e00\u6b21\u6027")),p.a.createElement("td",{className:"text-right"},(Object(N["e"])(this.props.header.userInfo.expired_at)*this.state.update_fee).toFixed(2))):""))),p.a.createElement("p",{className:"text-muted text-center my-5"},"Thank you for doing business with us.")))),0===this.state.status&&p.a.createElement("h3",{className:"font-w300 mt-4 mb-3"},"\u652f\u4ed8\u65b9\u5f0f"),0===this.state.status&&p.a.createElement("div",{className:"mb-4"},p.a.createElement(r["a"].Group,{onChange:e=>this.setState({method:e.target.value}),size:"large",defaultValue:this.state.method},this.state.paymentMethod.map(e=>{return p.a.createElement(r["a"].Button,{value:e.method},this.getPaymentIcon(e.icon)," ",e.name)})))),0===this.state.status&&p.a.createElement("div",{className:"col-md-4 col-sm-12"},p.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 text-light",style:{background:"#35383D"}},p.a.createElement("h5",{className:"text-light mb-3"},"\u8ba2\u5355\u603b\u989d"),p.a.createElement("div",{className:"row no-gutters pb-3",style:{borderBottom:"1px solid #646669"}},p.a.createElement("div",{className:"col-8"},this.state.plan.name," x ",v["a"].cycleText[this.state.cycle]),p.a.createElement("div",{className:"col-4 text-right"},"\xa5",(this.state.plan[this.state.cycle]/100).toFixed(2))),3===this.state.type?p.a.createElement("div",{className:"row no-gutters py-3",style:{borderBottom:"1px solid #646669"}},p.a.createElement("div",{className:"col-8"},"\u66f4\u6539\u8ba2\u9605\u624b\u7eed\u8d39"),p.a.createElement("div",{className:"col-4 text-right"},"\xa5",(Object(N["e"])(this.props.header.userInfo.expired_at)*this.state.update_fee).toFixed(2))):"",p.a.createElement("div",{className:"pt-3",style:{color:"#646669"}},"\u603b\u8ba1"),p.a.createElement("h1",{className:"text-light mt-3 mb-3"},"\xa5 ",(this.state.total_amount/100).toFixed(2)," CNY"),p.a.createElement("button",{type:"button",className:"btn btn-block btn-primary",disabled:this.state.loading,onClick:()=>this.submit()},this.state.loading?p.a.createElement(o["a"],{type:"loading"}):p.a.createElement("span",null,p.a.createElement("i",{className:"far fa-check-circle"})," \u7ed3\u8d26"))))))),p.a.createElement(l["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:p.a.createElement("div",{style:{textAlign:"center"}},"\u7b49\u5f85\u652f\u4ed8\u4e2d")},p.a.createElement("img",{width:"100%",src:"https://www.zhihu.com/qrcode?url="+this.state.payUrl})))}}t["default"]=Object(E["c"])(e=>{var t=e.header;return{header:t}})(y)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}}}]); \ No newline at end of file diff --git a/public/p__plan.async.js b/public/p__plan.async.js index 4dae7a85..8f6cc99d 100644 --- a/public/p__plan.async.js +++ b/public/p__plan.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[20],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),c=t("/MKj"),l=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===l["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(c["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class g extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===l["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(c["c"])(e=>{var a=e.header;return{header:a}})(g)},ih8c:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=t("q1tI"),r=t.n(s),c=t("Bl7J"),l=t("/MKj"),m=t("t3Un"),o=t("3a4m"),d=t.n(o);class h extends r.a.Component{constructor(){super(...arguments),this.state={plan:[],loading:!0}}componentDidMount(){Object(m["a"])("/guest/plan/fetch").then(e=>{this.setState({plan:e.data,loading:!1})})}getUnitPriceTag(e){return null!==e.month_price?{tag:"\u6708\u4ed8",price:e.month_price}:null!==e.quarter_price?{tag:"\u5b63\u4ed8",price:e.quarter_price}:null!==e.half_year_price?{tag:"\u534a\u5e74\u4ed8",price:e.half_year_price}:null!==e.year_price?{tag:"\u5e74\u4ed8",price:e.year_price}:void 0}render(){return r.a.createElement(c["a"],i()({},this.props,{loading:this.state.loading}),r.a.createElement("main",{id:"main-container"},r.a.createElement("div",{className:"content content-full"},r.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9009\u62e9\u8ba2\u9605"),r.a.createElement("div",{className:"row"},this.state.plan.map(e=>{if(this.getUnitPriceTag(e))return r.a.createElement("div",{className:"col-md-6 col-xl-4 animated fadeInUp"},r.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))},r.a.createElement("div",{className:"block-header"},r.a.createElement("h3",{className:"block-title"},e.name)),r.a.createElement("div",{className:"block-content bg-body-light"},r.a.createElement("div",{className:"py-2"},r.a.createElement("p",{className:"h1 font-w700 mb-2"},"\xa5 ",(this.getUnitPriceTag(e).price/100).toFixed(2)),r.a.createElement("p",{className:"h6 text-muted"},this.getUnitPriceTag(e).tag))),e.content?r.a.createElement("div",{className:"block-content"},r.a.createElement("div",{className:"py-2",dangerouslySetInnerHTML:{__html:e.content}})):"",r.a.createElement("div",{className:"block-content block-content-full bg-body-light"},r.a.createElement("span",{className:"btn btn-hero-primary px-4"},r.a.createElement("i",{className:"fa fa-thumbs-up mr-1"}),"\u7acb\u5373\u8ba2\u9605"))))})))))}}a["default"]=Object(l["c"])()(h)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[20],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),i=t.n(n),s=t("3a4m"),r=t.n(s),c=t("/MKj"),l=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===l["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var a=e.header;return{header:a}})(o),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(c["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class g extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===l["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(c["c"])(e=>{var a=e.header;return{header:a}})(g)},ih8c:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),i=t.n(n),s=t("q1tI"),r=t.n(s),c=t("Bl7J"),l=t("/MKj"),m=t("t3Un"),o=t("3a4m"),d=t.n(o);class h extends r.a.Component{constructor(){super(...arguments),this.state={plan:[],loading:!0}}componentDidMount(){Object(m["a"])("/guest/plan/fetch").then(e=>{this.setState({plan:e.data,loading:!1})})}getUnitPriceTag(e){return null!==e.month_price?{tag:"\u6708\u4ed8",price:e.month_price}:null!==e.quarter_price?{tag:"\u5b63\u4ed8",price:e.quarter_price}:null!==e.half_year_price?{tag:"\u534a\u5e74\u4ed8",price:e.half_year_price}:null!==e.year_price?{tag:"\u5e74\u4ed8",price:e.year_price}:void 0}render(){return r.a.createElement(c["a"],i()({},this.props,{loading:this.state.loading}),r.a.createElement("main",{id:"main-container"},r.a.createElement("div",{className:"content content-full"},r.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u9009\u62e9\u8ba2\u9605"),r.a.createElement("div",{className:"row"},this.state.plan.map(e=>{if(this.getUnitPriceTag(e))return r.a.createElement("div",{className:"col-md-6 col-xl-4 animated fadeInUp"},r.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))},r.a.createElement("div",{className:"block-header"},r.a.createElement("h3",{className:"block-title"},e.name)),r.a.createElement("div",{className:"block-content bg-body-light"},r.a.createElement("div",{className:"py-2"},r.a.createElement("p",{className:"h1 font-w700 mb-2"},"\xa5 ",(this.getUnitPriceTag(e).price/100).toFixed(2)),r.a.createElement("p",{className:"h6 text-muted"},this.getUnitPriceTag(e).tag))),e.content?r.a.createElement("div",{className:"block-content"},r.a.createElement("div",{className:"py-2",dangerouslySetInnerHTML:{__html:e.content}})):"",r.a.createElement("div",{className:"block-content block-content-full bg-body-light"},r.a.createElement("span",{className:"btn btn-hero-primary px-4"},r.a.createElement("i",{className:"fa fa-thumbs-up mr-1"}),"\u7acb\u5373\u8ba2\u9605"))))})))))}}a["default"]=Object(l["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 642c8b1a..16d79aee 100644 --- a/public/p__plan__$plan_id.async.js +++ b/public/p__plan__$plan_id.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[21],{"+URf":function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),s=(a("Pwec"),a("CtXQ")),r=(a("7Kak"),a("9yH6")),l=a("p0pE"),c=a.n(l),m=a("q1tI"),o=a.n(m),d=a("Bl7J"),h=a("/MKj"),p=a("t3Un"),u=a("LbTH"),v=a("3a4m"),b=a.n(v);class E extends o.a.Component{constructor(){super(...arguments),this.state={submit:{plan_id:this.props.match.params.plan_id},loading:!1,layout_login:!0}}componentDidMount(){Object(p["b"])("/user/plan/fetch",{plan_id:this.props.match.params.plan_id}).then(e=>{200===e.code&&this.setState(c()({},e.data,{layout_login:!1}),()=>{this.setState({submit:c()({},this.state.submit,{cycle:this.getFirstPrice()})})})})}getFirstPrice(){return this.state.month_price?"month_price":this.state.quarter_price?"quarter_price":this.state.half_year_price?"half_year_price":this.state.year_price?"year_price":void 0}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,t){this.setState({submit:c()({},this.state.submit,{[e]:t})})}render(){return console.log(this.state),o.a.createElement(d["a"],n()({},this.props,{loading:this.state.layout_login}),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"},"\u914d\u7f6e\u8ba2\u9605"),o.a.createElement("div",{className:"row",id:"cashier"},o.a.createElement("div",{className:"col-md-8 col-sm-12"},o.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 block-fx-shadow"},o.a.createElement("h4",{className:"mb-0"},this.state.name),this.state.content?o.a.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.content},className:"mt-4"}):""),o.a.createElement("h3",{className:"font-w300 mt-4 mb-3"},"\u4ed8\u6b3e\u5468\u671f"),o.a.createElement("div",{className:"mb-3"},o.a.createElement(r["a"].Group,{defaultValue:this.getFirstPrice(),size:"large",onChange:e=>this.submitOnChange("cycle",e.target.value)},null!==this.state.month_price?o.a.createElement(r["a"].Button,{value:"month_price"},"\u6708\u4ed8"):"",null!==this.state.quarter_price?o.a.createElement(r["a"].Button,{value:"quarter_price"},"\u5b63\u4ed8"):"",null!==this.state.half_year_price?o.a.createElement(r["a"].Button,{value:"half_year_price"},"\u534a\u5e74\u4ed8"):"",null!==this.state.year_price?o.a.createElement(r["a"].Button,{value:"year_price"},"\u5e74\u4ed8"):""))),o.a.createElement("div",{className:"col-md-4 col-sm-12"},o.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 text-light",style:{background:"#35383D"}},o.a.createElement("h5",{className:"text-light mb-3"},"\u8ba2\u5355\u603b\u989d"),o.a.createElement("div",{className:"row no-gutters pb-3",style:{borderBottom:"1px solid #646669"}},o.a.createElement("div",{className:"col-8"},this.state.name," x ",u["a"].cycleText[this.state.submit.cycle]),o.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))),o.a.createElement("div",{className:"pt-3",style:{color:"#646669"}},"\u603b\u8ba1"),o.a.createElement("h1",{className:"text-light mt-3 mb-3"},"\xa5 ",(this.state[this.state.submit.cycle]/100).toFixed(2)," CNY"),o.a.createElement("button",{type:"button",className:"btn btn-block btn-primary",disabled:this.state.loading,onClick:()=>this.submit()},this.state.loading?o.a.createElement(s["a"],{type:"loading"}):o.a.createElement("span",null,o.a.createElement("i",{className:"far fa-check-circle"})," \u4e0b\u5355"))))))))}}t["default"]=Object(h["c"])()(E)},Bl7J:function(e,t,a){"use strict";var i=a("q1tI"),n=a.n(i),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[21],{"+URf":function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),s=(a("Pwec"),a("CtXQ")),r=(a("7Kak"),a("9yH6")),l=a("p0pE"),c=a.n(l),m=a("q1tI"),o=a.n(m),d=a("Bl7J"),h=a("/MKj"),p=a("t3Un"),u=a("LbTH"),v=a("3a4m"),b=a.n(v);class E extends o.a.Component{constructor(){super(...arguments),this.state={submit:{plan_id:this.props.match.params.plan_id},loading:!1,layout_login:!0}}componentDidMount(){Object(p["b"])("/user/plan/fetch",{plan_id:this.props.match.params.plan_id}).then(e=>{200===e.code&&this.setState(c()({},e.data,{layout_login:!1}),()=>{this.setState({submit:c()({},this.state.submit,{cycle:this.getFirstPrice()})})})})}getFirstPrice(){return this.state.month_price?"month_price":this.state.quarter_price?"quarter_price":this.state.half_year_price?"half_year_price":this.state.year_price?"year_price":void 0}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,t){this.setState({submit:c()({},this.state.submit,{[e]:t})})}render(){return console.log(this.state),o.a.createElement(d["a"],n()({},this.props,{loading:this.state.layout_login}),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"},"\u914d\u7f6e\u8ba2\u9605"),o.a.createElement("div",{className:"row",id:"cashier"},o.a.createElement("div",{className:"col-md-8 col-sm-12"},o.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 block-fx-shadow"},o.a.createElement("h4",{className:"mb-0"},this.state.name),this.state.content?o.a.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.content},className:"mt-4"}):""),o.a.createElement("h3",{className:"font-w300 mt-4 mb-3"},"\u4ed8\u6b3e\u5468\u671f"),o.a.createElement("div",{className:"mb-3"},o.a.createElement(r["a"].Group,{defaultValue:this.getFirstPrice(),size:"large",onChange:e=>this.submitOnChange("cycle",e.target.value)},null!==this.state.month_price?o.a.createElement(r["a"].Button,{value:"month_price"},"\u6708\u4ed8"):"",null!==this.state.quarter_price?o.a.createElement(r["a"].Button,{value:"quarter_price"},"\u5b63\u4ed8"):"",null!==this.state.half_year_price?o.a.createElement(r["a"].Button,{value:"half_year_price"},"\u534a\u5e74\u4ed8"):"",null!==this.state.year_price?o.a.createElement(r["a"].Button,{value:"year_price"},"\u5e74\u4ed8"):""))),o.a.createElement("div",{className:"col-md-4 col-sm-12"},o.a.createElement("div",{className:"block block-link-pop block-rounded block-bordered px-3 py-3 text-light",style:{background:"#35383D"}},o.a.createElement("h5",{className:"text-light mb-3"},"\u8ba2\u5355\u603b\u989d"),o.a.createElement("div",{className:"row no-gutters pb-3",style:{borderBottom:"1px solid #646669"}},o.a.createElement("div",{className:"col-8"},this.state.name," x ",u["a"].cycleText[this.state.submit.cycle]),o.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))),o.a.createElement("div",{className:"pt-3",style:{color:"#646669"}},"\u603b\u8ba1"),o.a.createElement("h1",{className:"text-light mt-3 mb-3"},"\xa5 ",(this.state[this.state.submit.cycle]/100).toFixed(2)," CNY"),o.a.createElement("button",{type:"button",className:"btn btn-block btn-primary",disabled:this.state.loading,onClick:()=>this.submit()},this.state.loading?o.a.createElement(s["a"],{type:"loading"}):o.a.createElement("span",null,o.a.createElement("i",{className:"far fa-check-circle"})," \u4e0b\u5355"))))))))}}t["default"]=Object(h["c"])()(E)},Bl7J:function(e,t,a){"use strict";var i=a("q1tI"),n=a.n(i),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}}}]); \ No newline at end of file diff --git a/public/p__profile.async.js b/public/p__profile.async.js index adb922a2..c3d01a26 100644 --- a/public/p__profile.async.js +++ b/public/p__profile.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[22],{"9Emu":function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),s=t.n(n),i=(t("BoS7"),t("Sdc0")),r=(t("+L6B"),t("2/Rp")),l=(t("5Dmo"),t("3S7+")),c=(t("Pwec"),t("CtXQ")),o=(t("miYZ"),t("tsqr")),m=t("q1tI"),d=t.n(m),p=t("Bl7J"),h=t("t3Un"),u=t("3a4m"),v=t.n(u),f=t("/MKj");class E extends d.a.Component{constructor(){super(...arguments),this.state={loading:!0}}componentDidMount(){this.fetchData()}fetchData(){this.props.dispatch({type:"header/getUserInfo",complete:()=>{this.setState({loading:!1})}})}changePassword(){if(this.refs.re_password.value!==this.refs.new_password.value)return o["a"].error("\u4e24\u6b21\u65b0\u5bc6\u7801\u8f93\u5165\u4e0d\u540c");Object(h["b"])("/user/changePassword",{old_password:this.refs.old_password.value,new_password:this.refs.new_password.value}).then(e=>{200===e.code&&(o["a"].success("\u4fee\u6539\u6210\u529f\uff0c\u8bf7\u91cd\u65b0\u767b\u9646"),v.a.push("/login"))})}update(e,a){this.setState({[e+"_loading"]:!0},()=>{Object(h["b"])("/user/update",{[e]:a}).then(a=>{200===a.code&&(this.fetchData(),this.setState({[e+"_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"},"\u4e2a\u4eba\u4e2d\u5fc3"),d.a.createElement("div",{className:"row"},d.a.createElement("div",{className:"col-lg-12 animated fadeIn"},d.a.createElement("div",{className:"block block-bordered"},d.a.createElement("div",{className:"block-content pb-3"},d.a.createElement("i",{className:"fa fa-wallet fa-2x text-gray-light float-right"}),d.a.createElement("div",{className:"pb-sm-3"},d.a.createElement("p",{className:"text-muted w-75"},"\u6211\u7684\u94b1\u5305"),d.a.createElement("p",{className:"display-4 text-black font-w300 mb-2"},(this.props.header.userInfo.balance+this.props.header.userInfo.commission_balance/100).toFixed(2),d.a.createElement("span",{className:"font-size-h5 text-muted ml-4"},"CNY")),d.a.createElement(l["a"],{placement:"right",title:d.a.createElement("div",null,d.a.createElement("div",null,"\u8d26\u6237\u4f59\u989d\uff1a",(this.props.header.userInfo.balance/100).toFixed(2)),d.a.createElement("div",null,"\u63a8\u5e7f\u4f63\u91d1\uff1a",(this.props.header.userInfo.commission_balance/100).toFixed(2)))},d.a.createElement("span",{className:"text-muted",style:{cursor:"pointer"}},"\u94b1\u5305\u7ec4\u6210\u90e8\u5206 ",d.a.createElement(c["a"],{type:"question-circle"})))))))),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"},"\u4fee\u6539\u5bc6\u7801"),d.a.createElement("div",{className:"block-options"},d.a.createElement(r["a"],{type:"primary",onClick:()=>this.changePassword()},"\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"},"\u65e7\u5bc6\u7801"),d.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u65e7\u5bc6\u7801",ref:"old_password"})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u65b0\u5bc6\u7801"),d.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801",ref:"new_password"})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u65b0\u5bc6\u7801"),d.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u786e\u8ba4\u65b0\u5bc6\u7801",ref:"re_password"})))))),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"},"\u901a\u77e5")),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"},"\u5230\u671f\u90ae\u4ef6\u63d0\u9192"),d.a.createElement("div",null,d.a.createElement(i["a"],{loading:this.props.header.userInfo.remind_expire_loading,checked:this.props.header.userInfo.remind_expire,onChange:e=>this.update("remind_expire",e?1:0)}))),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u6d41\u91cf\u90ae\u4ef6\u63d0\u9192"),d.a.createElement("div",null,d.a.createElement(i["a"],{loading:this.props.header.userInfo.remind_traffic_loading,checked:this.props.header.userInfo.remind_traffic,onChange:e=>this.update("remind_traffic",e?1:0)}))))))))))}}a["default"]=Object(f["c"])(e=>{var a=e.header;return{header:a}})(E)},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"),c=t("20nU"),o=t("yWgo");class m 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(m),p=t("t3Un");class h extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},s.a.createElement("i",{className:"fa fa-fw fa-search"})," ",s.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),s.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&s.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},s.a.createElement("div",{className:"content-header bg-dark"},s.a.createElement("div",{className:"w-100"},s.a.createElement("div",{className:"input-group"},s.a.createElement("div",{className:"input-group-prepend"},s.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},s.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),s.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(h);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(d,this.props),s.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(f)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[22],{"9Emu":function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),s=t.n(n),i=(t("BoS7"),t("Sdc0")),r=(t("+L6B"),t("2/Rp")),l=(t("5Dmo"),t("3S7+")),c=(t("Pwec"),t("CtXQ")),o=(t("miYZ"),t("tsqr")),m=t("q1tI"),d=t.n(m),p=t("Bl7J"),h=t("t3Un"),u=t("3a4m"),v=t.n(u),f=t("/MKj");class E extends d.a.Component{constructor(){super(...arguments),this.state={loading:!0}}componentDidMount(){this.fetchData()}fetchData(){this.props.dispatch({type:"header/getUserInfo",complete:()=>{this.setState({loading:!1})}})}changePassword(){if(this.refs.re_password.value!==this.refs.new_password.value)return o["a"].error("\u4e24\u6b21\u65b0\u5bc6\u7801\u8f93\u5165\u4e0d\u540c");Object(h["b"])("/user/changePassword",{old_password:this.refs.old_password.value,new_password:this.refs.new_password.value}).then(e=>{200===e.code&&(o["a"].success("\u4fee\u6539\u6210\u529f\uff0c\u8bf7\u91cd\u65b0\u767b\u9646"),v.a.push("/login"))})}update(e,a){this.setState({[e+"_loading"]:!0},()=>{Object(h["b"])("/user/update",{[e]:a}).then(a=>{200===a.code&&(this.fetchData(),this.setState({[e+"_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"},"\u4e2a\u4eba\u4e2d\u5fc3"),d.a.createElement("div",{className:"row"},d.a.createElement("div",{className:"col-lg-12 animated fadeIn"},d.a.createElement("div",{className:"block block-bordered"},d.a.createElement("div",{className:"block-content pb-3"},d.a.createElement("i",{className:"fa fa-wallet fa-2x text-gray-light float-right"}),d.a.createElement("div",{className:"pb-sm-3"},d.a.createElement("p",{className:"text-muted w-75"},"\u6211\u7684\u94b1\u5305"),d.a.createElement("p",{className:"display-4 text-black font-w300 mb-2"},(this.props.header.userInfo.balance+this.props.header.userInfo.commission_balance/100).toFixed(2),d.a.createElement("span",{className:"font-size-h5 text-muted ml-4"},"CNY")),d.a.createElement(l["a"],{placement:"right",title:d.a.createElement("div",null,d.a.createElement("div",null,"\u8d26\u6237\u4f59\u989d\uff1a",(this.props.header.userInfo.balance/100).toFixed(2)),d.a.createElement("div",null,"\u63a8\u5e7f\u4f63\u91d1\uff1a",(this.props.header.userInfo.commission_balance/100).toFixed(2)))},d.a.createElement("span",{className:"text-muted",style:{cursor:"pointer"}},"\u94b1\u5305\u7ec4\u6210\u90e8\u5206 ",d.a.createElement(c["a"],{type:"question-circle"})))))))),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"},"\u4fee\u6539\u5bc6\u7801"),d.a.createElement("div",{className:"block-options"},d.a.createElement(r["a"],{type:"primary",onClick:()=>this.changePassword()},"\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"},"\u65e7\u5bc6\u7801"),d.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u65e7\u5bc6\u7801",ref:"old_password"})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u65b0\u5bc6\u7801"),d.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u8f93\u5165\u65b0\u5bc6\u7801",ref:"new_password"})),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u65b0\u5bc6\u7801"),d.a.createElement("input",{type:"password",className:"form-control",placeholder:"\u8bf7\u786e\u8ba4\u65b0\u5bc6\u7801",ref:"re_password"})))))),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"},"\u901a\u77e5")),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"},"\u5230\u671f\u90ae\u4ef6\u63d0\u9192"),d.a.createElement("div",null,d.a.createElement(i["a"],{loading:this.props.header.userInfo.remind_expire_loading,checked:this.props.header.userInfo.remind_expire,onChange:e=>this.update("remind_expire",e?1:0)}))),d.a.createElement("div",{className:"form-group"},d.a.createElement("label",{for:"example-text-input"},"\u6d41\u91cf\u90ae\u4ef6\u63d0\u9192"),d.a.createElement("div",null,d.a.createElement(i["a"],{loading:this.props.header.userInfo.remind_traffic_loading,checked:this.props.header.userInfo.remind_traffic,onChange:e=>this.update("remind_traffic",e?1:0)}))))))))))}}a["default"]=Object(f["c"])(e=>{var a=e.header;return{header:a}})(E)},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"),c=t("20nU"),o=t("yWgo");class m 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(m),p=t("t3Un");class h extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},s.a.createElement("i",{className:"fa fa-fw fa-search"})," ",s.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),s.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&s.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},s.a.createElement("div",{className:"content-header bg-dark"},s.a.createElement("div",{className:"w-100"},s.a.createElement("div",{className:"input-group"},s.a.createElement("div",{className:"input-group-prepend"},s.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},s.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),s.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(h);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class f extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(d,this.props),s.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(f)}}]); \ No newline at end of file diff --git a/public/p__subscribe.async.js b/public/p__subscribe.async.js index 6a105e52..70931947 100644 --- a/public/p__subscribe.async.js +++ b/public/p__subscribe.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[24],{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"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(o),p=t("t3Un");class h extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},s.a.createElement("i",{className:"fa fa-fw fa-search"})," ",s.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),s.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&s.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},s.a.createElement("div",{className:"content-header bg-dark"},s.a.createElement("div",{className:"w-100"},s.a.createElement("div",{className:"input-group"},s.a.createElement("div",{className:"input-group-prepend"},s.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},s.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),s.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(h);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class E extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(d,this.props),s.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(E)},o5uR:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),s=t.n(n),i=(t("g9YV"),t("wCAj")),r=(t("qVdP"),t("jsC+")),l=(t("lUTK"),t("BvKs")),c=(t("+BJd"),t("mr32")),m=(t("Awhp"),t("KrTs")),o=(t("5Dmo"),t("3S7+")),d=(t("Pwec"),t("CtXQ")),p=(t("miYZ"),t("tsqr")),h=(t("2qtc"),t("kLXV")),u=t("q1tI"),v=t.n(u),E=t("Bl7J"),f=t("/MKj"),b=t("t3Un"),g=t("+QRC"),N=t.n(g),w=t("3a4m"),k=t.n(w),y=t("yWgo"),x=t("wd/R"),j=t.n(x);class C extends v.a.Component{constructor(){super(...arguments),this.state={user:{plan:{}},server:[],loading:!0,show:!1}}componentDidMount(){this.fetchData()}fetchData(){Object(b["a"])("/user/getSubscribe").then(e=>{200===e.code&&this.setState({user:e.data,loading:!1})}),Object(b["a"])("/user/server/fetch").then(e=>{200===e.code&&this.setState({server:e.data})})}getTags(e){if(e)return e=JSON.parse(e),e}resetSecurity(){var e=this;h["a"].confirm({title:"\u786e\u5b9a\u8981\u91cd\u7f6eUUID\u53ca\u8ba2\u9605\uff1f",content:"\u5982\u679c\u4f60\u7684\u8ba2\u9605\u5730\u5740\u6216UUID\u6cc4\u9732\u53ef\u4ee5\u8fdb\u884c\u6b64\u64cd\u4f5c\u3002\u91cd\u7f6e\u540e\u4f60\u7684UUID\u53ca\u8ba2\u9605\u5c06\u4f1a\u53d8\u66f4\uff0c\u9700\u8981\u91cd\u65b0\u8fdb\u884c\u8ba2\u9605\u3002",onOk(){Object(b["a"])("/user/resetSecurity").then(a=>{200===a.code&&(p["a"].success("\u91cd\u7f6e\u6210\u529f"),e.fetchData())})},onCancel(){}})}isExpire(){return this.state.user.expired_at<(new Date).getTime()/1e3}render(){var e=[{title:"\u540d\u79f0",dataIndex:"name",key:"name"},{title:v.a.createElement("span",null,"\u72b6\u6001 ",v.a.createElement(o["a"],{placement:"top",title:"\u8282\u70b9\u4e94\u5206\u949f\u5185\u8282\u70b9\u5728\u7ebf\u60c5\u51b5"},v.a.createElement(d["a"],{type:"question-circle"}))),dataIndex:"last_check_at",key:"last_check_at",align:"center",render:e=>{return v.a.createElement(m["a"],{status:(new Date).getTime()/1e3-300>e?"error":"processing"})}},{title:"\u670d\u52a1\u5668",dataIndex:"host",key:"host",render:e=>{return v.a.createElement("a",{href:"javascript:void(0)",onClick:()=>{N()(e),p["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236")}},{title:"\u7aef\u53e3",dataIndex:"port",key:"port",render:e=>{return v.a.createElement("a",{href:"javascript:void(0)",onClick:()=>{N()(e),p["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236")}},{title:v.a.createElement("span",null,"\u500d\u7387 ",v.a.createElement(o["a"],{placement:"top",title:"\u4f7f\u7528\u7684\u6d41\u91cf\u5c06\u4e58\u4ee5\u500d\u7387\u8fdb\u884c\u6263\u9664"},v.a.createElement(d["a"],{type:"question-circle"}))),dataIndex:"rate",key:"rate",align:"center",render:e=>{return v.a.createElement(c["a"],{color:"blue",style:{minWidth:60}},e+" x")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return v.a.createElement("div",null,v.a.createElement(r["a"],{trigger:["click"],overlay:v.a.createElement(l["a"],null,v.a.createElement(l["a"].Item,{key:"0",onClick:()=>{N()(a.link),p["a"].success("\u590d\u5236\u6210\u529f")}},v.a.createElement(d["a"],{type:"link"}),"\u590d\u5236\u94fe\u63a5"))},v.a.createElement("a",{href:"javascript:void(0)"},"\u66f4\u591a\u64cd\u4f5c ",v.a.createElement(d["a"],{type:"caret-down"}))))}}];return v.a.createElement(E["a"],s()({},this.props,{loading:this.state.loading}),v.a.createElement("main",{id:"main-container"},v.a.createElement("div",{className:"content content-full"},v.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8ba2\u9605"),this.state.user.plan_id?v.a.createElement("div",{className:"block block-rounded mb-2 animated fadeIn","data-toggle":"appear"},v.a.createElement("div",{className:"block-content block-content-full"},v.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},v.a.createElement("div",{className:"p-1 p-md-3 col-md-6 col-xs-12"},v.a.createElement("h3",{className:"h4 font-w700 mb-1"},this.state.user.plan.name),v.a.createElement("p",{className:"font-size-sm text-muted"},this.isExpire()?v.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"\u5df2\u8fc7\u671f"):v.a.createElement("span",null,"\u4e8e ",j()(1e3*this.state.user.expired_at).format("YYYY/MM/DD")," \u5230\u671f\uff0c\u8ddd\u79bb\u5230\u671f\u8fd8\u6709 ",((this.state.user.expired_at-j()().format("X"))/86400).toFixed(0)," \u5929")),v.a.createElement("div",{className:"mb-0"},v.a.createElement("div",{className:"progress mb-1",style:{height:6}},v.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:Object(y["d"])(this.state.user.u+this.state.user.d,this.state.user.transfer_enable)+"%"}})),v.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},v.a.createElement("span",{className:"font-w700"},Object(y["b"])(this.state.user.u+this.state.user.d))," / ",v.a.createElement("span",{className:"font-w700"},Object(y["b"])(this.state.user.transfer_enable))))),v.a.createElement("div",{className:"p-1 p-md-3 col-md-6 col-xs-12 text-md-right"},v.a.createElement(r["a"],{trigger:["click"],overlay:v.a.createElement(l["a"],null,v.a.createElement(l["a"].Item,{key:"0"},v.a.createElement("a",{onClick:()=>{N()(this.state.user.v2ray_uuid),p["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236 UUID")),v.a.createElement(l["a"].Item,{key:"1"},v.a.createElement("a",{onClick:()=>this.resetSecurity()},"\u91cd\u7f6e UUID\u53ca\u8ba2\u9605")))},v.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},v.a.createElement("i",{className:"fa fa-bullseye mr-1"}),"\u64cd\u4f5c")),Object(y["f"])()?v.a.createElement(r["a"],{trigger:["click"],overlay:v.a.createElement(l["a"],null,v.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(/=+$/,"")},v.a.createElement("a",null,"Quantumult")),v.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]}))},v.a.createElement("a",null,"QuantumultX")),v.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},v.a.createElement("a",null,"Shadowrocket")))},v.a.createElement("a",{className:"btn btn-sm btn-primary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},v.a.createElement("i",{className:"fa fa-rss mr-1"}),"\u4e00\u952e\u8ba2\u9605")):v.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>{N()(this.state.user.subscribe_url),p["a"].success("\u590d\u5236\u6210\u529f")}},v.a.createElement("i",{className:"fa fa-copy mr-1"}),"\u590d\u5236\u8ba2\u9605\u5730\u5740"),v.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)",onClick:()=>k.a.push("/plan/"+this.state.user.plan_id)},v.a.createElement("i",{className:"fa fa-redo mr-1"}),"\u7eed\u8d39"))))):v.a.createElement("a",{className:"block block-rounded mb-2 block-link-pop animated fadeIn",onClick:()=>k.a.push("/plan")},v.a.createElement("div",{className:"block-content block-content-full"},v.a.createElement("div",{className:"text-center align-items-md-center py-5"},v.a.createElement("div",null,v.a.createElement("i",{className:"fa fa-plus fa-2x"})),v.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted pt-2"},"\u6dfb\u52a0\u8ba2\u9605")))),v.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},v.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8282\u70b9")),this.state.server.length>0||!this.isExpire()?v.a.createElement("div",{className:"bg-white"},v.a.createElement(i["a"],{dataSource:this.state.server,columns:e,pagination:!1,scroll:{x:900}})):v.a.createElement("div",{className:"alert alert-dark",role:"alert"},v.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?v.a.createElement("a",{className:"alert-link",href:"javascript:void(0)",onClick:()=>k.a.push("/plan/"+this.state.user.plan_id)},"\u7eed\u8d39"):v.a.createElement("a",{className:"alert-link",href:"javascript:void(0)",onClick:()=>k.a.push("/plan")},"\u8ba2\u9605"),"\u3002")))))}}a["default"]=Object(f["c"])()(C)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[24],{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"),c=t("20nU"),m=t("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:s.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(o),p=t("t3Un");class h extends s.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},s.a.createElement("i",{className:"fa fa-fw fa-search"})," ",s.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),s.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",s.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&s.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},s.a.createElement("div",{className:"content-header bg-dark"},s.a.createElement("div",{className:"w-100"},s.a.createElement("div",{className:"input-group"},s.a.createElement("div",{className:"input-group-prepend"},s.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},s.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),s.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(h);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),s.a.createElement("span",{"data-toggle":"year-copy"})))))}}class E extends s.a.Component{render(){return s.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},s.a.createElement(d,this.props),s.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(E)},o5uR:function(e,a,t){"use strict";t.r(a);var n=t("jehZ"),s=t.n(n),i=(t("g9YV"),t("wCAj")),r=(t("qVdP"),t("jsC+")),l=(t("lUTK"),t("BvKs")),c=(t("+BJd"),t("mr32")),m=(t("Awhp"),t("KrTs")),o=(t("5Dmo"),t("3S7+")),d=(t("Pwec"),t("CtXQ")),p=(t("miYZ"),t("tsqr")),h=(t("2qtc"),t("kLXV")),u=t("q1tI"),v=t.n(u),E=t("Bl7J"),f=t("/MKj"),b=t("t3Un"),g=t("+QRC"),N=t.n(g),w=t("3a4m"),k=t.n(w),y=t("yWgo"),x=t("wd/R"),j=t.n(x);class C extends v.a.Component{constructor(){super(...arguments),this.state={user:{plan:{}},server:[],loading:!0,show:!1}}componentDidMount(){this.fetchData()}fetchData(){Object(b["a"])("/user/getSubscribe").then(e=>{200===e.code&&this.setState({user:e.data,loading:!1})}),Object(b["a"])("/user/server/fetch").then(e=>{200===e.code&&this.setState({server:e.data})})}getTags(e){if(e)return e=JSON.parse(e),e}resetSecurity(){var e=this;h["a"].confirm({title:"\u786e\u5b9a\u8981\u91cd\u7f6eUUID\u53ca\u8ba2\u9605\uff1f",content:"\u5982\u679c\u4f60\u7684\u8ba2\u9605\u5730\u5740\u6216UUID\u6cc4\u9732\u53ef\u4ee5\u8fdb\u884c\u6b64\u64cd\u4f5c\u3002\u91cd\u7f6e\u540e\u4f60\u7684UUID\u53ca\u8ba2\u9605\u5c06\u4f1a\u53d8\u66f4\uff0c\u9700\u8981\u91cd\u65b0\u8fdb\u884c\u8ba2\u9605\u3002",onOk(){Object(b["a"])("/user/resetSecurity").then(a=>{200===a.code&&(p["a"].success("\u91cd\u7f6e\u6210\u529f"),e.fetchData())})},onCancel(){}})}isExpire(){return this.state.user.expired_at<(new Date).getTime()/1e3}render(){var e=[{title:"\u540d\u79f0",dataIndex:"name",key:"name"},{title:v.a.createElement("span",null,"\u72b6\u6001 ",v.a.createElement(o["a"],{placement:"top",title:"\u8282\u70b9\u4e94\u5206\u949f\u5185\u8282\u70b9\u5728\u7ebf\u60c5\u51b5"},v.a.createElement(d["a"],{type:"question-circle"}))),dataIndex:"last_check_at",key:"last_check_at",align:"center",render:e=>{return v.a.createElement(m["a"],{status:(new Date).getTime()/1e3-300>e?"error":"processing"})}},{title:"\u670d\u52a1\u5668",dataIndex:"host",key:"host",render:e=>{return v.a.createElement("a",{href:"javascript:void(0)",onClick:()=>{N()(e),p["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236")}},{title:"\u7aef\u53e3",dataIndex:"port",key:"port",render:e=>{return v.a.createElement("a",{href:"javascript:void(0)",onClick:()=>{N()(e),p["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236")}},{title:v.a.createElement("span",null,"\u500d\u7387 ",v.a.createElement(o["a"],{placement:"top",title:"\u4f7f\u7528\u7684\u6d41\u91cf\u5c06\u4e58\u4ee5\u500d\u7387\u8fdb\u884c\u6263\u9664"},v.a.createElement(d["a"],{type:"question-circle"}))),dataIndex:"rate",key:"rate",align:"center",render:e=>{return v.a.createElement(c["a"],{color:"blue",style:{minWidth:60}},e+" x")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,a)=>{return v.a.createElement("div",null,v.a.createElement(r["a"],{trigger:["click"],overlay:v.a.createElement(l["a"],null,v.a.createElement(l["a"].Item,{key:"0",onClick:()=>{N()(a.link),p["a"].success("\u590d\u5236\u6210\u529f")}},v.a.createElement(d["a"],{type:"link"}),"\u590d\u5236\u94fe\u63a5"))},v.a.createElement("a",{href:"javascript:void(0)"},"\u66f4\u591a\u64cd\u4f5c ",v.a.createElement(d["a"],{type:"caret-down"}))))}}];return v.a.createElement(E["a"],s()({},this.props,{loading:this.state.loading}),v.a.createElement("main",{id:"main-container"},v.a.createElement("div",{className:"content content-full"},v.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8ba2\u9605"),this.state.user.plan_id?v.a.createElement("div",{className:"block block-rounded mb-2 animated fadeIn","data-toggle":"appear"},v.a.createElement("div",{className:"block-content block-content-full"},v.a.createElement("div",{className:"d-md-flex justify-content-md-between align-items-md-center"},v.a.createElement("div",{className:"p-1 p-md-3 col-md-6 col-xs-12"},v.a.createElement("h3",{className:"h4 font-w700 mb-1"},this.state.user.plan.name),v.a.createElement("p",{className:"font-size-sm text-muted"},this.isExpire()?v.a.createElement("a",{className:"font-w600 text-danger",href:"javascript:void(0)"},"\u5df2\u8fc7\u671f"):v.a.createElement("span",null,"\u4e8e ",j()(1e3*this.state.user.expired_at).format("YYYY/MM/DD")," \u5230\u671f\uff0c\u8ddd\u79bb\u5230\u671f\u8fd8\u6709 ",((this.state.user.expired_at-j()().format("X"))/86400).toFixed(0)," \u5929")),v.a.createElement("div",{className:"mb-0"},v.a.createElement("div",{className:"progress mb-1",style:{height:6}},v.a.createElement("div",{className:"progress-bar progress-bar-striped progress-bar-animated bg-success",role:"progressbar",style:{width:Object(y["d"])(this.state.user.u+this.state.user.d,this.state.user.transfer_enable)+"%"}})),v.a.createElement("p",{className:"font-size-sm font-w600 mb-3"},v.a.createElement("span",{className:"font-w700"},Object(y["b"])(this.state.user.u+this.state.user.d))," / ",v.a.createElement("span",{className:"font-w700"},Object(y["b"])(this.state.user.transfer_enable))))),v.a.createElement("div",{className:"p-1 p-md-3 col-md-6 col-xs-12 text-md-right"},v.a.createElement(r["a"],{trigger:["click"],overlay:v.a.createElement(l["a"],null,v.a.createElement(l["a"].Item,{key:"0"},v.a.createElement("a",{onClick:()=>{N()(this.state.user.v2ray_uuid),p["a"].success("\u590d\u5236\u6210\u529f")}},"\u590d\u5236 UUID")),v.a.createElement(l["a"].Item,{key:"1"},v.a.createElement("a",{onClick:()=>this.resetSecurity()},"\u91cd\u7f6e UUID\u53ca\u8ba2\u9605")))},v.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},v.a.createElement("i",{className:"fa fa-bullseye mr-1"}),"\u64cd\u4f5c")),Object(y["f"])()?v.a.createElement(r["a"],{trigger:["click"],overlay:v.a.createElement(l["a"],null,v.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(/=+$/,"")},v.a.createElement("a",null,"Quantumult")),v.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]}))},v.a.createElement("a",null,"QuantumultX")),v.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},v.a.createElement("a",null,"Shadowrocket")))},v.a.createElement("a",{className:"btn btn-sm btn-primary btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)"},v.a.createElement("i",{className:"fa fa-rss mr-1"}),"\u4e00\u952e\u8ba2\u9605")):v.a.createElement("a",{className:"btn btn-sm btn-outline-warning btn-rounded px-3 mr-1 my-1",href:"javascript:void(0)",onClick:()=>{N()(this.state.user.subscribe_url),p["a"].success("\u590d\u5236\u6210\u529f")}},v.a.createElement("i",{className:"fa fa-copy mr-1"}),"\u590d\u5236\u8ba2\u9605\u5730\u5740"),v.a.createElement("a",{className:"btn btn-sm btn-outline-danger btn-rounded px-3 my-1",href:"javascript:void(0)",onClick:()=>k.a.push("/plan/"+this.state.user.plan_id)},v.a.createElement("i",{className:"fa fa-redo mr-1"}),"\u7eed\u8d39"))))):v.a.createElement("a",{className:"block block-rounded mb-2 block-link-pop animated fadeIn",onClick:()=>k.a.push("/plan")},v.a.createElement("div",{className:"block-content block-content-full"},v.a.createElement("div",{className:"text-center align-items-md-center py-5"},v.a.createElement("div",null,v.a.createElement("i",{className:"fa fa-plus fa-2x"})),v.a.createElement("div",{className:"font-size-sm font-w700 text-uppercase text-muted pt-2"},"\u6dfb\u52a0\u8ba2\u9605")))),v.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},v.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u8282\u70b9")),this.state.server.length>0||!this.isExpire()?v.a.createElement("div",{className:"bg-white"},v.a.createElement(i["a"],{dataSource:this.state.server,columns:e,pagination:!1,scroll:{x:900}})):v.a.createElement("div",{className:"alert alert-dark",role:"alert"},v.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?v.a.createElement("a",{className:"alert-link",href:"javascript:void(0)",onClick:()=>k.a.push("/plan/"+this.state.user.plan_id)},"\u7eed\u8d39"):v.a.createElement("a",{className:"alert-link",href:"javascript:void(0)",onClick:()=>k.a.push("/plan")},"\u8ba2\u9605"),"\u3002")))))}}a["default"]=Object(f["c"])()(C)}}]); \ No newline at end of file diff --git a/public/p__ticket.async.js b/public/p__ticket.async.js index d8eeb0ec..d08970e9 100644 --- a/public/p__ticket.async.js +++ b/public/p__ticket.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[25],{Bl7J:function(e,t,a){"use strict";var i=a("q1tI"),n=a.n(i),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},RJTe:function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),s=(a("2qtc"),a("kLXV")),r=(a("OaEy"),a("2fM7")),l=(a("5NDa"),a("5rEg")),c=a("p0pE"),m=a.n(c),o=(a("g9YV"),a("wCAj")),d=(a("/zsF"),a("PArb")),h=(a("Awhp"),a("KrTs")),p=a("q1tI"),u=a.n(p),v=a("Bl7J"),b=a("/MKj"),E=a("t3Un"),f=a("3a4m"),g=a.n(f),N=(a("LbTH"),a("wd/R")),y=a.n(N);class k extends u.a.Component{constructor(){super(...arguments),this.state={tickets:[],loading:!0,visible:!1,submit:{level:1}}}componentDidMount(){this.fetchData()}fetchData(){Object(E["a"])("/user/ticket/fetch").then(e=>{200===e.code&&this.setState({tickets:e.data,loading:!1})})}modalVisible(){this.setState({visible:!this.state.visible},()=>{this.state.visible||this.setState({submit:{level:1}})})}save(){Object(E["b"])("/user/ticket/save",this.state.submit).then(e=>{200===e.code&&(this.fetchData(),this.modalVisible())})}close(e){Object(E["b"])("/user/ticket/close",{id:e}).then(e=>{200===e.code&&this.fetchData()})}render(){var e=["\u4f4e","\u4e2d","\u9ad8"],t=[{title:"#",dataIndex:"id",key:"id"},{title:"\u4e3b\u9898",dataIndex:"subject",key:"subject"},{title:"\u5de5\u5355\u7ea7\u522b",dataIndex:"level",key:"level",render:t=>{return e[t]}},{title:"\u5de5\u5355\u72b6\u6001",dataIndex:"reply_status",key:"reply_status",render:(e,t)=>{return 1===t.status?u.a.createElement("span",null,u.a.createElement(h["a"],{status:"success"}),"\u5df2\u5173\u95ed"):u.a.createElement("span",null,u.a.createElement(h["a"],{status:e?"processing":"error"}),e?"\u5df2\u56de\u590d":"\u5f85\u56de\u590d")}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return y()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u6700\u540e\u56de\u590d",dataIndex:"updated_at",key:"updated_at",render:e=>{return y()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t)=>{return u.a.createElement("div",null,u.a.createElement("a",{href:"javascript:void(0)",onClick:()=>g.a.push("/ticket/"+t.id)},"\u67e5\u770b"),u.a.createElement(d["a"],{type:"vertical"}),u.a.createElement("a",{disabled:t.status,href:"javascript:void(0)",onClick:()=>this.close(t.id)},"\u5173\u95ed"))}}];return u.a.createElement(v["a"],n()({},this.props,{loading:this.state.loading}),u.a.createElement("main",{id:"main-container"},u.a.createElement("div",{className:"content content-full"},u.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},u.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u5de5\u5355"),u.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u65b0\u7684\u5de5\u5355")),u.a.createElement("div",{className:"bg-white"},u.a.createElement(o["a"],{dataSource:this.state.tickets,columns:t,pagination:!1,scroll:{x:900}})))),u.a.createElement(s["a"],{title:"\u65b0\u7684\u5de5\u5355",visible:this.state.visible,onCancel:()=>this.modalVisible(),maskClosable:!0,onOk:()=>this.save()},u.a.createElement("div",null,u.a.createElement("div",{className:"form-group"},u.a.createElement("label",{for:"example-text-input-alt"},"\u4e3b\u9898"),u.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u5de5\u5355\u4e3b\u9898",value:this.state.submit.subject,onChange:e=>{this.setState({submit:m()({},this.state.submit,{subject:e.target.value})})}})),u.a.createElement("div",{className:"form-group"},u.a.createElement("label",{for:"example-text-input-alt"},"\u5de5\u5355\u7b49\u7ea7"),u.a.createElement(r["a"],{placeholder:"\u8bf7\u9009\u62e9\u5de5\u5355\u7b49\u7ea7",style:{width:"100%"},value:["".concat(this.state.submit.level)],onChange:e=>{this.setState({submit:m()({},this.state.submit,{level:e})})}},e.map((e,t)=>{return u.a.createElement(r["a"].Option,{key:t},e)}))),u.a.createElement("div",{className:"form-group"},u.a.createElement("label",{for:"example-text-input-alt"},"\u6d88\u606f"),u.a.createElement(l["a"].TextArea,{rows:5,value:this.state.submit.message,placeholder:"\u8bf7\u63cf\u8ff0\u4f60\u9047\u5230\u7684\u95ee\u9898",onChange:e=>{this.setState({submit:m()({},this.state.submit,{message:e.target.value})})}})))))}}t["default"]=Object(b["c"])()(k)}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[25],{Bl7J:function(e,t,a){"use strict";var i=a("q1tI"),n=a.n(i),s=a("3a4m"),r=a.n(s),l=a("/MKj"),c=a("20nU"),m=a("yWgo");class o 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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:n.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("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:()=>{r.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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var t=e.header;return{header:t}})(o),h=a("t3Un");class p extends n.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},n.a.createElement("i",{className:"fa fa-fw fa-search"})," ",n.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),n.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",n.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&n.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},n.a.createElement("div",{className:"content-header bg-dark"},n.a.createElement("div",{className:"w-100"},n.a.createElement("div",{className:"input-group"},n.a.createElement("div",{className:"input-group-prepend"},n.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},n.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),n.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var t=e.header;return{header:t}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),n.a.createElement("span",{"data-toggle":"year-copy"})))))}}class b extends n.a.Component{render(){return n.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},n.a.createElement(d,this.props),n.a.createElement(u,{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(v,null))}}t["a"]=Object(l["c"])(e=>{var t=e.header;return{header:t}})(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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},RJTe:function(e,t,a){"use strict";a.r(t);var i=a("jehZ"),n=a.n(i),s=(a("2qtc"),a("kLXV")),r=(a("OaEy"),a("2fM7")),l=(a("5NDa"),a("5rEg")),c=a("p0pE"),m=a.n(c),o=(a("g9YV"),a("wCAj")),d=(a("/zsF"),a("PArb")),h=(a("Awhp"),a("KrTs")),p=a("q1tI"),u=a.n(p),v=a("Bl7J"),b=a("/MKj"),E=a("t3Un"),f=a("3a4m"),g=a.n(f),N=(a("LbTH"),a("wd/R")),y=a.n(N);class k extends u.a.Component{constructor(){super(...arguments),this.state={tickets:[],loading:!0,visible:!1,submit:{level:1}}}componentDidMount(){this.fetchData()}fetchData(){Object(E["a"])("/user/ticket/fetch").then(e=>{200===e.code&&this.setState({tickets:e.data,loading:!1})})}modalVisible(){this.setState({visible:!this.state.visible},()=>{this.state.visible||this.setState({submit:{level:1}})})}save(){Object(E["b"])("/user/ticket/save",this.state.submit).then(e=>{200===e.code&&(this.fetchData(),this.modalVisible())})}close(e){Object(E["b"])("/user/ticket/close",{id:e}).then(e=>{200===e.code&&this.fetchData()})}render(){var e=["\u4f4e","\u4e2d","\u9ad8"],t=[{title:"#",dataIndex:"id",key:"id"},{title:"\u4e3b\u9898",dataIndex:"subject",key:"subject"},{title:"\u5de5\u5355\u7ea7\u522b",dataIndex:"level",key:"level",render:t=>{return e[t]}},{title:"\u5de5\u5355\u72b6\u6001",dataIndex:"reply_status",key:"reply_status",render:(e,t)=>{return 1===t.status?u.a.createElement("span",null,u.a.createElement(h["a"],{status:"success"}),"\u5df2\u5173\u95ed"):u.a.createElement("span",null,u.a.createElement(h["a"],{status:e?"processing":"error"}),e?"\u5df2\u56de\u590d":"\u5f85\u56de\u590d")}},{title:"\u521b\u5efa\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return y()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u6700\u540e\u56de\u590d",dataIndex:"updated_at",key:"updated_at",render:e=>{return y()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u64cd\u4f5c",dataIndex:"action",key:"action",align:"right",render:(e,t)=>{return u.a.createElement("div",null,u.a.createElement("a",{href:"javascript:void(0)",onClick:()=>g.a.push("/ticket/"+t.id)},"\u67e5\u770b"),u.a.createElement(d["a"],{type:"vertical"}),u.a.createElement("a",{disabled:t.status,href:"javascript:void(0)",onClick:()=>this.close(t.id)},"\u5173\u95ed"))}}];return u.a.createElement(v["a"],n()({},this.props,{loading:this.state.loading}),u.a.createElement("main",{id:"main-container"},u.a.createElement("div",{className:"content content-full"},u.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},u.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6211\u7684\u5de5\u5355"),u.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3",onClick:()=>this.modalVisible()},"\u65b0\u7684\u5de5\u5355")),u.a.createElement("div",{className:"bg-white"},u.a.createElement(o["a"],{dataSource:this.state.tickets,columns:t,pagination:!1,scroll:{x:900}})))),u.a.createElement(s["a"],{title:"\u65b0\u7684\u5de5\u5355",visible:this.state.visible,onCancel:()=>this.modalVisible(),maskClosable:!0,onOk:()=>this.save()},u.a.createElement("div",null,u.a.createElement("div",{className:"form-group"},u.a.createElement("label",{for:"example-text-input-alt"},"\u4e3b\u9898"),u.a.createElement(l["a"],{placeholder:"\u8bf7\u8f93\u5165\u5de5\u5355\u4e3b\u9898",value:this.state.submit.subject,onChange:e=>{this.setState({submit:m()({},this.state.submit,{subject:e.target.value})})}})),u.a.createElement("div",{className:"form-group"},u.a.createElement("label",{for:"example-text-input-alt"},"\u5de5\u5355\u7b49\u7ea7"),u.a.createElement(r["a"],{placeholder:"\u8bf7\u9009\u62e9\u5de5\u5355\u7b49\u7ea7",style:{width:"100%"},value:["".concat(this.state.submit.level)],onChange:e=>{this.setState({submit:m()({},this.state.submit,{level:e})})}},e.map((e,t)=>{return u.a.createElement(r["a"].Option,{key:t},e)}))),u.a.createElement("div",{className:"form-group"},u.a.createElement("label",{for:"example-text-input-alt"},"\u6d88\u606f"),u.a.createElement(l["a"].TextArea,{rows:5,value:this.state.submit.message,placeholder:"\u8bf7\u63cf\u8ff0\u4f60\u9047\u5230\u7684\u95ee\u9898",onChange:e=>{this.setState({submit:m()({},this.state.submit,{message:e.target.value})})}})))))}}t["default"]=Object(b["c"])()(k)}}]); \ No newline at end of file diff --git a/public/p__ticket__$ticket_id.async.js b/public/p__ticket__$ticket_id.async.js index bc1d36a0..c210c231 100644 --- a/public/p__ticket__$ticket_id.async.js +++ b/public/p__ticket__$ticket_id.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[26],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),i=a.n(n),s=a("3a4m"),r=a.n(s),c=a("/MKj"),l=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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 ".concat(1===l["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(c["c"])(e=>{var t=e.header;return{header:t}})(p);class f 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.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 ".concat(1===l["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(f,null))}}t["a"]=Object(c["c"])(e=>{var t=e.header;return{header:t}})(v)},FPmv:function(e,t,a){"use strict";a.r(t);var n,i=a("jehZ"),s=a.n(i),r=(a("miYZ"),a("tsqr")),c=a("p0pE"),l=a.n(c),o=a("q1tI"),m=a.n(o),d=a("Bl7J"),h=a("/MKj"),p=a("t3Un"),u=(a("LbTH"),a("yW/I"));class f extends m.a.Component{constructor(){super(...arguments),this.state={message:[],loading:!0,submit:{},sendLoading:!1}}componentDidMount(){this.fetchData(),n=(()=>setTimeout(()=>{this.fetchData(),"function"===typeof n&&n()},5e3)),n()}componentWillUnmount(){n=void 0}fetchData(){Object(p["a"])("/user/ticket/fetch",{id:this.props.match.params.ticket_id}).then(e=>{200===e.code&&this.setState(l()({},e.data,{loading:!1}))})}reply(e){this.setState({sendLoading:!0},()=>{r["a"].loading("\u53d1\u9001\u4e2d"),Object(p["b"])("/user/ticket/reply",l()({id:this.props.match.params.ticket_id},this.state.submit)).then(t=>{r["a"].destroy(),this.setState({sendLoading:!1}),200===t.code&&(r["a"].success("\u53d1\u9001\u6210\u529f"),this.fetchData(),this.setState({submit:{}},()=>{e()}))})})}render(){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"},"# \u5de5\u5355",this.props.match.params.ticket_id)),m.a.createElement(u["a"],{title:document.title,description:"Support",message:this.state.message,onKeyDown:(e,t)=>{13!==e.keyCode||this.state.sendLoading||this.reply(t)},onChange:e=>{this.setState({submit:{message:e.target.value}})}}))))}}t["default"]=Object(h["c"])(e=>{var t=e.header;return{header:t}})(f)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},"yW/I":function(e,t,a){"use strict";a.d(t,"a",function(){return c});var n=a("q1tI"),i=a.n(n),s=a("wd/R"),r=a.n(s);class c extends i.a.Component{constructor(){super(...arguments),this.state={},this.chatCount=0}componentDidMount(){this.chatScroll()}componentDidUpdate(){this.chatCount!==this.props.message.length&&(this.chatCount=this.props.message.length,this.chatScroll())}chatScroll(){this.refs.chat&&this.refs.chat.scrollTo(0,this.refs.chat.scrollHeight)}render(){return i.a.createElement("div",{className:"block block-rounded"},i.a.createElement("div",{className:"block-content block-content-full bg-primary"},i.a.createElement("p",{className:"font-size-lg font-w600 text-white mt-0 mb-0"},this.props.title),i.a.createElement("p",{className:"text-white-75 mb-0"},this.props.description)),i.a.createElement("div",{className:"js-chat-messages block-content block-content-full text-wrap-break-word overflow-y-auto",style:{height:window.innerHeight-450},ref:"chat"},this.props.message.map(e=>{return e.is_me?i.a.createElement("div",null,i.a.createElement("div",{className:"font-size-sm font-italic text-muted animated fadeIn my-2 text-right"},r()(1e3*e.created_at).format("YYYY/MM/DD HH:mm")),i.a.createElement("div",{className:"text-right ml-4"},i.a.createElement("div",{className:"d-inline-block font-w600 animated fadeIn bg-body-light border-3x px-3 py-2 mb-2 shadow-sm mw-100 border-right border-primary rounded-left text-left"},e.message))):i.a.createElement("div",null,i.a.createElement("div",{className:"font-size-sm font-italic text-muted animated fadeIn my-2"},r()(1e3*e.created_at).format("YYYY/MM/DD HH:mm")),i.a.createElement("div",{className:"mr-4"},i.a.createElement("div",{className:"d-inline-block font-w600 animated fadeIn bg-body-light border-3x px-3 py-2 mb-2 shadow-sm mw-100 border-left border-dark rounded-right"},e.message)))})),i.a.createElement("div",{className:"js-chat-form block-content p-2 bg-body-dark"},i.a.createElement("input",{onKeyDown:e=>this.props.onKeyDown(e,()=>{this.refs.message&&(this.refs.message.value="")}),ref:"message",type:"text",className:"js-chat-input form-control form-control-alt",placeholder:"\u8f93\u5165\u5185\u5bb9\u56de\u590d\u5de5\u5355...",onChange:e=>this.props.onChange(e)})))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[26],{Bl7J:function(e,t,a){"use strict";var n=a("q1tI"),i=a.n(n),s=a("3a4m"),r=a.n(s),c=a("/MKj"),l=a("20nU"),o=a("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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: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 ".concat(1===l["a"].theme?"":"bg-header-dark")},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 d=Object(c["c"])(e=>{var t=e.header;return{header:t}})(m),h=a("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(c["c"])(e=>{var t=e.header;return{header:t}})(p);class f 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),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 ".concat(1===l["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(f,null))}}t["a"]=Object(c["c"])(e=>{var t=e.header;return{header:t}})(v)},FPmv:function(e,t,a){"use strict";a.r(t);var n,i=a("jehZ"),s=a.n(i),r=(a("miYZ"),a("tsqr")),c=a("p0pE"),l=a.n(c),o=a("q1tI"),m=a.n(o),d=a("Bl7J"),h=a("/MKj"),p=a("t3Un"),u=(a("LbTH"),a("yW/I"));class f extends m.a.Component{constructor(){super(...arguments),this.state={message:[],loading:!0,submit:{},sendLoading:!1}}componentDidMount(){this.fetchData(),n=(()=>setTimeout(()=>{this.fetchData(),"function"===typeof n&&n()},5e3)),n()}componentWillUnmount(){n=void 0}fetchData(){Object(p["a"])("/user/ticket/fetch",{id:this.props.match.params.ticket_id}).then(e=>{200===e.code&&this.setState(l()({},e.data,{loading:!1}))})}reply(e){this.setState({sendLoading:!0},()=>{r["a"].loading("\u53d1\u9001\u4e2d"),Object(p["b"])("/user/ticket/reply",l()({id:this.props.match.params.ticket_id},this.state.submit)).then(t=>{r["a"].destroy(),this.setState({sendLoading:!1}),200===t.code&&(r["a"].success("\u53d1\u9001\u6210\u529f"),this.fetchData(),this.setState({submit:{}},()=>{e()}))})})}render(){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"},"# \u5de5\u5355",this.props.match.params.ticket_id)),m.a.createElement(u["a"],{title:document.title,description:"Support",message:this.state.message,onKeyDown:(e,t)=>{13!==e.keyCode||this.state.sendLoading||this.reply(t)},onChange:e=>{this.setState({submit:{message:e.target.value}})}}))))}}t["default"]=Object(h["c"])(e=>{var t=e.header;return{header:t}})(f)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},"yW/I":function(e,t,a){"use strict";a.d(t,"a",function(){return c});var n=a("q1tI"),i=a.n(n),s=a("wd/R"),r=a.n(s);class c extends i.a.Component{constructor(){super(...arguments),this.state={},this.chatCount=0}componentDidMount(){this.chatScroll()}componentDidUpdate(){this.chatCount!==this.props.message.length&&(this.chatCount=this.props.message.length,this.chatScroll())}chatScroll(){this.refs.chat&&this.refs.chat.scrollTo(0,this.refs.chat.scrollHeight)}render(){return i.a.createElement("div",{className:"block block-rounded"},i.a.createElement("div",{className:"block-content block-content-full bg-primary"},i.a.createElement("p",{className:"font-size-lg font-w600 text-white mt-0 mb-0"},this.props.title),i.a.createElement("p",{className:"text-white-75 mb-0"},this.props.description)),i.a.createElement("div",{className:"js-chat-messages block-content block-content-full text-wrap-break-word overflow-y-auto",style:{height:window.innerHeight-450},ref:"chat"},this.props.message.map(e=>{return e.is_me?i.a.createElement("div",null,i.a.createElement("div",{className:"font-size-sm font-italic text-muted animated fadeIn my-2 text-right"},r()(1e3*e.created_at).format("YYYY/MM/DD HH:mm")),i.a.createElement("div",{className:"text-right ml-4"},i.a.createElement("div",{className:"d-inline-block font-w600 animated fadeIn bg-body-light border-3x px-3 py-2 mb-2 shadow-sm mw-100 border-right border-primary rounded-left text-left"},e.message))):i.a.createElement("div",null,i.a.createElement("div",{className:"font-size-sm font-italic text-muted animated fadeIn my-2"},r()(1e3*e.created_at).format("YYYY/MM/DD HH:mm")),i.a.createElement("div",{className:"mr-4"},i.a.createElement("div",{className:"d-inline-block font-w600 animated fadeIn bg-body-light border-3x px-3 py-2 mb-2 shadow-sm mw-100 border-left border-dark rounded-right"},e.message)))})),i.a.createElement("div",{className:"js-chat-form block-content p-2 bg-body-dark"},i.a.createElement("input",{onKeyDown:e=>this.props.onKeyDown(e,()=>{this.refs.message&&(this.refs.message.value="")}),ref:"message",type:"text",className:"js-chat-input form-control form-control-alt",placeholder:"\u8f93\u5165\u5185\u5bb9\u56de\u590d\u5de5\u5355...",onChange:e=>this.props.onChange(e)})))}}}}]); \ No newline at end of file diff --git a/public/p__traffic.async.js b/public/p__traffic.async.js index 00045d1f..bb685fec 100644 --- a/public/p__traffic.async.js +++ b/public/p__traffic.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[27],{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"),c=t("20nU"),o=t("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(m),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class g extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(g)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},seQb:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return b});var n=t("jehZ"),i=t.n(n),s=(t("g9YV"),t("wCAj")),r=(t("7Kak"),t("9yH6")),l=(t("5Dmo"),t("3S7+")),c=(t("Pwec"),t("CtXQ")),o=(t("+BJd"),t("mr32")),m=t("p0pE"),d=t.n(m),h=t("q1tI"),p=t.n(h),u=t("Bl7J"),v=t("t3Un"),g=t("yWgo"),f=(t("LbTH"),t("wd/R")),E=t.n(f);class b extends p.a.Component{constructor(){super(...arguments),this.state={traffics:[],pagination:{current:1,pageSize:10,total:0},type:0,loading:!0,sum:{}}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=d()({},this.state.pagination),Object.assign(e,{type:this.state.type}),Object(v["a"])("/user/server/log/fetch",e).then(e=>{200===e.code&&this.setState({traffics:e.data,pagination:d()({},this.state.pagination,{total:e.total}),loading:!1,sum:e.sum})})}searchOnChange(e){this.inputDelayTimer&&clearTimeout(this.inputDelayTimer),this.inputDelayTimer=setTimeout(function(){this.inputDelayTimer=null,this.setState({trade_no:e,pagination:d()({},this.state.pagination,{current:1})},()=>{this.fetchData()})}.bind(this),400)}render(){var e=["\u4eca\u65e5","\u672c\u5468","\u672c\u6708"],a=[{title:"\u8bb0\u5f55\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u5b9e\u9645\u4e0a\u884c",dataIndex:"u",key:"u",render:e=>Object(g["b"])(e)},{title:"\u5b9e\u9645\u4e0b\u884c",dataIndex:"d",key:"d",render:e=>Object(g["b"])(e)},{title:"\u6263\u8d39\u500d\u7387",dataIndex:"rate",key:"rate",align:"center",render:e=>{return p.a.createElement(o["a"],{color:"blue",style:{minWidth:60}},e+" x")}},{title:p.a.createElement(l["a"],{placement:"topRight",title:"\u516c\u5f0f\uff1a(\u5b9e\u9645\u4e0a\u884c + \u5b9e\u9645\u4e0b\u884c) x \u6263\u8d39\u500d\u7387 = \u6263\u9664\u6d41\u91cf"},"\u5408\u8ba1 ",p.a.createElement(c["a"],{type:"question-circle"})),dataIndex:"total",key:"total",align:"right",render:(e,a)=>{return Object(g["b"])((parseInt(a.u)+parseInt(a.d))*a.rate)}}];return p.a.createElement(u["a"],i()({},this.props,{loading:this.state.loading}),p.a.createElement("main",{id:"main-container"},p.a.createElement("div",{className:"content content-full"},p.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},p.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6d41\u91cf\u660e\u7ec6")),p.a.createElement("div",{className:"bg-white"},p.a.createElement("div",{className:"p-3",style:{float:"left",position:"relative",zIndex:100}},p.a.createElement(r["a"].Group,{value:this.state.type,onChange:e=>{this.setState({type:e.target.value},()=>this.fetchData())}},p.a.createElement(r["a"].Button,{value:0},"\u4eca\u65e5"),p.a.createElement(r["a"].Button,{value:1},"\u672c\u5468"),p.a.createElement(r["a"].Button,{value:2},"\u672c\u6708"))),p.a.createElement("div",{className:"p-3",style:{float:"right",lineHeight:"34px"}},e[this.state.type],"\u5408\u8ba1\u4f7f\u7528 ",Object(g["b"])(this.state.sum.u+this.state.sum.d)),p.a.createElement(s["a"],{dataSource:this.state.traffics,pagination:d()({},this.state.pagination,{size:"small"}),columns:a,scroll:{x:800},onChange:e=>this.paginationOnChange(e)})))))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[27],{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"),c=t("20nU"),o=t("yWgo");class m extends i.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8ba2\u9605",type:"heading"},{title:"\u6211\u7684\u8ba2\u9605",type:"item",href:"/subscribe",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8d22\u52a1",type:"heading"},{title:"\u6211\u7684\u8ba2\u5355",type:"item",href:"/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"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],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:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",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:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{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"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:i.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(o["c"])("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 ".concat(1===c["a"].theme?"":"bg-header-dark")},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 d=Object(l["c"])(e=>{var a=e.header;return{header:a}})(m),h=t("t3Un");class p extends i.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(h["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?"block":"none"}},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("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},i.a.createElement("i",{className:"fa fa-fw fa-search"})," ",i.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),i.a.createElement("div",null),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:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",i.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&i.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},i.a.createElement("div",{className:"content-header bg-dark"},i.a.createElement("div",{className:"w-100"},i.a.createElement("div",{className:"input-group"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},i.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),i.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(l["c"])(e=>{var a=e.header;return{header:a}})(p);class v 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:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),i.a.createElement("span",{"data-toggle":"year-copy"})))))}}class g extends i.a.Component{render(){return i.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===c["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},i.a.createElement(d,this.props),i.a.createElement(u,{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(v,null))}}a["a"]=Object(l["c"])(e=>{var a=e.header;return{header:a}})(g)},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"],commissionStatusText:["\u786e\u8ba4\u4e2d","\u5df2\u786e\u8ba4","\u5df2\u5b8c\u6210"],ticketStatusText:["\u5f00\u542f","\u5f85\u56de\u590d","\u5f85\u7b54\u590d","\u5173\u95ed"]}},seQb:function(e,a,t){"use strict";t.r(a),t.d(a,"default",function(){return b});var n=t("jehZ"),i=t.n(n),s=(t("g9YV"),t("wCAj")),r=(t("7Kak"),t("9yH6")),l=(t("5Dmo"),t("3S7+")),c=(t("Pwec"),t("CtXQ")),o=(t("+BJd"),t("mr32")),m=t("p0pE"),d=t.n(m),h=t("q1tI"),p=t.n(h),u=t("Bl7J"),v=t("t3Un"),g=t("yWgo"),f=(t("LbTH"),t("wd/R")),E=t.n(f);class b extends p.a.Component{constructor(){super(...arguments),this.state={traffics:[],pagination:{current:1,pageSize:10,total:0},type:0,loading:!0,sum:{}}}componentDidMount(){this.fetchData()}paginationOnChange(e){this.setState({pagination:e},()=>this.fetchData())}fetchData(){var e;e=d()({},this.state.pagination),Object.assign(e,{type:this.state.type}),Object(v["a"])("/user/server/log/fetch",e).then(e=>{200===e.code&&this.setState({traffics:e.data,pagination:d()({},this.state.pagination,{total:e.total}),loading:!1,sum:e.sum})})}searchOnChange(e){this.inputDelayTimer&&clearTimeout(this.inputDelayTimer),this.inputDelayTimer=setTimeout(function(){this.inputDelayTimer=null,this.setState({trade_no:e,pagination:d()({},this.state.pagination,{current:1})},()=>{this.fetchData()})}.bind(this),400)}render(){var e=["\u4eca\u65e5","\u672c\u5468","\u672c\u6708"],a=[{title:"\u8bb0\u5f55\u65f6\u95f4",dataIndex:"created_at",key:"created_at",render:e=>{return E()(1e3*e).format("YYYY/MM/DD HH:mm")}},{title:"\u5b9e\u9645\u4e0a\u884c",dataIndex:"u",key:"u",render:e=>Object(g["b"])(e)},{title:"\u5b9e\u9645\u4e0b\u884c",dataIndex:"d",key:"d",render:e=>Object(g["b"])(e)},{title:"\u6263\u8d39\u500d\u7387",dataIndex:"rate",key:"rate",align:"center",render:e=>{return p.a.createElement(o["a"],{color:"blue",style:{minWidth:60}},e+" x")}},{title:p.a.createElement(l["a"],{placement:"topRight",title:"\u516c\u5f0f\uff1a(\u5b9e\u9645\u4e0a\u884c + \u5b9e\u9645\u4e0b\u884c) x \u6263\u8d39\u500d\u7387 = \u6263\u9664\u6d41\u91cf"},"\u5408\u8ba1 ",p.a.createElement(c["a"],{type:"question-circle"})),dataIndex:"total",key:"total",align:"right",render:(e,a)=>{return Object(g["b"])((parseInt(a.u)+parseInt(a.d))*a.rate)}}];return p.a.createElement(u["a"],i()({},this.props,{loading:this.state.loading}),p.a.createElement("main",{id:"main-container"},p.a.createElement("div",{className:"content content-full"},p.a.createElement("div",{className:"d-flex justify-content-between align-items-center"},p.a.createElement("h2",{className:"font-w300 mt-4 mb-3"},"\u6d41\u91cf\u660e\u7ec6")),p.a.createElement("div",{className:"bg-white"},p.a.createElement("div",{className:"p-3",style:{float:"left",position:"relative",zIndex:100}},p.a.createElement(r["a"].Group,{value:this.state.type,onChange:e=>{this.setState({type:e.target.value},()=>this.fetchData())}},p.a.createElement(r["a"].Button,{value:0},"\u4eca\u65e5"),p.a.createElement(r["a"].Button,{value:1},"\u672c\u5468"),p.a.createElement(r["a"].Button,{value:2},"\u672c\u6708"))),p.a.createElement("div",{className:"p-3",style:{float:"right",lineHeight:"34px"}},e[this.state.type],"\u5408\u8ba1\u4f7f\u7528 ",Object(g["b"])(this.state.sum.u+this.state.sum.d)),p.a.createElement(s["a"],{dataSource:this.state.traffics,pagination:d()({},this.state.pagination,{size:"small"}),columns:a,scroll:{x:800},onChange:e=>this.paginationOnChange(e)})))))}}}}]); \ No newline at end of file diff --git a/public/p__tutorial.async.js b/public/p__tutorial.async.js index 061c311e..7baa1cc7 100644 --- a/public/p__tutorial.async.js +++ b/public/p__tutorial.async.js @@ -1 +1 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[28],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),l=t.n(n),s=t("3a4m"),c=t.n(s),i=t("/MKj"),r=t("20nU"),m=t("yWgo");class o extends l.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-user"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("is_admin")&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:l.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 l.a.createElement("li",{className:"nav-main-heading"},a);case"item":return l.a.createElement("li",{className:"nav-main-item"},l.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{c.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,l.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return l.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},l.a.createElement("div",{className:"smini-visible-block"},l.a.createElement("div",{className:"content-header bg-black-10"},l.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},l.a.createElement("span",{className:"text-white-75"},"X"),l.a.createElement("span",{className:"text-white"},"H")))),l.a.createElement("div",{className:"smini-hidden ".concat(1===r["a"].theme?"":"bg-header-dark")},l.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},l.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},l.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),l.a.createElement("div",{className:"d-lg-none"},l.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"})},l.a.createElement("i",{className:"fa fa-times-circle"}))))),l.a.createElement("div",{className:"content-side content-side-full"},l.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var d=Object(i["c"])(e=>{var a=e.header;return{header:a}})(o),p=t("t3Un");class h extends l.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["a"])("/user/logout").then(e=>{c.a.push("/login")})}render(){return l.a.createElement("header",{id:"page-header"},l.a.createElement("div",{className:"content-header"},l.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"block":"none"}},l.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"})},l.a.createElement("i",{className:"fa fa-fw fa-bars"})),this.props.search&&l.a.createElement("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},l.a.createElement("i",{className:"fa fa-fw fa-search"})," ",l.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),l.a.createElement("div",null),l.a.createElement("div",null,this.state.loading?l.a.createElement("div",{className:"spinner-grow text-primary"}):l.a.createElement("div",{className:"dropdown d-inline-block"},l.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()},l.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),l.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),l.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),l.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"},l.a.createElement("div",{className:"p-2"},l.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",l.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&l.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},l.a.createElement("div",{className:"content-header bg-dark"},l.a.createElement("div",{className:"w-100"},l.a.createElement("div",{className:"input-group"},l.a.createElement("div",{className:"input-group-prepend"},l.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},l.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),l.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(i["c"])(e=>{var a=e.header;return{header:a}})(h);class E extends l.a.Component{render(){return l.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},l.a.createElement("div",{className:"content py-0"},l.a.createElement("div",{className:"row font-size-sm"},l.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},l.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),l.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},l.a.createElement("a",{className:"font-w600",href:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.1"),l.a.createElement("span",{"data-toggle":"year-copy"})))))}}class N extends l.a.Component{render(){return l.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===r["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},l.a.createElement(d,this.props),l.a.createElement(u,{search:this.props.search}),this.props.loading?l.a.createElement("main",{id:"main-container"},l.a.createElement("div",{className:"content content-full"},l.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},l.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,l.a.createElement(E,null))}}a["a"]=Object(i["c"])(e=>{var a=e.header;return{header:a}})(N)},MCmo:function(e,a,t){e.exports={row:"row___10Wq0",col:"col___ooUQl",col_img:"col_img___2YHHz",img:"img___2dDCv",step:"step___2Fqd-",action_area:"action_area___ZjErh"}},rUea:function(e,a,t){"use strict";t.r(a);t("bbsP");var n=t("/wGt"),l=t("q1tI"),s=t.n(l),c=t("Bl7J"),i=(t("miYZ"),t("tsqr")),r=(t("14J3"),t("BMrR")),m=(t("jCWc"),t("kPKH")),o=t("p0pE"),d=t.n(o),p=t("MCmo"),h=t.n(p),u=t("t3Un"),E=t("+QRC"),N=t.n(E);class v extends s.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(u["a"])("/user/tutorial/getSubscribeUrl").then(e=>{200===e.code&&this.setState(d()({},e.data))})}render(){return s.a.createElement("div",null,s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"1"),s.a.createElement("div",null,"\u4e0b\u8f7d ClashX \u5ba2\u6237\u7aef\uff0c\u5b89\u88c5\u540e\u8fd0\u884c\u3002"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="".concat(window.location.origin,"/downloads/ClashX.zip")},"\u70b9\u51fb\u4e0b\u8f7d")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/20/uNGrjl2noCL1f5B.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"2"),s.a.createElement("div",null,"\u70b9\u51fb\u901a\u77e5\u680f ClashX \u56fe\u6807\u4fdd\u6301\u9009\u4e2d\u72b6\u6001\uff0c\u6309\u5feb\u6377\u952e \u2318+M(\u8ba2\u9605\u5feb\u6377\u952e)\uff0c\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u70b9\u51fb\u6dfb\u52a0\u8f93\u5165\u4e0b\u65b9\u4fe1\u606f"),s.a.createElement("div",{className:h.a.action_area},s.a.createElement("div",null,"Url\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.subscribe_url),i["a"].success("\u590d\u5236\u6210\u529f")}},this.state.subscribe_url)),s.a.createElement("div",null,"Config Name\uff1a",s.a.createElement("code",{onClick:()=>{N()(document.title),i["a"].success("\u590d\u5236\u6210\u529f")}},document.title))),s.a.createElement("div",{className:"mt-3"},"\u4ea6\u6216\u8005\u6253\u5f00 ClashX \u540e\u70b9\u51fb\u4e0b\u65b9\u6309\u94ae\u4e00\u952e\u914d\u7f6e"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="clash://install-config?url=".concat(this.state.subscribe_url,"&name=").concat(document.title)},"\u4e00\u952e\u914d\u7f6e")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/20/8eB13mRbFuszwxg.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"3"),s.a.createElement("div",null,"\u70b9\u51fb\u901a\u77e5\u680f ClashX \u56fe\u6807\u4fdd\u6301\u9009\u4e2d\u72b6\u6001\uff0c\u6309\u5feb\u6377\u952e \u2318+S(\u8bbe\u7f6e\u4e3a\u7cfb\u7edf\u4ee3\u7406\u5feb\u6377\u952e)\uff0c\u5373\u8fde\u63a5\u5b8c\u6210"))))}}class b extends s.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(u["a"])("/user/tutorial/getSubscribeUrl").then(e=>{200===e.code&&this.setState(d()({},e.data))})}render(){return s.a.createElement("div",null,s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"1"),s.a.createElement("div",null,"\u4e0b\u8f7d V2rayN \u5ba2\u6237\u7aef\u3002"),s.a.createElement("div",null,"\u4e0b\u8f7d\u5b8c\u6210\u540e\u89e3\u538b\uff0c\u89e3\u538b\u5b8c\u6210\u540e\u8fd0\u884cV2rayN"),s.a.createElement("div",null,"\u8fd0\u884c\u65f6\u8bf7\u53f3\u952e\uff0c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="".concat(window.location.origin,"/downloads/V2rayN.zip")},"\u70b9\u51fb\u4e0b\u8f7d"))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"2"),s.a.createElement("div",null,"\u70b9\u51fb\u8ba2\u9605\u6309\u94ae\uff0c\u9009\u62e9\u8ba2\u9605\u8bbe\u7f6e\u70b9\u51fb\u6dfb\u52a0\uff0c\u8f93\u5165\u5982\u4e0b\u5185\u5bb9\u540e\u70b9\u51fb\u786e\u5b9a\u4fdd\u5b58"),s.a.createElement("div",{className:h.a.action_area},s.a.createElement("div",null,"\u5907\u6ce8\uff1a",s.a.createElement("code",{onClick:()=>{N()(document.title),i["a"].success("\u590d\u5236\u6210\u529f")}},document.title)),s.a.createElement("div",null,"\u5730\u5740(url)\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.subscribe_url),i["a"].success("\u590d\u5236\u6210\u529f")}},this.state.subscribe_url)))),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/UkcHNtERTnjLVS8.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"3"),s.a.createElement("div",null,"\u70b9\u51fb\u8ba2\u9605\u540e\uff0c\u4ece\u670d\u52a1\u5668\u5217\u8868\u9009\u62e9\u670d\u52a1\u5668")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/BgPGFQ3kCSuIRjJ.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"4"),s.a.createElement("div",null,"\u70b9\u51fb\u53c2\u6570\u8bbe\u7f6e\uff0c\u627e\u5230Http\u4ee3\u7406\uff0c\u9009\u62e9PAC\u6a21\u5f0f\u540e\u6309\u786e\u5b9a\u4fdd\u5b58\u5373\u542f\u52a8\u4ee3\u7406\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/vnVykKEFT8Lzo3f.jpg"}))))}}class g extends s.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(u["a"])("/user/tutorial/getAppleID").then(e=>{200===e.code&&this.setState(d()({},e.data))}),Object(u["a"])("/user/tutorial/getSubscribeUrl").then(e=>{200===e.code&&this.setState(d()({},e.data))})}render(){return s.a.createElement("div",null,s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"1"),s.a.createElement("div",null,"iOS\u4e0a\u4f7f\u7528\u8bf7\u5728iOS\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u672c\u9875"))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"2"),s.a.createElement("div",null,"\u5728 App Store \u767b\u5f55\u672c\u7ad9\u63d0\u4f9b\u7684\u7f8e\u533a Apple ID \u4e0b\u8f7d\u5ba2\u6237\u7aef\u3002"),s.a.createElement("div",null,"\u4e3a\u4e86\u4fdd\u62a4\u60a8\u7684\u9690\u79c1\uff0c\u8bf7\u52ff\u5728\u624b\u673a\u8bbe\u7f6e\u91cc\u76f4\u63a5\u767b\u5f55\uff0c\u4ec5\u5728 App Store \u767b\u5f55\u5373\u53ef\u3002"),s.a.createElement("div",null,"\u767b\u9646\u5b8c\u6210\u540e\u70b9\u51fb\u4e0b\u65b9\u4e0b\u8f7d\u4f1a\u81ea\u52a8\u5524\u8d77\u4e0b\u8f7d\u3002"),this.state.apple_id?s.a.createElement("div",{className:h.a.action_area},s.a.createElement("div",null,"Apple ID\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.apple_id),i["a"].success("\u590d\u5236\u6210\u529f")}},this.state.apple_id)),s.a.createElement("div",null,"\u5bc6\u7801\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.apple_id_password),i["a"].success("\u590d\u5236\u6210\u529f")}},"\u70b9\u51fb\u590d\u5236\u5bc6\u7801"))):s.a.createElement("div",{className:h.a.action_area},"\u8d26\u53f7\u8fc7\u671f\u6216\u672a\u8ba2\u9605\uff0c\u6216\u7ba1\u7406\u5458\u65e0\u6cd5\u4e3a\u4f60\u63d0\u4f9bApple ID"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="https://apps.apple.com/us/app/shadowrocket/id932747118"},"\u6253\u5f00Apple Store\u4e0b\u8f7d")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/5idkjJ61stWgREV.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"3"),s.a.createElement("div",null,"\u5f85\u5ba2\u6237\u7aef\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u4e0b\u65b9\u4e00\u952e\u8ba2\u9605\u6309\u94ae\u4f1a\u81ea\u52a8\u5524\u8d77\u5e76\u8fdb\u884c\u8ba2\u9605"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="shadowrocket://add/sub://"+window.btoa(this.state.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")+"?remark="+window.v2board.title},"\u4e00\u952e\u8ba2\u9605")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/ZcqlNMb3eg5Uhxd.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"4"),s.a.createElement("div",null,"\u9009\u62e9\u8282\u70b9\u8fdb\u884c\u94fe\u63a5\uff0c\u9996\u6b21\u94fe\u63a5\u8fc7\u7a0b\u6388\u6743\u7a97\u53e3\u8bf7\u4e00\u8def\u5141\u8bb8\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/9Zdxksr7Ey6hjlm.jpg"}))))}}class w extends s.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(u["a"])("/user/tutorial/getSubscribeUrl").then(e=>{200===e.code&&this.setState(d()({},e.data))})}render(){return s.a.createElement("div",null,s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"1"),s.a.createElement("div",null,"\u4e0b\u8f7d V2rayNG \u5ba2\u6237\u7aef\u3002"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="".concat(window.location.origin,"/downloads/V2rayNG.apk")},"\u70b9\u51fb\u4e0b\u8f7d"))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"2"),s.a.createElement("div",null,"\u6253\u5f00 V2rayNG \u70b9\u51fb\u5de6\u4e0a\u89d2\u7684\u83dc\u5355\u56fe\u6807\u6253\u5f00\u4fa7\u8fb9\u680f\uff0c\u968f\u540e\u70b9\u51fb \u8ba2\u9605\u8bbe\u7f6e\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u2795\u6309\u94ae\u65b0\u589e\u8ba2\u9605\u3002"),s.a.createElement("div",null,"\u6309\u7167\u4e0b\u65b9\u5185\u5bb9\u8fdb\u884c\u586b\u5199\uff0c\u586b\u5199\u5b8c\u6bd5\u540e\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u2611\ufe0f\u6309\u94ae\u3002"),s.a.createElement("div",{className:h.a.action_area},s.a.createElement("div",null,"\u5907\u6ce8\uff1a",s.a.createElement("code",{onClick:()=>{N()(document.title),i["a"].success("\u590d\u5236\u6210\u529f")}},document.title)),s.a.createElement("div",null,"\u5730\u5740(url)\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.subscribe_url),i["a"].success("\u590d\u5236\u6210\u529f")}},this.state.subscribe_url)))),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/ghuVkTe6LBqRxSO.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"3"),s.a.createElement("div",null,"\u518d\u6b21\u4ece\u4fa7\u8fb9\u680f\u8fdb\u5165 \u8bbe\u7f6e \u9875\u9762\uff0c\u70b9\u51fb \u8def\u7531\u6a21\u5f0f \u5c06\u5176\u66f4\u6539\u4e3a \b\u7ed5\u8fc7\u5c40\u57df\u7f51\u53ca\u5927\u9646\u5730\u5740\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/Tf1AGoXZuhJrwOq.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"4"),s.a.createElement("div",null,"\u968f\u540e\u4ece\u4fa7\u8fb9\u680f\u56de\u5230 \u914d\u7f6e\u6587\u4ef6 \u9875\u9762\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u7701\u7565\u53f7\u56fe\u6807\u9009\u62e9\u66f4\u65b0\u8ba2\u9605\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/UtfPShQXupRmB4L.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"5"),s.a.createElement("div",null,"\u70b9\u51fb\u9009\u62e9\u60a8\u9700\u8981\u7684\u8282\u70b9\uff0c\u70b9\u51fb\u53f3\u4e0b\u89d2\u7684V\u5b57\u6309\u94ae\u5373\u53ef\u8fde\u63a5\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/ZkbNsSrAg3m5Dny.jpg"}))))}}t.d(a,"default",function(){return f});class f extends s.a.Component{constructor(){super(...arguments),this.state={visible:!1,platform:void 0}}componentDidMount(){}onShow(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.setState({visible:!this.state.visible,platform:e})}tutorialTemplate(){switch(this.state.platform){case"macos":return s.a.createElement(v,null);case"windows":return s.a.createElement(b,null);case"ios":return s.a.createElement(g,null);case"android":return s.a.createElement(w,null)}}render(){return s.a.createElement(c["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"},"\u4f7f\u7528\u6559\u7a0b"),s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-md-6 col-xl-6"},s.a.createElement("a",{className:"block block-rounded block-link-shadow",href:"javascript:void(0)",onClick:()=>this.onShow("windows")},s.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},s.a.createElement("div",{className:"item"},s.a.createElement("i",{className:"fab fa-2x fa-windows text-primary"})),s.a.createElement("div",{className:"ml-3 text-right"},s.a.createElement("p",{className:"font-size-lg font-w600 mb-0"},"Windows"),s.a.createElement("p",{className:"text-muted mb-0"},"\u517c\u5bb9 Windows 7 \u4ee5\u4e0a\u7684\u7248\u672c"))))),s.a.createElement("div",{className:"col-md-6 col-xl-6"},s.a.createElement("a",{className:"block block-rounded block-link-shadow",href:"javascript:void(0)",onClick:()=>this.onShow("android")},s.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},s.a.createElement("div",{className:"item"},s.a.createElement("i",{className:"fab fa-2x fa-android text-primary"})),s.a.createElement("div",{className:"ml-3 text-right"},s.a.createElement("p",{className:"font-size-lg font-w600 mb-0"},"Android"),s.a.createElement("p",{className:"text-muted mb-0"},"\u517c\u5bb9 Android 6 \u4ee5\u4e0a\u7684\u7248\u672c"))))),s.a.createElement("div",{className:"col-md-6 col-xl-6"},s.a.createElement("a",{className:"block block-rounded block-link-shadow",href:"javascript:void(0)",onClick:()=>this.onShow("macos")},s.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},s.a.createElement("div",{className:"item"},s.a.createElement("i",{className:"fab fa-2x fa-apple text-primary"})),s.a.createElement("div",{className:"ml-3 text-right"},s.a.createElement("p",{className:"font-size-lg font-w600 mb-0"},"macOS"),s.a.createElement("p",{className:"text-muted mb-0"},"\u517c\u5bb9 Yosemite \u4ee5\u4e0a\u7684\u7248\u672c"))))),s.a.createElement("div",{className:"col-md-6 col-xl-6"},s.a.createElement("a",{className:"block block-rounded block-link-shadow",href:"javascript:void(0)",onClick:()=>this.onShow("ios")},s.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},s.a.createElement("div",{className:"item"},s.a.createElement("i",{className:"fab fa-2x fa-apple text-primary"})),s.a.createElement("div",{className:"ml-3 text-right"},s.a.createElement("p",{className:"font-size-lg font-w600 mb-0"},"iOS"),s.a.createElement("p",{className:"text-muted mb-0"},"\u517c\u5bb9 iOS 9 \u4ee5\u4e0a\u7684\u7248\u672c")))))))),s.a.createElement(n["a"],{placement:"right",closable:!1,onClose:()=>this.onShow(),visible:this.state.visible,width:"80%"},this.tutorialTemplate()))}}}}]); \ No newline at end of file +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[28],{Bl7J:function(e,a,t){"use strict";var n=t("q1tI"),l=t.n(n),s=t("3a4m"),c=t.n(s),i=t("/MKj"),r=t("20nU"),m=t("yWgo");class o extends l.a.Component{constructor(){super(...arguments),this.state={nav:[]}}componentDidMount(){var e=[{title:"\u4eea\u8868\u76d8",type:"item",href:"/dashboard",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-badge"})},{title:"\u8d2d\u4e70\u8ba2\u9605",type:"item",href:"/plan",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u6211\u7684\u9080\u8bf7",type:"item",href:"/invite",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-user"})},{title:"\u6211\u7684\u5de5\u5355",type:"item",href:"/ticket",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-support"})},{title:"\u6d41\u91cf\u660e\u7ec6",type:"item",href:"/traffic",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-bar-chart"})},{title:"\u4f7f\u7528\u6559\u7a0b",type:"item",href:"/tutorial",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-book-open"})}],a=[{title:"\u8fd4\u56de\u7528\u6237\u4e2d\u5fc3",type:"item",href:"/dashboard",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-action-undo"})},{title:"\u4eea\u8868\u76d8",type:"item",href:"/admin/dashboard",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-speedometer"})},{title:"\u8bbe\u7f6e",type:"heading"},{title:"\u7cfb\u7edf\u914d\u7f6e",type:"item",href:"/admin/config/system",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-equalizer"})},{title:"\u652f\u4ed8\u914d\u7f6e",type:"item",href:"/admin/config/payment",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-vector"})},{title:"\u6743\u9650\u7ec4\u7ba1\u7406",type:"item",href:"/admin/server/group",icon:l.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:l.a.createElement("i",{className:"nav-main-link-icon si si-bag"})},{title:"\u8ba2\u5355\u7ba1\u7406",type:"item",href:"/admin/order",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-list"})},{title:"\u4f63\u91d1\u7ba1\u7406",type:"item",href:"/admin/commission",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-user-following"})},{title:"\u7528\u6237",type:"heading"},{title:"\u7528\u6237\u7ba1\u7406",type:"item",href:"/admin/user",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-users"})},{title:"\u516c\u544a\u7ba1\u7406",type:"item",href:"/admin/notice",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-speech"})},{title:"\u5de5\u5355\u7ba1\u7406",type:"item",href:"/admin/ticket",icon:l.a.createElement("i",{className:"nav-main-link-icon si si-support"})}];Object(m["c"])("is_admin")&&e.unshift({title:"\u8fd4\u56de\u7ba1\u7406\u4e2d\u5fc3",type:"item",href:"/admin/dashboard",icon:l.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 l.a.createElement("li",{className:"nav-main-heading"},a);case"item":return l.a.createElement("li",{className:"nav-main-item"},l.a.createElement("a",{className:"nav-main-link ".concat(this.props.location.pathname===t&&"active"),onClick:()=>{c.a.push(t),this.props.dispatch({type:"header/showNav"})}},n&&n,l.a.createElement("span",{className:"nav-main-link-name"},a)))}}isAdmin(){return-1!==this.props.location.pathname.indexOf("admin")}render(){return l.a.createElement("nav",{id:"sidebar","aria-label":"Main Navigation"},l.a.createElement("div",{className:"smini-visible-block"},l.a.createElement("div",{className:"content-header bg-black-10"},l.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},l.a.createElement("span",{className:"text-white-75"},"X"),l.a.createElement("span",{className:"text-white"},"H")))),l.a.createElement("div",{className:"smini-hidden ".concat(1===r["a"].theme?"":"bg-header-dark")},l.a.createElement("div",{className:"content-header justify-content-lg-center bg-black-10"},l.a.createElement("a",{className:"link-fx font-size-lg text-white",href:"index.html"},l.a.createElement("span",{className:"text-white-75"},window.v2board.title?window.v2board.title:"V2Board")),l.a.createElement("div",{className:"d-lg-none"},l.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"})},l.a.createElement("i",{className:"fa fa-times-circle"}))))),l.a.createElement("div",{className:"content-side content-side-full"},l.a.createElement("ul",{className:"nav-main"},this.state.nav.map(e=>{return this.renderMenu(e.type,e.title,e.href,e.icon)}))))}}var d=Object(i["c"])(e=>{var a=e.header;return{header:a}})(o),p=t("t3Un");class h extends l.a.Component{constructor(){super(...arguments),this.state={showAvatarMenu:!1,loading:!1,showSearchBar:!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(p["a"])("/user/logout").then(e=>{c.a.push("/login")})}render(){return l.a.createElement("header",{id:"page-header"},l.a.createElement("div",{className:"content-header"},l.a.createElement("div",{className:"sidebar-toggle",style:{display:this.props.search?"block":"none"}},l.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"})},l.a.createElement("i",{className:"fa fa-fw fa-bars"})),this.props.search&&l.a.createElement("button",{type:"button",className:"btn btn-dual",onClick:()=>{this.setState({showSearchBar:!0})}},l.a.createElement("i",{className:"fa fa-fw fa-search"})," ",l.a.createElement("span",{className:"ml-1 d-none d-sm-inline-block"},"\u641c\u7d22"))),l.a.createElement("div",null),l.a.createElement("div",null,this.state.loading?l.a.createElement("div",{className:"spinner-grow text-primary"}):l.a.createElement("div",{className:"dropdown d-inline-block"},l.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()},l.a.createElement("img",{className:"img-avatar img-avatar32 img-avatar-thumb",src:this.props.header.userInfo.avatar_url,alt:""}),l.a.createElement("span",{className:"d-none d-lg-inline ml-1"},this.props.header.userInfo.email),l.a.createElement("i",{className:"fa fa-fw fa-angle-down ml-1"})),l.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"},l.a.createElement("div",{className:"p-2"},l.a.createElement("a",{className:"dropdown-item d-flex justify-content-between align-items-center",href:"javascript:void(0)",onClick:()=>this.logout()},"\u9000\u51fa\u767b\u5f55",l.a.createElement("i",{className:"fa fa-fw fa-sign-out-alt text-danger ml-1"}))))))),this.props.search&&l.a.createElement("div",{className:"overlay-header bg-dark ".concat(this.state.showSearchBar?"show":"")},l.a.createElement("div",{className:"content-header bg-dark"},l.a.createElement("div",{className:"w-100"},l.a.createElement("div",{className:"input-group"},l.a.createElement("div",{className:"input-group-prepend"},l.a.createElement("button",{type:"button",className:"btn btn-dark",onClick:()=>{this.setState({showSearchBar:!1})}},l.a.createElement("i",{className:"fa fa-fw fa-times-circle"}))),l.a.createElement("input",{type:"text",className:"form-control border-0",placeholder:this.props.search.placeholder,onChange:e=>this.props.search.onChange(e.target.value),defaultValue:this.props.search.defaultValue}))))))}}var u=Object(i["c"])(e=>{var a=e.header;return{header:a}})(h);class E extends l.a.Component{render(){return l.a.createElement("footer",{id:"page-footer",className:"bg-body-light"},l.a.createElement("div",{className:"content py-0"},l.a.createElement("div",{className:"row font-size-sm"},l.a.createElement("div",{className:"col-sm-6 order-sm-2 mb-1 mb-sm-0 text-center text-sm-right"},l.a.createElement("i",{className:"fa fa-heart text-danger"})," ",window.v2board.title?window.v2board.title:"V2Board"),l.a.createElement("div",{className:"col-sm-6 order-sm-1 text-center text-sm-left"},l.a.createElement("a",{className:"font-w600",href:"javascript:void(0)"},window.v2board.title?window.v2board.title:"V2Board"," v1.0.2"),l.a.createElement("span",{"data-toggle":"year-copy"})))))}}class N extends l.a.Component{render(){return l.a.createElement("div",{id:"page-container",className:"sidebar-o ".concat(1===r["a"].theme?"sidebar-dark":"page-header-dark"," side-scroll page-header-fixed main-content-boxed side-trans-enabled ").concat(this.props.header.showNav&&"sidebar-o-xs")},l.a.createElement(d,this.props),l.a.createElement(u,{search:this.props.search}),this.props.loading?l.a.createElement("main",{id:"main-container"},l.a.createElement("div",{className:"content content-full"},l.a.createElement("div",{className:"spinner-grow text-primary",role:"status"},l.a.createElement("span",{className:"sr-only"},"Loading...")))):this.props.children,l.a.createElement(E,null))}}a["a"]=Object(i["c"])(e=>{var a=e.header;return{header:a}})(N)},MCmo:function(e,a,t){e.exports={row:"row___10Wq0",col:"col___ooUQl",col_img:"col_img___2YHHz",img:"img___2dDCv",step:"step___2Fqd-",action_area:"action_area___ZjErh"}},rUea:function(e,a,t){"use strict";t.r(a);t("bbsP");var n=t("/wGt"),l=t("q1tI"),s=t.n(l),c=t("Bl7J"),i=(t("miYZ"),t("tsqr")),r=(t("14J3"),t("BMrR")),m=(t("jCWc"),t("kPKH")),o=t("p0pE"),d=t.n(o),p=t("MCmo"),h=t.n(p),u=t("t3Un"),E=t("+QRC"),N=t.n(E);class v extends s.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(u["a"])("/user/tutorial/getSubscribeUrl").then(e=>{200===e.code&&this.setState(d()({},e.data))})}render(){return s.a.createElement("div",null,s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"1"),s.a.createElement("div",null,"\u4e0b\u8f7d ClashX \u5ba2\u6237\u7aef\uff0c\u5b89\u88c5\u540e\u8fd0\u884c\u3002"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="".concat(window.location.origin,"/downloads/ClashX.zip")},"\u70b9\u51fb\u4e0b\u8f7d")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/20/uNGrjl2noCL1f5B.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"2"),s.a.createElement("div",null,"\u70b9\u51fb\u901a\u77e5\u680f ClashX \u56fe\u6807\u4fdd\u6301\u9009\u4e2d\u72b6\u6001\uff0c\u6309\u5feb\u6377\u952e \u2318+M(\u8ba2\u9605\u5feb\u6377\u952e)\uff0c\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u70b9\u51fb\u6dfb\u52a0\u8f93\u5165\u4e0b\u65b9\u4fe1\u606f"),s.a.createElement("div",{className:h.a.action_area},s.a.createElement("div",null,"Url\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.subscribe_url),i["a"].success("\u590d\u5236\u6210\u529f")}},this.state.subscribe_url)),s.a.createElement("div",null,"Config Name\uff1a",s.a.createElement("code",{onClick:()=>{N()(document.title),i["a"].success("\u590d\u5236\u6210\u529f")}},document.title))),s.a.createElement("div",{className:"mt-3"},"\u4ea6\u6216\u8005\u6253\u5f00 ClashX \u540e\u70b9\u51fb\u4e0b\u65b9\u6309\u94ae\u4e00\u952e\u914d\u7f6e"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="clash://install-config?url=".concat(this.state.subscribe_url,"&name=").concat(document.title)},"\u4e00\u952e\u914d\u7f6e")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/20/8eB13mRbFuszwxg.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"3"),s.a.createElement("div",null,"\u70b9\u51fb\u901a\u77e5\u680f ClashX \u56fe\u6807\u4fdd\u6301\u9009\u4e2d\u72b6\u6001\uff0c\u6309\u5feb\u6377\u952e \u2318+S(\u8bbe\u7f6e\u4e3a\u7cfb\u7edf\u4ee3\u7406\u5feb\u6377\u952e)\uff0c\u5373\u8fde\u63a5\u5b8c\u6210"))))}}class b extends s.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(u["a"])("/user/tutorial/getSubscribeUrl").then(e=>{200===e.code&&this.setState(d()({},e.data))})}render(){return s.a.createElement("div",null,s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"1"),s.a.createElement("div",null,"\u4e0b\u8f7d V2rayN \u5ba2\u6237\u7aef\u3002"),s.a.createElement("div",null,"\u4e0b\u8f7d\u5b8c\u6210\u540e\u89e3\u538b\uff0c\u89e3\u538b\u5b8c\u6210\u540e\u8fd0\u884cV2rayN"),s.a.createElement("div",null,"\u8fd0\u884c\u65f6\u8bf7\u53f3\u952e\uff0c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="".concat(window.location.origin,"/downloads/V2rayN.zip")},"\u70b9\u51fb\u4e0b\u8f7d"))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"2"),s.a.createElement("div",null,"\u70b9\u51fb\u8ba2\u9605\u6309\u94ae\uff0c\u9009\u62e9\u8ba2\u9605\u8bbe\u7f6e\u70b9\u51fb\u6dfb\u52a0\uff0c\u8f93\u5165\u5982\u4e0b\u5185\u5bb9\u540e\u70b9\u51fb\u786e\u5b9a\u4fdd\u5b58"),s.a.createElement("div",{className:h.a.action_area},s.a.createElement("div",null,"\u5907\u6ce8\uff1a",s.a.createElement("code",{onClick:()=>{N()(document.title),i["a"].success("\u590d\u5236\u6210\u529f")}},document.title)),s.a.createElement("div",null,"\u5730\u5740(url)\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.subscribe_url),i["a"].success("\u590d\u5236\u6210\u529f")}},this.state.subscribe_url)))),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/UkcHNtERTnjLVS8.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"3"),s.a.createElement("div",null,"\u70b9\u51fb\u8ba2\u9605\u540e\uff0c\u4ece\u670d\u52a1\u5668\u5217\u8868\u9009\u62e9\u670d\u52a1\u5668")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/BgPGFQ3kCSuIRjJ.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"4"),s.a.createElement("div",null,"\u70b9\u51fb\u53c2\u6570\u8bbe\u7f6e\uff0c\u627e\u5230Http\u4ee3\u7406\uff0c\u9009\u62e9PAC\u6a21\u5f0f\u540e\u6309\u786e\u5b9a\u4fdd\u5b58\u5373\u542f\u52a8\u4ee3\u7406\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/vnVykKEFT8Lzo3f.jpg"}))))}}class g extends s.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(u["a"])("/user/tutorial/getAppleID").then(e=>{200===e.code&&this.setState(d()({},e.data))}),Object(u["a"])("/user/tutorial/getSubscribeUrl").then(e=>{200===e.code&&this.setState(d()({},e.data))})}render(){return s.a.createElement("div",null,s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"1"),s.a.createElement("div",null,"iOS\u4e0a\u4f7f\u7528\u8bf7\u5728iOS\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\u672c\u9875"))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"2"),s.a.createElement("div",null,"\u5728 App Store \u767b\u5f55\u672c\u7ad9\u63d0\u4f9b\u7684\u7f8e\u533a Apple ID \u4e0b\u8f7d\u5ba2\u6237\u7aef\u3002"),s.a.createElement("div",null,"\u4e3a\u4e86\u4fdd\u62a4\u60a8\u7684\u9690\u79c1\uff0c\u8bf7\u52ff\u5728\u624b\u673a\u8bbe\u7f6e\u91cc\u76f4\u63a5\u767b\u5f55\uff0c\u4ec5\u5728 App Store \u767b\u5f55\u5373\u53ef\u3002"),s.a.createElement("div",null,"\u767b\u9646\u5b8c\u6210\u540e\u70b9\u51fb\u4e0b\u65b9\u4e0b\u8f7d\u4f1a\u81ea\u52a8\u5524\u8d77\u4e0b\u8f7d\u3002"),this.state.apple_id?s.a.createElement("div",{className:h.a.action_area},s.a.createElement("div",null,"Apple ID\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.apple_id),i["a"].success("\u590d\u5236\u6210\u529f")}},this.state.apple_id)),s.a.createElement("div",null,"\u5bc6\u7801\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.apple_id_password),i["a"].success("\u590d\u5236\u6210\u529f")}},"\u70b9\u51fb\u590d\u5236\u5bc6\u7801"))):s.a.createElement("div",{className:h.a.action_area},"\u8d26\u53f7\u8fc7\u671f\u6216\u672a\u8ba2\u9605\uff0c\u6216\u7ba1\u7406\u5458\u65e0\u6cd5\u4e3a\u4f60\u63d0\u4f9bApple ID"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="https://apps.apple.com/us/app/shadowrocket/id932747118"},"\u6253\u5f00Apple Store\u4e0b\u8f7d")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/5idkjJ61stWgREV.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"3"),s.a.createElement("div",null,"\u5f85\u5ba2\u6237\u7aef\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u4e0b\u65b9\u4e00\u952e\u8ba2\u9605\u6309\u94ae\u4f1a\u81ea\u52a8\u5524\u8d77\u5e76\u8fdb\u884c\u8ba2\u9605"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="shadowrocket://add/sub://"+window.btoa(this.state.subscribe_url).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")+"?remark="+window.v2board.title},"\u4e00\u952e\u8ba2\u9605")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/ZcqlNMb3eg5Uhxd.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"4"),s.a.createElement("div",null,"\u9009\u62e9\u8282\u70b9\u8fdb\u884c\u94fe\u63a5\uff0c\u9996\u6b21\u94fe\u63a5\u8fc7\u7a0b\u6388\u6743\u7a97\u53e3\u8bf7\u4e00\u8def\u5141\u8bb8\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/9Zdxksr7Ey6hjlm.jpg"}))))}}class w extends s.a.Component{constructor(){super(...arguments),this.state={}}componentDidMount(){Object(u["a"])("/user/tutorial/getSubscribeUrl").then(e=>{200===e.code&&this.setState(d()({},e.data))})}render(){return s.a.createElement("div",null,s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"1"),s.a.createElement("div",null,"\u4e0b\u8f7d V2rayNG \u5ba2\u6237\u7aef\u3002"),s.a.createElement("button",{type:"button",className:"btn btn-primary btn-sm btn-primary btn-rounded px-3 mt-3",onClick:()=>window.location.href="".concat(window.location.origin,"/downloads/V2rayNG.apk")},"\u70b9\u51fb\u4e0b\u8f7d"))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"2"),s.a.createElement("div",null,"\u6253\u5f00 V2rayNG \u70b9\u51fb\u5de6\u4e0a\u89d2\u7684\u83dc\u5355\u56fe\u6807\u6253\u5f00\u4fa7\u8fb9\u680f\uff0c\u968f\u540e\u70b9\u51fb \u8ba2\u9605\u8bbe\u7f6e\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u2795\u6309\u94ae\u65b0\u589e\u8ba2\u9605\u3002"),s.a.createElement("div",null,"\u6309\u7167\u4e0b\u65b9\u5185\u5bb9\u8fdb\u884c\u586b\u5199\uff0c\u586b\u5199\u5b8c\u6bd5\u540e\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u2611\ufe0f\u6309\u94ae\u3002"),s.a.createElement("div",{className:h.a.action_area},s.a.createElement("div",null,"\u5907\u6ce8\uff1a",s.a.createElement("code",{onClick:()=>{N()(document.title),i["a"].success("\u590d\u5236\u6210\u529f")}},document.title)),s.a.createElement("div",null,"\u5730\u5740(url)\uff1a",s.a.createElement("code",{onClick:()=>{N()(this.state.subscribe_url),i["a"].success("\u590d\u5236\u6210\u529f")}},this.state.subscribe_url)))),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/ghuVkTe6LBqRxSO.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"3"),s.a.createElement("div",null,"\u518d\u6b21\u4ece\u4fa7\u8fb9\u680f\u8fdb\u5165 \u8bbe\u7f6e \u9875\u9762\uff0c\u70b9\u51fb \u8def\u7531\u6a21\u5f0f \u5c06\u5176\u66f4\u6539\u4e3a \b\u7ed5\u8fc7\u5c40\u57df\u7f51\u53ca\u5927\u9646\u5730\u5740\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/Tf1AGoXZuhJrwOq.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"4"),s.a.createElement("div",null,"\u968f\u540e\u4ece\u4fa7\u8fb9\u680f\u56de\u5230 \u914d\u7f6e\u6587\u4ef6 \u9875\u9762\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u7701\u7565\u53f7\u56fe\u6807\u9009\u62e9\u66f4\u65b0\u8ba2\u9605\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/UtfPShQXupRmB4L.jpg"}))),s.a.createElement(r["a"],{className:h.a.row},s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col},s.a.createElement("div",{className:h.a.step},"5"),s.a.createElement("div",null,"\u70b9\u51fb\u9009\u62e9\u60a8\u9700\u8981\u7684\u8282\u70b9\uff0c\u70b9\u51fb\u53f3\u4e0b\u89d2\u7684V\u5b57\u6309\u94ae\u5373\u53ef\u8fde\u63a5\u3002")),s.a.createElement(m["a"],{xs:24,md:12,lg:12,className:h.a.col_img},s.a.createElement("img",{className:h.a.img,src:"https://i.loli.net/2019/11/21/ZkbNsSrAg3m5Dny.jpg"}))))}}t.d(a,"default",function(){return f});class f extends s.a.Component{constructor(){super(...arguments),this.state={visible:!1,platform:void 0}}componentDidMount(){}onShow(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;this.setState({visible:!this.state.visible,platform:e})}tutorialTemplate(){switch(this.state.platform){case"macos":return s.a.createElement(v,null);case"windows":return s.a.createElement(b,null);case"ios":return s.a.createElement(g,null);case"android":return s.a.createElement(w,null)}}render(){return s.a.createElement(c["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"},"\u4f7f\u7528\u6559\u7a0b"),s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-md-6 col-xl-6"},s.a.createElement("a",{className:"block block-rounded block-link-shadow",href:"javascript:void(0)",onClick:()=>this.onShow("windows")},s.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},s.a.createElement("div",{className:"item"},s.a.createElement("i",{className:"fab fa-2x fa-windows text-primary"})),s.a.createElement("div",{className:"ml-3 text-right"},s.a.createElement("p",{className:"font-size-lg font-w600 mb-0"},"Windows"),s.a.createElement("p",{className:"text-muted mb-0"},"\u517c\u5bb9 Windows 7 \u4ee5\u4e0a\u7684\u7248\u672c"))))),s.a.createElement("div",{className:"col-md-6 col-xl-6"},s.a.createElement("a",{className:"block block-rounded block-link-shadow",href:"javascript:void(0)",onClick:()=>this.onShow("android")},s.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},s.a.createElement("div",{className:"item"},s.a.createElement("i",{className:"fab fa-2x fa-android text-primary"})),s.a.createElement("div",{className:"ml-3 text-right"},s.a.createElement("p",{className:"font-size-lg font-w600 mb-0"},"Android"),s.a.createElement("p",{className:"text-muted mb-0"},"\u517c\u5bb9 Android 6 \u4ee5\u4e0a\u7684\u7248\u672c"))))),s.a.createElement("div",{className:"col-md-6 col-xl-6"},s.a.createElement("a",{className:"block block-rounded block-link-shadow",href:"javascript:void(0)",onClick:()=>this.onShow("macos")},s.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},s.a.createElement("div",{className:"item"},s.a.createElement("i",{className:"fab fa-2x fa-apple text-primary"})),s.a.createElement("div",{className:"ml-3 text-right"},s.a.createElement("p",{className:"font-size-lg font-w600 mb-0"},"macOS"),s.a.createElement("p",{className:"text-muted mb-0"},"\u517c\u5bb9 Yosemite \u4ee5\u4e0a\u7684\u7248\u672c"))))),s.a.createElement("div",{className:"col-md-6 col-xl-6"},s.a.createElement("a",{className:"block block-rounded block-link-shadow",href:"javascript:void(0)",onClick:()=>this.onShow("ios")},s.a.createElement("div",{className:"block-content block-content-full d-flex align-items-center justify-content-between"},s.a.createElement("div",{className:"item"},s.a.createElement("i",{className:"fab fa-2x fa-apple text-primary"})),s.a.createElement("div",{className:"ml-3 text-right"},s.a.createElement("p",{className:"font-size-lg font-w600 mb-0"},"iOS"),s.a.createElement("p",{className:"text-muted mb-0"},"\u517c\u5bb9 iOS 9 \u4ee5\u4e0a\u7684\u7248\u672c")))))))),s.a.createElement(n["a"],{placement:"right",closable:!1,onClose:()=>this.onShow(),visible:this.state.visible,width:"80%"},this.tutorialTemplate()))}}}}]); \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index f4cf59b7..2d9e75f6 100755 --- a/routes/web.php +++ b/routes/web.php @@ -20,6 +20,6 @@ Route::get('/', function (Request $request) { return view('app', [ 'title' => config('v2board.app_name', 'V2Board'), 'theme' => config('v2board.app_theme', 1), - 'verison' => '1.0.1' + 'verison' => '1.0.2' ]); });