From 3e0e40c844c3a10aca5cc0c87b18579122700b61 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 09 一月 2024 10:36:57 +0800
Subject: [PATCH] 1.新增APP升级接口对接2.列表页渲染速度优化

---
 pages/login/index.vue |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/pages/login/index.vue b/pages/login/index.vue
index 0a79b9b..65e4952 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -34,6 +34,17 @@
 						@click="gotoIndex"></u-button>
 				</view>
 
+				<u-modal :show="isShow" :showCancelButton="isShowCancelButton" :showConfirmButton='false' title=""
+					@confirm='isShowConfirm' @cancel='isShowCancel'>
+					<view>
+						<view>
+							<u--text type="info" :size='32' :block='false' text="褰撳墠鐗堟湰涓嶆槸鏈�鏂扮増鏈紝璇风偣鍑�"></u--text>
+						</view>
+						<view>
+							<u--text :block='false' mode="link" :size='50' text="閾炬帴涓嬭浇" :href="downloadUrl"></u--text>
+						</view>
+					</view>
+				</u-modal>
 
 			</view>
 
@@ -54,6 +65,7 @@
 	import {
 		LoginSave,
 		ForcedOffline,
+		AppUpgrade
 	} from '../../config/api.js';
 	import {
 		decode
@@ -74,7 +86,7 @@
 
 				isDisabledSubmitButton: false, //鎻愪氦鎸夐挳鏄惁澶勪簬鍔犺浇涓�
 
-				isShowCancelButton: false,
+				isShowCancelButton: true,
 				isShow: false,
 				downloadUrl: '', //涓嬭浇鍦板潃
 
@@ -86,12 +98,21 @@
 
 		},
 		created() {
-
+			this.getAppUpgrade()
 		},
 		mounted() {
 
 		},
 		methods: {
+			getAppUpgrade() {
+				AppUpgrade().then(res => {
+					this.isShow = res.data[0].version !== this.$appVersion
+					if (res.data[0].version !== this.$appVersion) { // 璇存槑涓庢渶鏂扮増鏈笉鍖归厤
+						this.downloadUrl = this.$baseUrl.substring(0, 25) + '/APK/JLAPP.apk'
+					}
+				})
+
+			},
 			//瀵嗙爜鏄惁鏌ョ湅  鏄剧ず鏄庢枃
 			isViewClick() {
 				this.isView = !this.isView

--
Gitblit v1.9.3