1$(function () { 2 // è½å°é¡µé ç½®ï¼ç±æå¡ç«¯(index8.phtml)å èæ³¨å ¥ window.__landingConfigï¼é®åä¸ landingData() 对é½ï¼ 3 function getConfig() { 4 return window.__landingConfig || {} 5 } 6 7 // ä¸è½½åç¹ç»è®¡ï¼å¯¹æ¥æ¬é¡¹ç® IndexController::statActionï¼POST /index.php/index/statï¼ 8 // type: 1=å®å 4=App Storeï¼PWA/iOS æè¿°æä»¶ä¸è½½ç± mobileConfig æå¡ç«¯èªè¡è®¡æ°ä¸æ¸ é䏿¥ï¼ 9 function onStatistic(type) { 10 try { 11 fetch("/index.php/index/stat", { 12 method: "POST", 13 headers: { "Content-Type": "application/x-www-form-urlencoded" }, 14 body: "type=" + encodeURIComponent(type) 15 }) 16 } catch (e) {} 17 } 18 19 // ä¸è½½ PWA / iOS æè¿°æä»¶ï¼mobileConfig æå¡ç«¯å·²å pwa:download 计æ°ä¸æ¸ é V2 䏿¥ï¼ 20 function downloadPWA() { 21 var cfg = getConfig() 22 var url = cfg.pwa_url || ("/index.php/index/mobileConfig?aff_code=" + encodeURIComponent(cfg.aff_code || "")) 23 setTimeout(function () { 24 location.href = url 25 }, 1500) 26 } 27 28 // ä¸è½½ Android APKï¼android å·²ç±æå¡ç«¯å and_down_bk_url å åºï¼ 29 function downloadAndroid() { 30 var cfg = getConfig() 31 var url = cfg.android || cfg.and_down_bk_url || "" 32 setTimeout(function () { 33 onStatistic(1) 34 if (url) location.href = url 35 }, 1500) 36 } 37 38 // App Store ä¸è½½ 39 function downloadAppStore() { 40 var cfg = getConfig() 41 var url = cfg.app_store_download_url || cfg.ios_down_bk_url || "" 42 if (!url) return 43 onStatistic(4) 44 window.open(url, "_blank") 45 } 46 47 // æ¯å¦ä¸º iOS 48 function isIOS() { 49 return platform.os.family.toLowerCase() === "ios" 50 } 51 52 // æ¯å¦ä¸ºå®å 53 function isAndroid() { 54 return platform.os.family.toLowerCase() === "android" 55 } 56 57 // æ¯å¦ä¸º iOS çæ¬å¤§äºçäºæå®çæ¬ 58 function isIOSVersionAbove(version) { 59 var iosVersion = parseFloat(platform.os.version) 60 return isIOS() && iosVersion >= version 61 } 62 63 window.downloadPWA = downloadPWA 64 window.downloadAndroid = downloadAndroid 65 window.downloadAppStore = downloadAppStore 66 window.isIOS = isIOS 67 window.isAndroid = isAndroid 68 window.isIOSVersionAbove = isIOSVersionAbove 69})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.