|
@@ -1,6 +1,5 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div>中转页面 |
|
|
<div>中转页面 |
|
|
|
|
|
|
|
|
<button @click="baidu">百度</button> |
|
|
<button @click="baidu">百度</button> |
|
|
<button @click="auto">根据环境判断</button> |
|
|
<button @click="auto">根据环境判断</button> |
|
|
<button @click="lishui">丽水</button> |
|
|
<button @click="lishui">丽水</button> |
|
@@ -12,29 +11,29 @@ |
|
|
export default { |
|
|
export default { |
|
|
name: 'App', |
|
|
name: 'App', |
|
|
created() { |
|
|
created() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
|
|
|
auto(){ |
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
auto() { |
|
|
var userAgent = navigator.userAgent || navigator.vendor || window.opera |
|
|
var userAgent = navigator.userAgent || navigator.vendor || window.opera |
|
|
const isMobile = |
|
|
const isMobile = |
|
|
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test( |
|
|
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test( |
|
|
userAgent |
|
|
userAgent |
|
|
) |
|
|
) |
|
|
|
|
|
let url = './mobile/index.html#/indicatorBoard' |
|
|
// 如果是移动设备,重定向到mobile目录下的index.html |
|
|
// 如果是移动设备,重定向到mobile目录下的index.html |
|
|
if (isMobile) { |
|
|
if (isMobile) { |
|
|
// 移动端 |
|
|
// 移动端 |
|
|
window.location.href = './mobile/index.html#/indicatorBoard' |
|
|
|
|
|
|
|
|
url = './mobile/index.html#/indicatorBoard' |
|
|
} else { |
|
|
} else { |
|
|
window.location.href = './web/index.html' |
|
|
|
|
|
// router.push('/home') |
|
|
|
|
|
|
|
|
url = './web/index.html' |
|
|
} |
|
|
} |
|
|
|
|
|
location.replace(url) |
|
|
}, |
|
|
}, |
|
|
baidu(){ |
|
|
|
|
|
window.location.href = 'https://www.baidu.com' |
|
|
|
|
|
|
|
|
baidu() { |
|
|
|
|
|
location.replace('https://www.baidu.com') |
|
|
}, |
|
|
}, |
|
|
lishui(){ |
|
|
|
|
|
window.location.href = 'https://xmgl.dsj.lishui.gov.cn/login' |
|
|
|
|
|
|
|
|
lishui() { |
|
|
|
|
|
location.replace('https://xmgl.dsj.lishui.gov.cn/login') |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|