Bläddra i källkod

萧山版本仅支持扫码

kumu 3 månader sedan
förälder
incheckning
35238cd9ca
7 ändrade filer med 49 tillägg och 2 borttagningar
  1. 6 0
      .env/.env.xs
  2. 2 1
      @types/loader.d.ts
  3. 1 0
      index.html
  4. 1 0
      package.json
  5. BIN
      src/assets/images/screen.scan.png
  6. 32 0
      src/pages/scan.page.vue
  7. 7 1
      src/router/index.ts

+ 6 - 0
.env/.env.xs

@@ -0,0 +1,6 @@
+REQUEST_API_PROXY_URL=https://wx.hzliuzhi.com/manager
+
+SIX_REQUEST_BASE=/manager
+
+SIX_APP_TITLE=萧山区中医智能辅诊系统
+SIX_APP_SCAN=1

+ 2 - 1
@types/loader.d.ts

@@ -9,5 +9,6 @@ declare global {
     export interface Loader {
       (app: App): Promise<any>;
     }
-  }
+  };
+  export const __is_scan__: boolean;
 }

+ 1 - 0
index.html

@@ -5,6 +5,7 @@
     <link rel="icon" href="/favicon.ico">
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
     <title>%SIX_APP_TITLE%</title>
+    <script>var __is_scan__ = '%SIX_APP_SCAN%' === '1';</script>
     <script>document.addEventListener('gesturestart', function(event) { event.preventDefault(); }, false);</script>
   </head>
   <body>

+ 1 - 0
package.json

@@ -8,6 +8,7 @@
     "build": "run-p type-check \"build-aio {@}\" --",
     "preview": "vite preview",
     "build-aio": "vite build --base=/aio/",
+    "build-aio.xs": "vite build --base=/aio/ --mode=xs",
     "type-check": "vue-tsc --build --force",
     "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
     "format": "prettier --write src/"

BIN
src/assets/images/screen.scan.png


+ 32 - 0
src/pages/scan.page.vue

@@ -0,0 +1,32 @@
+<script setup lang="ts">
+import { useRequest } from 'alova/client';
+import { copyrightMethod } from '@/request/api';
+import { Dialog } from '@/platform';
+const title = import.meta.env.SIX_APP_TITLE;
+const { data: copyright, send: load } = useRequest(copyrightMethod).onError(async ({ error }) => {
+  await Dialog.show({
+    message: error.message,
+    theme: 'round-button',
+    showCancelButton: false,
+    confirmButtonText: '刷新',
+    width: '350px',
+  });
+  await load();
+});
+</script>
+
+<template>
+  <div class="wrapper flex flex-col">
+    <div class="flex-none h-[106px]">
+      <div class="h-full flex justify-center items-center text-4xl" style="letter-spacing: 0.2em">{{ title }}</div>
+    </div>
+    <div class="flex-auto"></div>
+    <div class="flex-none text-xl p-2 text-center tracking-widest" v-html="copyright"></div>
+  </div>
+</template>
+
+<style scoped lang="scss">
+.wrapper {
+  background: url("@/assets/images/screen.scan.png") no-repeat center / 100%;
+}
+</style>

+ 7 - 1
src/router/index.ts

@@ -4,7 +4,7 @@ import { createRouter, createWebHistory } from 'vue-router';
 const router = createRouter({
   history: createWebHistory(import.meta.env.BASE_URL),
   routes: [
-    { path: '/screen', component: () => import('@/pages/screen.page.vue'), meta: { scan: true } },
+    // { path: '/screen', component: () => import('@/pages/screen.page.vue'), meta: { scan: true } },
     { path: '/register', component: () => import('@/pages/register.page.vue'), meta: { title: '建档', scan: true } },
     { path: '/camera', component: () => import('@/modules/camera/camera.page.vue'), meta: { title: '拍摄' } },
     { path: '/camera/result', component: () => import('@/modules/camera/camera-result.page.vue'), meta: { title: '拍摄完成' } },
@@ -16,4 +16,10 @@ const router = createRouter({
   ],
 });
 
+router.addRoute(
+  __is_scan__
+    ? { path: '/screen', component: () => import('@/pages/scan.page.vue'), meta: { scan: true } }
+    : { path: '/screen', component: () => import('@/pages/screen.page.vue'), meta: { scan: true } }
+);
+
 export default router;