<template>
<div class="login-box">
<div class="label">123</div>
</div>
</template>
<script>
export default {
layout: "mobile",
components: {
},
data() {
return {
};
},
mounted() {
var n = navigator.userAgent
console.log(navigator)
if (n.indexOf('Android') > -1 || n.indexOf('Linux') > -1) {
window.location="xxx";
// 跳安卓
} else if (n.indexOf('iPhone') > -1) {
window.location="xxx";
// 跳苹果
}
},
methods: {
},
};
</script>
vue判断苹果安卓
于 2022-08-17 10:45:08 首次发布