main.js 3.38 KB
$(function() {
	var n = navigator.userAgent
	var ie = n.indexOf("MSIE") != -1
	if(ie) {
		var s = /MSIE\s[6789]\./g;
		if(s.test(n)) {
			fn();
		}
		try {
			if(typeof WebSocket != "function") {
				fn();
			}
		} catch(e) {

		}
	}

	function fn() {
		location.href = '/browser'
	}
})
//
//$(function() {
//	var navt = 0;
//	var navel = '';
//	var navnewel = ''
//	var sourcet = 0;
//	var sourceel = '';
//	var sourcenewel = '';
//	var pop_banner = '';
//	var nel = '',
//		t = 0;
//
//self.$set('list',JSON.parse(localStorage.getItem('socketArr')));
//localStorage.setItem('socketArr',JSON.stringify(self.querySelectGoods));
//	function fn_header() {
//		$(".new_tdheader").remove();
//		var el = $('#t_header');
//		if(el != undefined && el.length > 0) {
//			var n = el.get(0).tagName.toLowerCase();
//			t = el.offset().top - 79;
//
//			if(n == 'div') {
//				var u = $("<div class='new_tdheader'></div>").attr('style', 'top:69px;position: fixed;z-index: 100;background: #fff;width: 1003px;').hide()
//				$(".container").append(u.addClass('ctable').append(el.clone(true)));
//				u.find('span').css({
//					'padding-top': '10px'
//				})
//				nel = u;
//
//			} else if(n == "thead") {
//				var clname = el.parent().attr('class')
//				var u = $('<table  class="new_tdheader"></table>').attr('style', 'top:69px;position: fixed;z-index: 100;background: #fff;width: 1003px;').hide();
//				$(".container").append(u.addClass(clname).append(el.clone(true)));
//				nel = u;
//			}
//
//		}
//		navel = $('.menu-nav');
//		sourceel = $('.source-nav');
//	}
//
//	function scroll() {
//		var s = $(window).scrollTop();
//		var menuTop = $('.g_hea_g1').outerHeight() + $('#menuAll').outerHeight();
//		if(s > t) {
//			nel && nel.show();
//		} else {
//			nel && nel.hide();
//		}
//		if(s > menuTop) {
//			navnewel.show();
//			navel.attr('style', 'position: fixed;left: 0px;top: 39px;width: 100%;z-index:281;')
//		} else {
//			navnewel.hide();
//			navel.attr('style', '')
//		}
//		if(s > menuTop) {
//			sourcenewel.show();
//			sourceel.
//			attr('style', 'position: fixed;left: 0px;width: 100%;top: 0px;z-index: 282;');
//			$(".pop-banner").
//			attr('style', 'position: fixed;top: 0px;z-index: 283;  padding-left: 48px;');
//		} else {
//			sourcenewel.hide();
//			sourceel.attr('style', '');
//			$(".pop-banner").attr('style', '');
//			// 菜单
//
//		}
//
//	}
//
//	function nav() {
////		navt = $('.menu-nav').offset().top - 39;
//
//		navnewel = $('<div class="menunew1"></div>').
//		attr('style', 'width:100%;height:30px;').hide();
//		//navel=$($('.menu-nav').clone(true));
//		//navel.attr('style','position: fixed;left: 0px;top: 39px;width: 100%;z-index: 9999;').hide();
//		navel.before(navnewel);
//	}
//
//	function source() {
//		sourcet = $('.source-nav').offset().top;
//		sourcenewel = $('<div class="sourcenew1"></div>').
//		attr('style', 'width:100%;height:39px;').hide();
//		//sourceel=$($('.source-nav').clone(true));
//		//sourceel.attr('style','position: fixed;left: 0px;top: 0px;width: 100%;z-index:99999;').hide();
//		sourceel.before(sourcenewel);
//
//
//	}
//
//	// 菜单圆球浮动
//
//	setTimeout(function() {
//		fn_header();
//		nav();
//		source();
//		scroll();
//		$(window).on('scroll', function(e) {
//			scroll();
//
//		})
//	}, 1000);
//	$(window).on('hashchange', function() {
//		setTimeout(function() {
//			$(document).scrollTop(0);
//			fn_header();
//			scroll();
//		}, 1000)
//
//	})
//
//})