隐藏视频优化
parent
b31e488cfe
commit
3ab4416f34
|
@ -94,7 +94,7 @@
|
|||
{
|
||||
iconPath: "/static/tabbar/icon-mo-sp.png",
|
||||
selectedIconPath: "/static/tabbar/icon-active-sp.png",
|
||||
title:'视频'
|
||||
title:''
|
||||
},
|
||||
{
|
||||
iconPath: "/static/tabbar/icon-mo-wd.png",
|
||||
|
@ -105,9 +105,20 @@
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
// 判断视频是否隐藏
|
||||
this.$requst.get('/api/index/base-config').then(res=>{
|
||||
if(res.code==0){
|
||||
this.show_video = res.data.show_video;
|
||||
if(parseInt(this.show_video)!==0){
|
||||
this.footList[3].title = '视频'
|
||||
}else{
|
||||
this.footList[3].title = '待定'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
methods:{
|
||||
// 跳转页面
|
||||
choosefoot(index){
|
||||
// 已授权
|
||||
switch (index){
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
<list ref="refcourse" @goDetail="goCourseDetail"></list>
|
||||
<!-- 两列列表 end -->
|
||||
<!-- 推荐视频 start -->
|
||||
<view class="disjb ae mar-s40 mar-x20">
|
||||
<view class="disjb ae mar-s40 mar-x20" v-if="parseInt(show_video)!==0">
|
||||
<view class="fon32 bold colb">推荐视频</view>
|
||||
<view class="fon20" style="color: #bbb4b3;" @tap="goMore(0)">更多+</view>
|
||||
</view>
|
||||
<view class="radius8 bacf pad10 boxshow1 mar-x30" v-for="(item,index) in videoList" :key="index">
|
||||
<view class="radius8 bacf pad10 boxshow1 mar-x30" v-for="(item,index) in videoList" :key="index" v-if="parseInt(show_video)!==0">
|
||||
<view class="posir disjcac">
|
||||
<image :src="item.cover" style="height: 388rpx;" mode="aspectFill" class="width100" lazy-load></image>
|
||||
<image v-if="item.src.includes('.mp4')" @tap="palyVideo(index)" class="posia" src="/static/tabbar/icon-play.png" mode="" style="width: 70rpx;height: 70rpx;" lazy-load></image>
|
||||
|
@ -88,11 +88,14 @@
|
|||
videoList:[],//推荐视频
|
||||
ifLoading:false,
|
||||
ifCount:0,
|
||||
show_video:'', //是否隐藏视频
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// 开启banner图自动轮播
|
||||
this.$store.commit('setAutoplay',true);
|
||||
// 判断视频是否隐藏
|
||||
this.isVideoEv();
|
||||
},
|
||||
onHide() {
|
||||
// 关闭banner图自动轮播
|
||||
|
@ -118,6 +121,14 @@
|
|||
this.getBanner();
|
||||
},
|
||||
methods: {
|
||||
// 判断视频是否隐藏
|
||||
isVideoEv(){
|
||||
this.$requst.get('/api/index/base-config').then(res=>{
|
||||
if(res.code==0){
|
||||
this.show_video = res.data.show_video;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取首页banner图
|
||||
getBanner(){
|
||||
this.$requst.get('/api/common/slides',{position:'home-banner'}).then(res=>{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view>
|
||||
<status-container :ifReturn="false" titlet="视频列表">
|
||||
<view slot="content" style="margin-top: -20rpx;" v-if="loading">
|
||||
<status-container :ifReturn="false" :titlet="pageTitle">
|
||||
<view slot="content" style="margin-top: -20rpx;" v-if="loading && parseInt(show_video)!==0">
|
||||
<view class="posi-sticky" :style="{top:newtop+'px'}">
|
||||
<view class="pad-sx26 pad-zy20" style="box-shadow: 0 3rpx 20rpx rgba(0, 0, 0, 0.1);">
|
||||
<view class="radius40 pad-sx2 disjbac pad-zy20" style="background-color: #fff6f5;border: 2rpx solid #ece6e6;">
|
||||
|
@ -50,13 +50,15 @@
|
|||
data() {
|
||||
return {
|
||||
newtop:uni.getSystemInfoSync().statusBarHeight + 42,
|
||||
pageTitle:'',
|
||||
dataList:[],
|
||||
page:1,
|
||||
size:20,
|
||||
total:0,
|
||||
keyword:'',
|
||||
noMore:false,
|
||||
loading:false
|
||||
loading:false,
|
||||
show_video:'', //是否隐藏视频
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
|
@ -68,7 +70,24 @@
|
|||
onLoad() {
|
||||
this.getVideoList();
|
||||
},
|
||||
onShow() {
|
||||
// 判断视频是否隐藏
|
||||
this.isVideoEv();
|
||||
},
|
||||
methods: {
|
||||
// 判断视频是否隐藏
|
||||
isVideoEv(){
|
||||
this.$requst.get('/api/index/base-config').then(res=>{
|
||||
if(res.code==0){
|
||||
this.show_video = res.data.show_video;
|
||||
if(parseInt(this.show_video)!==0){
|
||||
this.pageTitle = '视频列表'
|
||||
}else{
|
||||
this.pageTitle = '待定'
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取视频列表
|
||||
getVideoList(){
|
||||
this.loading = false;
|
||||
|
|
Loading…
Reference in New Issue