PageSourceSearch

https://www.btldnywm.com/landing8/js/utils.js?v=20260721b

js btldnywm.com collected 2026-09-26 05:35:06 UTC 2,181 bytes, 69 lines download raw bytes

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.