38 lines
808 B
Vue
38 lines
808 B
Vue
|
<template>
|
||
|
<view>
|
||
|
欢迎来到pixel.ai制图系统
|
||
|
<Loading :show="loading" />
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
loading: true
|
||
|
};
|
||
|
},
|
||
|
onLoad() {
|
||
|
let that = this;
|
||
|
uni.reLaunch({
|
||
|
url: `/pages/${this.$store.state.current_platform}/index/index`,
|
||
|
complete() {
|
||
|
that.loading = false;
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
methods: {
|
||
|
// 添加判断方法
|
||
|
isMobile() {
|
||
|
let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
||
|
// localStorage.setItem('isiphone',flag)
|
||
|
console.log(flag);
|
||
|
this.$u.vuex('current_platform', flag ? 'mobile_web' : 'pc_web');
|
||
|
return flag;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
</style>
|