sunshibo 7 часов назад
Родитель
Сommit
120960cc44

+ 4 - 1
HBuilderProjects/secondShareGoods.html

@@ -721,6 +721,7 @@
 		 */
 		var APP_ANDROID_PACKAGE = 'com.alien.Udianzaizhe';
 		var APP_DOWNLOAD_URL = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.alien.Udianzaina';
+		var APP_IOS_DOWNLOAD_URL = 'https://apps.apple.com/cn/app/u店在哪/id6752243565';
 		var APP_IOS_URL_SCHEME = 'shopro://';
 		var APP_UNI_STORE_PATH = 'pages/secondHandTransactions/pages/detail/index';
 
@@ -742,7 +743,9 @@
 		var wxJssdkInitPromise = null;
 
 		function showDownloadTip() {
-			window.location.href = APP_DOWNLOAD_URL;
+			var ua = navigator.userAgent || '';
+			var isIOS = /iP(hone|od|ad)/i.test(ua) || (navigator.platform === 'MacIntel' && (navigator.maxTouchPoints || 0) > 1);
+			window.location.href = isIOS ? APP_IOS_DOWNLOAD_URL : APP_DOWNLOAD_URL;
 		}
 
 		function mergeSearchAndHashParams() {

+ 5 - 6
HBuilderProjects/shareAiConsult.html

@@ -574,6 +574,8 @@
       var WX_GET_CONFIG_SIGN_URL = H5_PAGE_BASE_FALLBACK + "shareAiConsult.html";
       var WECHAT_JS_SAFE_HOSTS = ["uat.ailien.shop", "prod.ailien.shop"];
       var APP_ANDROID_PACKAGE = "com.alien.Udianzaizhe";
+      var APP_DOWNLOAD_URL = "https://a.app.qq.com/o/simple.jsp?pkgname=com.alien.Udianzaina";
+      var APP_IOS_DOWNLOAD_URL = "https://apps.apple.com/cn/app/u店在哪/id6752243565";
       var APP_IOS_URL_SCHEME = "shopro://";
       var APP_UNI_AI_PATH = "pages/aiSearchResult/index";
       var AI_LEGAL_CONVERSATION_API =
@@ -1866,12 +1868,9 @@
       }
 
       function showDownloadTip() {
-        var msg = "请到应用商店下载「U店在哪」";
-        if (typeof uni !== "undefined" && typeof uni.showToast === "function") {
-          uni.showToast({ title: msg, icon: "none", duration: 2500 });
-        } else {
-          window.alert(msg);
-        }
+        var ua = navigator.userAgent || "";
+        var isIOS = /iP(hone|od|ad)/i.test(ua) || (navigator.platform === "MacIntel" && (navigator.maxTouchPoints || 0) > 1);
+        window.location.href = isIOS ? APP_IOS_DOWNLOAD_URL : APP_DOWNLOAD_URL;
       }
 
       function showAppOpenFailTip(msg) {

+ 5 - 6
HBuilderProjects/shareAiKfChat.html

@@ -462,6 +462,8 @@
       var WX_GET_CONFIG_SIGN_URL = H5_PAGE_BASE_FALLBACK + "shareAiKfChat.html";
       var WECHAT_JS_SAFE_HOSTS = ["uat.ailien.shop", "prod.ailien.shop"];
       var APP_ANDROID_PACKAGE = "com.alien.Udianzaizhe";
+      var APP_DOWNLOAD_URL = "https://a.app.qq.com/o/simple.jsp?pkgname=com.alien.Udianzaina";
+      var APP_IOS_DOWNLOAD_URL = "https://apps.apple.com/cn/app/u店在哪/id6752243565";
       var APP_IOS_URL_SCHEME = "shopro://";
       var APP_UNI_AI_PATH = "pages/aiKfChat/index";
       var AI_KF_CS_CONVERSATION_API =
@@ -1638,12 +1640,9 @@
       }
 
       function showDownloadTip() {
-        var msg = "请到应用商店下载「U店在哪」";
-        if (typeof uni !== "undefined" && typeof uni.showToast === "function") {
-          uni.showToast({ title: msg, icon: "none", duration: 2500 });
-        } else {
-          window.alert(msg);
-        }
+        var ua = navigator.userAgent || "";
+        var isIOS = /iP(hone|od|ad)/i.test(ua) || (navigator.platform === "MacIntel" && (navigator.maxTouchPoints || 0) > 1);
+        window.location.href = isIOS ? APP_IOS_DOWNLOAD_URL : APP_DOWNLOAD_URL;
       }
 
       function showAppOpenFailTip(msg) {

+ 4 - 1
HBuilderProjects/shareCheckIn.html

@@ -567,6 +567,7 @@
 		 */
 		var APP_ANDROID_PACKAGE = 'com.alien.Udianzaizhe';
 		var APP_DOWNLOAD_URL = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.alien.Udianzaina';
+		var APP_IOS_DOWNLOAD_URL = 'https://apps.apple.com/cn/app/u店在哪/id6752243565';
 		var APP_IOS_URL_SCHEME = 'shopro://';
 		var APP_UNI_STORE_PATH = 'pages/checkIn/index';
 
@@ -589,7 +590,9 @@
 		var wxJssdkInitPromise = null;
 
 		function showDownloadTip() {
-			window.location.href = APP_DOWNLOAD_URL;
+			var ua = navigator.userAgent || '';
+			var isIOS = /iP(hone|od|ad)/i.test(ua) || (navigator.platform === 'MacIntel' && (navigator.maxTouchPoints || 0) > 1);
+			window.location.href = isIOS ? APP_IOS_DOWNLOAD_URL : APP_DOWNLOAD_URL;
 		}
 
 		/**

+ 4 - 1
HBuilderProjects/shareCheckInUndefined.html

@@ -285,6 +285,7 @@
 
 		var APP_ANDROID_PACKAGE = 'com.alien.Udianzaizhe';
 		var APP_DOWNLOAD_URL = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.alien.Udianzaina';
+		var APP_IOS_DOWNLOAD_URL = 'https://apps.apple.com/cn/app/u店在哪/id6752243565';
 		var APP_IOS_URL_SCHEME = 'shopro://';
 		var APP_UNI_STORE_PATH = 'pages/checkIn/index';
 
@@ -294,7 +295,9 @@
 		}
 
 		function showDownloadTip() {
-			window.location.href = APP_DOWNLOAD_URL;
+			var ua = navigator.userAgent || '';
+			var isIOS = /iP(hone|od|ad)/i.test(ua) || (navigator.platform === 'MacIntel' && (navigator.maxTouchPoints || 0) > 1);
+			window.location.href = isIOS ? APP_IOS_DOWNLOAD_URL : APP_DOWNLOAD_URL;
 		}
 
 		function mergeSearchAndHashParams() {

+ 4 - 1
HBuilderProjects/shareDynamic.html

@@ -649,11 +649,14 @@
 		 */
 		var APP_ANDROID_PACKAGE = 'com.alien.Udianzaizhe';
 		var APP_DOWNLOAD_URL = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.alien.Udianzaina';
+		var APP_IOS_DOWNLOAD_URL = 'https://apps.apple.com/cn/app/u店在哪/id6752243565';
 		var APP_IOS_URL_SCHEME = 'shopro://';
 		var APP_UNI_STORE_PATH = 'pages/newdetails/index';
 
 		function showDownloadTip() {
-			window.location.href = APP_DOWNLOAD_URL;
+			var ua = navigator.userAgent || '';
+			var isIOS = /iP(hone|od|ad)/i.test(ua) || (navigator.platform === 'MacIntel' && (navigator.maxTouchPoints || 0) > 1);
+			window.location.href = isIOS ? APP_IOS_DOWNLOAD_URL : APP_DOWNLOAD_URL;
 		}
 
 		/**

+ 4 - 1
HBuilderProjects/shareIndex.html

@@ -1035,12 +1035,15 @@
 		 */
 		var APP_ANDROID_PACKAGE = 'com.alien.Udianzaizhe';
 		var APP_DOWNLOAD_URL = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.alien.Udianzaina';
+		var APP_IOS_DOWNLOAD_URL = 'https://apps.apple.com/cn/app/u店在哪/id6752243565';
 		var APP_IOS_URL_SCHEME = 'shopro://';
 		/** businessSection 未传或其它值时的默认落地页(与 1 相同) */
 		var APP_UNI_STORE_PATH = 'pages/ieisureEntertainment/eightTypeList/delicacyDetails';
 
 		function showDownloadTip() {
-			window.location.href = APP_DOWNLOAD_URL;
+			var ua = navigator.userAgent || '';
+			var isIOS = /iP(hone|od|ad)/i.test(ua) || (navigator.platform === 'MacIntel' && (navigator.maxTouchPoints || 0) > 1);
+			window.location.href = isIOS ? APP_IOS_DOWNLOAD_URL : APP_DOWNLOAD_URL;
 		}
 
 		/** getClientStoreDetail 回填后用于补全 storeType / storeTypeName 等唤起参数 */

+ 4 - 1
HBuilderProjects/shareUndefined.html

@@ -543,11 +543,14 @@
 		 */
 		var APP_ANDROID_PACKAGE = 'com.alien.Udianzaizhe';
 		var APP_DOWNLOAD_URL = 'https://a.app.qq.com/o/simple.jsp?pkgname=com.alien.Udianzaina';
+		var APP_IOS_DOWNLOAD_URL = 'https://apps.apple.com/cn/app/u店在哪/id6752243565';
 		var APP_IOS_URL_SCHEME = 'shopro://';
 		var APP_UNI_STORE_PATH = 'pages/secondHandTransactions/pages/detail/index';
 
 		function showDownloadTip() {
-			window.location.href = APP_DOWNLOAD_URL;
+			var ua = navigator.userAgent || '';
+			var isIOS = /iP(hone|od|ad)/i.test(ua) || (navigator.platform === 'MacIntel' && (navigator.maxTouchPoints || 0) > 1);
+			window.location.href = isIOS ? APP_IOS_DOWNLOAD_URL : APP_DOWNLOAD_URL;
 		}
 
 		function mergeSearchAndHashParams() {