555 lines
12 KiB
Vue
555 lines
12 KiB
Vue
<template>
|
||
<div class="mobilePage" ref="page" @scroll="onScroll">
|
||
<header class="topBar">
|
||
<img class="topLogo" :src="logo" alt="黄果漫剧" />
|
||
<span class="topBrand goldText">黄果漫剧</span>
|
||
<a
|
||
class="topLink"
|
||
:href="businessUrl"
|
||
target="_blank"
|
||
rel="noreferrer"
|
||
@click.stop
|
||
>
|
||
<img class="topLinkIcon" :src="businessIcon" alt="" />
|
||
<span class="goldText">官方商务</span>
|
||
</a>
|
||
</header>
|
||
|
||
<div class="track">
|
||
<img
|
||
v-for="item in sections"
|
||
:key="item.id"
|
||
:id="item.id"
|
||
class="section"
|
||
:src="item.src"
|
||
alt=""
|
||
@click.stop="getApkInfo(primaryFlag)"
|
||
/>
|
||
|
||
<footer class="footer">
|
||
<div class="footerBrand">
|
||
<img class="footerLogo" :src="logo" alt="黄果漫剧" />
|
||
<span class="footerName goldText">黄果漫剧</span>
|
||
<span class="footerSlogan">随时随地,开启漫剧世界</span>
|
||
</div>
|
||
<p class="copyright">
|
||
Copyright © 2026 黄果漫剧. All Rights Reserved.
|
||
</p>
|
||
</footer>
|
||
<div class="dockSpacer"></div>
|
||
</div>
|
||
|
||
<div class="floatBar">
|
||
<img
|
||
class="tutorialBtn"
|
||
:src="tutorialImg"
|
||
alt="安装教程"
|
||
@click.stop="showInstallTutorial(isIos ? 'ios' : 'android')"
|
||
/>
|
||
<div class="backTopBox">
|
||
<div
|
||
class="backTop"
|
||
:class="{ show: showBackTop }"
|
||
@click.stop="backToTop"
|
||
>
|
||
<svg viewBox="0 0 24 24" fill="none">
|
||
<path
|
||
d="M5 3.5h14"
|
||
stroke="#050505"
|
||
stroke-width="2.6"
|
||
stroke-linecap="round"
|
||
/>
|
||
<path
|
||
d="M12 21V8.5M6.5 13.5 12 8l5.5 5.5"
|
||
stroke="#050505"
|
||
stroke-width="2.6"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
/>
|
||
</svg>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="dock">
|
||
<div class="dockBtns">
|
||
<div class="dockBtn fast" @click.stop="getApkInfo(primaryBtn.flag)">
|
||
<img class="dockIcon" :src="fastIcon" alt="" />
|
||
<span>{{ primaryBtn.text }}</span>
|
||
</div>
|
||
<div
|
||
v-if="secondaryBtn"
|
||
class="dockBtn backup"
|
||
@click.stop="getApkInfo(secondaryBtn.flag)"
|
||
>
|
||
<img class="dockIcon" :src="iosIcon" alt="" />
|
||
<span class="goldText">{{ secondaryBtn.text }}</span>
|
||
</div>
|
||
</div>
|
||
<p class="dockTip">{{ dockTip }}</p>
|
||
</div>
|
||
|
||
<van-overlay :show="androidPromptShow" z-index="999" class="androidOverlay">
|
||
<div>
|
||
<div class="overlayContent" @click.stop>
|
||
<div class="confirmBtnBox" @click="androidPromptShow = false"></div>
|
||
</div>
|
||
</div>
|
||
</van-overlay>
|
||
<van-overlay :show="iosPromptShow" z-index="999" class="iosOverlay">
|
||
<div>
|
||
<div class="overlayContent" @click.stop>
|
||
<div class="confirmBtnBox" @click="iosPromptShow = false"></div>
|
||
</div>
|
||
</div>
|
||
</van-overlay>
|
||
<van-popup v-model="showTip" class="downTip">
|
||
<div class="downTipTitle">温馨提示</div>
|
||
<div class="downTipContent">请使用Safari浏览器进行下载</div>
|
||
<div class="url">{{ currUrl }}</div>
|
||
<div class="downTipConfirm" @click.stop="doCopy">复制链接</div>
|
||
</van-popup>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
function landImg(name) {
|
||
return require("@/assets/images/land/h5/" + name + ".webp");
|
||
}
|
||
|
||
export default {
|
||
props: {
|
||
os: {},
|
||
switchData: {},
|
||
version: {
|
||
type: String,
|
||
default: "A"
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
androidPromptShow: false,
|
||
iosPromptShow: false,
|
||
showTip: false,
|
||
showBackTop: false,
|
||
currUrl: window.location.href,
|
||
sections: [
|
||
"hero",
|
||
"highlights",
|
||
"types",
|
||
"immerse",
|
||
"wish",
|
||
"creator",
|
||
"about"
|
||
].map(id => ({ id, src: landImg(id) })),
|
||
logo: require("@/assets/images/common/hgmj_logo.png"),
|
||
tutorialImg: landImg("tutorial"),
|
||
fastIcon: require("@/assets/images/land/icon/fast.svg"),
|
||
iosIcon: require("@/assets/images/land/icon/ios.svg"),
|
||
businessIcon: require("@/assets/images/land/icon/business.svg"),
|
||
businessUrl: "https://t.me/jbd125"
|
||
};
|
||
},
|
||
computed: {
|
||
isIos() {
|
||
return !!(this.os && this.os.isPhone);
|
||
},
|
||
hasShopIos() {
|
||
return !!(this.isIos && this.switchData && this.switchData.iosStore);
|
||
},
|
||
// 页面切图点击走的下载方式:有商店包优先商店包
|
||
primaryFlag() {
|
||
return this.hasShopIos ? "shopIos" : true;
|
||
},
|
||
primaryBtn() {
|
||
if (this.hasShopIos) return { text: "商店下载", flag: "shopIos" };
|
||
return { text: this.isIos ? "苹果下载" : "极速下载", flag: true };
|
||
},
|
||
secondaryBtn() {
|
||
if (this.hasShopIos) return { text: "极速下载", flag: true };
|
||
if (!this.isIos) return { text: "备用下载", flag: "androidSpare" };
|
||
return null;
|
||
},
|
||
dockTip() {
|
||
return this.isIos
|
||
? "请使用自带Safari浏览器打开"
|
||
: "下载完成后请先断开网络再安装";
|
||
}
|
||
},
|
||
mounted() {
|
||
let ua = this.os.userAgent.toLowerCase();
|
||
let isSafari =
|
||
ua.indexOf("safari") !== -1 &&
|
||
ua.indexOf("browser") === -1 &&
|
||
ua.indexOf("android") === -1;
|
||
if (!isSafari && this.os.isPhone) {
|
||
this.showTip = true;
|
||
}
|
||
},
|
||
methods: {
|
||
onScroll() {
|
||
this.showBackTop = this.$refs.page.scrollTop > 400;
|
||
},
|
||
backToTop() {
|
||
this.$refs.page.scrollTo({ top: 0, behavior: "smooth" });
|
||
},
|
||
doCopy() {
|
||
this.$copyText(this.currUrl).then(
|
||
() => {
|
||
this.showTip = false;
|
||
},
|
||
() => {
|
||
console.log("复制失败");
|
||
}
|
||
);
|
||
},
|
||
async showInstallTutorial(type) {
|
||
if (type === "ios") {
|
||
this.iosPromptShow = true;
|
||
} else {
|
||
this.androidPromptShow = true;
|
||
}
|
||
},
|
||
async getApkInfo(flag) {
|
||
let type = this.os.isPhone ? "ios" : "android";
|
||
if (flag === "shopIos") {
|
||
type = "shopIos";
|
||
}
|
||
if (flag === "androidSpare") {
|
||
type = "androidSpare";
|
||
}
|
||
if (flag && flag !== "shopIos") {
|
||
await this.showInstallTutorial(type === "ios" ? "ios" : "android");
|
||
}
|
||
setTimeout(() => {
|
||
this.$emit("getApkInfo", type);
|
||
}, 500);
|
||
}
|
||
}
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
$bg: #0b0b0b;
|
||
|
||
.goldText {
|
||
display: inline-block;
|
||
background: linear-gradient(180deg, #f3bc58, #cc8a33);
|
||
-webkit-background-clip: text;
|
||
background-clip: text;
|
||
color: transparent;
|
||
}
|
||
|
||
.mobilePage {
|
||
height: 100%;
|
||
width: 100%;
|
||
overflow-x: hidden;
|
||
overflow-y: auto;
|
||
-webkit-overflow-scrolling: touch;
|
||
background: $bg;
|
||
color: #fff;
|
||
font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
||
}
|
||
|
||
/* 顶部栏(同原站 layout4-h5-header) */
|
||
.topBar {
|
||
position: fixed;
|
||
z-index: 30;
|
||
left: 0;
|
||
right: 0;
|
||
top: 0;
|
||
height: 55px;
|
||
padding: 0 19px 0 15px;
|
||
display: flex;
|
||
align-items: center;
|
||
background: $bg;
|
||
|
||
.topLogo {
|
||
width: 34px;
|
||
height: 34px;
|
||
border-radius: 9px;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.topBrand {
|
||
margin-left: 6px;
|
||
font-size: 20px;
|
||
font-weight: 800;
|
||
font-style: italic;
|
||
padding-right: 0.15em;
|
||
letter-spacing: 1px;
|
||
}
|
||
.topLink {
|
||
margin-left: auto;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
|
||
.topLinkIcon {
|
||
width: 23px;
|
||
height: 20px;
|
||
object-fit: contain;
|
||
}
|
||
|
||
span {
|
||
font-size: 12px;
|
||
line-height: 17px;
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 分区切图 */
|
||
.track .section {
|
||
display: block;
|
||
width: 100%;
|
||
}
|
||
|
||
.footer {
|
||
height: 114px;
|
||
/* 右侧留出浮动按钮(安装教程、回到顶部)的位置,避免遮挡 */
|
||
padding: 22px 72px 0 12px;
|
||
box-sizing: border-box;
|
||
background: $bg;
|
||
text-align: center;
|
||
|
||
.footerBrand {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.footerLogo {
|
||
width: 26px;
|
||
height: 26px;
|
||
border-radius: 7px;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.footerName {
|
||
margin-left: 5px;
|
||
font-size: 16px;
|
||
font-weight: 800;
|
||
font-style: italic;
|
||
padding-right: 0.15em;
|
||
}
|
||
|
||
.footerSlogan {
|
||
margin-left: 14px;
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
color: #6e6e6e;
|
||
}
|
||
|
||
.copyright {
|
||
margin-top: 16px;
|
||
font-size: 10px;
|
||
color: #4d4d4d;
|
||
white-space: nowrap;
|
||
}
|
||
}
|
||
|
||
.dockSpacer {
|
||
height: calc(125px + env(safe-area-inset-bottom));
|
||
}
|
||
|
||
/* 右侧浮标:安装教程 + 返回顶部 */
|
||
.floatBar {
|
||
position: fixed;
|
||
z-index: 20;
|
||
right: 10px;
|
||
bottom: calc(137px + env(safe-area-inset-bottom));
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 12px;
|
||
|
||
.tutorialBtn {
|
||
display: block;
|
||
width: 52px;
|
||
height: 59px;
|
||
object-fit: contain;
|
||
}
|
||
|
||
.backTopBox {
|
||
width: 44px;
|
||
height: 44px;
|
||
}
|
||
|
||
.backTop {
|
||
width: 100%;
|
||
height: 100%;
|
||
border-radius: 50%;
|
||
background: linear-gradient(180deg, #f7d48d, #e3a64f);
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
opacity: 0;
|
||
transform: translateY(8px);
|
||
pointer-events: none;
|
||
transition: opacity 0.25s ease, transform 0.25s ease;
|
||
|
||
&.show {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
pointer-events: auto;
|
||
}
|
||
|
||
svg {
|
||
width: 55%;
|
||
height: 55%;
|
||
}
|
||
}
|
||
}
|
||
|
||
/* 底部下载栏(同原站 l8-dock) */
|
||
.dock {
|
||
position: fixed;
|
||
z-index: 30;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
padding: 12px 0 calc(10px + env(safe-area-inset-bottom));
|
||
border-top: 1px solid rgba(232, 172, 79, 0.35);
|
||
border-radius: 16px 16px 0 0;
|
||
background: linear-gradient(180deg, rgba(11, 11, 11, 0.92), $bg 55%);
|
||
|
||
.dockBtns {
|
||
display: flex;
|
||
justify-content: center;
|
||
gap: 10px;
|
||
}
|
||
|
||
.dockBtn {
|
||
width: 172.5px;
|
||
height: 49px;
|
||
border-radius: 10px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
box-sizing: border-box;
|
||
|
||
span {
|
||
font-size: 17px;
|
||
font-weight: 540;
|
||
line-height: 1;
|
||
letter-spacing: 0.85px;
|
||
}
|
||
|
||
&.fast {
|
||
background: linear-gradient(180deg, #f3bc58, #cc8a33);
|
||
|
||
span {
|
||
color: #050505;
|
||
}
|
||
}
|
||
|
||
&.backup {
|
||
border: 1px solid #e8ac4f;
|
||
background: linear-gradient(180deg, #352c1d 39%, rgba(1, 1, 1, 0.32) 95%);
|
||
}
|
||
|
||
.dockIcon {
|
||
width: 26px;
|
||
height: 26px;
|
||
margin-right: 4px;
|
||
}
|
||
}
|
||
|
||
.dockTip {
|
||
margin-top: 10px;
|
||
text-align: center;
|
||
font-size: 10px;
|
||
font-weight: 340;
|
||
line-height: 12px;
|
||
color: #e9af4e;
|
||
}
|
||
}
|
||
|
||
/* 安装教程弹窗 */
|
||
.androidOverlay,
|
||
.iosOverlay {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
|
||
.overlayContent {
|
||
width: 297px;
|
||
height: 441px;
|
||
background-repeat: no-repeat;
|
||
background-size: 100% 100%;
|
||
box-sizing: border-box;
|
||
}
|
||
}
|
||
|
||
.androidOverlay .overlayContent {
|
||
background-image: url("./../../../assets/images/mobile1/android_tip.webp");
|
||
border-radius: 12px;
|
||
padding-top: 380px;
|
||
|
||
.confirmBtnBox {
|
||
height: 36px;
|
||
width: 140px;
|
||
border-radius: 40px;
|
||
margin: 0 auto;
|
||
}
|
||
}
|
||
|
||
.iosOverlay .overlayContent {
|
||
background-image: url("./../../../assets/images/mobile1/iosTip.webp");
|
||
border-radius: 14px;
|
||
padding-top: 382px;
|
||
|
||
.confirmBtnBox {
|
||
height: 33px;
|
||
width: 129px;
|
||
border-radius: 16.5px;
|
||
margin: 0 auto;
|
||
}
|
||
}
|
||
|
||
.downTip {
|
||
width: 297px;
|
||
border-radius: 10px;
|
||
padding: 18px;
|
||
box-sizing: border-box;
|
||
text-align: center;
|
||
background: #1a1510;
|
||
color: #fff;
|
||
border: 1px solid rgba(232, 172, 79, 0.35);
|
||
|
||
.downTipTitle {
|
||
font-size: 18px;
|
||
margin-bottom: 34px;
|
||
color: #e9af4e;
|
||
}
|
||
|
||
.downTipContent {
|
||
white-space: nowrap;
|
||
font-size: 15px;
|
||
}
|
||
|
||
.url {
|
||
font-size: 15px;
|
||
margin-top: 16px;
|
||
text-align: left;
|
||
word-break: break-all;
|
||
color: #c9c2b5;
|
||
}
|
||
|
||
.downTipConfirm {
|
||
font-size: 15px;
|
||
width: 160px;
|
||
height: 34px;
|
||
border-radius: 40px;
|
||
margin: 32px auto 0;
|
||
color: #050505;
|
||
background: linear-gradient(180deg, #f3bc58, #cc8a33);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
}
|
||
</style>
|