<template>
  <div>中转页面
    <button @click="baidu">百度</button>
    <button @click="auto">根据环境判断</button>
    <button @click="lishui">丽水</button>
  </div>
</template>

<script>

export default {
  name: 'App',
  created() {
  },
  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) {
        // 移动端
        url = './mobile/index.html#/indicatorBoard'
      } else {
        url = './web/index.html'
      }
      location.replace(url)
    },
    baidu() {
      location.replace('https://www.baidu.com')
    },
    lishui() {
      location.replace('https://xmgl.dsj.lishui.gov.cn/login')
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
