var header = { template:'
\n' + '
\n' + '
\n' + ' \n' + '
\n' + ' \n' + '
\n' + ' \n' + '
\n' + '
2018年08月08日 星期三
\n' + '
\n' + ' \n' + ' \n' + '
\n' + '
\n' + ' \n' + '
\n' + '
\n' + ' \n' + '
\n' + '
\n' + '
', data(){ return{ titleList:'', dao_lix:'dao_lix', active:'active', active1:'', url:0, shouye:{ width:'122px' }, shouye1:{ width:'134px' }, date:null, ercode:null, user:null } }, methods:{ enterFun:function(h){ if($('.dao_hangl>li').eq(h).find('.xial_divx')){ $('.dao_hangl>li').eq(h).find('.xial_divx').stop().slideDown(); } }, esSearch: function(){ var searchName = encodeURI(encodeURI($(".sousuo").val())); if (searchName.trim() != "") { window.location.href = "search.html?key=" + searchName; } }, outFun:function(h){ if($('.dao_hangl>li').eq(h).find('.xial_divx')){ $('.dao_hangl>li').eq(h).find('.xial_divx').stop(true,false).slideUp(); } }, //获取标题 getTitleList:function(){ var that=this; $.ajax({ type: "post", url:"../../sys/nclass/getTitle", data:JSON.stringify({ }), dataType:"json", contentType:"application/json;charset=UTF-8", success:function(e){ that.titleList=e.rows; Vue.nextTick(function(){ $('.dao_hangl>li').mouseenter(function(){ $(this).find('.xial_divx').slideDown(); }).mouseleave(function(){ $(this).find('.xial_divx').stop(true,false).slideUp(); }) }) //console.log('标题',that.titleList); that.titleList.forEach(function (item,index){ if(item.nclassEntityList.length){ item.nclassEntityList.forEach(function(ele,i){ if(ele.link == that.url){ that.url = item.link; } }) }else{ if(that.url == item.link){ that.url = item.link; } } }) }, error:function(e){ console.log(e); } }) }, //获取二维码 getCode:function(){ var that=this; $.ajax({ type: "post", url:"../../sys/home_rotary_map/listForPage", data:JSON.stringify({ "type":3, }), dataType:"json", contentType:"application/json;charset=UTF-8", success:function(e){ that.ercode= '/zjtbaweb/' + e.rows[0].picture; }, error:function(e){ console.log(e); } }) }, }, created(){ this.url = window.location.href.split('/'); this.url = this.url[[this.url.length-1]]; //console.log(this.url) this.getTitleList(); this.getCode(); //搜索框下方日期 var myDate = new Date(); var year = myDate.getFullYear() + "年"; //获取完整的年份(4位,1970-????) var month = myDate.getMonth()+1 + "月"; //获取当前月份(0-11,0代表1月) var date = myDate.getDate() + "日"; //获取当前日(1-31) month = month.length == 2 ? "0" + month : month;//补零 date = date.length == 2 ? "0" + date : date;//补零 var str = " 星期" + "日一二三四五六".charAt(myDate.getDay()); this.date = year+month+date+str var userCookie = getCookie("yzbuser");//取出key为yzbuser的cookie if (userCookie){ this.user = JSON.parse(userCookie);//将cookie转为json对象 } } } //获取cookie function getCookie(name) { var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); if(arr=document.cookie.match(reg)) return decodeURIComponent(arr[2]); else return null; } var footer = { template:'
{{footerlist}}\n' + '\n' + '
\n' + ' \n' + '\n' + '
版权所有:浙江招标投标协会 浙ICP备12039346号
\n' + '
主管单位:浙江省发展和改革委员会
\n' + '
主办单位:浙江省招标投标协会 英文域名:zjtba.org.cn 中文域名:浙江省招标投标协会 . 公益
\n' + '
浙公网安备33020602008599号 技术支持:杭州鼎易科技
\n' + '
\n' + '
', data(){ return { footerlist:null } }, methods:{ }, created(){ //this.getLinkList(); } } var leftnav = { template:'
\n' + ' \n' + '
\n' + '
{{title.ch}}
\n' + '
{{title.en}}
\n' + '
\n' + '
\n' + ' \n' + '
\n' + '
', data(){ return { titleList:[], active:'active', active1:'', url:'' } }, props:['navlist','title'],//页面里接收的数据 methods:{ getLeft:function(){ var that=this; $.ajax({ type: "post", url:"../../sys/nclass/getSecondTitle", data:JSON.stringify({ "parentId":that.navlist }), dataType:"json", contentType:"application/json;charset=UTF-8", success:function(data){ // console.log('---------',data); that.titleList = data.rows; }, error:function(e){ console.log(e); } }) } }, created(){ //console.log(this) this.url = window.location.href.split('/'); this.url = this.url[[this.url.length-1]]; //console.log(this.url); if(this.url.indexOf('active_detail.html') > -1){ //console.log(this.url.indexOf('active_detail.html')) if(getParam("pid") == 1){ this.url="association_dynamic.html" } } if(this.url.indexOf('news_detail.html') > -1) { if (getParam("pid") == 2) { this.url = "newsletters.html" } else if (getParam("pid") == 3) { this.url = "tender_dynamic.html" } else if (getParam("pid") == 4) { this.url = "government_dynamic.html" } else if (getParam("pid") == 5) { this.url = "member_style.html" } } if(this.url.indexOf('regulations_detail.html') > -1){ //法律 if (getParam("pid") == 1){ this.url="legislation.html" }else if (getParam("pid") == 2){ this.url="administrative_regulation.html" }else if (getParam("pid") == 3){ this.url="department_regulations.html" }else if (getParam("pid") == 4){ this.url="local_regulations.html" }else if (getParam("pid") == 5){ this.url="local_rules.html" }else if (getParam("pid") == 6){ this.url="specification_file.html" } } if(this.url.indexOf('study_detail.html') > -1) { //学习园地 if (getParam("pid") == 1) { this.url = "policy_elucidation.html" } else if (getParam("pid") == 2) { this.url = "theoretical_discussion.html" } else if (getParam("pid") == 3) { this.url = "practical_solutions.html" } } if(this.url.indexOf('notice_detail.html') > -1) { //学习园地 if (getParam("pid") == 1) { this.url = "notice.html" } } if(this.url.indexOf('project_detail.html') > -1) { //项目信息 if (getParam("pid") == 1) { this.url = "project.html" } } if(this.url.indexOf('member_detail.html') > -1) { //会员中心 if (getParam("pid") == 1) { this.url = "electronic_magazine.html" }else if (getParam("pid") == 2){ this.url = "integrity.html" }else if (getParam("pid") == 3){ this.url = "study_training.html" }else if (getParam("pid") == 4){ this.url = "deposit.html" } } this.getLeft(); } } $('body').on('click','#logout',function(){ layer.open({ title: '系统提示', area: '338px', icon: 3, anim: -1, isOutAnim: false, move: false, content: '注:您确定要安全退出本次登录吗?', btn: ['确定', '取消'], btnAlign: 'c', yes: function () { top.layer.load(0, { shade: [0.1,'#fff'], time: 2000 }); setTimeout(function () { vm.user = null; window.location.href = '../../sys/member/logout?_' + $.now(); }, 500); } }); });