if( parseInt($.browser.version) === 8 ){ console.log('ie8') }else{ //只有dom存在,才绑定js if(document.querySelector('#u301449')) { var num = 'u301449'; window['indexVm' + num] = new Vue({ el: "#u301449", data: { indexStore: {}, datas: { year: '', months: "", day: "", hours: "", minutes: "", seconds: "", }, indexShow: false }, watch: { infor: { handler: function (val, oldVal) { }, deep: true } }, methods: { pageHeight: function () { // 获取浏览器高度 if ($.browser.msie) { return document.compatMode == "CSS1Compat" ? document.documentElement.clientHeight : document.body.clientHeight; } else { return self.innerHeight; } return $(window).height(); }, setDate: function () { // 当前日期 var date = new Date(); var year = date.getFullYear(); var months = date.getMonth() + 1; var day = date.getDate(); this.datas.year = year; this.datas.months = months; this.datas.day = day; console.log('.....', 'u301449'); $('#u301449 #b_date').text(year + this.indexStore.year + months + this.indexStore.month + day + this.indexStore.day); }, setTime: function () { // 当前时间 var date = new Date(); var hours = date.getHours(); var minutes = date.getMinutes(); var seconds = date.getSeconds(); this.datas.hours = hours; this.datas.minutes = minutes; this.datas.seconds = seconds; $('#u301449 #b_time').text(hours + this.indexStore.hours + minutes + this.indexStore.minutes + seconds + this.indexStore.seconds); } }, computed: { imgstyle: function () { return {}; } }, created: function () { try { var StorageVal = {"allwidth":240,"allheight":42,"picStyle":"0","date_mr":3,"picture_width":200,"year":"年","month":"月","day":"日","hours":"时","minutes":"分","seconds":"秒","date_is_show":"block","time_is_show":"block","date_fs":14,"time_fs":14,"date_color":"rgba(255, 255, 255, 1)","time_color":"rgba(255, 255, 255, 1)","width":400,"height":44,"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) { } }, ready: function () { if (typeof templet != "undefined") { templet.checkaction(this); } //date var _this = this; _this.setDate(); _this.setTime(); setInterval(function () { _this.setTime(); }, 500); } }); } } //