filesbox/web/dist/10492.8dc854d8.async.js

32 lines
11 KiB
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[10492],{12108:function(Q,A,n){"use strict";n.r(A),n.d(A,{default:function(){return G}});var X=n(71194),K=n(50146),q=n(13062),W=n(71230),ee=n(89032),I=n(15746),se=n(63185),j=n(9676),te=n(77883),L=n(85986),le=n(36877),k=n(18480),ne=n(34792),w=n(48086),H=n(67294),J=n(28216),V=n(30381),x=n.n(V),F=n(96278),Y=n.n(F),Z=n(5283),ae=n.n(Z),$=n(87269),ie=n.n($),z=n(54870),re=n.n(z),ce=n(41273),o=n(85893),R,U,G=(R=(0,J.$j)(S=>{var e=S.commondesign,l=S.page;return{commondesign:e,page:l}}),R(U=class extends H.PureComponent{constructor(){super(...arguments);this.state={visible:!1,styleType:"xtwlb",classify:[],startNum:1,endNum:10,list:[],options:[],loading:!1,sTeacher:0,sNum:0,sDate:0,sTitle:0,sborder:0,isAll:!1},this.listAllSetting=()=>{var e=this.props.dispatch;e({type:"page/listAllSetting",callback:l=>{this.setState({visible:!0,options:l.data})}})},this.updataDomCallBack=e=>{var l=this,r=this.props.differenceType;r==1?l.pcDom(e):l.mobileDom2(e)},this.pcDom=e=>{var l=this.props.commondesign,r=l.ShortVideo,h=r.visible,t=r.element,v=r.callback,_=r.callClose,a="",f,P=0,c=e.list.length,u=e.list[0],m=""+(u.computerPicPath?JSON.parse(u.computerPicPath).sourcePath||JSON.parse(u.computerPicPath)[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg");t.css("height","auto");var E=e.sTeacher,T=e.sDate,y=e.sNum,N=e.sTitle,C=s=>"/information/".concat(s.infoID,".shtml"),D=s=>E?'<span class="realName">'.concat(s.realName,"</span>"):"",O=s=>T?'<span class="sDate">'.concat(x()(s.gmtCreate).format("YYYY-MM-DD"),"</span>"):"",M=s=>y?'<span class="sNum"><i class="iconfont icon-eye"></i>'.concat(s.viewCount,"</span>"):"",B=s=>N?'<span class="title moreTitle">'.concat(s.title,"</span>"):'<p><span class="title">'.concat(s.title,'</span></p><p class="introduce">').concat(s.introduce,"</p>");switch(e.styleType){case"xtwlb":t.css({width:"100%",left:0}),a='<ul class="xtwlb newxtwlb">',f=s=>`<li>
<a href="`.concat(C(s),`">
<div class="coverBox">
<div class="maskBox">
<img src="`).concat(s.computerPicPath,`"/>
<div class="playerIcon"></div>
</div>
</div>
<div class="infoBox">
<p class="title">`).concat(s.title,`</p>
<p class="introduce" style="height: 32px;">`).concat(s.introduce,`</p>
<p class="introduce"> `).concat(D(s)," ").concat(O(s),`</p>
</div>
</a>
</li>`);break}for(var d=document.createElement("div"),g=P,i=c;g<i;g++){var p=e.list[g];p.computerPicPath=""+(p.computerPicPath?JSON.parse(p.computerPicPath).sourcePath||JSON.parse(p.computerPicPath)[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg"),d.innerHTML=p.detail,p.detail=d.innerText,a+=f(p,g)}a+="</ul>";var b=t.find(".boxHtml");b.length>0?b.html(a):t.html('<div class="boxHtml">'+a+"</div>"),t.css({backgroundColor:"#fff"}),t.attr("data-shortvideo",JSON.stringify({styleType:e.styleType,classify:e.classify,startNum:e.startNum,endNum:e.endNum,sTeacher:e.sTeacher,sNum:e.sNum,sTitle:e.sTitle,sborder:e.sborder,sDate:e.sDate,isAll:e.isAll}))},this.mobileDom2=e=>{var l=this.props.commondesign,r=l.ShortVideo,h=r.visible,t=r.element,v=r.callback,_=r.callClose,a="",f,P=0,c=e.list.length,u=e.list[0],m=""+(u.computerPicPath?JSON.parse(u.computerPicPath).sourcePath||JSON.parse(u.computerPicPath)[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg");t.css("height","auto");var E=e.sTeacher,T=e.sDate,y=e.sNum,N=e.sTitle,C=s=>"/information/".concat(s.infoID,".shtml"),D=s=>E?'<span class="realName">'.concat(s.realName,"</span>"):"",O=s=>T?'<span class="sDate">'.concat(x()(s.gmtCreate).format("YYYY-MM-DD"),"</span>"):"",M=s=>y?'<span class="sNum"><i class="iconfont icon-eye"></i>'.concat(s.viewCount,"</span>"):"",B=s=>N?'<span class="title moreTitle">'.concat(s.title,"</span>"):'<p><span class="title">'.concat(s.title,'</span></p><p class="introduce">').concat(s.introduce,"</p>");switch(e.styleType){case"xtwlb":t.css({width:"100%",left:0}),a='<ul class="xtwlb newxtwlb">',f=s=>`<li>
<a href="`.concat(C(s),`">
<div class="infoBox">
<p class="title">`).concat(s.title,`</p>
</div>
<div class="coverBox">
<div class="maskBox">
<img src="`).concat(s.computerPicPath,`"/>
<div class="playerIcon"></div>
</div>
</div>
<div class="infoBox">
<p class="introduce" style="height: 32px;">`).concat(s.introduce,`</p>
<p class="introduce"> `).concat(D(s)," ").concat(O(s),`</p>
</div>
</a>
</li>`);break}for(var d=document.createElement("div"),g=P,i=c;g<i;g++){var p=e.list[g];p.computerPicPath=""+(p.computerPicPath?JSON.parse(p.computerPicPath).sourcePath||JSON.parse(p.computerPicPath)[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg"),d.innerHTML=p.detail,p.detail=d.innerText,a+=f(p,g)}a+="</ul>";var b=t.find(".boxHtml");b.length>0?b.html(a):t.html('<div class="boxHtml">'+a+"</div>"),t.css({backgroundColor:"#fff"}),t.attr("data-shortvideo",JSON.stringify({styleType:e.styleType,classify:e.classify,startNum:e.startNum,endNum:e.endNum,sTeacher:e.sTeacher,sNum:e.sNum,sTitle:e.sTitle,sborder:e.sborder,sDate:e.sDate,isAll:e.isAll}))},this.mobileDom=e=>{var l=this,r=this.props,h=r.commondesign,t=r.differenceType,v=h.ShortVideo,_=v.visible,a=v.element,f=v.callback,P=v.callClose,c="",u;a.css({height:"auto"});var m=e.sDate,E=e.sNum,T=e.sTitle,y=i=>"/pubinfo/".concat(i.infoID,".shtml"),N=i=>m?'<span class="teacher">'+x()(i.gmtCreate).format("YYYY-MM-DD")+"</span>":"",C=i=>E?'<span class="curren">'+i.viewCount+"</span>":"",D=i=>T?'<span class="title moreTitle">'+i.title+"</span>":'<span class="title">'+i.title+'</span><span class="introduce" >'+i.introduce+"</span>";switch(e.styleType){case"xtwlb":a.css({width:"100%",left:0}),c='<ul class="xtwlb">',u=i=>'<li><a href="'+y(i)+'"><img src="'+i.computerSinglePicPath+'"/><span class="title">'+i.title+"</span>"+N(i)+C(i)+"</a></li>";break;case"twlb":a.css({width:"100%",left:0}),c='<ul class="twlb">',u=i=>'<li><a href="'+y(i)+'"><span class="rser">'+D(i)+N(i)+C(i)+'</span><img src="'+i.computerSinglePicPath+'"/></a></li>';break;case"btrqlb":a.css({width:"100%",left:0}),c='<ul class="btrqlb">',u=i=>'<li><a href="'+y(i)+'">'+D(i)+N(i)+C(i)+"</a></li>";break}for(var O=document.createElement("div"),M=0,B=e.list.length;M<B;M++){var d=e.list[M];d.computerPicPath=d.computerPicPath?JSON.parse(d.computerPicPath):"/design/designstatic/common/image/information/defult.jpg",d.computerSinglePicPath=""+(d.computerPicPath?d.computerPicPath.sourcePath||d.computerPicPath[0].sourcePath:"/design/designstatic/common/image/information/defult.jpg"),O.innerHTML=d.detail,d.detail=O.innerText,c+=u(d,M)}c+="</ul>";var g=a.find(".boxHtml");g.length>0?g.html(c):a.html('<div class="boxHtml">'+c+"</div>"),a.css({backgroundColor:"#fff"}),a.attr("data-shortvideo",JSON.stringify({styleType:e.styleType,classify:e.classify,startNum:e.startNum,endNum:e.endNum,isAll:e.isAll,sNum:e.sNum,sTitle:e.sTitle||0,sDate:e.sDate}))},this.show=e=>{e?(e=JSON.parse(e),this.setState({styleType:e.styleType,classify:e.classify,startNum:e.startNum,endNum:e.endNum,sTeacher:e.sTeacher,sNum:e.sNum,sTitle:e.sTitle||0,sDate:e.sDate,isAll:e.isAll=="1"})):this.setState({styleType:"xtwlb",classify:[],startNum:1,endNum:10,sTeacher:0,sNum:0,sTitle:0,sDate:0,isAll:!1})},this.renderStyle=()=>{var e=this.state.styleType,l=(h,t)=>{this.setState({styleType:t})},r=[{type:"xtwlb",image:""},{type:"twlb",image:""},{type:"btrqlb",image:""}];return(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"label",children:"\u98CE\u683C\uFF1A"}),(0,o.jsx)("div",{className:"content",children:r.map(h=>{var t=h.type==e?"on":"";return(0,o.jsx)("div",{kay:h.type,className:"styleli ".concat(h.type," ").concat(t),onClick:v=>l(v,h.type),style:h.image?{backgroundImage:"url(".concat(h.image,")")}:{},children:" "})})})]})},this.carryCallBack=e=>{var l=this,r=this.props.commondesign,h=r.ShortVideo.callback,t=this.state,v=t.visible,_=t.styleType,a=t.classify,f=t.startNum,P=t.endNum,c=t.sTeacher,u=t.sNum,m=t.sTitle,E=t.sDate,T=t.isAll;if(e.length>0){var y={list:e,styleType:_,classify:a,startNum:f,endNum:P,sTeacher:c,sNum:u,sTitle:m,sDate:E,isAll:T?"1":"0"};l.updataDomCallBack(y),h&&h(y),l.cancelEvent()}else w.ZP.error("\u5F53\u524D\u5206\u7C7B\u4E0B\u6682\u65E0\u77ED\u89C6\u9891\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9");this.setState({loading:!1})},this.cancelEvent=()=>{var e=this,l=this.props.dispatch;l({type:"commondesign/setState",payload:{ShortVideo:{visible:!1,callback:()=>{},callClose:()=>{}}}})}}componentDidMount(){var e=this