<template>
  <div id="app">
	<div class="bg">
		<img src="@/assets/img/m1.png" >
	</div>
	<div>
	</div>
    <top-logo></top-logo>
    <nav-bar></nav-bar>
	<div class="main-wrapper">
		<router-view />
	</div>
	<page-bottom></page-bottom>
  </div>
</template>
<script>
import TopLogo from './components/topLogo/TopLogo.vue'
import NavBar from './components/navBar/NavBar.vue'
import PageBottom from './components/pageBottom/PageBottom.vue'
export default {
  components: {
    NavBar,
    TopLogo,
	PageBottom
  },
  created() {
  	if(this.isMobile()) {
		window.location.href = 'http://jz.red.igxys.com/index/#/'
	}
  },
  methods: {
	  isMobile() {
	  	if(/android/i.test(navigator.userAgent)) {
	  		//document.write("This is Android'browser.");//这是Android平台下浏览器
	  		return true;
	  	}
	  	if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
	  		//document.write("This is iOS'browser.");//这是iOS平台下浏览器
	  		return true;
	  	}
	  	return false;
	  }
  }
}
</script>
<style lang="scss" scoped>
#app {
	// max-width: 1920px;
	min-width: 1200px;
	margin: 0 auto;
}
.main-wrapper {
	width: 1200px;
	margin: 0 auto;
}
.bg {
	// position: absolute;
	// left: 0;
	// right: 0;
	margin: 0 auto;
	height: 300px;
	margin-bottom: -300px;
	// z-index: -1;
	img {
		// min-width: 100vw;
		width: 100%;
		height: 300px;
	}
}

</style>
