|
|
@@ -22,6 +22,24 @@ export default {
|
|
|
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>
|