From 4f548f2f9bb931f8282cd899ebd96ddf6284282d Mon Sep 17 00:00:00 2001 From: Leo_Ding <2405260743@qq.com> Date: Mon, 20 Oct 2025 14:36:08 +0800 Subject: [PATCH] 1 --- src/views/login/platForm.vue | 58 +++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/src/views/login/platForm.vue b/src/views/login/platForm.vue index 7555bd3..fe1558b 100644 --- a/src/views/login/platForm.vue +++ b/src/views/login/platForm.vue @@ -32,7 +32,7 @@ 南通市通州区互联网+智慧养老居家上门服务项目 -
+
@@ -52,6 +52,20 @@

运营平台

+
+ +
+ {{ '< 返回' }} +
+

请选择您的管理组织

+ + {{ + value.name + }} + +
+
@@ -69,6 +83,7 @@ import yunying from '@/assets/imgs/yunying.png' import { useAppStore, useRouterStore, useUserStore } from '@/store' import { template } from 'lodash-es' import { useRoute, useRouter } from 'vue-router' +import apis from '@/apis' import storage from '@/utils/storage' defineOptions({ name: 'PlatForm', @@ -76,19 +91,35 @@ defineOptions({ const appStore = useAppStore() const routerStore = useRouterStore() const router = useRouter() +const stationList = ref([]) +const currentPlatForm = ref('jianguan') +const currentOrg = ref() // 在组件挂载前设置 body 类名 onBeforeMount(() => { document.body.className = 'body-bg' }) async function handleSelect(type) { - storage.local.setItem('platform', type) - // 加载完成 - if (appStore.complete) { - goIndex() + if (type === 'yunying') { + currentPlatForm.value = 'yunying' + try { + const { data, success } = await apis.serviceMenu.getServiceSiteList({ pageSize: 100, current: 1 }) + if (success) { + stationList.value = data.map(item => ({ id: item.id, name: item.name })) + } + } catch (error) { + + } } else { - await appStore.init({ platform: type }) - goIndex() + storage.local.setItem('platform', type) + // 加载完成 + if (appStore.complete) { + goIndex() + } else { + await appStore.init({ platform: type }) + goIndex() + } } + } async function goIndex() { console.log('goIndex') @@ -96,7 +127,7 @@ async function goIndex() { console.log(indexRoute) if (!indexRoute) return router.push(indexRoute) - + } /** * 获取首页路由 @@ -115,6 +146,17 @@ function getFirstValidRoute() { } return indexRoute } +async function handleChange(e) { + storage.local.setItem('platform', 'yunying') + storage.local.setItem('stationId', e) + // 加载完成 + if (appStore.complete) { + goIndex() + } else { + await appStore.init({ platform: 'yunying' }) + goIndex() + } +}