filesbox/web/dist/46660.b7dd5c85.async.js

18 lines
23 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[46660],{76734:function(G){G.exports={newColorPicker:"newColorPicker___2va38"}},18358:function(G){G.exports={hrefModal:"hrefModal___1qwTY",hoverClick:"hoverClick___3KWOm",contentModal:"contentModal___22xzu"}},96328:function(G,Q,c){"use strict";var os=c(67294),q=c(79941),ls=c(53390),ss=c(76734),is=c.n(ss),N=c(85893);function rs(M){var D=M.offsetTop;return M.offsetParent!=null&&(D+=rs(M.offsetParent)),D}function es(M){var D=M.offsetLeft;return M.offsetParent!=null&&(D+=es(M.offsetParent)),D}class cs extends os.Component{constructor(){super(...arguments);this.state={displayColorPicker:!1,pageX:0,pageY:0},this.handleClick=D=>{var L=this.props.cssData,F=L===void 0?{devX:0,devY:0}:L,R=F.devX,X=F.devY;this.first=!0;var T=root.clientWidth,H=root.clientHeight,O=$(D.target),W=O.offset().left+R,j=O.offset().top+O.outerHeight()+5+X;W+220>T&&(W=T-220),j+333>H&&(j=H-333),this.setState({displayColorPicker:!this.state.displayColorPicker,pageX:W,pageY:j})},this.handleClear=()=>{var D=this.props.onChange,L=D===void 0?F=>{}:D;this.setState({displayColorPicker:!1,scrollTop:0}),L("transparent")},this.handleClose=()=>{this.setState({displayColorPicker:!1,scrollTop:0})}}render(){var D=this.props,L=D.className,F=L===void 0?"colorPicker":L,R=D.onChange,X=R===void 0?P=>{}:R,T=D.value,H=T===void 0?"#000000":T,O=D.style,W=this.state,j=W.pageX,ds=W.pageY,as=P=>{P.rgb.a<1&&!(this.first&&P.rgb.a==0)?X("rgba(".concat(P.rgb.r,", ").concat(P.rgb.g,", ").concat(P.rgb.b,", ").concat(P.rgb.a,")")):X(P.hex),this.first=!1},K=(0,q.ZP)({default:{color:{height:"100%",borderRadius:"2px",background:H},colorBox:{height:"100%",borderRadius:"2px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",background:'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")'},swatch:{width:"100%",height:"100%",padding:"2px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"fixed",zIndex:"101",background:"#ccc",top:ds,left:j},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"},clearBtn:{position:"absolute",bottom:"10px",height:"18px",lineHeight:"18px",right:"8px",zIndex:1,fontSize:"12px",cursor:"pointer"}}});return(0,N.jsxs)("div",{style:O,className:F+" "+is().newColorPicker,children:[(0,N.jsx)("div",{style:K.swatch,onClick:this.handleClick,children:(0,N.jsx)("div",{style:K.colorBox,children:(0,N.jsx)("div",{style:K.color})})}),this.state.displayColorPicker?(0,N.jsxs)("div",{style:K.popover,children:[(0,N.jsx)("div",{style:K.clearBtn,onClick:this.handleClear,children:"\u6E05\u7A7A"}),(0,N.jsx)("div",{style:K.cover,onClick:this.handleClose}),(0,N.jsx)(ls.xS,{color:H,onChange:as})]}):null]})}}Q.Z=cs},87690:function(G,Q,c){"use strict";c.r(Q),c.d(Q,{default:function(){return _s}});var os=c(66456),q=c(5322),ls=c(57663),ss=c(71577),is=c(48736),N=c(27049),rs=c(34792),es=c(48086),cs=c(71194),M=c(50146),D=c(13254),L=c(14277),F=c(14781),R=c(23492),X=c(20228),T=c(11382),H=c(43358),O=c(34041),W=c(63185),j=c(9676),ds=c(88983),as=c(47933),K=c(18106),P=c(95562),Es=c(47673),ts=c(4107),Cs=c(67294),ps=c(28216),Is=c(56173),fs=c(7861),gs=c(19755),hs=c.n(gs),ys=c(96328),xs=c(18358),Z=c.n(xs),e=c(85893),vs,us,ks=ts.Z.TextArea,U=P.Z.TabPane,Ds=as.ZP.Group,Y=j.Z.Group,_s=(vs=(0,ps.$j)(J=>{var s=J.page,n=J.commondesign,a=J.globaldesign,d=J.loading;return{page:s,commondesign:n,globaldesign:a,loading:d.effects["page/getCourseSelections"]}}),vs(us=class extends Cs.PureComponent{constructor(){super(...arguments);this.state={visible:!1,navList:[{name:"\u5973\u738B\u8282",subName:"\u72C2\u6B225\u6298\u8D77",coureData:[],shopData:[],infoData:[],nid:0}],color:"#000",showEdit:99,showSubEdit:99,recordIndex:0,visibleHref:!1,activeKey:"1",classifyList:[],firstClass:{},secondClass:{},courseList:[],courseCurrent:1,courseTotal:0,courseCheck:[],courseCheckItem:[],classifyShopList:[],firstShopClass:{},secondShopClass:{},shopList:[],shopCurr
<div class="title">`).concat(m.name,`</div>
<div class="subName">`).concat(m.subName,`</div>
</li>`)}v+="</ul>",v+='<div class="tabConTentBox">';for(var I=0,S=s.length;I<S;I++){var o=s[I],y=o.coureData,k=o.shopData,B=o.infoData;v+='<div class="tabConTent '.concat(I==0?"on":"",'">');for(var b=0,t=y.length;b<t;b++){var x=y[b];v+=`<div class="courseCard">
<div class="cover" style="background-image:url(`.concat(""+x.cover,`)"></div>
<div class="title">`).concat(x.courseName,`</div>
</div>`)}for(var E=0,ns=k.length;E<ns;E++){var w=k[E];v+=`<div class="shopCard">
<div class="cover" style="background-image:url(`.concat(""+n.getShopCover(w),`)"></div>
<div class="title">`).concat(w.shopName,`</div>
<div class="price">`).concat(w.price/100,'<span class="marketPrice">\uFFE5').concat(w.marketPrice,'</span><span class="orderCount">').concat(w.orderCount,`\u4EF6\u5DF2\u552E</span></div>
</div>`)}for(var V=0,f=B.length;V<f;V++){var r=B[V];v+=`<div class="infoCard">
<div class="cover" style="background-image:url(`.concat(""+n.getInformationCover(r),`)"></div>
<div class="rightBox">
<div class="title">`).concat(r.title,`</div>
<div class="introduce">`).concat(r.introduce,`</div>
</div>
</div>`)}v+="</div>"}v+="</div>",v+="</div>",i.css({fontSize:12}),i.html(v),i.attr("data-TabNav",JSON.stringify(s))},this.show=s=>{s?(s=JSON.parse(s),this.setState({navList:s})):this.setState({navList:s}),this.setState({visible:!0,showEdit:99})},this.cancelEvent=()=>{var s=this,n=this.props.dispatch;n({type:"commondesign/setState",payload:{TabNav:{visible:!1,callback:()=>{},callClose:()=>{}}}})},this.classifyList=()=>{var s=this,n=s.props.dispatch;n({type:"page/getDressClassifyCourseList",payload:{needShare:!0},callback:a=>{a.success&&s.setState({classifyList:a.data})}})},this.getCourseList=()=>{var s=this,n=s.props.dispatch,a=s.state,d=a.firstClass,i=a.secondClass,u=a.courseCurrent,C=d.courseClassifyId,g=i.courseClassifyId;hs()(".courseList").scrollTop(0),n({type:"page/getCourseSelections",payload:{mainClassify:C,childClassify:g,currentPage:u,pageSize:50,courseType:2},callback:v=>{if(v.success){var l=v.data,p=l.list,m=l.total;s.setState({courseList:p,courseTotal:m})}}})},this.getClassifyList=()=>{var s=this,n=this.props.dispatch,a=this.state.classifyShopList;a.length<1&&n({type:"page/getClassifyList",payload:{},callback:d=>{d.success&&s.setState({classifyShopList:d.data})}})},this.getShopList=()=>{var s=this,n=s.props.dispatch,a=s.state,d=a.firstShopClass,i=a.secondShopClass,u=a.shopCurrent,C=d.shopClassifyId,g=i.shopClassifyId;hs()(".courseList").scrollTop(0),n({type:"page/getShopListByCondition",payload:{shopClassifyId:g||C,currentPage:u,pageSize:50},callback:v=>{if(v.success){var l=v.data,p=l.list,m=l.total;s.setState({shopList:p,shopTotal:m})}}})},this.getShopCover=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=s.coverList;if((0,fs.pM)(n)){var a=JSON.parse(n);return a.length>0?""+a[0].sourcePath:""}return""},this.getInfoClassifyList=()=>{var s=this,n=this.props.dispatch;n({type:"page/listAllSetting",payload:{showCount:1},callback:a=>{a.success&&s.setState({classifyInfoList:a.data})}})},this.getHomepageInfoList=()=>{var s=this,n=this.props.dispatch;n({type:"page/listHomepageInfo",callback:a=>{a.success&&s.setState({infoList:a.data.list,infoTotal:a.data.total})}})},this.getInformationCover=s=>{var n=s.thumb,a=n===void 0?"":n;return a.indexOf("//")==0?a.substring(1):a},this.getSelectCourseList=()=>{var s=this,n=this.props.dispatch,a=this.state.courseCheck;n({type:"page/getCourseInfoByIds",payload:{courseIds:a},callback:d=>{d.success&&s.setState({courseCheckItem:d.data})}})},this.coverCourseData=function(){for(var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[],a=0,d=s.length;a<d;a++){var i=s[a],u=i.courseId,C=i.cover,g=i.courseType,v=i.courseName,l=i.price;n.push({courseId:u,cover:C,courseType:g,courseName:v,price:l})}return n},this.coverShopData=s=>{for(var n=[],a=0,d=s.length;a<d;a++){var i=s[a],u=i.shopId,C=i.cover,g=i.coverList,v=i.shopName,l=i.price,p=i.marketPrice,m=i.orderCount;n.push({shopId:u,cover:C,coverList:g,shopName:v,price:l,marketPrice:p,orderCount:m})}return n},this.coverInfoData=s=>{for(var n=[],a=0,d=s.length;a<d;a++){var i=s[a],u=i.infoID,C=i.thumb,g=i.title,v=i.introduce;n.push({infoID:u,thumb:C,title:g,introduce:v})}return n}}componentDidMount(){var s=this,n=s.props,a=n.commondesign,d=n.page,i=a.TabNav,u=i.visible,C=i.element,g=i.callback,v=i.callClose;s.setState({visible:u});var l=C.attr("data-tabnav");s.show(l);var p=d.classCourseList,m=s.state.classifyList;m.length>0?s.setState({classifyList:p}):s.classifyList(),s.getCourseList()}renderCourse(){var s=this,n=s.props.loading,a=s.state,d=a.classifyList,i=a.firstClass.children,u=i===void 0?[]:i,C=a.secondClass,g=C===void 0?{}:C,v=a.courseCurrent,l=a.courseTotal,p=a.courseList,m=p===void 0?[]:p,I=a.courseCheckItem,S=g.courseClassifyId,o=s.state.courseCheck,y=(t,x)=>{s.setState({firstClass:x.data,courseCurrent:1,secondClass:{}},()=>{s.getCourseList()})},k=function(x){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s.setState({secondClass:E.data,courseCurrent:1},()=>{s.getCourseList()})},B=t=>{var x=t.courseId,E=o.indexOf(x);E>-1?(o.splice(E,1),I.splice(E,1)):(o.push(x