267 lines
9.1 KiB
HTML
267 lines
9.1 KiB
HTML
<!doctype html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title id="page-title">彩先知 - APP下载</title>
|
|
<script src="../public/css/layui/layui.js"></script>
|
|
<script src="../config.js"></script>
|
|
<script src="../utils/ApiClient.js"></script>
|
|
<script src="../utils/DateUtil.js"></script>
|
|
<script src="../utils/CommonUtil.js"></script>
|
|
<script src="../public/js/qrcode.min.js"></script>
|
|
<link rel="stylesheet" href="../public/css/layui/css/layui.css" />
|
|
<link rel="stylesheet" href="../public/css/public.css" />
|
|
<link rel="stylesheet" href="../public/css/appdown.css" />
|
|
</head>
|
|
<body>
|
|
<!-- Header -->
|
|
<nav class="topbar" id="navbar">
|
|
<div class="topbar__inner">
|
|
<a href="index.html" class="topbar__brand">
|
|
<img
|
|
src="../images/home-logo.png"
|
|
alt="彩先知"
|
|
class="topbar__logo"
|
|
/>
|
|
</a>
|
|
<div class="topbar__nav" id="navLotteryItems">
|
|
<a href="index.html" class="topbar__nav-link">首页</a>
|
|
</div>
|
|
<div class="topbar__user">
|
|
<div id="notLoggedInBox" class="topbar__guest">
|
|
<a href="login.html" class="topbar__btn topbar__btn--ghost">登录</a>
|
|
<a href="reg.html" class="topbar__btn topbar__btn--primary"
|
|
>免费注册</a
|
|
>
|
|
</div>
|
|
<div id="loggedInBox" class="topbar__logged" style="display: none">
|
|
<a href="usercenter.html" class="topbar__profile">
|
|
<img
|
|
id="userAvatar"
|
|
src="../public/img/userimg.png"
|
|
alt=""
|
|
class="topbar__avatar"
|
|
/>
|
|
<div class="topbar__meta">
|
|
<span id="userName" class="topbar__uname">用户</span>
|
|
<span id="userLevel" class="topbar__ubadge">会员</span>
|
|
</div>
|
|
</a>
|
|
<button class="topbar__btn topbar__btn--logout" onclick="logout()">
|
|
退出登录
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Main Content -->
|
|
<main class="page-main">
|
|
<!-- Hero with QR -->
|
|
<div class="download-hero">
|
|
<div class="hero-text">
|
|
<h1>下载彩先知<span>APP</span></h1>
|
|
<p>随时随地查看预测分析,不错过任何精彩推荐</p>
|
|
<p>扫码下载,畅享移动端体验</p>
|
|
</div>
|
|
<div class="hero-qr">
|
|
<div class="hero-qr-box">
|
|
<img id="downloadQrImg" src="" alt="下载二维码" />
|
|
</div>
|
|
<div class="hero-qr-label">扫描二维码下载APP</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Download Buttons -->
|
|
<div class="download-cards">
|
|
<div class="dl-card">
|
|
<div class="dl-card-icon android">
|
|
<i class="layui-icon layui-icon-android"></i>
|
|
</div>
|
|
<h3>Android 下载</h3>
|
|
<p>支持 Android 5.0 及以上系统<br />安装包大小约 15MB</p>
|
|
<a href="#" class="dl-btn android-btn" id="androidBtn"
|
|
>Android 下载</a
|
|
>
|
|
</div>
|
|
<div class="dl-card">
|
|
<div class="dl-card-icon ios">
|
|
<i class="layui-icon layui-icon-ios"></i>
|
|
</div>
|
|
<h3>iOS 下载</h3>
|
|
<p>支持 iOS 12.0 及以上系统<br />App Store 搜索"彩先知"</p>
|
|
<a href="#" class="dl-btn ios-btn" id="iosBtn">iOS 下载</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Features -->
|
|
<div class="features-section">
|
|
<div class="features-title">APP特色功能</div>
|
|
<div class="features-grid">
|
|
<div class="feature-item">
|
|
<div class="feature-icon">
|
|
<i class="layui-icon layui-icon-notice"></i>
|
|
</div>
|
|
<div class="feature-name">实时推送</div>
|
|
<div class="feature-desc">开奖结果即时通知</div>
|
|
</div>
|
|
<div class="feature-item">
|
|
<div class="feature-icon">
|
|
<i class="layui-icon layui-icon-chart"></i>
|
|
</div>
|
|
<div class="feature-name">走势分析</div>
|
|
<div class="feature-desc">专业走势图表工具</div>
|
|
</div>
|
|
<div class="feature-item">
|
|
<div class="feature-icon">
|
|
<i class="layui-icon layui-icon-star"></i>
|
|
</div>
|
|
<div class="feature-name">专家预测</div>
|
|
<div class="feature-desc">权威专家精准推荐</div>
|
|
</div>
|
|
<div class="feature-item">
|
|
<div class="feature-icon">
|
|
<i class="layui-icon layui-icon-group"></i>
|
|
</div>
|
|
<div class="feature-name">社区交流</div>
|
|
<div class="feature-desc">彩民互动交流平台</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<!-- Footer -->
|
|
<footer class="site-footer">
|
|
<div class="site-footer__inner">
|
|
<img
|
|
src="../images/home-logo.png"
|
|
alt="彩先知"
|
|
class="site-footer__logo"
|
|
/>
|
|
<p id="copyright-info">彩先知以开奖数据、免费文章、资讯推荐为核心</p>
|
|
<div class="site-footer__meta">
|
|
<a
|
|
id="beian"
|
|
href="https://beian.miit.gov.cn/"
|
|
target="_blank"
|
|
style="font-size: 12px; color: rgba(255, 255, 255, 0.5)"
|
|
>工信部备案号</a
|
|
>
|
|
<span id="additional-info">本站仅供数据分析参考</span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
<button
|
|
class="gotop"
|
|
id="backTop"
|
|
type="button"
|
|
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
>
|
|
↑
|
|
</button>
|
|
|
|
<script>
|
|
layui.use(["layer", "jquery"], function () {
|
|
var layer = layui.layer;
|
|
var $ = layui.$;
|
|
|
|
// Load page config
|
|
CommonUtil.loadPageConfig({ ads: false, links: false });
|
|
|
|
// Check login state for topbar
|
|
checkLogin();
|
|
renderNav();
|
|
|
|
function checkLogin() {
|
|
var token = CommonUtil.getToken();
|
|
if (token) {
|
|
$("#notLoggedInBox").hide();
|
|
$("#loggedInBox").css("display", "flex");
|
|
CommonUtil.getCurrentUserDetail(
|
|
function (data) {
|
|
if (data) {
|
|
$("#userName").text(data.nickName || "用户");
|
|
$("#userLevel").text(data.isExpert === "1" ? "专家" : "会员");
|
|
if (data.avatar) {
|
|
$("#userAvatar").attr("src", data.avatar);
|
|
}
|
|
}
|
|
},
|
|
function () {
|
|
$("#notLoggedInBox").show();
|
|
$("#loggedInBox").hide();
|
|
},
|
|
);
|
|
}
|
|
}
|
|
|
|
function renderNav() {
|
|
ApiClient.post("/api/web/menu/getFormatList", {}).then(
|
|
function (res) {
|
|
if (res.code !== 0 || !res.data) return;
|
|
var $nav = $("#navLotteryItems");
|
|
$nav.find(".topbar__nav-link").not(":first").remove();
|
|
$.each(res.data, function (i, item) {
|
|
$nav.append(
|
|
'<a href="cai.html?id=' +
|
|
item.suoxie +
|
|
'" class="topbar__nav-link">' +
|
|
item.name +
|
|
"</a>",
|
|
);
|
|
});
|
|
},
|
|
);
|
|
}
|
|
|
|
$(window).on("scroll", function () {
|
|
$(window).scrollTop() > 320
|
|
? $("#backTop").addClass("is-visible")
|
|
: $("#backTop").removeClass("is-visible");
|
|
});
|
|
var downloadUrl = window.location.origin;
|
|
CommonUtil.generateQRCode(downloadUrl, "downloadQrImg", {
|
|
width: 180,
|
|
height: 180,
|
|
colorDark: "#102b6a",
|
|
colorLight: "#ffffff",
|
|
});
|
|
|
|
// Load download links from page config
|
|
ApiClient.post("/api/web/index", {})
|
|
.then(function (result) {
|
|
if (result.data && result.data.webConfigs) {
|
|
var configs = result.data.webConfigs;
|
|
configs.forEach(function (item) {
|
|
if (item.type === "android_download_url") {
|
|
$("#androidBtn").attr("href", item.content);
|
|
} else if (item.type === "ios_download_url") {
|
|
$("#iosBtn").attr("href", item.content);
|
|
} else if (item.type === "app_download_url") {
|
|
CommonUtil.generateQRCode(item.content, "downloadQrImg", {
|
|
width: 180,
|
|
height: 180,
|
|
colorDark: "#102b6a",
|
|
colorLight: "#ffffff",
|
|
});
|
|
}
|
|
});
|
|
}
|
|
})
|
|
.catch(function () {});
|
|
|
|
// Default fallback - generate QR for current origin
|
|
if (!$("#downloadQrImg").attr("src")) {
|
|
CommonUtil.generateQRCode(window.location.origin, "downloadQrImg", {
|
|
width: 180,
|
|
height: 180,
|
|
colorDark: "#102b6a",
|
|
colorLight: "#ffffff",
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|