guanqb
2022-10-12 fa612bd7766f338cb09c5933fdb0ac879c59c023
src/App.vue
@@ -86,8 +86,12 @@
        } else {
            // pc端
            // this.$router.replace('/large')
            // this.$router.replace('/pcLayout')
            this.$router.replace('/login')
            if (this.$route.path == '/pcLayout/default') {
                this.$router.replace('/pcLayout')
            } else {
                this.$router.replace('/login')
            }
        }
    },
    methods: {
@@ -107,23 +111,6 @@
            if (r != null) return decodeURIComponent(r)
            return null
        },
        getQueryVariable (variable) {
            var query = window.location.search.substring(1)
            var vars = query.split('&')
            for (var i = 0; i < vars.length; i++) {
                var pair = vars[i].split('=')
                if (pair[0] == variable) {
                    return pair[1]
                }
            }
            return false
        },
        _isMobile () {
            const flag = navigator.userAgent.match(
                /(phone|pad|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows phone)/i
            )
            return flag
        }
    }
}
</script>