From 2de633725d5e5d843853240933f63220dc4e4cb2 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 03 十二月 2025 16:53:57 +0800
Subject: [PATCH] fix: 导体会存在每隔一段距离需要标记的情况,需要通知工人进行标记。

---
 src/pages/login/index.vue |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 7e29461..a33808c 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -75,6 +75,11 @@
           <text class="text">鍜�</text>
           <text class="link" @click="navigateToPrivacy">銆婇殣绉佹斂绛栥��</text>
         </view>
+
+        <!-- 鐗堟湰鍙� -->
+        <view class="version">
+          <text class="version-text">鐗堟湰鍙凤細{{ versionName }}</text>
+        </view>
       </view>
     </view>
 
@@ -87,18 +92,49 @@
 import { type LoginFormData } from "@/api/auth";
 import { useUserStore } from "@/store/modules/user";
 import { useToast } from "wot-design-uni";
-import { ref } from "vue";
+import { ref, onMounted } from "vue";
 
 const loginFormRef = ref();
 const toast = useToast();
 const loading = ref(false);
 const userStore = useUserStore();
 
+// 鐗堟湰鍙�
+const versionName = ref("1.0.16");
+
+// 鑾峰彇鐗堟湰鍙�
+onMounted(() => {
+  // #ifdef MP-WEIXIN
+  try {
+    const accountInfo = uni.getAccountInfoSync();
+    if (accountInfo?.miniProgram?.version) {
+      versionName.value = accountInfo.miniProgram.version;
+    }
+  } catch (e) {
+    // 鑾峰彇澶辫触鏃朵娇鐢ㄩ粯璁ゅ��
+  }
+  // #endif
+
+  // #ifdef APP-PLUS
+  try {
+    // @ts-ignore
+    if (plus?.runtime?.version) {
+      // @ts-ignore
+      versionName.value = plus.runtime.version;
+    }
+  } catch (e) {
+    // 鑾峰彇澶辫触鏃朵娇鐢ㄩ粯璁ゅ��
+  }
+  // #endif
+});
+
 // 鐧诲綍琛ㄥ崟鏁版嵁
 const loginFormData = ref<LoginFormData>({
-  // username: "31601016",
-  username: "32308027",
-  password: "cxjt1234",
+  username: "",
+  password: "",
+  // username: "32408083",
+  // username: "32308027",
+  // password: "cxjt1234",
 });
 
 // 鑾峰彇閲嶅畾鍚戝弬鏁�
@@ -382,4 +418,16 @@
 .agreement .link {
   color: #165dff;
 }
+
+.version {
+  display: flex;
+  justify-content: center;
+  margin-top: 20rpx;
+  margin-bottom: 20rpx;
+}
+
+.version-text {
+  font-size: 22rpx;
+  color: #9ca3af;
+}
 </style>

--
Gitblit v1.9.3