if( parseInt($.browser.version) === 8 ){ console.log('ie8') }else{ //只有dom存在,才绑定js if(document.querySelector('#u456278')){ var num = 'u456278'; window['indexVm'+num] = new Vue({ el:'#u456278', data:{ indexStore:{ }, indexShow:false }, methods:{ vif:function(v){ // return this.indexStore.switchArr[v] =='true' ? true : false; } }, computed:{ vifs:function(){ return { width:this.indexStore.w_flinks_pic_width + 'px', height:this.indexStore.w_flinks_pic_height + 'px', left:this.indexStore.w_flinks_pic_left + 'px', top:this.indexStore.w_flinks_pic_top + 'px', position:'absolute', zIndex: 99 } }, spanConi:function(){ return { left:this.indexStore.w_flinks_icon_left + 'px', top:this.indexStore.w_flinks_icon_top + 'px', position:'absolute', fontFamily:"Ionicons" } }, spanCon:function(){ return { width:this.indexStore.w_flinks_width + 'px', height:this.indexStore.w_flinks_height + 'px', lineHeight:this.indexStore.w_flinks_height + 'px', textAlign:this.indexStore.w_flink_text_align, background:this.indexStore.w_flinks_bc_color, color:this.indexStore.w_flinks_font_color, fontSize:this.indexStore.w_flinks_font_size + 'px', borderRadius:this.indexStore.w_flinks_border_radius + 'px', position:'relative' } }, listyles:function(){ return { float:this.indexStore.w_link_dir, position:'relative' } }, astylesFir:function(){ return { color:this.indexStore.w_link_color_first, fontSize:this.indexStore.w_link_fs_first + 'px', backgroundColor:this.indexStore.w_link_bg_color_first, fontWeight:this.indexStore.w_link_bold_first, position:'relative', width:this.indexStore.w_color_width_first + 'px', height:this.indexStore.w_color_height_first + 'px', lineHeight:this.indexStore.w_color_height_first + 'px', textAlign:this.indexStore.w_link_text_align_first, display:'block', textDecoration:this.indexStore.w_link_decoration_link, marginTop:this.indexStore.w_link_first_mt + 'px', marginRight:this.indexStore.w_link_first_mr + 'px', marginBottom:this.indexStore.w_link_first_mb + 'px', marginLeft:this.indexStore.w_link_first_ml + 'px', paddingLeft:this.indexStore.w_link_first_pl + 'px', paddingRight:this.indexStore.w_link_first_pr + 'px', paddingTop:this.indexStore.w_link_first_pt + 'px', paddingBottom:this.indexStore.w_link_first_pb + 'px', borderTopStyle:this.indexStore.w_link_border_top_border_style, borderTopColor:this.indexStore.w_link_border_top_border_color, borderTopWidth:this.indexStore.w_link_border_top_border_width + 'px', borderRightStyle:this.indexStore.w_link_border_right_border_style, borderRightColor:this.indexStore.w_link_border_right_border_color, borderRightWidth:this.indexStore.w_link_border_right_border_width + 'px', borderBottomStyle:this.indexStore.w_link_border_bottom_border_style, borderBottomColor:this.indexStore.w_link_border_bottom_border_color, borderBottomWidth:this.indexStore.w_link_border_bottom_border_width + 'px', borderLeftStyle:this.indexStore.w_link_border_left_border_style, borderLeftColor:this.indexStore.w_link_border_left_border_color, borderLeftWidth:this.indexStore.w_link_border_left_border_width + 'px', } }, astyles:function(){ return { color:this.indexStore.w_link_color, fontSize:this.indexStore.w_link_fs + 'px', backgroundColor:this.indexStore.w_link_bg_color, fontWeight:this.indexStore.w_link_bold, position:'relative', paddingTop:this.indexStore.w_link_filltop + 'px', paddingRight:this.indexStore.w_link_fillr + 'px', paddingBottom:this.indexStore.w_link_fillbtm + 'px', paddingLeft:this.indexStore.w_link_fillleft + 'px', width:this.indexStore.w_color_width + 'px', height:this.indexStore.w_color_height + 'px', lineHeight:this.indexStore.w_color_height + 'px', textAlign:this.indexStore.w_link_text_align, display:'block', textDecoration:this.indexStore.w_link_decoration_link, borderTopStyle:this.indexStore.w_link_border_top_border_style, borderTopColor:this.indexStore.w_link_border_top_border_color, borderTopWidth:this.indexStore.w_link_border_top_border_width + 'px', borderRightStyle:this.indexStore.w_link_border_right_border_style, borderRightColor:this.indexStore.w_link_border_right_border_color, borderRightWidth:this.indexStore.w_link_border_right_border_width + 'px', borderBottomStyle:this.indexStore.w_link_border_bottom_border_style, borderBottomColor:this.indexStore.w_link_border_bottom_border_color, borderBottomWidth:this.indexStore.w_link_border_bottom_border_width + 'px', borderLeftStyle:this.indexStore.w_link_border_left_border_style, borderLeftColor:this.indexStore.w_link_border_left_border_color, borderLeftWidth:this.indexStore.w_link_border_left_border_width + 'px', marginLeft:this.indexStore.w_link_margin_left + 'px', marginRight:this.indexStore.w_link_margin_right + 'px', marginTop:this.indexStore.w_link_margin_top + 'px', marginBottom:this.indexStore.w_link_margin_bottom + 'px', } }, istyles:function(){ return { color:this.indexStore.w_icon_color, fontSize:this.indexStore.w_color_fs + 'px', paddingTop:this.indexStore.w_icon_filltop + 'px', paddingRight:this.indexStore.w_icon_fillr + 'px', paddingBottom:this.indexStore.w_icon_fillbtm + 'px', paddingLeft:this.indexStore.w_icon_fillleft + 'px', position:'absolute', left:this.indexStore.icon_pos_left, top:this.indexStore.icon_pos_top, fontFamily:"FontAwesome" } } }, watch:{ indexStore:{ handler:function(a,b){ }, deep:true } }, created:function(){ try{ var StorageVal = JSON.stringify({"allwidth":55,"allheight":55,"width":400,"height":44,"isShows":false,"newwidth":100,"w_link_decoration_link":"none","w_link_decoration_visited":"none","w_link_decoration_hover":"none","w_link_decoration_active":"none","icon_pos_left":0,"icon_pos_top":0,"w_icon_fillr":0,"w_icon_fillleft":0,"w_icon_fillbtm":0,"w_icon_filltop":0,"w_link_fillleft":0,"w_link_fillr":0,"w_link_fillbtm":0,"w_link_filltop":0,"w_link_family":"SimSun","w_link_bold":"normal","w_link_fs":12,"w_link_dir":"left","w_color_fs":12,"w_icon_color":"#f00","w_link_bg_color":"#fff","w_link_bg_hover_color":"#ff0","w_link_color":"#333","w_link_hover_color":"#0f0","clickName":0,"cityList":[{"linkTitles":"link_title1","linkLinks":"link_href1","linkTargets":"link_target1","linkAddPic":"添加图","linkDelPic":"删除图","imgalt":"imgalt1","imgUrl":"","isShowPic":"false","isShowPics":"isShowPics1","imgUrls":"imgUrls1","linkDeletes":"删除行"}],"cityLists":[{"title":"旧网入口","href":"http://www.br-ndt.com","target":"_blank","iconCLass":"","imgalt":"","isShowPic":"false","isShowPics":"false","imgUrls":"","backgroundImage":"","backgroundImageHover":""}],"rowNumber":1,"isShowWarn":false,"widget":"","links_styles":"0","w_color_width":80,"w_color_height":40,"w_color_lineheight":40,"w_link_text_align":"center","w_flinks_width":180,"w_flinks_height":50,"w_flink_text_align":"center","w_flinks_bc_color":"#ccc","w_flinks_font_color":"#0f0","w_flinks_con":"友情链接","w_links_emit_styles":"click","w_flinks_font_size":18,"w_links_sport_time":1000,"w_links_sport_styles":"slide","w_flinks_icon_left":20,"w_flinks_icon_top":20,"w_flinks_border_radius":0,"imgUrls":[],"switchArr":["false"],"w_flinks_pic_width":200,"w_flinks_pic_height":100,"w_flinks_pic_left":50,"w_flinks_pic_top":20,"w_link_bold_first":"bolder","w_link_text_align_first":"center","w_link_color_first":"rgba(0, 0, 0, 1)","w_link_hover_color_first":"rgba(255, 0, 0, 1)","w_link_bg_color_first":"rgba(21, 27, 89, 0)","w_link_bg_hover_color_first":"","w_color_width_first":50,"w_color_height_first":54,"w_color_lineheight_first":22,"w_link_fs_first":13,"w_link_open_first_set":"1","w_link_margin_left":0,"w_link_margin_right":0,"w_link_margin_top":0,"w_link_margin_bottom":0,"w_link_border_top_border_style":"solid","w_link_border_top_border_color":"#000","w_link_border_top_border_width":0,"w_link_border_right_border_style":"solid","w_link_border_right_border_color":"#000","w_link_border_right_border_width":0,"w_link_border_bottom_border_style":"solid","w_link_border_bottom_border_color":"#000","w_link_border_bottom_border_width":0,"w_link_border_left_border_style":"solid","w_link_border_left_border_color":"#000","w_link_border_left_border_width":0,"w_link_hover_border_top_border_style":"solid","w_link_hover_border_top_border_color":"#000","w_link_hover_border_top_border_width":0,"w_link_hover_border_right_border_style":"solid","w_link_hover_border_right_border_color":"#000","w_link_hover_border_right_border_width":0,"w_link_hover_border_bottom_border_style":"solid","w_link_hover_border_bottom_border_color":"#000","w_link_hover_border_bottom_border_width":0,"w_link_hover_border_left_border_style":"solid","w_link_hover_border_left_border_color":"#000","w_link_hover_border_left_border_width":0,"w_link_first_mt":0,"w_link_first_mb":0,"w_link_first_ml":0,"w_link_first_mr":0,"w_link_first_pt":0,"w_link_first_pb":0,"w_link_first_pl":16,"w_link_first_pr":0,"w_link_first_br":0,"w_link_second_br":0,"w_firlink_border_top_border_style":"solid","w_firlink_border_top_border_color":"#000","w_firlink_border_top_border_width":0,"w_firlink_border_right_border_style":"solid","w_firlink_border_right_border_color":"#000","w_firlink_border_right_border_width":0,"w_firlink_border_bottom_border_style":"solid","w_firlink_border_bottom_border_color":"#000","w_firlink_border_bottom_border_width":0,"w_firlink_border_left_border_style":"solid","w_firlink_border_left_border_color":"#000","w_firlink_border_left_border_width":0,"w_firlink_hover_border_top_border_style":"solid","w_firlink_hover_border_top_border_color":"#000","w_firlink_hover_border_top_border_width":0,"w_firlink_hover_border_right_border_style":"solid","w_firlink_hover_border_right_border_color":"#000","w_firlink_hover_border_right_border_width":0,"w_firlink_hover_border_bottom_border_style":"solid","w_firlink_hover_border_bottom_border_color":"#000","w_firlink_hover_border_bottom_border_width":0,"w_firlink_hover_border_left_border_style":"solid","w_firlink_hover_border_left_border_color":"#000","w_firlink_hover_border_left_border_width":0,"effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"},"styleId":3455,"w_link_hover_color_first_globalColor":"","w_link_bg_color_first_globalColor":"","w_link_bg_hover_color_first_globalColor":"sys_color_primary","w_link_color_first_globalColor":""}); if(StorageVal != null){ this.indexStore = JSON.parse(StorageVal); } }catch(e){} if(this.indexStore.links_styles == '0' || '0' == '0'){ //样式1 $('#u456278 #links_a ul li').hover(function(){ $(this).find('img').show(); },function(){ $(this).find('img').hide(); }); $('#u456278 #links_a ul li a').hover(function(){ $(this).css('color','' || '#0f0'); },function(){ $(this).css('color','' || '#333'); }); var w_link_open_first_set = '' || '1'; $('#u456278 #links_a ul li a:first').hover(function(){ if (w_link_open_first_set == '1') { $(this).css('color','' || 'rgba(255, 0, 0, 1)'); }else{ $(this).css('color','' || '#0f0'); } },function(){ if (w_link_open_first_set == '1'){ $(this).css('color','' || 'rgba(0, 0, 0, 1)'); }else{ $(this).css('color','' || '#333'); } }); }else if(this.indexStore.links_styles == '1' || '0' == '1'){ //样式2 var objs = { w_links_emit_styles:'' || 'click', w_links_sport_time:'' || '1000', w_links_sport_styles:'' || 'slide', w_link_hover_color:'' || '#0f0', w_link_color:'' || '#333' } $('#u456278 #links_a ul li a ').hover(function(){ $(this).css('color',objs.w_link_hover_color); },function(){ $(this).css('color',objs.w_link_color); }); if (objs.w_links_emit_styles == 'click') { $('#u456278 #links_a #flinks').off(); $('#u456278 #links_a #flinks').on('click',function(){ if (objs.w_links_sport_styles == 'slide') { $('#u456278 #links_a ul').stop(true,true).slideToggle(parseInt(objs.w_links_sport_time)); }else{ $('#u456278 #links_a ul').stop(true,true).fadeToggle(parseInt(objs.w_links_sport_time)); } $('#u456278 #links_a #flinks i').toggleClass('flinksi'); if ($('#u456278 #links_a #flinks i').hasClass('flinksi')) { $('#u456278 #links_a #flinks i').css('transform','rotate(180deg)'); }else{ $('#u456278 #links_a #flinks i').css('transform','rotate(360deg)'); } }); }else{ $('#u456278 #links_a #flinks').off(); $('#u456278 #links_a').hover(function(){ if (objs.w_links_sport_styles == 'slide') { $('#u456278 #links_a ul').stop(true,true).slideDown(parseInt(objs.w_links_sport_time)); $('#u456278 #links_a #flinks i').css('transform','rotate(180deg)'); }else{ $('#u456278 #links_a ul').stop(true,true).fadeIn(parseInt(objs.w_links_sport_time)); $('#u456278 #links_a #flinks i').css('transform','rotate(180deg)'); } },function(){ if (objs.w_links_sport_styles == 'slide') { $('#u456278 #links_a ul').stop(true,true).slideUp(parseInt(objs.w_links_sport_time)); $('#u456278 #links_a #flinks i').css('transform','rotate(0deg)'); }else{ $('#u456278 #links_a ul').stop(true,true).fadeOut(parseInt(objs.w_links_sport_time)); $('#u456278 #links_a #flinks i').css('transform','rotate(0deg)'); } }); } }else if(this.indexStore.links_styles == '2' || '0' == '2'){ //样式3 var objs = { w_links_emit_styles:'' || 'click', w_links_sport_time:'' || '1000' , w_links_sport_styles:'' || 'slide', w_link_hover_color:'' || '#0f0', w_link_color:'' || '#333', is_hover_leave:false } $('#u456278 #links_a ul li a ').hover(function(){ $(this).css('color',objs.w_link_hover_color); },function(){ $(this).css('color',objs.w_link_color); }); $('#u456278 #links_a > #flinks').hover(function(){ $('#u456278 #links_a ul').css('transform','scale(1)').css('opacity',1); $('#u456278 #links_a #flinks i').css('transform','rotate(180deg)'); objs.is_hover_leave = false; },function(){ objs.is_hover_leave = true; setTimeout(function(){ if (objs.is_hover_leave) { $('#u456278 #links_a ul').css('transform','scale(0.00001)').css('opacity',0); $('#u456278 #links_a #flinks i').css('transform','rotate(0deg)'); } },200); }); $('#u456278 #links_a > ul').hover(function(){ $('#u456278 #links_a ul').css('transform','scale(1)').css('opacity',1); objs.is_hover_leave = false; },function(){ objs.is_hover_leave = true; setTimeout(function(){ if (objs.is_hover_leave) { $('#u456278 #links_a ul').css('transform','scale(0.00001)').css('opacity',0); $('#u456278 #links_a #flinks i').css('transform','rotate(0deg)'); } },200); }); } //挂件动画 try{ $.allWidgetAnimate(this,$('#u456278')); }catch(e){}; }, ready:function(){ console.log('链接组件版本:2019-03-11') if(typeof templet!="undefined"){ templet.checkaction(this); } $.each($('#u456278 #links_a a'), function(index, item) { //防止页面无缘增加空链接 影响样式 if ($(item).attr('href') === '' && $(item).text().trim() === "") { $('#u456278 #links_a a').eq(index).hide() } }); //链接的默认背景图片和悬浮背景图片处理 $('#u456278 #links_a a').hover(function(){ var hoverImg = $(this).data('hoverimg'); if(hoverImg){ $(this).css('backgroundImage','url('+hoverImg+')') }else{ //若是没有悬浮背景图片 直接移除 显示背景颜色 $(this).css('backgroundImage','') } },function(){ var defaultImg = $(this).data('defaultimg'); if(defaultImg){ $(this).css('backgroundImage','url('+defaultImg+')') } }) } }); } } if( parseInt($.browser.version) === 8 ){ }else{ //只有dom存在,才绑定js if(document.querySelector('#u960762')){ var num = 'u960762'; window['indexNavVm'+num] = new Vue({ el: '#u960762', data:{ editVal:{}, listArr:[], url:'', indexShow:true,//判断渲染index还是edit }, methods:{ iconFourStyle:function (fontSize,navIconPosition,tweLevelFontSize,color) { var liHeight = $('#u960762').find('.indexNav').children('.indexNavChild').height(); var liWidth = $('#u960762').find('.indexNav').children('li').width(); var dropDownMenuHeight = $('#u960762').find('.indexNavChild').children('ul').children('li').height(); var fontSize = parseInt(fontSize); if(navIconPosition == 'top-left'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:'3%', bottom:'', left:'7%', right:'', fontSize:fontSize+'px', color:color }); } else if(navIconPosition == 'top-center'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:'3%', bottom:'', left:(liWidth - fontSize)/2+'px', right:'', fontSize:fontSize+'px', color:color }); } else if(navIconPosition == 'top-right'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:'3%', bottom:'', left:'', right:'7%', fontSize:fontSize+'px', color:color }); } else if(navIconPosition == 'center-left'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:(liHeight - fontSize)/2+'px', bottom:'', left:'7%', right:'', fontSize:fontSize+'px', color:color }); } else if(navIconPosition == 'center-center'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:(liHeight - fontSize)/2+'px', bottom:'', left:(liWidth - fontSize)/2+'px', right:'', fontSize:fontSize+'px', color:color }); } else if(navIconPosition == 'center-right'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:(liHeight - fontSize)/2+'px', bottom:'', left:'', right:'7%', fontSize:fontSize+'px', color:color }); } else if(navIconPosition == 'bottom-left'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:'', bottom:'3%', left:'7%', right:'', fontSize:fontSize+'px', color:color }); } else if(navIconPosition == 'bottom-center'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:'', bottom:'3%', left:(liWidth - fontSize)/2+'px', right:'', fontSize:fontSize+'px', color:color }); } else if(navIconPosition == 'bottom-right'){ $('#u960762').find('.indexNav').children('li').children('i').css({ top:'68%', bottom:'3%', left:'', right:'7%', fontSize:fontSize+'px', color:color }); } //下拉菜单样式 $('#u960762').find('.indexNavChild').children('ul').find('i').css({ top:(dropDownMenuHeight - fontSize)/2+'px', bottom:'', left:'7%', right:'', fontSize:fontSize+'px', color:color }); //所有样式加载完成,导航出现 $('#u960762').find('.indexCustom').find('i').css('display','block'); $('#u960762').find('.menumenu').find('i').css('display','block'); }, hoverUlShow:function () { var that = this; $('#u960762').find('.indexNav').on('mouseenter','.indexNavChild',function () { var page = $(this).attr('data-page'); if(that.editVal.full_screen_drop_down){ if(that.editVal.full_screen_drop_down.full_screen_drop_down && that.editVal.full_screen_drop_down.full_screen_drop_down.indexOf(page) > -1){ that.full_screen_drop_down($(this)); } else{ $(this).children('ul').stop(false,false).slideDown(150); } } else{ $(this).children('ul').stop(false,false).slideDown(150); } }); $('#u960762').find('.indexNav').on('mouseleave','.indexNavChild',function () { $(this).children('ul').stop(false,false).slideUp(150); var drop = $(this).find('.full_screen_drop_down'); if(drop.length > 0){ drop.removeClass('full_screen_drop_down_clone'); } }) }, full_screen_drop_down:function(li){ var w = $(window).width(); var dom = li.find('.full_screen_drop_down'); var l = li.offset().left; dom.css({ width:w + 'px', 'margin-left':l * -1 + 'px' }) dom.addClass('full_screen_drop_down_clone'); } }, created:function () { //初始化数据源赋 try{ var style = JSON.stringify({"navCustomStyle":true,"styleId":"","styleChoicIndex":"","style":{"navBackground":"rgba(255,255,255,0)","navLiBackground":"rgba(255, 255, 255, 0)","navColor":"rgba(76, 76, 76, 1)","navBorderStyle":"none","navBorderColor":"rgba(156, 173, 186, 0.5)","navFontFamily":"Microsoft YaHei","navFontWeight":"500","navFontAlign":"center","navOneWidth":92,"navWidth":948,"navHeight":48,"navFontSize":16,"navBorderRadius":0,"navMarginRight":0},"navSelectStyle":{"navSelectBackground":"rgba(255, 255, 255, 1)","navSelectColor":"rgba(21, 27, 89, 1)","navSelectFontSize":16},"dropDownStyle":{"dropDownBackground":"rgba(161, 177, 190, 0.5)","dropDownColor":"rgba(255, 255, 255, 1)","dropDownHeight":30,"dropDownFontSize":16,"dropDownBackgroundImage":"","isRepeat":"repeat","opacity":1,"navMarginTopHeight":0},"dropDownSelectStyle":{"dropDownSelectBackground":"rgba(255, 255, 255, 1)","dropDownSelectColor":"rgba(21, 27, 89, 1)","dropDownSelectFontSize":16,"height":30,"opacity":1},"icon":{"position":"center-left","fontSize":16,"dropDownFontSize":12,"childIcon":"","color":"#f00"},"effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"},"full_screen_drop_down":{"height":300,"background":"rgba(230, 226, 226, 0)","background_globalColor":"","col":6,"col_width":170,"class_title":{"color":"rgba(255, 255, 255, 1)","color_globalColor":"","select_color":"rgba(102, 102, 102, 1)","select_color_globalColor":"","fontSize":16,"fontWeight":"normal","fontStyle":"normal","textDecoration":"none"},"list_title":{"num":6,"color":"rgba(255, 255, 255, 1)","color_globalColor":"","select_color":"rgba(51, 51, 51, 1)","select_color_globalColor":"","fontSize":16,"fontWeight":"normal","fontStyle":"normal","textDecoration":"none"},"full_screen_drop_down":[]}}); if(style){ this.editVal = JSON.parse(style); } var listArr = JSON.stringify(); if(listArr){ this.listArr = JSON.parse(listArr); console.log('导航菜单',this.listArr) } } catch(err){} //获取链接,匹配/分割字符串 var urlId = window.location.pathname; }, ready:function () { var fontSize = this.editVal.icon.fontSize; var navIconPosition = this.editVal.icon.position; var tweLevelFontSize = this.editVal.icon.dropDownFontSize; var color = this.editVal.icon.color; this.iconFourStyle(fontSize,navIconPosition,tweLevelFontSize,color); this.hoverUlShow(); if(typeof templet!="undefined") { templet.checkaction(this); } } }); } } if( parseInt($.browser.version) === 8 ){ console.log('ie8') }else{ //只有dom存在,才绑定js if(document.querySelector('#u348934')){ ;var num = 'u348934'; window['indexVm'+num] = new Vue({ el:'#u348934', data:{ indexStore:{ }, infos:{ }, dataArr:{ }, inforLentgh:'', indexShow:false }, computed:{ lanImg:function(){ return { width:this.indexStore.w_language_img_width + 'px', height:this.indexStore.w_language_img_height + 'px', position:'absolute', left:this.indexStore.w_language_img_left + 'px', top:this.indexStore.w_language_img_top + 'px', display:this.indexStore.w_language_img_show, borderRadius:this.indexStore.w_language_img_border_radius + 'px' }; }, style2:function(){ return { width:this.indexStore.w_languageWidth + 'px', height:this.indexStore.w_languageHeight + 'px', fontSize:this.indexStore.w_minbeds + 'px', color:this.indexStore.w_fontColor, paddingLeft:this.indexStore.w_style2_padding_left + 'px', background:this.indexStore.w_inputColor, borderRadius:this.indexStore.w_style2_border_radius + 'px' }; }, style1:function(){ return { width:this.indexStore.w_languageWidth + 'px', height:this.indexStore.w_languageHeight + 'px', marginLeft:'2px' }; }, style1li:function(){ return { float:this.indexStore.w_style1_float, width:this.indexStore.w_style1_languageWidth + 'px', height:this.indexStore.w_style1_languageHeight + 'px', lineHeight:this.indexStore.w_style1_languageHeight + 'px', background:this.indexStore.w_inputColor, borderRadius:this.indexStore.w_style1_border_radius + 'px', textAlign:this.indexStore.w_style1_text_align, paddingTop:this.indexStore.w_style1_padding_top + 'px', paddingRight:this.indexStore.w_style1_padding_right + 'px', paddingBottom:this.indexStore.w_style1_padding_bottom + 'px', paddingLeft:this.indexStore.w_style1_padding_left + 'px', marginTop:this.indexStore.w_style1_margin_top + 'px', marginRight:this.indexStore.w_style1_margin_right + 'px', marginBottom:this.indexStore.w_style1_margin_bottom + 'px', marginLeft:this.indexStore.w_style1_margin_left + 'px', borderStyle:this.indexStore.language_a_border_all_styles, borderColor:this.indexStore.language_a_border_all_color, borderWidth:this.indexStore.language_a_border_all_width + 'px', position:'relative', }; }, style1af:function(){ return { display:this.indexStore.w_language_txt_show, fontSize:this.indexStore.w_minbeds + 'px', color:this.indexStore.w_fontColor, width:this.indexStore.w_style1_a_width + 'px', height:this.indexStore.w_style1_a_height + 'px', lineHeight:this.indexStore.w_style1_a_height + 'px', borderLeftStyle:this.indexStore.language_a_border_first_left_styles, borderLeftColor:this.indexStore.language_a_border_first_left_color, borderLeftWidth:this.indexStore.language_a_border_first_left_width + 'px', borderRightStyle:this.indexStore.language_a_border_first_right_styles, borderRightColor:this.indexStore.language_a_border_first_right_color, borderRightWidth:this.indexStore.language_a_border_first_right_width + 'px', }; }, style1a:function(){ return { display:this.indexStore.w_language_txt_show, fontSize:this.indexStore.w_minbeds + 'px', color:this.indexStore.w_fontColor, width:this.indexStore.w_style1_a_width + 'px', height:this.indexStore.w_style1_a_height + 'px', lineHeight:this.indexStore.w_style1_a_height + 'px', borderLeftStyle:this.indexStore.language_a_border_other_left_styles, borderLeftColor:this.indexStore.language_a_border_other_left_color, borderLeftWidth:this.indexStore.language_a_border_other_left_width + 'px', borderRightStyle:this.indexStore.language_a_border_other_right_styles, borderRightColor:this.indexStore.language_a_border_other_right_color, borderRightWidth:this.indexStore.language_a_border_other_right_width + 'px', }; }, style1as:function(){ return { display:this.indexStore.w_language_txt_show, fontSize:this.indexStore.w_minbeds + 'px', width:this.indexStore.w_style1_a_width + 'px', height:this.indexStore.w_style1_a_height + 'px', lineHeight:this.indexStore.w_style1_a_height + 'px', color:this.indexStore.w_fontColor, borderLeftStyle:this.indexStore.language_a_border_last_left_styles, borderLeftColor:this.indexStore.language_a_border_last_left_color, borderLeftWidth:this.indexStore.language_a_border_last_left_width + 'px', borderRightStyle:this.indexStore.language_a_border_last_right_styles, borderRightColor:this.indexStore.language_a_border_last_right_color, borderRightWidth:this.indexStore.language_a_border_last_right_width + 'px', }; } }, methods:{ boders:function(){ if (this.indexStore.language_a_border_right_show === 'show') { return "#f00" }else{ return '#f0f' } }, txtArr:function (arr) { var _this = this; if (!this.indexStore.txt_arr.length) { this.indexStore.txt_arr.length = 0; $.each(arr,function (index,item) { _this.indexStore.txt_arr.push(item.lang); }); } _this.indexStore.txt_arr_str = _this.indexStore.txt_arr.join(','); }, useOri:function(obj){ var arr = []; $.each(obj,function(index,item){ console.log('ie8',item.lang); arr.push(item.lang) }); return arr; } }, created:function(){ try{ //JSON.stringify var StorageVal = JSON.parse(JSON.stringify({"w_language_img":"http://txysen015.nbseo.cn/site/themes/T-XYSEN015/images/ch_ico.jpg,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png","img_obj":["/static/image/graphicInfo/style-bg.png","/static/image/graphicInfo/style-bg.png","/static/image/graphicInfo/style-bg.png"],"w_language_img_show":"none","w_language_img_width":30,"w_language_img_height":30,"w_language_img_left":0,"w_language_img_top":0,"w_language_img_border_radius":0,"w_languageHeight":"20","w_languageWidth":"100","w_minbeds":12,"w_filletRadius":4,"w_languageFont":"SimHei","w_fontColor":"#666","w_borderColor":"#666","w_inputColor":"rgba(255,255,255,0)","w_languageStyle":"1","w_style2_padding_left":0,"w_style2_border_radius":0,"w_style1_border_radius":0,"w_style1_float":"left","w_style1_languageWidth":50,"w_style1_languageHeight":12,"w_style1_line_height":30,"w_style1_padding_top":0,"w_style1_padding_right":0,"w_style1_padding_bottom":0,"w_style1_padding_left":0,"w_style1_margin_top":0,"w_style1_margin_right":0,"w_style1_margin_bottom":0,"w_style1_margin_left":0,"w_a_hover_font_color":"#e30920","w_a_hover_bc_color":"rgba(255,255,255,0)","w_style1_text_align":"center","language_a_border_all_styles":"solid","language_a_border_all_color":"#000","language_a_border_all_width":0,"w_style1_a_width":50,"w_style1_a_height":12,"language_a_border_right_show":"show","language_a_border_first_left_styles":"solid","language_a_border_first_left_color":"#000","language_a_border_first_left_width":0,"language_a_border_first_right_styles":"solid","language_a_border_first_right_color":"#666","language_a_border_first_right_width":1,"language_a_border_last_left_styles":"solid","language_a_border_last_left_color":"#000","language_a_border_last_left_width":0,"language_a_border_last_right_styles":"solid","language_a_border_last_right_color":"#000","language_a_border_last_right_width":0,"language_a_border_other_left_styles":"solid","language_a_border_other_left_color":"#000","language_a_border_other_left_width":0,"language_a_border_other_right_styles":"solid","language_a_border_other_right_color":"#000","language_a_border_other_right_width":0,"img_items":[{"id":"1","lang":"中文","version":"pc","mark":"zh-cn","_mark":"zh","binding_url":null,"default":"0","status":"1","disabled":"false"},{"id":"2","lang":"英文","version":"pc","mark":"en-us","_mark":"en","binding_url":null,"default":"1","status":"1","disabled":"false"}],"effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"}})); if(StorageVal != null){ this.indexStore = StorageVal; } if(''){ this.infos = JSON.parse(''); } //console.log('ie8',JSON.stringify(StorageVal)) //var listArr = '{"w_language_img":"http://txysen015.nbseo.cn/site/themes/T-XYSEN015/images/ch_ico.jpg,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png","img_obj":["/static/image/graphicInfo/style-bg.png","/static/image/graphicInfo/style-bg.png","/static/image/graphicInfo/style-bg.png"],"w_language_img_show":"none","w_language_img_width":30,"w_language_img_height":30,"w_language_img_left":0,"w_language_img_top":0,"w_language_img_border_radius":0,"w_languageHeight":20,"w_languageWidth":100,"w_minbeds":12,"w_filletRadius":4,"w_languageFont":"SimHei","w_fontColor":"#666","w_borderColor":"#666","w_inputColor":"rgba(255,255,255,0)","w_languageStyle":"1","w_style2_padding_left":0,"w_style2_border_radius":0,"w_style1_border_radius":0,"w_style1_float":"left","w_style1_languageWidth":50,"w_style1_languageHeight":12,"w_style1_line_height":30,"w_style1_padding_top":0,"w_style1_padding_right":0,"w_style1_padding_bottom":0,"w_style1_padding_left":0,"w_style1_margin_top":0,"w_style1_margin_right":0,"w_style1_margin_bottom":0,"w_style1_margin_left":0,"w_a_hover_font_color":"#e30920","w_a_hover_bc_color":"rgba(255,255,255,0)","w_style1_text_align":"center","language_a_border_all_styles":"solid","language_a_border_all_color":"#000","language_a_border_all_width":0,"w_style1_a_width":50,"w_style1_a_height":12,"language_a_border_right_show":"show","language_a_border_first_left_styles":"solid","language_a_border_first_left_color":"#000","language_a_border_first_left_width":0,"language_a_border_first_right_styles":"solid","language_a_border_first_right_color":"#666","language_a_border_first_right_width":1,"language_a_border_last_left_styles":"solid","language_a_border_last_left_color":"#000","language_a_border_last_left_width":0,"language_a_border_last_right_styles":"solid","language_a_border_last_right_color":"#000","language_a_border_last_right_width":0,"language_a_border_other_left_styles":"solid","language_a_border_other_left_color":"#000","language_a_border_other_left_width":0,"language_a_border_other_right_styles":"solid","language_a_border_other_right_color":"#000","language_a_border_other_right_width":0,"img_items":null,"effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"},"txt_arr":[]}'; var listArr = JSON.parse(JSON.stringify({"w_language_img":"http://txysen015.nbseo.cn/site/themes/T-XYSEN015/images/ch_ico.jpg,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png","img_obj":["/static/image/graphicInfo/style-bg.png","/static/image/graphicInfo/style-bg.png","/static/image/graphicInfo/style-bg.png"],"w_language_img_show":"none","w_language_img_width":30,"w_language_img_height":30,"w_language_img_left":0,"w_language_img_top":0,"w_language_img_border_radius":0,"w_languageHeight":20,"w_languageWidth":100,"w_minbeds":12,"w_filletRadius":4,"w_languageFont":"SimHei","w_fontColor":"#666","w_borderColor":"#666","w_inputColor":"rgba(255,255,255,0)","w_languageStyle":"1","w_style2_padding_left":0,"w_style2_border_radius":0,"w_style1_border_radius":0,"w_style1_float":"left","w_style1_languageWidth":50,"w_style1_languageHeight":12,"w_style1_line_height":30,"w_style1_padding_top":0,"w_style1_padding_right":0,"w_style1_padding_bottom":0,"w_style1_padding_left":0,"w_style1_margin_top":0,"w_style1_margin_right":0,"w_style1_margin_bottom":0,"w_style1_margin_left":0,"w_a_hover_font_color":"#e30920","w_a_hover_bc_color":"rgba(255,255,255,0)","w_style1_text_align":"center","language_a_border_all_styles":"solid","language_a_border_all_color":"#000","language_a_border_all_width":0,"w_style1_a_width":50,"w_style1_a_height":12,"language_a_border_right_show":"show","language_a_border_first_left_styles":"solid","language_a_border_first_left_color":"#000","language_a_border_first_left_width":0,"language_a_border_first_right_styles":"solid","language_a_border_first_right_color":"#666","language_a_border_first_right_width":1,"language_a_border_last_left_styles":"solid","language_a_border_last_left_color":"#000","language_a_border_last_left_width":0,"language_a_border_last_right_styles":"solid","language_a_border_last_right_color":"#000","language_a_border_last_right_width":0,"language_a_border_other_left_styles":"solid","language_a_border_other_left_color":"#000","language_a_border_other_left_width":0,"language_a_border_other_right_styles":"solid","language_a_border_other_right_color":"#000","language_a_border_other_right_width":0,"img_items":null,"effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"},"txt_arr":[]})); if(listArr != null){ if(listArr === ''){ //兼容之前的挂件 因为数据源更改 导致原始挂件无数据 使用默认原始数据 var arr = this.useOri(this.infos); this.$set('dataArr.txt_arr',arr) }else{ this.dataArr = JSON.parse(listArr); } } }catch(e){} this.$set('inforLentgh',Object.keys(this.infos).length); /** * 兼容 */ if (!this.indexStore.img_obj) { this.indexStore.w_language_img = 'http://txysen015.nbseo.cn/site/themes/T-XYSEN015/images/ch_ico.jpg,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png'; this.indexStore.img_obj = ['https://xcx05.71360.com//static/image/graphicInfo/style-bg.png','https://xcx05.71360.com//static/image/graphicInfo/style-bg.png','https://xcx05.71360.com//static/image/graphicInfo/style-bg.png','https://xcx05.71360.com//static/image/graphicInfo/style-bg.png','https://xcx05.71360.com//static/image/graphicInfo/style-bg.png']; this.indexStore.w_language_img_show = 'none'; this.indexStore.w_language_img_width = 30; this.indexStore.w_language_img_height = 30; this.indexStore.w_language_img_left = 0; this.indexStore.w_language_img_top = 0; this.indexStore.w_language_img_border_radius = 0; } if (!this.indexStore.w_language_txt_show) { this.indexStore.w_language_txt_show = 'block'; } if (!this.indexStore.txt_arr) { this.indexStore.txt_arr = []; this.indexStore.txt_arr_str = ''; } this.txtArr(this.infos); console.log('this.infos','http://txysen015.nbseo.cn/site/themes/T-XYSEN015/images/ch_ico.jpg,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png,http://txys015.nbseo.cn/site/themes/T-XYS015/images/en_ico.png') console.log('this.infos','/static/image/graphicInfo/style-bg.png') console.log('this.infos','/static/image/graphicInfo/style-bg.png') }, ready:function(){ if(typeof templet!="undefined"){ templet.checkaction(this); } } }); } } if( parseInt($.browser.version) === 8 ){ console.log('ie8') }else{ //只有dom存在,才绑定js if(document.querySelector('#u572747')){ var num = 'u572747'; window['indexVm' + num] = new Vue({ el: "#u572747", data: { indexStore: { }, indexShow: false }, watch: { infor: { handler: function(val, oldVal) { console.log($('#u572747').offset().top); }, deep: true } }, methods: { initWw: function() { // 挂件入场方式 var s = ''; var isDone = false; var countAni = 0; var hover_counts = 0; var graAnimateds = ''; var graHovers = ''; var animation_counts = '1'; var widget_ani = 'no'; var hover_times = '1'; var that = this; $('#u572747').find('.graphic_position a img').removeClass(); $('#u572747').find('.graphic_position a img').addClass(graAnimateds).hover(function() { $('#u572747').find('.graphic_position a img').removeClass().addClass(graHovers);countAni = 0; $(this).css('animationIterationCount', that.indexStore.animation_count && that.indexStore.animation_count.toString()) }, function() { if ('no' !== 'yes' && 'no' !== 'yes') { if (isDone) { $(this).removeClass(graHovers); } else { if (animation_counts === '1') { $(this).removeClass(graAnimateds); } else { $(this).removeClass(graHovers); } countAni++; } } else { $(this).removeClass(graHovers).addClass(graAnimateds); } }); $('#u572747').find('.graphic_position a img').on('webkitAnimationEnd', function() {}); $('#u572747').find('.graphic_position a img').on('webkitAnimationIteration', function() { countAni++;isDone = true; return ; if ('no' !== 'yes' && 'no' !== 'yes') { if (countAni <= animation_counts) { isDone = false; } else { isDone = true; $('#u572747').find('.graphic_position a img').removeClass(); return; } } }); }, pageHeight: function() { // 获取浏览器高度 if ($.browser.msie) { return document.compatMode == "CSS1Compat" ? document.documentElement.clientHeight : document.body.clientHeight; } else { return self.innerHeight; } return $(window).height(); } }, computed: { imgstyle: function() { return { width: this.indexStore.graWidth + 'px', height: this.indexStore.graHeight + 'px', opacity: this.indexStore.gra_style_opacity / 100, borderRadius: this.indexStore.border_radius_s + 'px', borderWidth: this.indexStore.border_gra_w + 'px', borderStyle: this.indexStore.border_gra_s, borderColor: this.indexStore.border_gra_c }; }, imgstyle2: function() { return { width: this.indexStore.graWidth + 'px', height: this.indexStore.graHeight + 'px', marginTop: this.indexStore.gra_margin_top + 'px', marginRight: this.indexStore.gra_margin_right + 'px', marginBottom: this.indexStore.gra_margin_bottom + 'px', marginLeft: this.indexStore.gra_margin_left + 'px' }; } }, created: function() { try{ var StorageVal = {"picStyle":"1","graWidth":240,"graHeight":79,"border_gra_c":"#000","gra_url":"/","w_gra_describe":"威斯尼斯人5845cc国际","gra_target":"_self","animation_duras":1,"animation_delays":0,"animation_counts":1,"gra_style_opacity":100,"border_gra_s":"solid","border_gra_w":0,"border_radius_s":0,"animation_dura":1,"animation_delay":0,"animation_count":1,"gra_opacity1":100,"border_s":"solid","border_w":0,"border_radius_h":0,"animation_durasss":1,"animation_delaysss":0,"animation_countsss":1,"gra_margin_top":0,"gra_margin_bottom":0,"gra_margin_left":0,"gra_margin_right":0,"contents":"","imgUrl":"https://cmsimg01.71360.com/data/20191227/11u3340/public/2019122709304295783.jpg","pic_loading":"基础","pic_loading_li":"无动画","pic_loading_hover":"基础","pic_loading_hover_li":"无动画","widget_loading":"基础","widget_loading_li":"无动画","widget_animateds":"","pic_animateds":"","pic_new_animateds":"","pic_new_animateds_hover":"","pic_iteration":"no","pic_iteration_checked":false,"pic_iteration1":"no","pic_iteration_checked1":false,"pic_iteration2":"no","pic_iteration_checked2":false,"pic_scroll_loading_checked":false,"pic_scroll_loading":false,"widget_scroll_loading_checked":false,"widget_scroll_loading":false,"pic_scroll_loading_location_checked":false,"pic_scroll_loading_location":false,"widget_scroll_loading_location_checked":false,"widget_scroll_loading_location":false,"pic_scroll_loading_location_height":0,"widget_scroll_loading_location_height":0,"effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"},"width":"150","height":"79","allwidth":"150","allheight":"79","isShows":false,"editBc":"#fff","year":"威斯尼斯人5845cc国际"}; if (StorageVal != null) { this.indexStore = StorageVal; } }catch(e){} }, ready: function() { var that = this, isScroll = true, $widget = $('#u572747'), isDon = true; //滚动 start //若不是滚动加载,则直接加载 //console.log('widget_scroll_loading', that.indexStore.widget_scroll_loading); if (!that.indexStore.widget_scroll_loading) { if (that.indexStore.widget_animateds === 'rotate animated') { $widget.css('animationName', 'rotate'); $widget.addClass(that.indexStore.widget_animateds); } else { $widget.addClass(that.indexStore.widget_animateds).addClass('hehe'); } //判断加载次数 if (that.indexStore.pic_iteration_checked2) { $widget.css('animationIterationCount', 'infinite'); } else { $widget.css({ 'animationIterationCount': that.indexStore.animation_countsss && that.indexStore.animation_countsss.toString(), 'animationDuration':that.indexStore.animation_durasss && that.indexStore.animation_durasss.toString() + 's', 'animationDelay':that.indexStore.animation_delaysss && that.indexStore.animation_delaysss.toString() + 's', }); } } //滚动 end that.initWw(); $(window).on("scroll", function() { //图片的 自定义高度 还是默认位置 图片的 if (that.indexStore.pic_scroll_loading) { if (that.indexStore.pic_scroll_loading_location) { if ($(window).scrollTop() > that.indexStore.pic_scroll_loading_location_height) { that.initWw(); } } else if (that.indexStore.pic_scroll_loading_location === false) { if ($(window).scrollTop() > $('#u572747').offset().top - that.pageHeight() + $('#u572747').outerHeight()) { if (isScroll) { that.initWw(); isScroll = false; } } } } //判断是否滚动加载 if (that.indexStore.widget_scroll_loading_checked) { //指定位置 开始加载动画 if (that.indexStore.widget_scroll_loading_location) { if ($(window).scrollTop() > that.indexStore.widget_scroll_loading_location_height) { if (that.indexStore.widget_animateds === 'rotate') { $widget.css('animationName', 'rotate'); } else { var times ; if(isDon){ $widget.removeClass(that.indexStore.widget_animateds); times = setTimeout(function(){ $widget.addClass(that.indexStore.widget_animateds); clearTimeout(times); },100); isDon = false; } } //判断加载次数 if (that.indexStore.pic_iteration_checked2) { $widget.css('animationIterationCount', 'infinite'); } else { $widget.css({ 'animationIterationCount': that.indexStore.animation_countsss && that.indexStore.animation_countsss.toString(), 'animationDuration':that.indexStore.animation_durasss && that.indexStore.animation_durasss.toString() + 's', 'animationDelay':that.indexStore.animation_delaysss && that.indexStore.animation_delaysss.toString() + 's', }); } } } //挂件全部显示时 开始加载动画 else if (that.indexStore.widget_scroll_loading_location === false) { if ($(window).scrollTop() > $widget.offset().top - $.getBrowserHeight() + $widget.outerHeight()) { console.log('挂件全部显示时1',that.indexStore.widget_animateds); console.log('挂件全部显示时2',that.indexStore.pic_iteration_checked2); if (that.indexStore.widget_animateds === 'rotate') { $widget.css('animationName', 'rotate'); } else { var times ; if(isDon){ $widget.removeClass(that.indexStore.widget_animateds); times = setTimeout(function(){ $widget.addClass(that.indexStore.widget_animateds); clearTimeout(times); },100); isDon = false; } } //判断加载次数 if (that.indexStore.pic_iteration_checked2) { $widget.css('animationIterationCount', 'infinite'); } else { $widget.css({ 'animationIterationCount': that.indexStore.animation_countsss && that.indexStore.animation_countsss.toString(), 'animationDuration':that.indexStore.animation_durasss && that.indexStore.animation_durasss.toString() + 's', 'animationDelay':that.indexStore.animation_delaysss && that.indexStore.animation_delaysss.toString() + 's', }); } } } } }); if (this.indexStore.pic_scroll_loading) { $('#u572747').find('.graphic_position a img').removeClass(this.indexStore.pic_new_animateds); } else { } if (typeof templet != "undefined") { templet.checkaction(this); } } }); } } if('1' == '0' || '1' == '0'){ //样式1 var ad = new AdMove("u517556"); $('#u517556').css('zIndex','999999'); var times = '10' || '10' ad.Run(parseInt(times)); //关闭点击事件 $("#u517556 #open_page").on('click',function(){ $('#u517556').css("display","none"); }); }; if( parseInt($.browser.version) === 8 ){ console.log('ie8') }else { //只有dom存在,才绑定js if (document.querySelector('#u517556')) { ;var num = 'u517556'; window['indexVm' + num] = new Vue({ el: "#u517556", data: { indexStore: {}, indexShow: false, costomDatas: {} }, watch: { costomDatas: { handler: function (val, oldVal) { console.log('test'); }, deep: true } }, computed: { div: function () { return { overflowX: this.indexStore.w_scrollX_type, overflowY: this.indexStore.w_scrollY_type, wordWrap: this.indexStore.w_word_type }; } }, methods: {}, created: function () { try { var StorageVal = {"w_scrollX_type":"hidden","w_scrollY_type":"hidden","w_word_type":"normal","contents":"

\n\t服务热线:13917649446 \n

","msg":"","custom_pos_style":"1","custom_pos_style_left":0,"custom_pos_style_top":0,"custom_pos_style_rate":10,"animation_countsss":1,"widget_loading":"基础","widget_loading_li":"无动画","widget_animateds":"","widget_scroll_loading_checked":false,"widget_scroll_loading":false,"widget_scroll_loading_location_checked":false,"widget_scroll_loading_location":false,"widget_scroll_loading_location_height":0,"pic_iteration_checked2":false,"pic_iteration2":"no","animation_durasss":1,"animation_delaysss":0,"effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"},"isShows":false,"editBc":"#fff","is_hover":"0","width":205,"height":41}; if (StorageVal != null) { this.indexStore = StorageVal; } } catch (e) { } // 兼容 if (!this.indexStore.is_hover) { this.indexStore.is_hover = '0'; this.indexStore.hover_color = "#000"; this.indexStore.hover_bc_color = "#fff"; } console.log('index', this.indexStore.custom_pos_style); //debugger; if (this.indexStore.custom_pos_style == '0') { //样式1 } else if (this.indexStore.custom_pos_style == '1') { //样式2 } else if (this.indexStore.custom_pos_style == '2') { //样式3 try { $('#u517556').css({ 'position': 'fixed', 'zIndex': '999999' }); } catch (e) { } ; } //挂件动画 try { $.allWidgetAnimate(this, $('#u517556')); } catch (e) { } ; }, ready: function () { if (this.indexStore.custom_pos_style === '2') { var t = setTimeout(function () { try { $("#u517556").draggable(); $("#u517556").draggable("disable"); } catch (e) { } clearTimeout(t); }, 500); } else if (this.indexStore.custom_pos_style === '1') { setTimeout(function () { try { $("#u517556").draggable("enable"); } catch (e) { } }, 100); } if (typeof templet != "undefined") { templet.checkaction(this); } // 兼容 if (!this.indexStore.is_hover) { this.indexStore.is_hover = '0'; this.indexStore.hover_color = "#000"; this.indexStore.hover_bc_color = "#fff"; } } }); } } if( parseInt($.browser.version) === 8 ){ console.log('ie8') }else{ //只有dom存在,才绑定js if(document.querySelector('#u509437')) { var num = 'u509437'; window['indexVm' + num] = new Vue({ el: "#u509437", data: { indexStore: {} }, watch: {}, computed: {}, methods: {}, created: function () { try { var StorageVal = {"allwidth":200,"allheight":100,"themes":"monokai","codeHtml":"","codeCss":"body{\nmin-width:1100px;overflow:hidden;\n}","codeJs":"","effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"}}; if (StorageVal != null) { this.indexStore = StorageVal; } //console.log('ie8',JSON.stringify(this.indexStore)) } catch (e) { } }, ready: function () { var _this = this; try { (function () { if (!_this.indexStore.codeJs) { return; } eval(_this.indexStore.codeJs) })(); } catch (e) { console.log('高级代码JS部分报错', e) } } }); } } //重设伪类,使字体强制生效 ;!(function redrawFontFace() { if ($.support.leadingWhitespace) return; $(window).one("load", function() { $('html').addClass('fix-ie-font-face'); setTimeout(function() { $('html').removeClass('fix-ie-font-face'); }, 10); }); }()); $(function () { init(); function init() { $(".iconBox").on("click", ".glyphicon", iconOnClick); } //点击图标显示类名 function iconOnClick(e) { var clsName = "." + $(this).attr("class").split(" ").join(" ."); $(".iconClass").val(clsName); } }); if( parseInt($.browser.version) === 8 ){ }else{ //只有dom存在,才绑定js if(document.querySelector('#u646149')){ var num = 'u646149'; window['indexVm' + num] = new Vue({ el: "#u646149", data: { indexStore : { }, indexShow: false, cnashu:'pro', urlValue:'' }, computed:{ isshowicons:function(){ return this.indexStore.search_oppen_style == 2 ? false : true; }, isshowbtnicon:function(){ var isClick = this.indexStore.isShowStyle3Icon || 'open'; return this.indexStore.search_oppen_style == 1 || (this.indexStore.search_oppen_style == 2 && isClick == 'open') ? true : false; }, isshowicon:function(){ return this.indexStore.search_is_show_icon == "block" ? true : false; }, isshowtxt:function(){ return this.indexStore.search_is_show_txt == "block" ? true : false; }, search1Div:function(){ return { position:'relative', width:this.indexStore.search_div_width + 'px', height:this.indexStore.search_div_height + 'px', backgroundColor:this.indexStore.search_div_height_bc, } }, search1Input:function(){ return { width:this.indexStore.search_width + 'px', height:this.indexStore.search_height + 'px', border:'0px', marginLeft:this.indexStore.search_margin_left + 'px', marginTop:this.indexStore.search_margin_top + 'px', paddingLeft:this.indexStore.search_padding_left + 'px', paddingRight:this.indexStore.search_padding_right + 'px', borderRadius:this.indexStore.search_radius + 'px', color:this.indexStore.search_input_color, fontSize:this.indexStore.search_input_fs + 'px', borderTopStyle:this.indexStore.searchs_border_top_style , borderTopColor:this.indexStore.searchs_border_top_color , borderTopWidth:this.indexStore.searchs_border_top_width + 'px', borderRightStyle:this.indexStore.searchs_border_right_style , borderRightColor:this.indexStore.searchs_border_right_color , borderRightWidth:this.indexStore.searchs_border_right_width + 'px', borderBottomStyle:this.indexStore.searchs_border_bottom_style , borderBottomColor:this.indexStore.searchs_border_bottom_color , borderBottomWidth:this.indexStore.searchs_border_bottom_width + 'px', borderLeftStyle:this.indexStore.searchs_border_left_style , borderLeftColor:this.indexStore.searchs_border_left_color , borderLeftWidth:this.indexStore.searchs_border_left_width + 'px', backgroundColor:this.indexStore.search_input_bg_color, } }, search1I:function(){ return { fontSize: this.indexStore.search_icon_width + 'px', color: this.indexStore.search_icon_color, display: 'inline-block', position: 'absolute', left: this.indexStore.search_absolute_left + 'px', top: this.indexStore.search_absolute_top + 'px', zIndex: 99, transform: 'rotate('+ this.indexStore.search_icon_rotate +'deg)' } }, search1Span:function(){ return { cursor: 'pointer', position: 'absolute', display: this.indexStore.search_is_show_txt, width: this.indexStore.search_text_width + 'px', height: this.indexStore.search_text_height + 'px', lineHeight: this.indexStore.search_text_height + 'px', color: this.indexStore.search_text_font_color, background: this.indexStore.search_text_color, fontSize: this.indexStore.search_text_fs + 'px', textAlign: this.indexStore.search_text_text_align, borderRadius: this.indexStore.search_text_border_radius + 'px', left: this.indexStore.search_text_pos_left + 'px', top: this.indexStore.search_text_pos_right + 'px' } }, search2Div:function(){ return { width: this.indexStore.search_btn_icon_div_width + 'px', height: this.indexStore.search_btn_icon_div_height + 'px', marginTop: this.indexStore.search_btn_icon_margin_top + 'px', marginRight: this.indexStore.search_btn_icon_margin_right + 'px', marginBottom: this.indexStore.search_btn_icon_margin_bottom + 'px', marginLeft: this.indexStore.search_btn_icon_margin_left + 'px', paddingTop: this.indexStore.search_btn_icon_padding_top + 'px', paddingRight: this.indexStore.search_btn_icon_padding_right + 'px', paddingBottom: this.indexStore.search_btn_icon_padding_bottom + 'px', paddingLeft: this.indexStore.search_btn_icon_padding_left + 'px' }; }, search2I:function(){ return { fontSize:this.indexStore.search_btn_icon_fs + 'px', color:this.indexStore.search_btn_icon_color, display:'block', transform: 'rotate('+ this.indexStore.search_iconbtn_rotate +'deg)' }; }, style5i:function(){ return { display: 'inline-block', width: 0, height: 0, border: '5px solid transparent', borderTopColor: '#000' }; } }, methods: { deleteSpace:function(str){ var arr1 = str.split(''); var str2 =''; arr1.forEach(function(val){ if (val === ' ') { }else{ str2 += val; } }); return str2; }, keyEnter: function() { this.url = location.host + '/search.html?keywords=' + this.urlValue; this.urlValue == '' this.urlValue = this.deleteSpace($('#u646149 .searchCon').val()); if (this.urlValue == '') { alert('输入查询内容' || '输入查询内容'); return; } document.location = '/search.html?keywords=' + this.urlValue + '&keywordstype=all'; }, keyEnter4: function() { this.url = location.host + '/search.html?keywords=' + this.urlValue; this.urlValue == '' this.urlValue = this.deleteSpace($('#u646149 .search4-input').val()); if (this.urlValue == '') { alert('输入查询内容' || '输入查询内容'); return; } document.location = '/search.html?keywords=' + this.urlValue + '&keywordstype=all'; }, keyEnters: function() { this.url = location.host + '/search.html?keywords=' + this.urlValue; this.urlValue == ''; this.urlValue = this.deleteSpace($('#u646149 .search3 .ivu-input').val()); if (this.urlValue === '') { alert('输入查询内容' || '输入查询内容'); return; } document.location = '/search.html?keywords=' + this.urlValue + '&keywordstype=' + this.cnashu; }, keyEnters5: function() { this.url = location.host + '/search.html?keywords=' + this.urlValue; this.urlValue == ''; this.urlValue = this.deleteSpace($('#u646149 input.search-center').val()); if (this.urlValue === '') { alert('输入查询内容' || '输入查询内容'); return; } document.location = '/search.html?keywords=' + this.urlValue + '&keywordstype=' + this.cnashu; }, txtchange:function(){ } }, watch:{ indexStore:{ handler: function (val, oldVal) { $('#u646149 input.ivu-input').css({ borderTopStyle:this.indexStore.searchs_border_top_style, borderTopColor:this.indexStore.searchs_border_top_color, borderTopWidth:this.indexStore.searchs_border_top_width, borderRightStyle:this.indexStore.searchs_border_right_style, borderRightColor:this.indexStore.searchs_border_right_color, borderRightWidth:this.indexStore.searchs_border_right_width, borderBottomStyle:this.indexStore.searchs_border_bottom_style, borderBottomColor:this.indexStore.searchs_border_bottom_color, borderBottomWidth:this.indexStore.searchs_border_bottom_width, borderLeftStyle:this.indexStore.searchs_border_left_style, borderLeftColor:this.indexStore.searchs_border_left_color, borderLeftWidth:this.indexStore.searchs_border_left_width, }); }, deep: true } }, created: function() { try{ var StorageVal = {"allwidth":267,"allheight":49,"isShowStyle3Icon":"open","search4_bc":"#fff","search4_bc_globalColor":"","search_div_height_bc":"#fff","search_div_height_bc_globalColor":"","search_x_show":"none","search_x_fs":12,"search_x_color":"#000","search_x_color_globalColor":"","search_x_top":0,"search_x_right":0,"search_input_placeholder_color":"rgba(0, 0, 0, 0.5)","search_input_placeholder_color_globalColor":"","search_placeholder_fs":14,"icon_class":"icon iconfont icon-search","search_oppen_style":"0","search_text_border_radius":0,"search_btn_icon_margin_top":0,"search_btn_icon_margin_right":0,"search_btn_icon_margin_bottom":0,"search_btn_icon_margin_left":0,"search_btn_icon_padding_top":0,"search_btn_icon_padding_right":0,"search_btn_icon_padding_bottom":0,"search_btn_icon_padding_left":0,"search_btn_icon_div_width":40,"search_btn_icon_div_height":40,"search_is_show_icon":"block","search_is_show_txt":"none","search_btn_icon_fs":24,"search_btn_icon_color":"#f0f","search_btn_icon_color_globalColor":"","search_text_fs":12,"search_text_text_align":"center","search_text_pos_left":260,"search_text_pos_right":0,"search_width":135,"search_height":34,"search_div_width":400,"search_div_height":40,"search_input_fs":18,"search_padding_left":34,"search_padding_right":4,"search_placeholder":"\u8bf7\u8f93\u5165\u67e5\u8be2\u4fe1\u606f","search_absolute_left":0,"search_absolute_top":8,"search_radius":0,"search_text_width":40,"search_text_height":34,"search_text_color":"rgba(255, 0, 0, 0)","search_text_color_globalColor":"","search_text_font_color":"#000","search_text_font_color_globalColor":"","search_icon_color":"rgba(111, 111, 111, 1)","search_icon_color_globalColor":"","search_input_color":"rgba(21, 27, 89, 1)","search_input_color_globalColor":"","is_show_icon":true,"show_icon":"","show_text":"","search_icon_width":20,"search_btn_text":"\u641c\u7d22","open_style":true,"search_margin_left":0,"search_margin_top":0,"styleId":"w1111","searchs_border_top_style":"solid","searchs_border_top_color":"#ccc","searchs_border_top_color_globalColor":"","searchs_border_top_width":0,"searchs_border_right_style":"solid","searchs_border_right_width":0,"searchs_border_bottom_style":"solid","searchs_border_bottom_width":1,"searchs_border_left_style":"solid","searchs_border_left_width":0,"searchs_border_right_color":"rgba(21, 27, 89, 1)","searchs_border_right_color_globalColor":"","searchs_border_bottom_color":"rgba(21, 27, 89, 1)","searchs_border_bottom_color_globalColor":"","searchs_border_left_color":"#ccc","searchs_border_left_color_globalColor":"","search_input_bg_color":"rgba(255, 255, 255, 0)","search_input_bg_color_globalColor":"","widget_loading":"\u57fa\u7840","widget_loading_li":"\u65e0\u52a8\u753b","widget_animateds":"","widget_scroll_loading_checked":false,"widget_scroll_loading":false,"widget_scroll_loading_location_checked":false,"widget_scroll_loading_location":false,"widget_scroll_loading_location_height":0,"pic_iteration_checked2":false,"pic_iteration2":"no","animation_countsss":1,"animation_durasss":1,"animation_delaysss":0,"search5_select_width":20,"search5_select_height":20,"search5_select_fs":12,"search5_icon_width":20,"search5_icon_height":20,"waringTitle":"\u8f93\u5165\u67e5\u8be2\u5185\u5bb9","effectsObj":{"type":"","icon":"fa-adjust","iconSize":50,"iconColor":"#fff","changeSrc":"","borderStyle":"solid","borderWidth":1,"borderColor":"#ccc","deg":90,"zoom":1.5,"distance":20,"direction":"left-right"}}; if (StorageVal != null) { this.indexStore = StorageVal; } }catch(e){} var arr = []; for (item in this.indexStore) { arr.push(this.indexStore[item]); } var _this = this; if(this.indexStore.search_oppen_style == '0'){ //样式1 $('#u646149 b').css('display','none'); }else if(this.indexStore.search_oppen_style == '1'){ //样式2 $('#u646149 .iconBtn i, #u646149 .search2 .btnClickShow b').off(); $('#u646149 .iconBtn i, #u646149 .search2 .btnClickShow b').on('click',function(){ $('#u646149 .search2').slideToggle("slow"); $('#u646149 .search2 .btnClickShow').slideToggle("slow"); var iShow = '' || 'block'; var spanShow = '' || 'none'; var bShow = '' || 'none'; if( iShow === 'block'){ $('#u646149 .search2 .btnClickShow i').slideToggle("slow"); } if( spanShow === 'block'){ $('#u646149 .search2 .btnClickShow span').slideToggle("slow"); } if( bShow === 'block'){ $('#u646149 .search2 .btnClickShow b').slideToggle("slow"); } }); }else if(this.indexStore.search_oppen_style == '2'){ //样式3 var isClick = this.indexStore.isShowStyle3Icon || 'open'; //是否开启图标显示 var $dom = $('#u646149 .search3'); if(isClick == 'open'){ $('#u646149 .iconBtn i').on('click',function(){ if($dom.hasClass('hasSelect')){ $dom.css('display','none').removeClass('hasSelect'); }else{ $dom.css('display','block').addClass('hasSelect'); } }); }else{ $dom.css('display','block'); $('#u646149 .iconBtn').css('display','none'); } }else if(this.indexStore.search_oppen_style == '3'){ //样式4 $('#u646149 div.search4-div, #u646149 input.search4-input').hover(function(){ $('#u646149 input.search4-input').show(); },function(){ $('#u646149 input.search4-input').hide(); }); }else if(this.indexStore.search_oppen_style == '4'){ $('#u646149 .search-left').off(); $('#u646149 .search-left').on('click',function () { $(this).toggleClass('select-visible'); $(this).find('.search-left-btm').fadeToggle(".3","linear"); }); var $li = $('#u646149 .search-left-btm ul li'); $.each( $li,function (index,value) { $(value).removeClass('checked-items'); $(value).on('click',function () { removeLiClass($li); $(this).addClass('checked-items'); _this.cnashu = $(this).data('type'); $('#u646149 #searchs5 .search-left-top span').text($(this).text()); }); }); // 移除其他li的class checked-items function removeLiClass(item) { $.each(item,function (index,value) { $(value).removeClass('checked-items'); }); } // 动态获取 下拉框选项 function getLi(){ var $ul = $('#u646149 .search-left-btm ul'); var $li = $('#u646149 .search-left-btm ul > li'); $.ajax({ url:location.host + '?m=mine&a=searchNav', success:function(val){ var val = JSON.parse(val); var i=0; $.each(val,function(item,index){ $li.eq(i).text(index).attr('data-type',item).css('display','block'); if(i == 0){ $('#u646149 #searchs5 .search-left-top span').text(index); $li.eq(i).addClass('checked-items') _this.cnashu = item; } i++; }); } }); } getLi(); } //挂件动画 try{ $.allWidgetAnimate(this,$('#u646149')); }catch(e){}; }, ready:function(){ if(typeof templet!="undefined"){ templet.checkaction(this); } //将搜索之后 返回时 输入框清空 $('#u646149 input').val(''); // 兼容placeholder searchCon // 客户端 样式3的边框样式 $('#u646149 input.ivu-input').css({ borderTopStyle:this.indexStore.searchs_border_top_style, borderTopColor:this.indexStore.searchs_border_top_color, borderTopWidth:this.indexStore.searchs_border_top_width, borderRightStyle:this.indexStore.searchs_border_right_style, borderRightColor:this.indexStore.searchs_border_right_color, borderRightWidth:this.indexStore.searchs_border_right_width, borderBottomStyle:this.indexStore.searchs_border_bottom_style, borderBottomColor:this.indexStore.searchs_border_bottom_color, borderBottomWidth:this.indexStore.searchs_border_bottom_width, borderLeftStyle:this.indexStore.searchs_border_left_style, borderLeftColor:this.indexStore.searchs_border_left_color, borderLeftWidth:this.indexStore.searchs_border_left_width, }); if(this.indexStore.search_oppen_style == 2){ } } }); } } //