wangguoyu há 1 mês atrás
pai
commit
1f499c7190
1 ficheiros alterados com 22 adições e 21 exclusões
  1. 22 21
      pages/login/index.vue

+ 22 - 21
pages/login/index.vue

@@ -81,7 +81,9 @@
 		error
 	} from "uview-plus";
 	import TipDialog from "@/components/dialog/tipDialog";
-  import {useVersionUpdate} from "@/utils/versionUpdate.js";
+	import {
+		useVersionUpdate
+	} from "@/utils/versionUpdate.js";
 
 	let indexData = reactive({
 		phoneNumber: null,
@@ -108,7 +110,9 @@
 	const tipDialogRef2 = ref(null)
 	const updateUrl = ref(null)
 
-  const { initDownload } = useVersionUpdate()
+	const {
+		initDownload
+	} = useVersionUpdate()
 
 	const store = useIsCanBack();
 	onUnload(() => {
@@ -140,7 +144,7 @@
 	})
 
 	function BanbenConfirmBtn() {
-    let resa = false;
+		let resa = false;
 		const systemInfo = uni.getSystemInfoSync();
 		if (systemInfo.platform == 'ios') {
 			const appStoreUrl = 'itms-apps://itunes.apple.com/app/6741551741'
@@ -176,25 +180,22 @@
 					storeWebUrl = `https://appgallery.huawei.com/app/C113217527`;
 					break;
 				default:
-          // 直接下载apk
-          initDownload(updateUrl.value)
-          resa = true;
-          break;
+					break;
 			}
-      if (!resa) {
-        plus.runtime.openURL(storeScheme, (error) => {
-          console.log('调起应用商店失败,尝试网页链接', error);
-          plus.runtime.openURL(storeWebUrl, (webError) => {
-            console.error('网页链接失败', webError);
-            plus.runtime.openURL(updateUrl.value, (webError) => {
-              uni.showToast({
-                title: '跳转失败,请手动打开应用商店搜索更新',
-                icon: 'none'
-              });
-            });
-          });
-        });
-      }
+			plus.runtime.openURL(storeScheme, (error) => {
+				console.log('调起应用商店失败,尝试网页链接', error);
+				plus.runtime.openURL(storeWebUrl, (webError) => {
+					console.error('网页链接失败', webError);
+					initDownload(updateUrl.value)
+					// plus.runtime.openURL(updateUrl.value, (webError) => {
+					//   uni.showToast({
+					//     title: '跳转失败,请手动打开应用商店搜索更新',
+					//     icon: 'none'
+					//   });
+					// });
+				});
+			});
+
 		}
 	}