mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-13 12:43:43 +08:00
refactor: V3 版本重构已基本完成
This commit is contained in:
@@ -2,25 +2,20 @@
|
||||
<div>{{ title }}</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent } from "vue"
|
||||
<script setup>
|
||||
import {onMounted, ref} from "vue"
|
||||
import {isMobile} from "@/utils/libs";
|
||||
import {useRouter} from "vue-router"; // 导入useRouter函数
|
||||
|
||||
export default defineComponent({
|
||||
name: 'HomePage',
|
||||
data () {
|
||||
return {
|
||||
title: "Loading page...",
|
||||
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (isMobile()) {
|
||||
this.$router.push("mobile");
|
||||
} else {
|
||||
this.$router.push("plus");
|
||||
}
|
||||
|
||||
const title = ref("Loading page...");
|
||||
const router = useRouter();
|
||||
onMounted(() => {
|
||||
if (isMobile()) {
|
||||
router.push("mobile");
|
||||
} else {
|
||||
router.push("chat");
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user