@@ -1,39 +1,42 @@
< template >
< view style = "padding-bottom: 20rpx;" >
<!-- 自定义导航栏 ( 带搜索 ) -- >
<!-- # ifdef H5 -- >
< u-navbar :background = "background" height = "60" :is-back = "false" :title = "title" :border-bottom = "false" >
<!-- # endif -- >
<!-- # ifndef H5 -- >
< u-navbar height = "60" :background = "background" :is-back = "false" :title = "title" :border-bottom = "false" >
< template v-if = "showSearch" >
< ! - - 自定义导航栏 ( 带搜索 ) - - >
<!-- # ifdef H5 -- >
< u-navbar :background = "background" height = "60" :is-back = "false" :title = "title" :border-bottom = "false" >
<!-- # endif -- >
<!-- # ifdef MP - TOUTIAO -- >
< view :style = "{marginTop:barHeight/2+'px'}" class = "nvavBar flex" style = "padding-left: 80rpx; ">
<!-- # ifn def H5 -- >
< u-navbar height = "60" :background = "background" :is-back = "false" :title = "title" :border-bottom = "false ">
<!-- # endif -- >
<!-- # ifn def MP - TOUTIAO -- >
< view class = "nvavBar flex justify-center ">
<!-- # ifdef MP - TOUTIAO -- >
< view :style = "{marginTop:barHeight/2+'px'}" class = "nvavBar flex" style = "padding-left: 80rpx; ">
<!-- # endif -- >
< view class = "nvavBar-box" :style = "{height:barHeight>0?barHeight+'px':'70rpx'}" >
<!-- # ifdef H5 || APP -- >
< view @click.stop ="goSearch" class = "nvavBar-boxs flex align-center" style = "width: 100%;" >
< u-search p laceholder -color = " # cccccc " disabled search -icon -color = " # ff7581 "
:show-action = "false" placeholder = "今日正在热播" v-model = "keyword" > < / u -search >
< / view >
<!-- # endif -- >
<!-- # ifndef H5 || APP -- >
< view @click.stop ="goSearch" class = "nvavBar-boxs flex align-center"
: style = "{width: 'calc(100% - '+barWidth+'px);'}" >
< u-search placeholder -color = " # cccccc " disabled search -icon -color = " # ff7581 "
:show-action = "false" placeholder = "今日正在热播" v-model = "keyword" > < / u -search >
< / view >
<!-- # endif -- >
<!-- # ifndef MP - TOUTIAO -- >
< view class = "nvavBar flex justify-center" >
<!-- # endif -- >
< view c lass = "nvavBar-box" :style = "{height:barHeight>0?barHeight+'px':'70rpx'}" >
<!-- # ifdef H5 || APP -- >
< view @click.stop ="goSearch" class = "nvavBar-boxs flex align-center"
style = "width: 100%;" >
< u-search placeholder -color = " # cccccc " disabled search -icon -color = " # ff7581 "
:show-action = "false" placeholder = "今日正在热播" v-model = "keyword" > < / u -search >
< / view >
<!-- # endif -- >
<!-- # ifndef H5 || APP -- >
< view @click.stop ="goSearch" class = "nvavBar-boxs flex align-center"
: style = "{width: 'calc(100% - '+barWidth+'px);'}" >
< u-search placeholder -color = " # cccccc " disabled search -icon -color = " # ff7581 "
:show-action = "false" placeholder = "今日正在热播" v-model = "keyword" > < / u -search >
< / view >
<!-- # endif -- >
< / view >
< / view >
< / view >
< / u-navbar >
< view class = "bgColorTop" >
<!-- < view v-if = "homeTypeSel != '否'" class="topTabs flex align-center justify-center" >
< / u-navbar >
< / template >
< view class = "bgColorTop " :class = "{'top-zhanwei':!showSearch} " >
<!-- < view v-if = "homeTypeSel != '否'" class="topTabs flex align-center justify-center" >
< view class = "topTabs-box" >
< scroll-view class = "topTabs-box-H" scroll -x = " true " >
< view class = "topTabs-box-H-item" @tap ="typeSel(index)"
@@ -43,161 +46,164 @@
< / scroll -view >
< / view >
< / view > -- >
<!-- 轮播图 -- >
< view v-if = "TabCur == 0" class="swipers flex align-center justify-center" >
< view class = "swipers-box" >
< swiper class = "swipers-box" :indicator-dots = "false" :autoplay = "true" interval = "5000"
duration = "500" :circular = "true" >
< swiper-item class = "swipers-box" v-for = "(item,index) in swiperList" : key = 'index'
@tap ="goPage(item)" >
< image :src = "item.imageUrl" mode = "aspectFill" style = "width: 100%;height:100%;" > < / image >
<!-- 轮播图 -- >
< view v-if = "TabCur == 0" class="swipers flex align-center justify-center" >
< view class = "swipers-box" >
< swiper class = "swipers-box" :indicator-dots = "false" :autoplay = "true" interval = "5000" duration = "500"
:circular = "true" >
< swiper-item class = "swipers-box" v-for = "(item,index) in swiperList" : key = 'index'
@tap ="goPage(item)" >
< image :src = "item.imageUrl" mode = "aspectFill" style = "width: 100%;height:100%;" > < / image >
< / swiper-item >
< / swiper >
< / view >
< / view >
< / view >
< block v-if = "TabCur == 0" >
< ! - - 公告 - - >
< view class = "gg flex align-center justify-center" v-if = "noticeList.length>0" >
< view class = "gg-box flex align-center justify-between" >
< image src = "../../static/images/index/ggIcon.png" mode = "" > < / image >
< swiper :autoplay = "true" :vertical = "true" :interval = "4000" :circular = "true" :indicator-dots = "false"
class = "gg-box-swiper" >
< block v-for = "(item, index) in noticeList" >
< swiper -item @ tap = 'goMsg(item.url)' >
< view class = "gg-box-swiper-t" > { { item . title } } < / view >
< / swiper-item >
< / block >
< / swiper >
< / view >
< / view >
<!-- 金刚区 -- >
< view class = "centers" >
< view class = "centers-cistrict flex align-center justify-center" v-if = "gridList.length > 0" >
< view class = "centers-cistrict-box" >
< swiper :indicator-dots = "false" class = "centers-cistrict-boxs" :autoplay = "false" :interval = "3000"
:duration = "300" >
< swiper-item v-for = "(item,index) in gridList" :key="index" >
< view class = "swiper-item flex align-center justify-between" >
< view class = "swiper-item-s" @click ="goGridList(ite)" v-for = "(ite,ind) in item.child"
:key = "ind" >
< view class = "swiper-item-s-img" >
< image :src = "ite.imageUrl" mode = "aspectFill" > < / image >
< / view >
< view class = "swiper-item-s-txt" >
{ { ite . name } }
< / view >
< / view >
< block v-if = "item.child.length == 2" >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< / block >
< block v-if = "item.child.length == 3" >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< / block >
< block v-if = "item.child.length == 4" >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< / block >
< / view >
< / swiper-item >
< / swiper >
< / view >
< / view >
< / view >
< block v-if = "TabCur == 0" >
<! - - 公告 - - >
< view class = "gg flex align-center justify-center" v-if = "noticeList.length>0" >
< view class = "gg-box flex align-center justify-between" >
< image src = "../../static/images/index/ggIcon.png" mode = "" > < / image >
< swiper :autoplay = "true" :vertical = "true" :interval = "4000" :circular = "true"
:indicator-dots = "false" class = "gg-box-swiper" >
< block v-for = "(item, index) in noticeList" >
< swiper -item @ tap = 'goMsg(item.url)' >
< view class = "gg-box-swiper-t" > { { item . title } } < / view >
< / swiper-item >
< / block >
< / swiper >
< / view >
< / view >
<!-- 金刚区 -- >
< view class = "centers" >
< view class = "centers-cistrict flex align-center justify-center" v-if = "gridList.length > 0" >
< view class = "centers-cistrict-box" >
< swiper :indicator-dots = "false" class = "centers-cistrict-boxs" :autoplay = "false"
:interval = "3000" :duration = "300" >
< swiper-item v-for = "(item,index) in gridList" :key="index" >
< view class = "swiper-item flex align-center justify-between" >
< view class = "swiper-item-s" @click ="goGridList(ite)"
v-for = "(ite,ind) in item.child" :key="ind" >
< view class = "swiper-item-s-img" >
< image :src = "ite.imageUrl" mode = "aspectFill" > < / image >
< / view >
< view class = "swiper-item-s-txt" >
{ { ite . name } }
< / view >
< / view >
< block v-if = "item.child.length == 2" >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< / block >
< block v-if = "item.child.length == 3" >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< / block >
< block v-if = "item.child.length == 4" >
< view class = "swiper-item-s" style = "height: 0;" > < / view >
< / block >
< / view >
< / swiper-item >
< / swiper >
< / view >
< / view >
< / view >
< view v-if = "rmVideList.length>0" >
< recommendVideo @more ="moreVideo" @video ="seVideo" v-if = "rmVideList.length>0" :list="rmVideList"
title = "本周热门" typeId = "2" / >
< / view >
< view v-if = "rmVideList.length>0" >
< recommendVideo @more ="moreVideo" @video ="seVideo" v-if = "phbVideoList.length>0" :list="phbVideoList"
title = "本周排行榜" typeId = "1" / >
< / view >
< view v-if = "rmVideList.length>0" >
< recommendVideo @more ="moreVideo" @video ="seVideo" v-if = "newVideList.length>0" :list="newVideList"
title = "最新热播" typeId = "" / >
< / view >
<!-- 视频列表 -- >
< view class = "videTitle flex align-center justify-center" >
< view class = "videTitle-box" >
更多短剧
< / view >
< / view >
< / block >
< view v-if = "courseList.length>0" class="" style="width: 100%;margin-top: 20rpx;" >
< videoList @success ="posterSuccess" :list = "courseList" / >
< view v-if = "rmVideList.length> 0" >
<recommendVideo @more ="moreVideo" @video ="seVideo" v-if = "rmVideList.length>0" :list="rmVideList"
title = "本周热门" typeId = "2" / >
< / view >
< view v-if = "rmVideList.length>0" >
< recommendVideo @more ="moreVideo" @video ="seVideo" v-if = "phbVideoList.length>0" :list="phbVideoList"
title = "本周排行榜" typeId = "1" / >
< / view >
< view v-if = "rmVideList.length>0" >
< recommendVideo @more ="moreVideo" @video ="seVideo" v-if = "newVideList.length>0" :list="newVideList"
title = "最新热播" typeId = "" / >
< / view >
<!-- 视频列表 -- >
< view class = "videTitle flex align-center justify-center" >
< view class = "videTitle-box" >
更多短剧
< / view >
< / view >
< / block >
< view v-if = "courseList.length>0" class="" style="width: 100%;margin-top: 20rpx;" >
< videoList @success ="posterSuccess" :list = "courseList" / >
< / view >
< u-loadmore v-if = "courseList.length > 0" :status="status" / >
< empty title = "暂无视频" v-if = "courseList.length == 0" / >
< uni-popup ref = "popusAuthorization" type = "center" :maskClick = "false" >
< view class = "contentview" >
< view class = "title" > 隐私保护指引 < / view >
< view class = "des" @click ="openPrivacyContract" >
在使用当前小程序服务之前 , 请仔细阅读 < text
style = "color: #5074FF;" > { { privacyContractName } } < / text > 。 如你同意 { { privacyContractName } } , 请点击 “ 同意 ” 开始使用 。
< / view >
< view class = "btns" >
< button class = "item reject" @click ="exitMiniProgram" > 拒绝 < / button >
< button id = "agree-btn" class = "item agree" open -type = " agreePrivacyAuthorization "
@agreeprivacyauthorization ="handleAgreePrivacyAuthorization" > 同意 < / button >
< / view >
< u-loadmore v-if = "courseList.length > 0" :status="status" / >
< empty title = "暂无视频" v-if = "courseList.length == 0" / >
< uni-popup ref = "popusAuthorization" type = "center" :maskClick = "false" >
< view class = "contentview" >
< view class = "title" > 隐私保护指引 < / view >
< view class = "des" @click ="openPrivacyContract" >
在使用当前小程序服务之前 , 请仔细阅读 < text
style = "color: #5074FF;" > { { privacyContractName } } < / text > 。 如你同意 { { privacyContractName } } , 请点击 “ 同意 ” 开始使用 。
< / view >
< / uni -popup >
<!-- 会员助力 -- >
< u-popup v-model = "showjl" :closeable="true" close-icon-color="#ffffff" mode="center" >
< view class = "zl" @click ="goZl()" >
< image class = "zl-bg"
src = "https://dj-api.hnsiyao.cn/file/uploadPath/2023/12/14/adf37beca97826d44970d20118f88e29.png"
mode = "" > < / image >
< view class = "zl-title" >
会员免费领
< / view >
< view class = "zl-titlef" >
免费领会员
< / view >
< view class = "zl-titlef2" >
助力中 ...
< / view >
< view class = "zl-titlebtn" >
立即领取
< / view >
< view class = "btns" >
< button class = "item reject" @click ="exitMiniProgram" > 拒绝 < / button >
< button id = "agree-btn" class = "item agree" open -type = " agreePrivacyAuthorization "
@agreeprivacyauthorization ="handleAgreePrivacyAuthorization" > 同意 < / button >
< / view >
< / u-popup >
<!-- 新人红包 -- >
< u-popup v-model = "xxPopu" :closeable="false" close-icon-color="#ffffff" mode="center" >
< view class = "zl" style = "height: 580rpx;" @click ="saveNewUser() ">
< image class = "zl-bgs "
src = "https://dj-api.hnsiyao.cn/file/uploadPath/2024/02/22/cee2fcdc4c4ebe31ab4ce2c3c3a3d183.pn g"
mode = "" > < / image >
< view class = "zl-titles" >
{ { xxJDNum } } < text > 金币 < / text >
< / view >
< / view >
< / uni -popup >
<!-- 会员助力 -- >
< u-popup v-model = "showjl" :closeable="true" close-icon-color="#ffffff" mode="center ">
< view class = "zl" @click ="goZl()" >
< image class = "zl-b g"
src = "https://dj-api.hnsiyao.cn/file/uploadPath/2023/12/14/adf37beca97826d44970d20118f88e29.png"
mode = "" > < / image >
< view class = "zl-title" >
会员免费领
< / view >
< / u-popup >
<!-- 活动悬浮入口 -- >
< activityComp v-if = "showzl && showzls" @clickCloseHd="clickCloseHd" @setImgs="goZl()" / >
<!-- 追剧悬浮 -- >
<!-- < drag-button v-if = "shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
< view class = "zl-titlef" >
免费领会员
< /view >
< view class = "zl-titlef2" >
助力中 ...
< / view >
< view class = "zl-titlebtn" >
立即领取
< / view >
< / view >
< / u-popup >
<!-- 新人红包 -- >
< u-popup v-model = "xxPopu" :closeable="false" close-icon-color="#ffffff" mode="center" >
< view class = "zl" style = "height: 580rpx;" @click ="saveNewUser()" >
< image class = "zl-bgs"
src = "https://dj-api.hnsiyao.cn/file/uploadPath/2024/02/22/cee2fcdc4c4ebe31ab4ce2c3c3a3d183.png"
mode = "" > < / image >
< view class = "zl-titles" >
{ { xxJDNum } } < text > 金币 < / text >
< / view >
< / view >
< / u-popup >
<!-- 活动悬浮入口 -- >
< activityComp v-if = "showzl && showzls" @clickCloseHd="clickCloseHd" @setImgs="goZl()" / >
<!-- 追剧悬浮 -- >
<!-- < drag-button v-if = "shodrag && shodrags" @clickClose="clickClose" :videoInfo="videoInfo" :isDock="true"
:existTabBar = "true" @btnClick ="btnClick" / > -- >
< u-image @click ="goMsg('/me/choujiang/choujiang')" :src = "`../../static/images/draw/dra w.gif`"
style = "width: 15 0rpx;height: 15 0rpx;position: fixed;right: 30rpx;bottom: 180rpx;" > < / u-image >
<!-- # ifdef H5 -- >
< div v-if = "isWeixin"
style = "width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;" >
< / div >
<!-- # endif -- >
<!-- # ifdef H5 -- >
< div v-if = "isIos" @click="isIos=false"
style = "width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/index_guide.png') no-repeat center bottom / 100%;background-color: rgba(0, 0, 0, 0.8);" >
< / div >
<!-- # endif -- >
< u-image @click ="goMsg('/me/choujiang/choujiang')" :src = "`../../static/red-pack-ne w.gif`"
style = "width: 20 0rpx;height: 20 0rpx;position: fixed;right: 30rpx;bottom: 180rpx;" > < / u-image >
<!-- # ifdef H5 -- >
< div v-if = "isWeixin"
style = "width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/open_guide.png') no-repeat center bottom / cover;" >
< / div >
<!-- # endif -- >
<!-- # ifdef H5 -- >
< div v-if = "isIos" @click="isIos=false"
style = "width: 100%;height: 100%;position: fixed;top: 0;z-index: 999;background: url('../../static/images/index_guide.png') no-repeat center bottom / 100%;background-color: rgba(0, 0, 0, 0.8);" >
< / div >
<!-- # endif -- >
< / view >
< / template >
< script >
import {
returnIsSafari
} from '@/utils/app.js'
import empty from '../../components/empty.vue'
import videoList from '../../components/videoList/videoList.vue'
import recommendVideo from '../../components/recommendVideo/recommendVideo.vue'
@@ -213,6 +219,7 @@
} ,
data ( ) {
return {
showSearch : false ,
showzls : true ,
shodrags : true ,
shodrag : false , //是否显示拖拽悬浮
@@ -252,6 +259,7 @@
draw : Math . floor ( ( Math . random ( ) * 12 ) + 1 ) ,
isWeixin : false ,
isIos : true ,
scrollTop : 0 ,
} ;
} ,
onShareAppMessage ( res ) {
@@ -270,6 +278,10 @@
imageUrl : this . bgImg
}
} ,
onPageScroll ( e ) {
console . log ( e ) ;
this . scrollTop = e . scrollTop
} ,
onLoad ( options ) {
// barWidth
// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-KUAISHOU
@@ -335,8 +347,8 @@
}
} )
}
let u = navigator ? navigator . userAgent : '' ;
let u = navigator ? navigator . userAgent : '' ;
if ( u . toLowerCase ( ) . indexOf ( 'micromessenger' ) !== - 1 ) {
this . isWeixin = true
}
@@ -504,13 +516,79 @@
} )
}
} ,
pageScrollTo ( time = 100 ) {
uni . pageScrollTo ( {
scrollTop : this . scrollTop - 50 ,
duration : time ,
complete ( ) {
}
} )
} ,
//查看视频
seVideo ( item ) {
const time = 100 ;
// #ifdef H5
if ( returnIsSafari ( ) ) {
this . pageScrollTo ( time )
setTimeout ( ( ) => {
uni . navigateTo ( {
url : '/me/detail/detail?id=' + item . courseId + '&courseDetailsId=' + item
. courseDetailsId +
'&tt_album_id=' + item . dyCourseId + '&tt_episode_id=' + item
. dyEpisodeId
} )
} , time )
} else {
uni . navigateTo ( {
url : '/me/detail/detail?id=' + item . courseId + '&courseDetailsId=' + item . courseDetailsId +
'&tt_album_id=' + item . dyCourseId + '&tt_episode_id=' + item
. dyEpisodeId
} )
}
// #endif
// #ifndef H5
uni . navigateTo ( {
url : '/me/detail/detail?id=' + item . courseId + '&courseDetailsId=' + item . courseDetailsId +
'&tt_album_id=' + item . dyCourseId + '&tt_episode_id=' + item
. dyEpisodeId
} )
// #endif
} ,
//点击回调
posterSuccess ( item ) {
const time = 100 ;
// #ifdef H5
if ( returnIsSafari ( ) ) {
this . pageScrollTo ( time )
setTimeout ( ( ) => {
uni . navigateTo ( {
url : '/me/detail/detail?id=' + item . courseId + '&courseDetailsId=' + item
. courseDetailsId +
'&tt_album_id=' + item . dyCourseId + '&tt_episode_id=' + item
. dyEpisodeId
} )
} , 100 )
} else {
uni . navigateTo ( {
url : '/me/detail/detail?id=' + item . courseId + '&courseDetailsId=' + item . courseDetailsId +
'&tt_album_id=' + item . dyCourseId + '&tt_episode_id=' + item
. dyEpisodeId
} )
}
// #endif
// #ifndef H5
uni . navigateTo ( {
url : '/me/detail/detail?id=' + item . courseId + '&courseDetailsId=' + item . courseDetailsId +
'&tt_album_id=' + item . dyCourseId + '&tt_episode_id=' + item
. dyEpisodeId
} )
// #endif
} ,
//获取推荐视频
getrecomVideo ( sort ) {
@@ -629,14 +707,7 @@
}
} ) ;
} ,
//点击回调
posterSuccess ( item ) {
uni . navigateTo ( {
url : '/me/detail/detail?id=' + item . courseId + '&courseDetailsId=' + item . courseDetailsId +
'&tt_album_id=' + item . dyCourseId + '&tt_episode_id=' + item
. dyEpisodeId
} )
} ,
// 获取资源列表
getCourseList ( ) {
let typeId = '' ;
@@ -1196,6 +1267,15 @@
line - height : 1.6 ;
}
. top - zhanwei {
/* #ifdef H5 */
padding - top : 32 rpx ;
/* #endif */
/* #ifndef H5 */
padding - top : 44 px ;
/* #endif */
}
. contentview . des . link {
color : # 5074 FF ;
text - decoration : underline ;