1 line
6.3 KiB
JavaScript
1 line
6.3 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-677c6fb8"],{"537b":function(t,i,e){var n=e("24fb");i=n(!1),i.push([t.i,'.component-wrapper[data-v-6969c5be]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;width:100%}.scroll-notice[data-v-6969c5be]{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;content:"..."}.icon-box[data-v-6969c5be]{position:absolute;left:0;top:0;height:39px;line-height:39px;padding:0 5px;margin:3px 0;background:#fff;z-index:1;vertical-align:middle;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.icon-box i[data-v-6969c5be]{font-size:20px}.icon-box .icon-img[data-v-6969c5be]{width:27px;height:27px}.wrap[data-v-6969c5be]{white-space:nowrap;overflow:hidden;height:45px;line-height:45px}.box[data-v-6969c5be]{width:80000%}.box div[data-v-6969c5be]{float:left}.marquee[data-v-6969c5be]{margin:0 16px 0 0}.node[data-v-6969c5be]{position:absolute;z-index:-999;top:-999999px}',""]),t.exports=i},9581:function(t,i,e){var n=e("537b");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=e("499e").default;o("304f2994",n,!0,{sourceMap:!1,shadowMode:!1})},b955:function(t,i,e){"use strict";e("9581")},fada:function(t,i,e){"use strict";e.r(i);var n=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"U000007-template1",class:t.className,staticStyle:{position:"relative",overflow:"hidden"}},[e("div",{domProps:{innerHTML:t._s(t.css)}}),e("div",{staticClass:"notice-box"},[t.datas.is_showIcon?e("div",{staticClass:"icon-box"},[t.datas.icon_value&&2==t.datas.icon_value.isIcon?t._e():e("i",{staticClass:"iconfont",class:[t.datas.icon_value&&t.datas.icon_value.icon?t.datas.icon_value.icon:"icon-ht_btn_news"]}),t.datas.icon_value&&2==t.datas.icon_value.isIcon?e("img",{staticClass:"icon-img",attrs:{src:t.datas.icon_value.image,alt:""}}):t._e()]):t._e(),e("div",{directives:[{name:"show",rawName:"v-show",value:t.datas.is_scroll,expression:"datas.is_scroll"}],staticClass:"wrap",attrs:{id:"wrap"},on:{click:t.toUrl}},[e("div",{staticClass:"box",attrs:{id:"box"+t.id}},[e("div",{staticClass:"marquee",attrs:{id:"marquee"+t.id}},[t._v(t._s(t.datas.search_title||"请填写内容,可设置是否滚动显示"))]),e("div",{staticClass:"copy",attrs:{id:"copy"+t.id}})]),e("div",{staticClass:"node",attrs:{id:"node"+t.id}},[t._v(t._s(t.datas.search_title||"请填写内容,可设置是否滚动显示"))]),2==t.datas.notice_link.is_h5?e("div",{staticStyle:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0"},domProps:{innerHTML:t._s(t.datas.notice_link.html)},on:{click:function(t){t.stopPropagation()}}}):t._e()]),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.datas.is_scroll,expression:"!datas.is_scroll"}],staticClass:"scroll-notice",on:{click:t.toUrl}},[t._v(" "+t._s(t.datas.search_title||"请填写内容,可设置是否滚动显示")+" "),2==t.datas.notice_link.is_h5?e("div",{staticStyle:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0"},domProps:{innerHTML:t._s(t.datas.notice_link.html)},on:{click:function(t){t.stopPropagation()}}}):t._e()])])])},o=[],a=(e("99af"),e("caad"),e("2532"),e("9911"),function(){var t=this.datas,i=t.preview_color,e=t.search_height,n=t.font_size,o=t.text_style,a=t.font_color;return"\n .component-".concat(this.id," .notice-box {\n background-color: ").concat(i.color,";\n background-image: url(").concat(2==i.isColor?i.image:"",");\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n font-size: ").concat(n,"px;\n font-weight: ").concat(o.includes("1")?"bold":"",";\n font-style: ").concat(o.includes("2")?"italic":"",";\n color: ").concat(a,";\n }\n\n .component-").concat(this.id," .icon-box{\n background-color: ").concat(2==i.isColor?"#ffffff":i.color,";\n height: ").concat(e-6,"px;\n line-height: ").concat(e-6,"px;\n }\n\n .component-").concat(this.id," .wrap, .component-").concat(this.id," .scroll-notice{\n height: ").concat(e,"px;\n line-height: ").concat(e,"px;\n }\n\n .component-").concat(this.id," .notice-box, .component-").concat(this.id," .scroll-notice{\n width: ").concat(this.noticeWidth,"px;\n }\n\n .component-").concat(this.id," .marquee, .component-").concat(this.id," .copy, .component-").concat(this.id," .node{\n min-width: ").concat(this.noticeWidth,"px;\n }\n ")}),c={props:["id","datas","styles"],data:function(){return{timer:null,noticeWidth:"375"}},mounted:function(){3==this.fun.getPhoneEnv()?this.noticeWidth="375":this.noticeWidth=document.body.clientWidth,this.move()},computed:{css:function(){return"<style>"+a.call(this)+"</style>"},className:function(){var t=["component-wrapper","component-".concat(this.id)];return t}},watch:{datas:{deep:!0,handler:function(){var t=document.getElementById("copy"+this.id);t&&(t.innerText=this.datas.search_title)}}},methods:{toUrl:function(){1==this.datas.notice_link.is_h5&&this.datas.notice_link.link&&(window.location.href=this.datas.notice_link.link)},move:function(){var t=document.createElement("script");if(t.type="text/wxtag-template",t.text='<div style="width: '.concat(this.noticeWidth,"px;height: ").concat(this.datas.search_height,'px;"></div>'),this.datas.notice_link.html='<wx-open-launch-weapp username="'.concat(this.datas.notice_link.gh_id,'" path="').concat(this.datas.notice_link.minApp_link,'">').concat(t.outerHTML,"</wx-open-launch-weapp>"),document.getElementById("node"+this.id)){var i=document.getElementById("node"+this.id).getBoundingClientRect().width,e=document.getElementById("box"+this.id),n=document.getElementById("copy"+this.id);n.innerText=this.datas.search_title;var o=0,a="";this.datas.scroll_speed&&(a=i/this.datas.scroll_speed),clearInterval(this.timer),this.timer=null,this.timer=setInterval((function(){o-=1,-o>=i&&(o=16),e.style.transform="translateX("+o+"px)"}),a||20)}}}},s=c,l=(e("b955"),e("2877")),d=Object(l["a"])(s,n,o,!1,null,"6969c5be",null);i["default"]=d.exports}}]); |