Commit 2edde7ad authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

chore: 首页跳转

See merge request !242
parents 685d48e7 b77a7cab
...@@ -15,4 +15,9 @@ export const Domain_Name: Record<'DEV' | 'PROD', string> = { ...@@ -15,4 +15,9 @@ export const Domain_Name: Record<'DEV' | 'PROD', string> = {
PROD: 'super-modellink.gsstcloud.com', PROD: 'super-modellink.gsstcloud.com',
} }
export const DOMAIN_ORIGIN: Record<'DEV' | 'PROD', string> = {
DEV: 'https://poc-sit.gsstcloud.com',
PROD: 'https://model-link.gsstcloud.com',
}
export const TEXTTOSPEECH_WS_URL = `wss://${Domain_Name[ENV || 'DEV']}/websocket/textToSpeechTC.ws` export const TEXTTOSPEECH_WS_URL = `wss://${Domain_Name[ENV || 'DEV']}/websocket/textToSpeechTC.ws`
...@@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n' ...@@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n'
import { Plus, Logout, Me, TransactionOrder } from '@icon-park/vue-next' import { Plus, Logout, Me, TransactionOrder } from '@icon-park/vue-next'
import type { MenuOption } from 'naive-ui' import type { MenuOption } from 'naive-ui'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { DOMAIN_ORIGIN } from '@/config/base-url'
// import LanguageSetting from '@/components/language-setting/language-setting.vue' // import LanguageSetting from '@/components/language-setting/language-setting.vue'
const { t } = useI18n() const { t } = useI18n()
...@@ -21,7 +22,7 @@ const currentMenuValue = ref('') ...@@ -21,7 +22,7 @@ const currentMenuValue = ref('')
const menuOptions = computed<MenuOption[]>(() => { const menuOptions = computed<MenuOption[]>(() => {
return [ return [
{ {
label: () => h('div', {}, t('router_title_module.home')), label: () => h('div', {}, t('common_module.back_home')),
key: 'Home', key: 'Home',
icon: () => h('i', { class: 'iconfont icon-home' }), icon: () => h('i', { class: 'iconfont icon-home' }),
}, },
...@@ -109,6 +110,12 @@ function handleToLogin() { ...@@ -109,6 +110,12 @@ function handleToLogin() {
} }
function handleMenuValueChange(key: string) { function handleMenuValueChange(key: string) {
if (key === 'Home') {
const ENV = import.meta.env.VITE_APP_ENV
window.open(`${DOMAIN_ORIGIN[ENV || 'DEV']}/admin/intelligent-application-platform/home`, '_self')
return
}
router.push({ name: key }) router.push({ name: key })
} }
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { ref, watchEffect } from 'vue' import { ref, watchEffect } from 'vue'
import Sidebar from './components/sidebar/sidebar.vue' import Sidebar from './components/sidebar/sidebar.vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import { DOMAIN_ORIGIN } from '@/config/base-url'
const route = useRoute() const route = useRoute()
...@@ -11,6 +12,8 @@ const isShowMainContentContainerPadding = ref(true) ...@@ -11,6 +12,8 @@ const isShowMainContentContainerPadding = ref(true)
watchEffect(() => { watchEffect(() => {
if (route.name === 'Home') { if (route.name === 'Home') {
const ENV = import.meta.env.VITE_APP_ENV
window.open(`${DOMAIN_ORIGIN[ENV || 'DEV']}/admin/intelligent-application-platform/home`, '_self')
isShowMainContentContainerPadding.value = false isShowMainContentContainerPadding.value = false
} else if (!isShowMainContentContainerPadding.value) { } else if (!isShowMainContentContainerPadding.value) {
isShowMainContentContainerPadding.value = true isShowMainContentContainerPadding.value = true
......
...@@ -168,6 +168,7 @@ common_module: ...@@ -168,6 +168,7 @@ common_module:
mermaid_render_error: 'There is an error in the chart rendering. Please ask again' mermaid_render_error: 'There is an error in the chart rendering. Please ask again'
mermaid_rendering: 'The chart is being rendered...' mermaid_rendering: 'The chart is being rendered...'
example: 'Ex.' example: 'Ex.'
back_home: 'Back to home'
dialogue_module: dialogue_module:
continue_question_message: 'You can keep asking questions' continue_question_message: 'You can keep asking questions'
...@@ -320,7 +321,7 @@ home_module: ...@@ -320,7 +321,7 @@ home_module:
business_marketing_list: business_marketing_list:
t_title_1: 'Event planning' t_title_1: 'Event planning'
t_doc_1: 'Efficiently customize various planning schemes' t_doc_1: 'Efficiently customize various planning schemes'
t_template_1: "I am an [[event planner]], please help me write a proposal for a [[music exchange event]], including but not limited to the planning theme, planning objectives, detailed plan, required resources, planning budget, risk management, and effectiveness evaluation." t_template_1: 'I am an [[event planner]], please help me write a proposal for a [[music exchange event]], including but not limited to the planning theme, planning objectives, detailed plan, required resources, planning budget, risk management, and effectiveness evaluation.'
t_title_2: 'Market research' t_title_2: 'Market research'
t_doc_2: 'Accurate insight into the market' t_doc_2: 'Accurate insight into the market'
......
...@@ -167,6 +167,7 @@ common_module: ...@@ -167,6 +167,7 @@ common_module:
mermaid_render_error: '图表渲染出错了,请重新提问' mermaid_render_error: '图表渲染出错了,请重新提问'
mermaid_rendering: '图表正在渲染中...' mermaid_rendering: '图表正在渲染中...'
example: '示例' example: '示例'
back_home: '返回首页'
dialogue_module: dialogue_module:
continue_question_message: '你可以继续提问' continue_question_message: '你可以继续提问'
......
...@@ -167,6 +167,7 @@ common_module: ...@@ -167,6 +167,7 @@ common_module:
mermaid_render_error: '圖表渲染出錯了,請重新提問' mermaid_render_error: '圖表渲染出錯了,請重新提問'
mermaid_rendering: '圖表正在渲染中...' mermaid_rendering: '圖表正在渲染中...'
example: '示例' example: '示例'
back_home: '返回首頁'
dialogue_module: dialogue_module:
continue_question_message: '你可以繼續提問' continue_question_message: '你可以繼續提問'
......
...@@ -11,7 +11,7 @@ export default [ ...@@ -11,7 +11,7 @@ export default [
title: '', title: '',
}, },
component: Layout, component: Layout,
redirect: '/home', redirect: '/personal-space',
children: [ children: [
{ {
path: '/home', path: '/home',
......
...@@ -128,7 +128,7 @@ async function handleGetApplicationDetail() { ...@@ -128,7 +128,7 @@ async function handleGetApplicationDetail() {
} }
}) })
.catch(() => { .catch(() => {
router.replace({ name: 'Home' }) router.replace({ name: 'Root' })
}) })
} }
......
...@@ -68,7 +68,7 @@ async function handleGetAgentDetail(agentId: string) { ...@@ -68,7 +68,7 @@ async function handleGetAgentDetail(agentId: string) {
} }
}) })
.catch(() => { .catch(() => {
router.replace({ name: 'Home' }) router.replace({ name: 'Root' })
}) })
} }
......
...@@ -113,7 +113,7 @@ onMounted(async () => { ...@@ -113,7 +113,7 @@ onMounted(async () => {
return return
} }
router.replace({ name: 'Home' }) router.replace({ name: 'Root' })
}) })
onUnmounted(() => { onUnmounted(() => {
...@@ -129,7 +129,7 @@ async function handleGetApplicationDetail() { ...@@ -129,7 +129,7 @@ async function handleGetApplicationDetail() {
document.title = agentApplicationConfig.value.baseInfo.agentTitle document.title = agentApplicationConfig.value.baseInfo.agentTitle
}) })
.catch(() => { .catch(() => {
router.replace({ name: 'Home' }) router.replace({ name: 'Root' })
}) })
} }
......
...@@ -170,7 +170,7 @@ onMounted(async () => { ...@@ -170,7 +170,7 @@ onMounted(async () => {
return return
} }
router.replace({ name: 'Home' }) router.replace({ name: 'Root' })
}) })
onUnmounted(() => { onUnmounted(() => {
...@@ -193,7 +193,7 @@ async function handleGetApplicationDetail() { ...@@ -193,7 +193,7 @@ async function handleGetApplicationDetail() {
} }
}) })
.catch(() => { .catch(() => {
router.replace({ name: 'Home' }) router.replace({ name: 'Root' })
}) })
} }
...@@ -224,7 +224,7 @@ function getAutoPlayByAgentId() { ...@@ -224,7 +224,7 @@ function getAutoPlayByAgentId() {
function handleBack() { function handleBack() {
if (!history.state.back) { if (!history.state.back) {
router.replace({ router.replace({
name: 'Home', name: 'Root',
}) })
} else { } else {
router.back() router.back()
......
...@@ -167,6 +167,7 @@ declare namespace I18n { ...@@ -167,6 +167,7 @@ declare namespace I18n {
mermaid_render_error: string mermaid_render_error: string
mermaid_rendering: string mermaid_rendering: string
example: string example: string
back_home: string
dialogue_module: { dialogue_module: {
continue_question_message: string continue_question_message: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment