mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 12:13:46 +08:00
auto jump to mobile page when use mobile device access the page
This commit is contained in:
@@ -219,7 +219,6 @@ import ChatReply from "@/components/ChatReply.vue";
|
||||
import {Delete, Edit, InfoFilled, More, Plus, Promotion, Search, Share, VideoPause} from '@element-plus/icons-vue'
|
||||
import 'highlight.js/styles/a11y-dark.css'
|
||||
import {
|
||||
isMobile,
|
||||
randString,
|
||||
removeArrayItem,
|
||||
UUID
|
||||
@@ -294,10 +293,6 @@ if (!chatId.value) {
|
||||
})
|
||||
}
|
||||
|
||||
if (isMobile()) {
|
||||
router.replace("/mobile/chat")
|
||||
}
|
||||
|
||||
// 获取系统配置
|
||||
getSystemInfo().then(res => {
|
||||
title.value = res.data.title
|
||||
|
||||
@@ -61,15 +61,10 @@ import {useRouter} from "vue-router";
|
||||
import FooterBar from "@/components/FooterBar.vue";
|
||||
import {httpGet} from "@/utils/http";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {isMobile} from "@/utils/libs";
|
||||
import {checkSession, getLicenseInfo, getSystemInfo} from "@/store/cache";
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
if (isMobile()) {
|
||||
router.push("/mobile")
|
||||
}
|
||||
|
||||
const title = ref("")
|
||||
const logo = ref("")
|
||||
const slogan = ref("")
|
||||
|
||||
@@ -183,7 +183,7 @@ import {ElMessage} from "element-plus";
|
||||
import {useRouter} from "vue-router";
|
||||
import FooterBar from "@/components/FooterBar.vue";
|
||||
import SendMsg from "@/components/SendMsg.vue";
|
||||
import {arrayContains} from "@/utils/libs";
|
||||
import {arrayContains, isMobile} from "@/utils/libs";
|
||||
import {setUserToken} from "@/store/session";
|
||||
import {validateEmail, validateMobile} from "@/utils/validate";
|
||||
import {showMessageError, showMessageOK} from "@/utils/dialog";
|
||||
@@ -294,11 +294,12 @@ const doSubmitRegister = (verifyData) => {
|
||||
data.value.reg_way = activeName.value
|
||||
httpPost('/api/user/register', data.value).then((res) => {
|
||||
setUserToken(res.data.token)
|
||||
showMessageOK({
|
||||
"message": "注册成功,即将跳转到对话主界面...",
|
||||
onClose: () => router.push("/chat"),
|
||||
duration: 1000
|
||||
})
|
||||
showMessageOK("注册成功,即将跳转到对话主界面...")
|
||||
if (isMobile()) {
|
||||
router.push('/mobile/index')
|
||||
} else {
|
||||
router.push('/chat')
|
||||
}
|
||||
}).catch((e) => {
|
||||
showMessageError('注册失败,' + e.message)
|
||||
})
|
||||
|
||||
@@ -182,7 +182,7 @@ const onLoad = () => {
|
||||
error.value = true
|
||||
showFailToast("加载会话列表失败")
|
||||
})
|
||||
})
|
||||
}).catch(() => {})
|
||||
};
|
||||
|
||||
const search = () => {
|
||||
|
||||
@@ -18,15 +18,8 @@
|
||||
|
||||
<script setup>
|
||||
import {ref, watch} from "vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import {isMobile} from "@/utils/libs";
|
||||
import {useSharedStore} from "@/store/sharedata";
|
||||
|
||||
const router = useRouter()
|
||||
if (!isMobile()) {
|
||||
router.replace('/')
|
||||
}
|
||||
|
||||
const active = ref('home')
|
||||
const store = useSharedStore()
|
||||
const theme = ref(store.mobileTheme)
|
||||
|
||||
Reference in New Issue
Block a user