wangxy hace 1 mes
padre
commit
1a9fd71178
Se han modificado 1 ficheros con 51 adiciones y 50 borrados
  1. 51 50
      pages/study/index.vue

+ 51 - 50
pages/study/index.vue

@@ -154,57 +154,58 @@
 
 
 	function BanbenConfirmBtn() {
-    const systemInfo = uni.getSystemInfoSync();
-    if (systemInfo.platform == 'ios') {
-      const appStoreUrl = 'itms-apps://itunes.apple.com/app/6741551741'
-      plus.runtime.openURL(appStoreUrl)
-    } else {
-      // 处理 Android/HarmonyOS 设备
-      const {
-        brand
-      } = systemInfo;
-      const androidPackage = 'com.llisoft.ezy'; // 安卓包名
-      let storeScheme = '';
-      let storeWebUrl = '';
-      switch (brand.toLowerCase()) {
-        case 'huawei':
-          storeScheme = `appmarket://details?id=${androidPackage}`;
-          storeWebUrl = `https://appgallery.huawei.com/app/C113217527`;
-          break;
-        case 'xiaomi':
-          storeScheme = `mimarket://app/detail?appId=${androidPackage}`;
-          storeWebUrl = `https://app.mi.com/details?id=${androidPackage}`;
-          break;
-        case 'oppo':
-          storeScheme = `oppomarket://app/detail?pkgName=${androidPackage}`;
-          storeWebUrl = `https://store.oppomobile.com/product?packagename=${androidPackage}`;
-          break;
-        case 'vivo':
-          storeScheme = `vivomarket://app/detail?appId=${androidPackage}`;
-          storeWebUrl = `https://appstore.vivo.com.cn/app/${androidPackage}`;
-          break;
-        case 'honor':
-          // 荣耀使用华为应用市场
-          storeScheme = `appmarket://details?id=${androidPackage}`;
-          storeWebUrl = `https://appgallery.huawei.com/app/C113217527`;
-          break;
-        default:
-          break;
-      }
-      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'
-          //   });
-          // });
-        });
-      });
+		const systemInfo = uni.getSystemInfoSync();
+		if (systemInfo.platform == 'ios') {
+			const appStoreUrl = 'itms-apps://itunes.apple.com/app/6741551741'
+			plus.runtime.openURL(appStoreUrl)
+		} else {
+			// 处理 Android/HarmonyOS 设备
+			const {
+				brand
+			} = systemInfo;
+			const androidPackage = 'com.llisoft.ezy'; // 安卓包名
+			let storeScheme = '';
+			let storeWebUrl = '';
+			switch (brand.toLowerCase()) {
+				case 'huawei':
+					storeScheme = `appmarket://details?id=${androidPackage}`;
+					storeWebUrl = `https://appgallery.huawei.com/app/C113217527`;
+					break;
+				case 'xiaomi':
+					storeScheme = `mimarket://app/detail?appId=${androidPackage}`;
+					storeWebUrl = `https://app.mi.com/details?id=${androidPackage}`;
+					break;
+				case 'oppo':
+					storeScheme = `oppomarket://app/detail?pkgName=${androidPackage}`;
+					storeWebUrl = `https://store.oppomobile.com/product?packagename=${androidPackage}`;
+					break;
+				case 'vivo':
+					storeScheme = `vivomarket://app/detail?appId=${androidPackage}`;
+					storeWebUrl = `https://appstore.vivo.com.cn/app/${androidPackage}`;
+					break;
+				case 'honor':
+					// 荣耀使用华为应用市场
+					storeScheme = `appmarket://details?id=${androidPackage}`;
+					storeWebUrl = `https://appgallery.huawei.com/app/C113217527`;
+					break;
+				default:
+					break;
+			}
+			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'
+					//   });
+					// });
+				});
+			});
 
+		}
 	}
 
 	function getLoginInit() {