From ac3d0a1205ee357e2e54784385dcdb7b63a98a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A6=86=E9=92=B1=E8=90=BD=E5=B0=BD=E6=A7=BF=E8=8A=B1?= =?UTF-8?q?=E7=A8=80?= <2675540038@qq.com> Date: Wed, 9 Apr 2025 18:00:59 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=BA=95=E9=83=A8=E6=A0=8F=E6=8E=92=E7=89=88?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=8C=BB=E9=99=A2?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=B1=95=E7=A4=BA=E5=8C=BA=E5=9F=9F=202.?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E6=9C=8D=E5=8A=A1=E6=95=B4=E5=90=88=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=85=BE=E8=AE=AF=E5=9C=B0=E5=9B=BE=E6=8E=A5?= =?UTF-8?q?=E5=85=A5=E5=8A=9F=E8=83=BD=203.=E4=BF=A1=E6=81=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=A8=A1=E5=9D=97=E5=8D=87=E7=BA=A7=EF=BC=8C=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E8=AF=A6=E6=83=85=E9=A1=B5=E5=90=8C=E6=AD=A5=E9=80=82?= =?UTF-8?q?=E9=85=8D=EF=BC=88=E5=90=AB=E6=89=8B=E6=9C=BA=E7=AB=AF=EF=BC=89?= =?UTF-8?q?=204.=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=AD=A5=E8=B0=83=E6=95=B4=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=B1=95=E7=A4=BA=E6=95=88=E6=9E=9C=205.?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=86=85=E5=AE=B9=E6=89=A9=E5=AE=B9=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E5=8D=87=E9=A1=B5=E9=9D=A2=E8=A7=86=E8=A7=89=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=95=88=E6=9E=9C=206.=E9=A1=B6=E9=83=A8=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F=E4=BC=98=E5=8C=96=EF=BC=8C=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?PC=E7=AB=AF=E4=B8=8E=E6=89=8B=E6=9C=BA=E7=AB=AF=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.vue | 8 +- assets/css/common.scss | 9 ++ assets/css/index.css | 17 +-- assets/css/list.css | 2 - components/AppFooter.vue | 224 +++++++++++++++++++++--------------- components/AppHeader.vue | 131 ++++++++++++++------- nuxt.config.ts | 2 +- package-lock.json | 41 ++++++- package.json | 1 + pages/about.vue | 76 +++++++----- pages/index.vue | 160 ++++++++++++++------------ pages/info/[id].vue | 4 +- pages/list/[id].vue | 42 ++++--- pages/phone_about.vue | 47 +++++--- pages/phone_index.vue | 13 ++- pages/phone_info/[id].vue | 4 +- pages/phone_list/[id].vue | 8 +- pages/phone_search/[id].vue | 173 ++++++++++++++++++++++++++++ pages/search/[id].vue | 121 +++++++++++++++++++ service/request.ts | 5 +- 20 files changed, 786 insertions(+), 302 deletions(-) create mode 100644 pages/phone_search/[id].vue create mode 100644 pages/search/[id].vue diff --git a/app.vue b/app.vue index ffee78d..63cea47 100644 --- a/app.vue +++ b/app.vue @@ -16,10 +16,10 @@ import { useI18n } from 'vue-i18n' const { locale } = useI18n() const router = useRouter() useSeoMeta({ - title: '信阳第五人民医院', - ogTitle: '信阳第五人民医院', - description: '信阳第五人民医院', - ogDescription: '信阳第五人民医院', + title: '信阳市第五人民医院', + ogTitle: '信阳市第五人民医院', + description: '信阳市第五人民医院', + ogDescription: '信阳市第五人民医院', ogImage: 'https://example.com/image.png', twitterCard: 'summary_large_image', }) diff --git a/assets/css/common.scss b/assets/css/common.scss index e8f31ad..296c7ae 100644 --- a/assets/css/common.scss +++ b/assets/css/common.scss @@ -38,3 +38,12 @@ animation-delay: 2.5s; animation-duration: 0.1s; } +//保留一行 +.one-line { + white-space: nowrap; /* 禁止换行 */ + overflow: hidden; /* 隐藏溢出内容 */ + text-overflow: ellipsis; /* 溢出显示省略号(可选) */ + display: inline-block; /* 使块元素能应用省略号 */ + max-width: 100%; /* 配合省略号的宽度限制 */ + } + diff --git a/assets/css/index.css b/assets/css/index.css index 8ffa17f..fbc9ee8 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -1097,7 +1097,7 @@ } .image_12 { - width: 680px; + width: 683px; height: 378px; } @@ -1575,7 +1575,7 @@ .group_26 { background-color: rgba(249, 249, 249, 1); height: 44px; - width: 410px; + width: 352px; position: relative; margin: 22px 0 24px 30px; } @@ -1768,7 +1768,7 @@ .box_26 { background-color: rgba(255, 255, 255, 1); height: 348px; - width: 100%; + width: 542px; margin-top: 16px; margin-left: -20px; } @@ -1841,7 +1841,6 @@ .group_29 { background-color: rgba(26, 172, 162, 1); width: 100%; - height: 309px; } .text-wrapper_57 { @@ -1948,7 +1947,7 @@ .block_4 { background-color: rgba(255, 255, 255, 1); - width: 1200px; + width: 78%; height: 1px; margin: 22px 0 0 358px; } @@ -1956,6 +1955,7 @@ @media screen and (max-width: 1440px) { .block_4 { margin: 38px 0 0 47px; + width: 94%; } } @@ -1980,14 +1980,11 @@ .text_75 { width: 258px; - height: 16px; - overflow-wrap: break-word; color: rgba(255, 255, 255, 1); font-size: 16px; font-family: Microsoft YaHei-Regular; font-weight: NaN; text-align: left; - white-space: nowrap; line-height: 16px; } @@ -2007,15 +2004,13 @@ .text_77 { width: 228px; - height: 16px; overflow-wrap: break-word; color: rgba(255, 255, 255, 1); font-size: 16px; font-family: Microsoft YaHei-Regular; font-weight: NaN; text-align: left; - white-space: nowrap; - line-height: 16px; + line-height: 20px; margin-top: 25px; } diff --git a/assets/css/list.css b/assets/css/list.css index c0f2fa6..7b2df95 100644 --- a/assets/css/list.css +++ b/assets/css/list.css @@ -396,14 +396,12 @@ } .text_15 { - width: 537px; overflow-wrap: break-word; color: rgba(50, 50, 50, 1); font-size: 20px; font-family: Microsoft YaHei-Regular; font-weight: NaN; text-align: left; - line-height: 18px; } .text_16 { diff --git a/components/AppFooter.vue b/components/AppFooter.vue index dfbc55d..12a1cb9 100644 --- a/components/AppFooter.vue +++ b/components/AppFooter.vue @@ -1,80 +1,68 @@ @@ -52,7 +111,7 @@ const store = useStore() const route = useRoute() const isMenuOpen = ref(false) const { locale } = useI18n() -const isLinl = ref(0) +const isLinl = ref('/') import $api from '@/service/webRequest' // 手机端相关变量和函数 const isMobile = ref(false) @@ -89,32 +148,20 @@ const selectMenuItem = (index: number) => { window.location.href = `/about` } } -const isOpneLinl = (item: any) => { - console.log(item); - isLinl.value = item.id; - sessionStorage.setItem('group_id', item.id) - mobileMenuOpen.value = false - router.push(`/list/${item.id}`) -} -const openLinl = (item) => { - isLinl.value = item; - mobileMenuOpen.value = false - if (item == 0) { - sessionStorage.setItem('group_id', '0') - router.push('/'); - } else { - sessionStorage.setItem('group_id', '-1') - //在当前页面打开 - window.location.href = `/about` - } -} + +watch(route, (newRoute) => { + console.log(newRoute); + isLinl.value = newRoute.path +}, { immediate: true }) // 监听窗口大小变化 onMounted(() => { - if (route.path == '/about') { - isLinl.value = -1 - } else { - isLinl.value = Number(sessionStorage.getItem('group_id')) - } + //console.log(route); + + // if (route.path == '/about') { + // isLinl.value = -1 + // } else { + // isLinl.value = Number(sessionStorage.getItem('group_id')) + // } checkIfMobile() window.addEventListener('resize', checkIfMobile) diff --git a/nuxt.config.ts b/nuxt.config.ts index 51275fa..c6aa0a1 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -30,7 +30,7 @@ export default defineNuxtConfig({ server: { proxy: { '/api': { - target: "http://192.168.10.140/", + target: "http://xysdwrmyy.cn/", changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ''), } diff --git a/package-lock.json b/package-lock.json index 9d68093..fdb1f30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "nuxt-icons": "^3.2.1", "pinia": "^2.1.7", "swiper": "^11.2.5", + "tlbs-map-vue": "^1.3.1", "vue-baidu-map-3x": "^1.0.40", "vue-i18n": "^9.8.0", "vue-swiper-animate": "^1.0.0" @@ -7491,7 +7492,6 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, "license": "ISC" }, "node_modules/graphemer": { @@ -8426,7 +8426,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, "license": "MIT", "dependencies": { "universalify": "^2.0.0" @@ -12353,6 +12352,43 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/tlbs-map-vue": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tlbs-map-vue/-/tlbs-map-vue-1.3.1.tgz", + "integrity": "sha512-oh239gdtis/b6VInlmFuxP3fnwssEG4Hy5sTzLyiJ4bTeqR8pB7MPzl81AqaL+fC4W7aFsSkofbBGmgh4rD/4w==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "fs-extra": "^10.1.0", + "vue-demi": "^0.14.6" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@vue/composition-api": "^1.4.9", + "vue": "^2.6.0 || >=3.0.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/tlbs-map-vue/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -12663,7 +12699,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, "license": "MIT", "engines": { "node": ">= 10.0.0" diff --git a/package.json b/package.json index c5fc94e..e339193 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "nuxt-icons": "^3.2.1", "pinia": "^2.1.7", "swiper": "^11.2.5", + "tlbs-map-vue": "^1.3.1", "vue-baidu-map-3x": "^1.0.40", "vue-i18n": "^9.8.0", "vue-swiper-animate": "^1.0.0" diff --git a/pages/about.vue b/pages/about.vue index 675a110..3a657e8 100644 --- a/pages/about.vue +++ b/pages/about.vue @@ -3,8 +3,7 @@
- + 您的位置:首页>系统公告
联系我们
@@ -14,33 +13,35 @@
- +
医院介绍
- {{ hospitalInfo.description }} + {{ hospitalInfo.description }}
- +
医院位置
-
- - - - -
- 信阳第五人民医院 -
-
-
+
+ + + + + +
@@ -48,15 +49,27 @@ diff --git a/pages/phone_search/[id].vue b/pages/phone_search/[id].vue new file mode 100644 index 0000000..bee8ddd --- /dev/null +++ b/pages/phone_search/[id].vue @@ -0,0 +1,173 @@ + + + + + diff --git a/pages/search/[id].vue b/pages/search/[id].vue new file mode 100644 index 0000000..e0bdea5 --- /dev/null +++ b/pages/search/[id].vue @@ -0,0 +1,121 @@ + + + + diff --git a/service/request.ts b/service/request.ts index 51d0659..295e4e7 100644 --- a/service/request.ts +++ b/service/request.ts @@ -3,12 +3,13 @@ import { handleError } from './handleError' function createRequestInstance(getServerUrl: () => string): AxiosInstance { //获取域名 - const serverUrl = 'http://admin.xysdwrmyy.cn'; + const serverUrl = 'https://xysdwrmyy.cn'; + //const serverUrl = '/api/'; //console.log(serverUrl); const instance = axios.create({ timeout: 1000 * 60 * 5, // 超时时间 withCredentials: true, // 允许跨域携带cookie - baseURL: serverUrl, // 请求地址 + baseURL:serverUrl, // 请求地址 }) instance.interceptors.response.use(