From ef13c07590638332db024d08a373aa8f5a2e44a0 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 8 Jul 2024 14:21:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=E5=8A=A0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/index.vue | 51 +++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 4d2ccead..2206d6d9 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -4,10 +4,12 @@ 您好,欢迎使用
- WMS仓库管理系统 + WMS仓库管理系统
+ 版本: {{version}}
+
@@ -28,7 +30,8 @@ - + @@ -104,8 +107,8 @@ data() { return { tenantArray: JSON.parse(import.meta.env.VITE_TENANT), - smloginmsg: "", - tenantValue:0, + smloginmsg: "", + tenantValue: 0, // tenantName: "闻荫源码", username: "", password: "", @@ -114,7 +117,8 @@ showPassword: true, imageSrc: "", code: "", - uuid: "" + uuid: "", + version: "" } }, // computed: mapState(['forcedLogin', 'hasLogin']), @@ -161,6 +165,7 @@ }).catch(error => { this.showErrorMessage(error); }) + this.getAppVersion() }, methods: { // ...mapMutations(['login']), @@ -197,8 +202,8 @@ logininfo.password = this.password logininfo.code = this.code; logininfo.uuid = this.uuid; - logininfo.tenantName = this.tenantArray.find(item=>item.value==this.tenantValue).text; - + logininfo.tenantName = this.tenantArray.find(item => item.value == this.tenantValue).text; + uni.setStorageSync('tenantId', this.tenantValue) } else if (this.tapstyle == 1) { @@ -254,7 +259,20 @@ this.uuid = res.data.uuid } }) + }, + getAppVersion() { + const systemInfo = uni.getSystemInfoSync(); + // #ifdef H5 + this.version = systemInfo.appVersion; + console.log(systemInfo.appVersion, '版本号'); + // #endif + + // #ifdef APP + this.version = systemInfo.appWgtVersion; + // #endif + } + } } @@ -284,7 +302,7 @@ .mytabline { flex: 1; text-align: center; - padding: 20rpx 0; + padding: 10rpx 0; color: #666; position: relative; font-size: 0.875rem; @@ -339,15 +357,16 @@ height: 90rpx; line-height: 90rpx; padding: 0 0 0 20rpx; - } - .conone .uni-data-select .uni-select{ - background-color: #F7F9FF; - height: 90rpx; - line-height: 90rpx; - border: 0px; + } + + .conone .uni-data-select .uni-select { + background-color: #F7F9FF; + height: 90rpx; + line-height: 90rpx; + border: 0px; padding: 0 10rpx 0 20rpx; - } - + } + .conone .title { font-size: .875rem; align-items: center;