123456
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<view>
|
||||
<image src="/static/image/icon11.png" class="w-100 u-h-166"></image>
|
||||
<view class="u-relative u-b-f u-radius-30 u-p-30" style="margin-top: -30rpx;">
|
||||
<u-tabs :list="videoMenuList" IconShow keyName="name" lineWidth="0" :curennt="curennt"
|
||||
:activeStyle="{padding:'0rpx 20rpx',fontSize:'30rpx'}"
|
||||
:inactiveStyle="{padding:'0rpx 20rpx',color:'#86909C',fontSize:'24rpx'}" @click="TabsClick"></u-tabs>
|
||||
<view class="u-m-t-40 u-flex u-col-top" v-for="(item,index) in recommendList" :key="index"
|
||||
@click.stop="govideo(item.id)">
|
||||
<view class="u-relative u-m-r-16">
|
||||
<u-image :src="apiUrl+item.img" width="130rpx" height="170rpx" radius="5"></u-image>
|
||||
<image v-show="index==0 " src="/static/image/icon8.png" class="u-w-40 u-h-40 u-absolute u-index-1"
|
||||
style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index==1 " src="/static/image/icon9.png" class="u-w-40 u-h-40 u-absolute u-index-1"
|
||||
style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index==2 " src="/static/image/icon10.png" class="u-w-40 u-h-40 u-absolute u-index-1"
|
||||
style="top: 0px;left:-2px;"></image>
|
||||
<view v-show="index>2"
|
||||
class="u-w-40 u-h-40 u-b-F9E1E9 u-text-center u-lh-40 u-font-20 u-absolute u-index-1"
|
||||
style="border-radius:0 0 20rpx 0 ;top: 0px;left:0px;">{{index+1}}</view>
|
||||
</view>
|
||||
<view class="u-flex-1 u-flex-col u-h-170 u-row-between">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="u-word-break u-line-1 u-font-26">{{item.name}}</view>
|
||||
<view class="u-flex">
|
||||
<image src="/static/image/icon12.png" class="u-w-30 u-h-30"></image>
|
||||
<view class="u-m-l-10 u-font-22 u-color-666">{{item.views}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-word-break u-font-20 u-color-999 u-line-2">
|
||||
{{item.story}}
|
||||
</view>
|
||||
<view class="u-color-999 u-font-24">
|
||||
<!-- {{item.album_status == 1?'未上映':item.album_status == 2?'更新中':'已完结'}} -->
|
||||
共{{item.sum}}集
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-if="recommendList.length<1"></empty>
|
||||
<u-loadmore v-if="recommendList.length>0" :status="status" icon-color="#999999" color="#999999"
|
||||
icon-type="circle" margin-top="30" margin-bottom="30" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
videoMenuList: [], //剧栏目
|
||||
curennt: 0, //当前栏目索引
|
||||
recommendList: [], //剧栏目列表数据
|
||||
apiUrl: getApp().globalData.oss_url, //域名
|
||||
status: 'loadmore', //加载更多
|
||||
parameter: {
|
||||
limit: 15, //每页的总条数
|
||||
page: 1, //页码
|
||||
menu_id: '', //剧栏目id
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.curennt = opt.curennt
|
||||
this.videoMenu()
|
||||
},
|
||||
// 下拉到底事件
|
||||
onReachBottom() {
|
||||
//避免多次触发
|
||||
if (this.status == 'loading' || this.status == 'nomore') {
|
||||
return;
|
||||
}
|
||||
this.videoGroupList()
|
||||
},
|
||||
methods: {
|
||||
// 剧栏目
|
||||
videoMenu() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoMenu',
|
||||
method: 'GET',
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
res.data[0].after_image = require('@/static/image/icon2.png')
|
||||
res.data[0].before_image = require('@/static/image/icon1.png')
|
||||
res.data[1].after_image = require('@/static/image/icon4.png')
|
||||
res.data[1].before_image = require('@/static/image/icon3.png')
|
||||
res.data[2].after_image = require('@/static/image/icon6.png')
|
||||
res.data[2].before_image = require('@/static/image/icon5.png')
|
||||
this.videoMenuList = res.data
|
||||
this.clear()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 剧栏目tab切换事件
|
||||
TabsClick(e) {
|
||||
this.curennt = e.index
|
||||
this.clear()
|
||||
},
|
||||
clear() {
|
||||
this.parameter.menu_id = this.videoMenuList[this.curennt].id
|
||||
this.recommendList = []
|
||||
this.parameter.page = 1
|
||||
this.videoGroupList()
|
||||
},
|
||||
// 剧栏目列表数据
|
||||
videoGroupList() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
...this.parameter
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.data.length < this.parameter.limit) {
|
||||
this.status = 'nomore';
|
||||
} else {
|
||||
this.parameter.page = this.parameter.page + 1;
|
||||
this.status = 'loadmore';
|
||||
}
|
||||
this.recommendList = this.recommendList.concat(res.data.data);
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
}, // 进入短剧播放页面
|
||||
govideo(vlid) {
|
||||
if (tt.canIUse('video-player')) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/index/VideoPlayer?vl_id=' + vlid
|
||||
})
|
||||
} else {
|
||||
this.$getMsg('当前版本过低,请升级抖音后观看')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,206 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="u-p-30">
|
||||
<u-search v-model="keyword" placeholder="搜短剧名/演员名,免费看短剧" borderColor="#C81F22" searchIconColor="#C81F22"
|
||||
:inputStyle="{backgroundColor:'#ffffff'}" @custom="onSearch"></u-search>
|
||||
<view v-if="SearchHistory.length>0">
|
||||
<view class="u-m-t-30 u-flex u-row-between">
|
||||
<view class="u-font-30">历史搜索</view>
|
||||
<view class="u-flex" @click="shanchu()">
|
||||
<u-icon name="trash" size="18"></u-icon>
|
||||
<view class="u-m-l-10 u-font-24 u-color-999">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex u-flex-wrap">
|
||||
<view class="u-m-t-20 u-m-r-20" v-for="(item,index) in SearchHistory" :key="index">
|
||||
<u-tag @click="$u.route({type:'redirect',url:'/pagesA/index/searchList?keyword='+item})"
|
||||
:text="item" bgColor="#f5f5f5" borderColor="#f5f5f5" color="#333" shape="circle"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x class="w-100" v-if="recommendList.length>0">
|
||||
<view class="u-flex u-col-top u-m-t-40">
|
||||
<view class="u-radius-10 u-b-f u-p-b-56 u-m-r-20" style="width: 480rpx;flex-shrink: 0"
|
||||
v-for="(item,index) in recommendList" :key="index">
|
||||
<view :class="(index+1)%3==0?'bg3':(index+1)%2==0?'bg2':'bg1'"
|
||||
class="u-flex u-p-l-30 u-p-t-6 u-p-b-6 u-radius-20 u-p-r-30 u-col-bottom u-row-between">
|
||||
<view class="u-font-34 u-fw-600">{{item.cartName}}</view>
|
||||
<image v-if="(index+1)%3==0" src="/static/image/icon15.png" class="u-w-70 u-h-70"></image>
|
||||
<image v-else-if="(index+1)%2==0" src="/static/image/icon16.png" class="u-w-70 u-h-70">
|
||||
</image>
|
||||
<image v-else src="/static/image/icon13.png" class="u-w-70 u-h-70"></image>
|
||||
</view>
|
||||
<view @click.stop="govideo(item1.id)" v-if="index1<8"
|
||||
class="u-m-t-30 u-p-l-30 u-p-r-30 u-flex u-col-top" style="width: 380rpx;"
|
||||
v-for="(item1,index1) in item.list" :key="index1">
|
||||
<view class="u-relative">
|
||||
<u-image :src="apiUrl+item1.img" width="100rpx" height="140rpx" radius="5"></u-image>
|
||||
<image v-show="index1 == 0" src="/static/image/icon17.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index1 == 1" src="/static/image/icon18.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<image v-show="index1 == 2" src="/static/image/icon19.png"
|
||||
class="u-w-40 u-h-40 u-absolute u-index-1" style="top: 0px;left:-2px;"></image>
|
||||
<view v-show="index1 >2"
|
||||
class="u-w-40 u-h-40 u-b-000-03 u-text-center u-lh-40 u-font-20 u-absolute u-index-1 u-color-f"
|
||||
style="border-radius:0 0 20rpx 0 ;top: 0px;left:-2px;">{{index1+1}}</view>
|
||||
</view>
|
||||
<view class="u-flex-1 u-m-l-10 u-flex-col u-row-between u-h-120 u-p-t-10 u-p-b-10">
|
||||
<view class="u-word-break u-line-1 u-font-26">{{item1.name}}</view>
|
||||
<view class="u-flex">
|
||||
<image src="/static/image/icon14.png" class="u-w-28 u-h-34"></image>
|
||||
<view class="u-color-C76B52 u-font-22 u-m-l-10 u-word-break u-line-1">
|
||||
热度值{{item1.views}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-font-24 u-color-999 u-word-break u-line-1">{{item1.video_cat}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.list.length>7" @click.stop="$u.route(`/pagesA/index/charts?curennt=${index}`)"
|
||||
class="u-flex u-row-center u-m-t-30">
|
||||
<view class="u-font-24 u-color-999 u-m-r-6">查看全部榜单</view>
|
||||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword: '', //关键字
|
||||
SearchHistory: [], //搜索历史
|
||||
recommendList: [],
|
||||
apiUrl: getApp().globalData.oss_url, //域名
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.SearchHistory = []
|
||||
if (uni.getStorageSync('HistoryArray')) {
|
||||
this.SearchHistory = uni.getStorageSync('HistoryArray')
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.videoMenu()
|
||||
},
|
||||
methods: {
|
||||
onSearch() {
|
||||
if (this.keyword == '') {
|
||||
this.$getMsg('请输入搜索关键字')
|
||||
} else {
|
||||
let index = this.SearchHistory.findIndex(item => item == this.keyword)
|
||||
if (index > -1) {
|
||||
uni.redirectTo({
|
||||
url: '/pagesA/index/searchList?keyword=' + this.keyword
|
||||
})
|
||||
} else {
|
||||
this.SearchHistory.push(this.keyword)
|
||||
uni.setStorageSync('HistoryArray', this.SearchHistory)
|
||||
uni.redirectTo({
|
||||
url: '/pagesA/index/searchList?keyword=' + this.keyword
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
shanchu() {
|
||||
uni.removeStorageSync('HistoryArray')
|
||||
this.SearchHistory = []
|
||||
},
|
||||
// 剧栏目
|
||||
videoMenu() {
|
||||
let that = this;
|
||||
that.$httpRequest({
|
||||
url: '/api/pno/videoMenu',
|
||||
method: 'GET',
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.recommendList = []
|
||||
res.data.forEach(item => {
|
||||
this.videoGroupList(item)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 剧栏目列表数据
|
||||
videoGroupList(item) {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
menu_id: item.id
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.recommendList.push({
|
||||
cartName: item.name,
|
||||
list: res.data.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 进入短剧播放页面
|
||||
govideo(vlid) {
|
||||
if (tt.canIUse('video-player')) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/index/VideoPlayer?vl_id=' + vlid
|
||||
})
|
||||
return
|
||||
this.$api.videoGroupInfo({
|
||||
vl_id: vlid,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.video_look == false) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[0].episode_id + '&vl_id=' +
|
||||
vlid
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[res.data.video_look.weigh -
|
||||
1].episode_id + '&vl_id=' + vlid
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$getMsg(res.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$getMsg('当前版本过低,请升级抖音后观看')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: linear-gradient(to top, #f8f8f8, #ffffff) no-repeat;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .u-search__content {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
|
||||
.bg1 {
|
||||
background: linear-gradient(to top, #ffffff, #FFF9E6);
|
||||
}
|
||||
|
||||
.bg2 {
|
||||
background: linear-gradient(to top, #ffffff, #FFF0ED);
|
||||
}
|
||||
|
||||
.bg3 {
|
||||
background: linear-gradient(to top, #ffffff, #E0FFFF);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="u-p-30">
|
||||
<u-search v-model="paramster.keyword" placeholder="搜短剧名/演员名,免费看短剧" borderColor="#C81F22"
|
||||
searchIconColor="#C81F22" :inputStyle="{backgroundColor:'#ffffff'}" @custom="clear" @search="clear"
|
||||
@clickIcon="clear" @clear="clear"></u-search>
|
||||
</view>
|
||||
<view :class="item.is_top==1?'u-b-FFEFEF-6':''"
|
||||
class="u-m-b-20 u-flex u-col-top u-p-t-20 u-p-b-20 u-p-l-30 u-p-r-30 u-relative"
|
||||
@click.stop="govideo(item.id)" v-for="(item,index) in list" :key="index">
|
||||
<image v-if="item.is_top==1" src="/static/image/icon20.png" class="u-w-84 u-h-94 u-absolute u-index-1"
|
||||
style="right: 30rpx;"></image>
|
||||
<u-image :src="apiUrl+item.img" width="150rpx" height="200rpx" radius="5"></u-image>
|
||||
<view class="u-flex-1 u-m-l-20 u-p-t-10 u-p-b-10 u-flex-col u-row-between u-h-180">
|
||||
<view class="u-font-30 u-fw-500 u-word-break u-line-1" :class="item.is_top==1?'u-color-FE5A5B':''">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<!-- <view class="u-font-24 u-word-break u-line-1 u-color-999">{{item.actor}}</view> -->
|
||||
<view class="u-font-24 u-word-break u-line-1 u-color-999">{{item.type_text}} | {{item.sum}}集</view>
|
||||
<view class="u-font-24 u-word-break u-line-2 u-color-999">{{item.story}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty v-if="list.length<1"></empty>
|
||||
<u-loadmore v-if="list.length>0" :status="status" icon-color="#999999" color="#999999" icon-type="circle"
|
||||
margin-top="30"/>
|
||||
<view style="padding-top: 30rpx;"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
paramster: {
|
||||
keyword: '',
|
||||
page: 1,
|
||||
limit: 15,
|
||||
},
|
||||
list: [],
|
||||
status: 'loadmore', //加载更多
|
||||
apiUrl: getApp().globalData.oss_url, //域名
|
||||
}
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.paramster.keyword = opt.keyword
|
||||
this.clear()
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
this.list = []
|
||||
this.page = 1
|
||||
this.videoGroupList()
|
||||
},
|
||||
// 剧栏目列表数据
|
||||
videoGroupList() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pno/videoGroupList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
...this.parameter
|
||||
},
|
||||
isLoading: true,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.data.length < this.paramster.limit) {
|
||||
this.status = 'nomore';
|
||||
} else {
|
||||
this.paramster.page = this.paramster.page + 1;
|
||||
this.status = 'loadmore';
|
||||
}
|
||||
this.list = this.list.concat(res.data.data);
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
})
|
||||
},
|
||||
// 进入短剧播放页面
|
||||
govideo(vlid) {
|
||||
if (tt.canIUse('video-player')) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/index/VideoPlayer?vl_id=' + vlid
|
||||
})
|
||||
return
|
||||
this.$api.videoGroupInfo({
|
||||
vl_id: vlid,
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (res.data.video_look == false) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[0].episode_id + '&vl_id=' +
|
||||
vlid
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/VideoPlayer?tt_album_id=' + res.data.album_id +
|
||||
'&tt_episode_id=' + res.data.video_info[res.data.video_look.weigh -
|
||||
1].episode_id + '&vl_id=' + vlid
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$getMsg(res.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$getMsg('当前版本过低,请升级抖音后观看')
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .u-search__content {
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user