This commit is contained in:
GaoHao
2024-12-18 17:34:53 +08:00
19 changed files with 607 additions and 295 deletions

View File

@@ -195,7 +195,7 @@
myVideo() {
let data = {
page: 1,
limit: 2,
limit: 6,
classify: 1, //1收藏 2点赞 3历史记录
}
this.$Request.getT('/app/courseCollect/selectByUserId', data).then(res => {
@@ -208,7 +208,7 @@
newLook() {
let data = {
page: 1,
limit: 2,
limit: 6,
classify: 3, //1收藏 2点赞 3历史记录
}
this.$Request.getT('/app/courseCollect/selectByUserId', data).then(res => {
@@ -321,24 +321,32 @@
}
}
.zuijin-box.justify-between{
justify-content: flex-start;
}
.zuijin {
width: 100%;
margin-top: 26rpx;
.zuijin-box {
width: 686rpx;
width: 700rpx;
height: 100%;
flex-wrap: wrap;
}
.zuijin-box-item {
width: calc((686rpx - 20rpx) / 2);
width: calc((700rpx - 40rpx) / 3);
height: 100%;
margin-bottom: 30rpx;
margin-right: calc(40rpx / 2);
}
.zuijin-box-item:nth-of-type(3n){
margin-right: 0;
}
.zuijin-box-item-img {
width: 100%;
// height: 204rpx;
height: 204rpx;
border-radius: 24rpx 24rpx 0 0;
position: relative;

View File

@@ -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;">
<!-- #ifndef H5 -->
<u-navbar height="60" :background="background" :is-back="false" :title="title" :border-bottom="false">
<!-- #endif -->
<!-- #ifndef 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 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 -->
<!-- #ifndef MP-TOUTIAO -->
<view class="nvavBar flex justify-center">
<!-- #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 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.png"
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-bg"
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/draw.gif`"
style="width: 150rpx;height: 150rpx;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-new.gif`"
style="width: 200rpx;height: 200rpx;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: 32rpx;
/* #endif */
/* #ifndef H5 */
padding-top: 44px;
/* #endif */
}
.contentview .des .link {
color: #5074FF;
text-decoration: underline;

View File

@@ -305,8 +305,14 @@
title: '登录成功',
icon: 'none'
})
const arr= getCurrentPages()
if(arr.length<=1){
return uni.reLaunch({
url:'/pages/index/index'
})
}
uni.navigateBack({
delta: 2
delta: arr.length<=2?1:2
})
} else {
uni.hideLoading();

View File

@@ -184,7 +184,7 @@
观看历史
</view>
</view>
<!-- <view v-if="rate>0" class="tool-box-content-item flex align-center justify-center flex-wrap"
<view v-if="rate>0" class="tool-box-content-item flex align-center justify-center flex-wrap"
@click="goNav('/me/invite/inviteDet')">
<view class="tool-box-content-item-img">
<image src="../../static/images/me/vtd.png" mode=""></image>
@@ -192,7 +192,7 @@
<view class="tool-box-content-item-txt">
我的团队
</view>
</view> -->
</view>
<view class="tool-box-content-item flex align-center justify-center flex-wrap" @click="goMsg()">
<view class="tool-box-content-item-img">
<image src="../../static/images/me/vkf.png" mode=""></image>
@@ -288,6 +288,7 @@
showCard: false,
numCount: 0,
rate: 0,
twoRate:0,
kmPaySel: '否',
isWxIosPay: true, //微信下是否显示支付功能
userInfo: {},
@@ -315,11 +316,8 @@
this.userName = res.data.userName
this.avatar = res.data.avatar
this.invitationCode = res.data.invitationCode
if (res.data.rate) {
this.rate = (Number(res.data.rate) * 100).toFixed(0)
} else {
this.rate = 0
}
this.rate = res.data.rate||0
this.twoRate = res.data.twoRate||0
}
})