This commit is contained in:
谢宇宁
2026-10-12 21:19:42 +07:00
parent e31e3315e9
commit 69c1ff6f11
22 changed files with 842 additions and 636 deletions
+350 -436
View File
@@ -1,79 +1,82 @@
<template>
<div class="mobilePage">
<div class="headerBox" :class="{ isIos: isIos }">
<div class="navBrand">
<img class="logoBox" :src="logoHeader" alt="黄果漫剧" />
<div class="brandCopy">
<p class="brandTitle">黄果漫剧 原创基地</p>
<p class="brandDesc">沉浸体验 极速观影</p>
<div class="mobilePage" ref="page" @scroll="onScroll">
<header class="topBar">
<img class="topLogo" :src="logo" alt="黄果漫剧" />
<span class="topBrand goldText">黄果漫剧</span>
</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
class="iosBanner"
@click.stop="getApkInfo(hasShopIos ? 'shopIos' : true, $event)"
></div>
<div
v-if="isIos"
class="iosLiteBar"
@click.stop="getApkInfo(true, $event)"
></div>
</div>
<div class="pageBody" :class="{ isIos: isIos, hasShop: hasShopIos }">
<div class="contentPanel">
<van-tabs
v-model="tabActive"
title-active-color="#ffffff"
title-inactive-color="#ffffff"
:ellipsis="false"
animated
:lazy-render="false"
:before-change="onTabBeforeChange"
class="vantTabs"
<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)"
>
<van-tab
:title="item.label"
:name="item.value"
v-for="item in tabs"
:key="item.value"
>
<div
class="main"
@click.stop="getApkInfo(hasShopIos ? 'shopIos' : true, $event)"
>
<div
class="contentGrid"
:class="{ portrait: item.value === 'ai' }"
>
<div
class="gridItem"
v-for="card in tabContents[item.value]"
:key="card.id"
>
<img class="gridThumb" :src="card.thumb" alt="" />
<p class="gridText">{{ card.title }}</p>
</div>
</div>
</div>
</van-tab>
</van-tabs>
<img class="dockIcon" :src="iosIcon" alt="" />
<span class="goldText">{{ secondaryBtn.text }}</span>
</div>
</div>
</div>
<div
class="downloadIosAppStore"
@click.stop="getApkInfo('shopIos', $event)"
v-if="hasShopIos && showIosTip"
>
<div class="close-btn" @click.stop="showIosTip = false"></div>
</div>
<div class="bottomBar" :class="{ isIos: isIos, hasShop: hasShopIos }">
<div
class="bottomBox"
:class="{ ios: isIos }"
@click.stop="getApkInfo(hasShopIos ? 'shopIos' : true, $event)"
></div>
<p class="dockTip">{{ dockTip }}</p>
</div>
<van-overlay :show="androidPromptShow" z-index="999" class="androidOverlay">
@@ -100,7 +103,9 @@
</template>
<script>
import tabContents from "./mobile1Contents";
function landImg(name) {
return require("@/assets/images/land/h5/" + name + ".webp");
}
export default {
props: {
@@ -116,19 +121,21 @@ export default {
androidPromptShow: false,
iosPromptShow: false,
showTip: false,
showBackTop: false,
currUrl: window.location.href,
tabActive: "ai",
tabTimer: null,
tabs: [
{ label: "AI短剧", value: "ai" },
{ label: "推荐", value: "hot" },
{ label: "国产", value: "country" },
{ label: "乱伦", value: "incest" },
{ label: "刚满18", value: "adult" }
],
tabContents,
showIosTip: true,
logoHeader: require("@/assets/images/common/hgmj_logo.png")
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")
};
},
computed: {
@@ -137,6 +144,24 @@ export default {
},
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() {
@@ -148,15 +173,13 @@ export default {
if (!isSafari && this.os.isPhone) {
this.showTip = true;
}
this.startTabAutoPlay();
},
beforeDestroy() {
this.clearTabAutoPlay();
},
methods: {
getTabName() {
const tab = this.tabs.find(item => item.value === this.tabActive);
return tab ? tab.label : "推荐";
onScroll() {
this.showBackTop = this.$refs.page.scrollTop > 400;
},
backToTop() {
this.$refs.page.scrollTo({ top: 0, behavior: "smooth" });
},
doCopy() {
this.$copyText(this.currUrl).then(
@@ -168,25 +191,6 @@ export default {
}
);
},
startTabAutoPlay() {
this.clearTabAutoPlay();
this.tabTimer = setInterval(() => {
const i = this.tabs.findIndex(tab => tab.value === this.tabActive);
const next = this.tabs[(i + 1) % this.tabs.length];
this.tabActive = next.value;
}, 5000);
},
clearTabAutoPlay() {
if (this.tabTimer) {
clearInterval(this.tabTimer);
this.tabTimer = null;
}
},
onTabBeforeChange() {
this.getApkInfo(this.hasShopIos ? "shopIos" : true);
this.startTabAutoPlay();
return false;
},
async showInstallTutorial(type) {
if (type === "ios") {
this.iosPromptShow = true;
@@ -203,7 +207,7 @@ export default {
type = "androidSpare";
}
if (flag && flag !== "shopIos") {
await this.showInstallTutorial(type);
await this.showInstallTutorial(type === "ios" ? "ios" : "android");
}
setTimeout(() => {
this.$emit("getApkInfo", type);
@@ -214,360 +218,265 @@ export default {
</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%;
background: linear-gradient(180deg, #0c0c0d 10.63%, #320606 100%);
overflow: hidden;
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;
}
.headerBox {
position: fixed;
z-index: 100;
left: 0;
top: 0;
width: 100%;
height: 217px;
background: transparent;
box-sizing: border-box;
/* 顶部栏(同原站 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;
&::before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 67px;
background: linear-gradient(187deg, #230d16 10.4%, #f3561f 201.71%);
opacity: 0.9;
z-index: 0;
}
&.isIos {
height: 258px;
}
.iosBanner {
position: absolute;
left: 0;
top: 67px;
width: 375px;
height: 150px;
z-index: 1;
background: url("./../../../assets/images/mobile1/banner-ios.webp")
no-repeat center center;
background-size: 100% 100%;
}
.iosLiteBar {
position: absolute;
left: 0;
top: 217px;
width: 375px;
height: 41px;
z-index: 1;
background: url("./../../../assets/images/mobile1/btn-ios.webp") no-repeat
center center;
background-size: 100% 100%;
}
.navBrand {
position: absolute;
left: 17px;
top: 13px;
z-index: 2;
display: flex;
align-items: center;
gap: 7px;
.logoBox {
display: block;
width: 46px;
height: 46px;
border-radius: 12px;
object-fit: cover;
}
.brandCopy {
display: flex;
flex-direction: column;
justify-content: center;
.brandTitle {
margin: 0;
color: #f9df1b;
font-size: 15px;
font-weight: 800;
line-height: 1.4;
white-space: nowrap;
}
.brandDesc {
margin: 0;
color: #fff;
font-size: 14px;
font-weight: 800;
line-height: 1.4;
white-space: nowrap;
}
}
}
.topLogo {
width: 34px;
height: 34px;
border-radius: 9px;
object-fit: cover;
}
.pageBody {
position: absolute;
left: 0;
right: 0;
top: 227px;
bottom: calc(74px + env(safe-area-inset-bottom));
padding: 0 15px;
width: 100%;
box-sizing: border-box;
overflow: hidden;
.topBrand {
margin-left: 6px;
font-size: 20px;
font-weight: 800;
font-style: italic;
padding-right: 0.15em;
letter-spacing: 1px;
}
}
/* 分区切图 */
.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;
flex-direction: column;
&.isIos {
top: 268px;
}
&.isIos.hasShop {
bottom: calc(110px + env(safe-area-inset-bottom));
}
align-items: center;
justify-content: center;
white-space: nowrap;
}
.contentPanel {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
background: #22030f;
border: 1px solid #8f450c;
border-radius: 21px;
padding: 9px 6px 16px;
box-sizing: border-box;
.footerLogo {
width: 26px;
height: 26px;
border-radius: 7px;
object-fit: cover;
}
.vantTabs {
.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%;
flex: 1;
min-height: 0;
height: 100%;
border-radius: 50%;
background: linear-gradient(180deg, #f7d48d, #e3a64f);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
display: flex;
flex-direction: column;
overflow: hidden;
background-color: transparent;
align-items: center;
justify-content: center;
opacity: 0;
transform: translateY(8px);
pointer-events: none;
transition: opacity 0.25s ease, transform 0.25s ease;
::v-deep .van-tabs__wrap {
flex-shrink: 0;
height: auto;
width: 100%;
position: relative;
z-index: 2;
padding: 0 0 8px;
box-sizing: border-box;
background: #22030f;
.van-tabs__nav {
height: 36px;
padding: 4px;
background: #5a170d;
border-radius: 969px;
box-sizing: border-box;
}
.van-tab {
flex: 1;
min-width: 0;
height: 28px;
line-height: 28px;
padding: 0;
margin: 0;
font-size: 12px;
color: #fff;
border-radius: 904px;
background: transparent;
}
.van-tab--active {
background: linear-gradient(180deg, #f1801f 0%, #f53d1f 100%);
color: #fff;
font-weight: 500;
}
.van-tab__text {
font-size: 12px;
line-height: 28px;
}
.van-tabs__line {
display: none;
}
&.show {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
::v-deep .van-tabs__content {
flex: 1;
min-height: 0;
overflow: hidden;
padding-top: 0;
}
::v-deep .van-tabs__track,
::v-deep .van-tab__pane-wrapper,
::v-deep .van-tab__pane {
height: 100%;
}
.main {
height: 100%;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
.contentGrid {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 12px 0;
padding: 0 3px;
.gridItem {
width: 157px;
.gridThumb {
width: 157px;
height: 90px;
display: block;
border-radius: 8px;
object-fit: cover;
}
.gridText {
margin-top: 9px;
color: #fff;
font-size: 10px;
line-height: 17px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
&.portrait {
.gridItem {
width: 157px;
.gridThumb {
width: 157px;
height: 228px;
border-radius: 7.5px;
}
}
}
}
svg {
width: 55%;
height: 55%;
}
}
}
.bottomBar {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
z-index: 99;
padding-bottom: env(safe-area-inset-bottom);
/* 底部下载栏(同原站 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;
background: transparent;
&.isIos {
padding-bottom: env(safe-area-inset-bottom);
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;
}
}
.bottomBox {
height: 64px;
width: 375px;
.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;
background: url("./../../../assets/images/mobile1/bottomBg.webp") no-repeat
center center;
background-size: 100% 100%;
}
}
.shopIos {
display: none;
}
.iosOverlay .overlayContent {
background-image: url("./../../../assets/images/mobile1/iosTip.webp");
border-radius: 14px;
padding-top: 382px;
.downloadIosAppStore {
height: 32px;
width: 298px;
background: url("./../../../assets/images/mobile1/shopIos.webp") no-repeat
center center;
background-size: 100% 100%;
position: fixed;
left: 0;
bottom: calc(64px + 14px + env(safe-area-inset-bottom));
z-index: 998;
border: 0.6px solid #1f1e1c;
border-radius: 0 16px 16px 0;
box-sizing: border-box;
overflow: visible;
.close-btn {
height: 17px;
width: 17px;
background: url("./../../../assets/images/mobile1/shopClose.svg")
no-repeat center center;
background-size: 100% 100%;
position: absolute;
right: -2px;
top: -7px;
}
}
.androidOverlay {
display: flex;
align-items: center;
justify-content: center;
.overlayContent {
width: 297px;
height: 441px;
background: url("./../../../assets/images/mobile1/android_tip.webp")
no-repeat;
background-size: 100% 100%;
border-radius: 12px;
padding-top: 380px;
box-sizing: border-box;
.confirmBtnBox {
height: 36px;
width: 140px;
border-radius: 40px;
margin: 0 auto;
}
}
}
.iosOverlay {
display: flex;
align-items: center;
justify-content: center;
.overlayContent {
width: 297px;
height: 441px;
background: url("./../../../assets/images/mobile1/iosTip.webp") no-repeat;
background-size: 100% 100%;
border-radius: 14px;
padding-top: 382px;
box-sizing: border-box;
.confirmBtnBox {
height: 33px;
width: 129px;
border-radius: 16.5px;
margin: 0 auto;
}
}
.confirmBtnBox {
height: 33px;
width: 129px;
border-radius: 16.5px;
margin: 0 auto;
}
}
@@ -577,10 +486,14 @@ export default {
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 {
@@ -593,16 +506,17 @@ export default {
margin-top: 16px;
text-align: left;
word-break: break-all;
color: #c9c2b5;
}
.downTipConfirm {
font-size: 15px;
width: 160px;
height: 30px;
height: 34px;
border-radius: 40px;
margin: 32px auto 0;
color: #fff;
background: #f53d1f;
color: #050505;
background: linear-gradient(180deg, #f3bc58, #cc8a33);
display: flex;
align-items: center;
justify-content: center;