Browse Source

[web_demo] 首页展示sdk版本号,左下角展示web版本号

yanxin 1 year ago
parent
commit
c4052b8d96

+ 1 - 7
src/MenuView.vue

@@ -45,7 +45,7 @@
       </el-menu>
     </el-col>
   </el-row>
-  <el-tag size="large" style="position: absolute; bottom: 0%;">{{ version }}</el-tag>
+  <el-tag size="large" style="position: absolute; bottom: 0%;">V 1.1.1</el-tag>
 </template>
 
 <style scoped lang="less">
@@ -59,12 +59,6 @@ import {
 } from '@element-plus/icons-vue'
 import { routerJump } from "@/pages/main/utils/routerJump";
 
-import { storeToRefs } from 'pinia'
-import { useVersionStore } from './store/Version';
-
-const vr = useVersionStore();
-const { version } = storeToRefs(vr);
-
 const handleOpen = (key: string, keyPath: string[]) => {
   console.log(key, keyPath)
 }

File diff suppressed because it is too large
+ 1 - 1
src/dist/assets/index-e8be439a.css


File diff suppressed because it is too large
+ 9 - 9
src/dist/assets/index-17c8c42c.js


+ 2 - 2
src/dist/index.html

@@ -4,8 +4,8 @@
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>DocumentAI Web Demo</title>
-    <script type="module" crossorigin src="./assets/index-17c8c42c.js"></script>
-    <link rel="stylesheet" href="./assets/index-e8be439a.css">
+    <script type="module" crossorigin src="./assets/index-b6811d62.js"></script>
+    <link rel="stylesheet" href="./assets/index-46046f92.css">
   </head>
   <body>
     <div id="app"></div>

+ 2 - 10
src/main.ts

@@ -34,21 +34,13 @@ xhr.onreadystatechange = function () {
       if (portResult) {
         let portValue: string = portResult[1];
         server_port.value = ":" + portValue;
-
-        // console.log(`当前端口为:${server_port.value}`);
-        // console.log(`当前ip为:${server_ip.value}`);
       }
       if (ipResult) {
         let ipValue: string = ipResult[1];
         server_ip.value = ipValue;
-
-        // console.log(`当前端口为:${server_port.value}`);
-        // console.log(`当前ip为:${server_ip.value}`);
       }
-              console.log(`当前端口为:${server_port.value}`);
-        console.log(`当前ip为:${server_ip.value}`);
-      // const port = headers.match(/port: (\d+)/i)[1];
-      // console.log("Port:", headers);
+      console.log(`当前端口为:${server_port.value}`);
+      console.log(`当前ip为:${server_ip.value}`);
     } else {
       console.error("There was a problem with the request.");
     }

+ 5 - 2
src/pages/main/views/homePage.vue

@@ -1,7 +1,10 @@
 <template>
   <h1>DocumentAI</h1>
 
-  <h3>构建版本号</h3>
+  <h3>build version</h3>
+  <p class="italic">{{ version }}</p>
+
+  <h3>build tag</h3>
   <p class="italic">{{ build_tag }}</p>
 
 
@@ -23,7 +26,7 @@ import { storeToRefs } from 'pinia'
 import { useVersionStore } from '../../../store/Version';
 
 const vr = useVersionStore();
-const { build_tag, model_info } = storeToRefs(vr);
+const { build_tag, model_info, version } = storeToRefs(vr);
 
 let model_num = ref(0)
 let model_data: any = ref([])