|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[35729],{69458:function(e,n,t){t.d(n,{Z:function(){return v}});var s=t(82242),i=t.n(s),l=t(7557),r=t.n(l),a=t(41498),c=t.n(a),o=t(79800),d=t.n(o),u=t(39647),h=t.n(u),x=t(3113),m=t(59301),p=t(37712),f=["children"],v=function(e){var n=e.children,t=h()(e,f),s=(0,m.useState)(!1),l=d()(s,2),a=l[0],o=l[1];return(0,p.jsx)(x.ZP,i()(i()({},t),{},{loading:a,onClick:function(){var e=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o(!0),e.next=4,t.onClick(n);case 4:o(!1),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),o(!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),children:n}))}},53070:function(e,n,t){var s=t(82242),i=t.n(s),l=(t(59301),t(19779)),r=t(3113),a=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,s=void 0===t?{}:t,c=e.styles,o=void 0===c?{}:c,d=e.customText,u=e.ButtonText,h=e.ButtonClick,x=e.Buttonclass,m=e.ButtonTwo,p=e.imgStyles,f=e.loading,v=void 0!==f&&f;return(0,a.jsxs)("section",{className:"tc animated fadeIn",style:i()(i()({},{color:"#999",margin:"100px auto",visibility:v?"hidden":"visible"}),o),children:[(0,a.jsx)("img",{src:n||l,style:i()({width:288,height:200},p)}),(0,a.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,a.jsx)(r.ZP,i()(i()({className:x,onClick:h},s),{},{children:u})),m&&m]})}},90820:function(e,n,t){t.r(n),t.d(n,{default:function(){return W}});var s=t(82242),i=t.n(s),l=t(7557),r=t.n(l),a=t(41498),c=t.n(a),o=t(79800),d=t.n(o),u=t(39647),h=t.n(u),x=t(59301),m=t(33936),p=t(67444),f=t(78241),v=t(8591),j=t(95237),_=t(43604),g=t(20834),b=t(66999),y=t(3113),Z=t(43418),k=t(24650),w=t(10302),N=t(69458),P=t(50872),F=t(84666),S={flex_box_center:"flex_box_center___W5itf",flex_space_between:"flex_space_between___gui6v",flex_box_vertical_center:"flex_box_vertical_center___pD9t3",flex_box_center_end:"flex_box_center_end___ocOJP",flex_box_column:"flex_box_column___KhV4h",content:"content____xM73",title:"title___Q0EMb",menu:"menu___dbMGX",contcats:"contcats___uNFhe",cooperatives:"cooperatives___EVJ5n",imgWrp:"imgWrp___wcdFr",btns:"btns___gQP5Z",confirm:"confirm___Igsxy",cancel:"cancel___EPAJA"},I=t(5112),C=t(5168),q="wrap___AsKly",T="link___CnaN3",E=t(16739),D=t(37712),Q=["user","globalSetting","loading","dispatch"],L=k.Z.TextArea,V=(0,m.connect)((function(e){var n=e.user,t=e.loading;return{user:n,globalSetting:e.globalSetting,loading:t.models.index}}))((function(e){var n=e.user,t=(e.globalSetting,e.loading,e.dispatch),s=(h()(e,Q),f.Z.useForm()),l=d()(s,1)[0];(0,x.useEffect)((function(){var e;(0,E.W)(null===(e=n.userInfo)||void 0===e?void 0:e.login)||(0,C.o1)(t)}),[n.userInfo.login]);var a=function(){var e=c()(r()().mark((function e(t){var s,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/helps/feedback.json",{method:"post",body:i()({},t)});case 2:0===(null==(s=e.sent)?void 0:s.status)&&m.history.push("/messages/".concat(null===(l=n.userInfo)||void 0===l?void 0:l.login,"/message_detail?target_ids=1"));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,D.jsxs)("section",{className:"".concat(q," bg-white pl30 pr30 pt30"),children:[(0,D.jsxs)("div",{className:"c-grey-999 line26",children:["想对我们的平台提供功能建议?",(0,D.jsx)("br",{}),"发现网页中的问题或bug想告诉我们?",(0,D.jsx)("br",{}),"期望与我们展开合作?",(0,D.jsx)("br",{}),"在这里把你想说的一切告诉我们吧?"]}),(0,D.jsxs)("div",{className:"c-red-ee4 mt20 mb20",children:["* ",(0,D.jsx)(m.Link,{to:"/help/help_center",className:"".concat(T," c-red-ee4"),children:"看看帮助中心是否有你想要的答案"})]}),(0,D.jsxs)(f.Z,{layout:"vertical",form:l,onFinish:a,initialValues:{question_kind:"登录注册"},children:[(0,D.jsx)(f.Z.Item,{label:"问题分类:",name:"question_kind",rules:[{required:!0,message:"不能为空"}],children:(0,D.jsxs)(I.ZP.Group,{children:[(0,D.jsx)(I.ZP,{value:"登录注册",children:"登录注册"}),(0,D.jsx)(I.ZP,{value:"信息认证",children:"信息认证"}),(0,D.jsx)(I.ZP,{value:"实训编程",children:"实训编程"}),(0,D.jsx)(I.ZP,{value:"实训课程",children:"实训课程"}),(0,D.jsx)(I.ZP,{value:"课堂",children:"课堂"}),(0,D.jsx)(I.ZP,{value:"其它",children:"其它"})]})}),(0,D.jsx)(f.Z.Item,{label:"问题页面网址:",name:"url",rules:[{required:!0,message:"不能为空"}],children:(0,D.jsx)(k.Z,{placeholder:"反馈平台问题,请同时填写对应的问题页面链接,以便平台能够及时跟踪解决,谢谢"})}),(0,D.jsx)(f.Z.Item,{label:"问题描述:",name:"description",rules:[{required:!0,message:"不能为空"}],children:(0,D.jsx)(L,{rows:4,placeholder:"反馈平台问题,请同时填写对应的问题页面链接,以便平台能够及时跟踪解决,谢谢"})}),(0,D.jsx)(f.Z.Item,{children:(0,D.jsx)(y.ZP,{type:"primary",htmlType:"submit",children:"提交"})})]})]})})),A=["user","globalSetting","loading","dispatch"],W=(0,m.connect)((function(e){var n=e.user,t=e.loading;return{user:n,globalSetting:e.globalSetting,loading:t.models.index}}))((function(e){var n,t,s,l,a,o,u,I=e.user,C=e.globalSetting,q=(e.loading,e.dispatch,h()(e,A),(0,x.useState)({content:"",message:"",status:0,contacts:[],address:"",data:[]})),T=d()(q,2),Q=T[0],L=T[1],W=(0,x.useState)(!0),z=d()(W,2),B=z[0],M=z[1],O=f.Z.useForm(),G=d()(O,1)[0],J=(0,m.useParams)(),K=(0,m.useLocation)(),R=(0,x.useState)(null),H=d()(R,2),X=H[0],U=H[1],Y=(0,x.useState)(0),$=d()(Y,2),ee=$[0],ne=$[1],te=(0,x.useState)(!1),se=d()(te,2),ie=se[0],le=se[1],re=(0,x.useState)(!1),ae=d()(re,2),ce=ae[0],oe=ae[1],de=(0,x.useState)(null==X?void 0:X.content),ue=d()(de,2),he=ue[0],xe=ue[1],me=[{name:"关于我们",key:"about_us",id:"about",editable:!0},{name:"加入我们",key:"join_us",id:"join_us",editable:!0},{name:"联系我们",key:"contact_us",id:"contact"},{name:"合作伙伴",key:"cooperatives",id:"cooperatives"},{name:"服务协议",key:"agreement",id:"agreement",editable:!0},{name:"帮助中心",key:"help_center",id:"help_center",editable:!0},{name:"意见反馈",key:"feedback",id:"feedback"}].filter((function(e){var n;return null==C||null===(n=C.setting)||void 0===n||!n.is_local||"关于我们"!==e.name})),pe=function(){var e=c()(r()().mark((function e(){var n,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==K.pathname.indexOf("/feedback")){e.next=6;break}return e.t0=L,e.next=4,(0,p.ZP)("/api/helps/".concat(null===(n=me.filter((function(e){return e.key===J.id})))||void 0===n||null===(n=n[0])||void 0===n?void 0:n.id,".json"),{method:"get"});case 4:e.t1=e.sent,(0,e.t0)(e.t1);case 6:M(!1),(0,E.Dk)(null===(t=me.filter((function(e){return e.key===J.id})))||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function fe(){return(fe=c()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/helps/update_content.json",{method:"put",body:{type:J.id,content:he}});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(v.ZP.info("提交成功"),le(!1),M(!0),pe());case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,x.useEffect)((function(){M(!0),pe()}),[J.id]),(0,D.jsxs)("section",{children:[(0,D.jsx)("aside",{className:"edu-container mt30",children:(0,D.jsxs)(j.Z,{gutter:[20,20],children:[(0,D.jsx)(_.Z,{children:(0,D.jsx)(g.Z,{className:S.menu,style:{width:174},defaultSelectedKeys:[null===(n=me.filter((function(e){return e.key===J.id})))||void 0===n?void 0:n[0].key],mode:"inline",children:me.map((function(e,n){return(0,D.jsx)(g.Z.Item,{children:(0,D.jsx)(m.Link,{to:"/help/".concat(e.key),onClick:function(){le(!1),U(null)},children:e.name})},e.key)}))})}),(0,D.jsxs)(_.Z,{flex:"1",children:[(0,D.jsxs)("h1",{className:S.title,children:[null===(t=me.filter((function(e){return e.key===J.id})))||void 0===t?void 0:t[0].name,(null===(s=me.filter((function(e){return e.key===J.id})))||void 0===s?void 0:s[0].editable)&&1===(null==I||null===(l=I.userInfo)||void 0===l?void 0:l.role)&&(0,D.jsxs)("a",{style:{float:"right",color:"#165DFF"},onClick:c()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return le(!0),e.next=3,(0,p.ZP)("/api/helps/edit_content.json",{params:{type:J.id}});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(U(n),console.log(n));case 5:case"end":return e.stop()}}),e)}))),children:[(0,D.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF"}})," 编辑"]})]}),(0,D.jsx)("div",{className:"minH500",children:"feedback"===J.id?(0,D.jsx)(V,{}):(0,D.jsx)(b.Z,{loading:B,children:(0,D.jsxs)("div",{className:[S.content,"bg-white pl30 pr30 pt30"].join(" "),children:[ie?(0,D.jsxs)("div",{children:[(0,D.jsx)(w.Z,{defaultValue:null==X?void 0:X.content,onChange:function(e){return xe(e)}}),(0,D.jsxs)("div",{className:S.btns,children:[(0,D.jsx)(y.ZP,{className:S.cancel,onClick:function(){return le(!1)},children:"取消"}),(0,D.jsx)(N.Z,{className:S.confirm,type:"primary",onClick:function(){return fe.apply(this,arguments)},children:"保存更改"})]})]}):(0,D.jsx)("div",{children:(0,D.jsx)(P.Z,{value:Q.content||""})}),null===(a=Q.contacts)||void 0===a?void 0:a.map((function(e,n){var t;return(0,D.jsxs)("ul",{className:S.contcats,children:[1===(null==I||null===(t=I.userInfo)||void 0===t?void 0:t.role)&&(0,D.jsxs)("a",{style:{float:"right",color:"#165DFF"},onClick:function(){oe(!0),ne(n+1),G.setFieldsValue({name:e.name,qq:e.qq,mail:e.mail})},children:[(0,D.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF"}})," 编辑"]}),(0,D.jsx)("h1",{children:e.type}),(0,D.jsxs)("li",{children:[(0,D.jsx)("span",{children:"联系人:"}),e.name]}),(0,D.jsxs)("li",{children:[(0,D.jsx)("span",{children:"QQ:"}),e.qq]}),(0,D.jsxs)("li",{children:[(0,D.jsx)("span",{children:"Email:"}),e.mail]})]},n)})),Q.address&&(0,D.jsxs)("ul",{className:S.contcats,children:[1===(null==I||null===(o=I.userInfo)||void 0===o?void 0:o.role)&&(0,D.jsxs)("a",{style:{float:"right",color:"#165DFF"},onClick:function(){oe(!0),ne(4),G.setFieldsValue({address:Q.address})},children:[(0,D.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF"}})," 编辑"]}),(0,D.jsx)("h1",{children:"公司地址"}),(0,D.jsx)("li",{children:Q.address})]}),null===(u=Q.data)||void 0===u?void 0:u.map((function(e,n){var t;return(0,D.jsxs)("div",{className:S.cooperatives,children:[(0,D.jsx)("h1",{children:e.name}),(0,D.jsx)(j.Z,{gutter:[10,20],children:null===(t=e.values)||void 0===t?void 0:t.map((function(e,n){return(0,D.jsx)(_.Z,{span:6,children:(0,D.jsx)("div",{className:S.imgWrp,children:(0,D.jsx)("img",{src:F.Z.IMG_SERVER+e.img})})})}))})]})}))]})})})]})]})}),(0,D.jsx)(Z.Z,{centered:!0,title:"编辑",open:ce,okText:"确定",cancelText:"取消",destroyOnClose:!0,onCancel:function(){oe(!1)},onOk:c()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=i(),e.t1={},e.next=4,G.validateFields();case 4:return e.t2=e.sent,n=(0,e.t0)(e.t1,e.t2),e.next=8,(0,p.ZP)("/api/helps/update_contact.json",{method:"put",body:i()(i()({},n),{},{type:ee})});case 8:0===e.sent.status&&(v.ZP.success("修改成功"),pe(),oe(!1));case 10:case"end":return e.stop()}}),e)}))),children:(0,D.jsxs)(f.Z,{form:G,labelAlign:"right",labelCol:{span:4},scrollToFirstError:!0,children:[4!==ee&&(0,D.jsx)(f.Z.Item,{label:"联系人",name:"name",placeholder:"请输入联系人",children:(0,D.jsx)(k.Z,{maxLength:60,size:"large",style:{height:40,marginTop:"-4px"}})}),4!==ee&&(0,D.jsx)(f.Z.Item,{label:"QQ",name:"qq",placeholder:"请输入QQ",children:(0,D.jsx)(k.Z,{maxLength:60,size:"large",style:{height:40,marginTop:"-4px"}})}),4!==ee&&(0,D.jsx)(f.Z.Item,{label:"Email",name:"mail",placeholder:"请输入Email",children:(0,D.jsx)(k.Z,{maxLength:60,size:"large",style:{height:40,marginTop:"-4px"}})}),4===ee&&(0,D.jsx)(f.Z.Item,{label:"公司地址",name:"address",placeholder:"请输入公司地址",children:(0,D.jsx)(k.Z,{maxLength:60,size:"large",style:{height:40,marginTop:"-4px"}})})]})})]})}))}}]); |