Files
video_mini/pagesA/index/searchList.vue
T
2026-07-24 11:56:12 +08:00

122 lines
3.5 KiB
Vue

<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>