2 lines
8.9 KiB
JavaScript
2 lines
8.9 KiB
JavaScript
|
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[62831],{96278:function(G){G.exports={root:"root___7VXfh",colorWeak:"colorWeak___2fQ5G","ant-layout":"ant-layout___2lk2i",globalSpin:"globalSpin___3wjkL","ant-table":"ant-table___3MoMQ","ant-table-thead":"ant-table-thead___2F4eD","ant-table-tbody":"ant-table-tbody___1iFAX",formBox:"formBox___1MR6m",hrefModal:"hrefModal___GOUPi",shop:"shop___3KrmS"}},44943:function(){},62831:function(G,Z,e){"use strict";e.r(Z),e.d(Z,{default:function(){return K}});var g=e(71194),h=e(50146),j=e(34792),O=e(48086),V=e(88983),H=e(47933),o=e(47673),R=e(4107),B=e(67294),J=e(28216),k=e(96278),$=e.n(k),y=e(41273),Q=e(56173),v=e(85893),f,i,r=R.Z.TextArea,u=H.ZP.Group,K=(f=(0,J.$j)(x=>{var s=x.commondesign,d=x.globaldesign;return{commondesign:s,globaldesign:d}}),f(i=class extends B.PureComponent{constructor(){super(...arguments);this.state={visible:!1,href:location.origin,hrefName:""},this.updataDomCallBack=s=>{var d=this,b=this.props.commondesign,C=b.QRCode,_=C.element,I=C.callback,A=C.callClose;_.find(".box").remove(),_.append('<div class="box"></div>'),_.find(".box").qrcode(s.href);var E=_.find("canvas")[0],T=E.toDataURL("image/png");_.find(".box, canvas").remove(),_.append('<a class="box" href='+T+' download="\u4E8C\u7EF4\u7801.png"><img src="'+T+'"/></a>'),_.attr("data-qrcode",JSON.stringify(s))},this.show=s=>{s?(s=JSON.parse(s),this.setState({href:s.href})):this.setState({visible:!0,href:location.origin})},this.cancelEvent=()=>{var s=this,d=this.props.dispatch;d({type:"commondesign/setState",payload:{QRCode:{visible:!1,callback:()=>{},callClose:()=>{}}}})}}componentDidMount(){var s=this.props.commondesign,d=s.QRCode,b=d.visible,C=d.element,_=d.callback,I=d.callClose;this.setState({visible:b});var A=C.attr("data-qrcode");this.show(A)}render(){var s=this,d=this.props,b=d.commondesign,C=d.dispatch,_=b.QRCode.callback,I=this.state,A=I.visible,E=I.href,T=t=>{s.cancelEvent()},a=t=>{if(E!=""){var n={href:E};s.updataDomCallBack(n),_&&_(n),s.cancelEvent()}else O.ZP.error("\u8BF7\u6DFB\u52A0\u94FE\u63A5\u5730\u5740")},l=t=>{s.setState({href:t.target.value})},c=()=>{C({type:"commondesign/setState",payload:{Href:{visible:!0,type:{question:!0,forum:!0,member:!0,shop:!0,information:!0,course:!0,formData:!0},closeHandle:!0,typex:!1,callback:t=>{var n=(0,Q.wS)(t,s),D=n.url;s.setState({href:location.origin+D})}}}})};return(0,v.jsx)(h.Z,{title:"\u6DFB\u52A0\u4E8C\u7EF4\u7801",visible:A,onOk:a,width:520,onCancel:T,maskClosable:!1,className:$().hrefModal,children:(0,v.jsxs)("div",{className:"divRow",children:[(0,v.jsx)("div",{className:"label",style:{marginBottom:0},children:"\u94FE\u63A5\u5730\u5740\uFF1A"}),(0,v.jsxs)("div",{className:"content",style:{paddingLeft:100,marginTop:-28},children:[(0,v.jsx)("div",{children:(0,v.jsx)("a",{onClick:c,children:"\u9009\u62E9\u94FE\u63A5"})}),(0,v.jsx)(R.Z,{value:E,onChange:l,style:{width:360},placeholder:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"})]})]})})}})||i)},47933:function(G,Z,e){"use strict";e.d(Z,{ZP:function(){return T}});var g=e(22122),h=e(96156),j=e(28481),O=e(94184),V=e.n(O),H=e(21770),o=e(67294),R=e(53124),B=e(97647),J=e(5467),k=o.createContext(null),$=k.Provider,y=k,Q=o.createContext(null),v=Q.Provider,f=e(50132),i=e(42550),r=e(98866),u=e(65223),K=function(a,l){var c={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&l.indexOf(t)<0&&(c[t]=a[t]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,t=Object.getOwnPropertySymbols(a);n<t.length;n++)l.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(a,t[n])&&(c[t[n]]=a[t[n]]);return c},x=function(l,c){var t,n=o.useContext(y),D=o.useContext(Q),M=o.useContext(R.E_),W=M.getPrefixCls,F=M.direction,L=o.useRef(),z=(0,i.sQ)(c,L),p=(0,o.useContext)(u.aM),te=p.isFormItemInput,w=function(ae){var N,S;(N=l.onChange)===null||N===void 0||N.call(l,ae),(S=n==null?void 0:n.onChange)===null||S===void 0||S.call(n,ae)},ne=l.prefixCls,X=l.className,Y=l.children,oe=l.style,q=l.disabled,re=K(l,["prefixCls","className","children","style","disabled"]),ee=W("radio",ne),U
|