月夕花晨 7 meses atrás
pai
commit
2aa4d898b6
1 arquivos alterados com 10 adições e 11 exclusões
  1. +10
    -11
      src/App.vue

+ 10
- 11
src/App.vue Ver arquivo

@@ -1,6 +1,5 @@
<template>
<div>中转页面

<button @click="baidu">百度</button>
<button @click="auto">根据环境判断</button>
<button @click="lishui">丽水</button>
@@ -12,29 +11,29 @@
export default {
name: 'App',
created() {

},
methods:{
auto(){
methods: {
auto() {
var userAgent = navigator.userAgent || navigator.vendor || window.opera
const isMobile =
/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(
userAgent
)
let url = './mobile/index.html#/indicatorBoard'
// 如果是移动设备,重定向到mobile目录下的index.html
if (isMobile) {
// 移动端
window.location.href = './mobile/index.html#/indicatorBoard'
url = './mobile/index.html#/indicatorBoard'
} 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')
}
}
}


Carregando…
Cancelar
Salvar