index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <template>
  2. <view class="search">
  3. <view class="input_box">
  4. <u-search height="30" bgColor="#FFF" :showAction="false" :focus="true" placeholder="请输入剧名"
  5. searchIconColor="#000" v-model="keyword" @search="search"></u-search>
  6. </view>
  7. <view class="videoLists">
  8. <view class="list_item" v-for="(item,index) in list" :key="index"></view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import { getServerShipProgramPage } from '@/apis/index'
  14. export default {
  15. data(){
  16. return{
  17. keyword:'',
  18. list:[]
  19. }
  20. },
  21. methods: {
  22. // 获取视频节目分页
  23. async getVideoPage() {
  24. let params = {
  25. orderByColumn: "",
  26. orderByAsc: true,
  27. pageIndex: 1,
  28. pageSize: 10,
  29. keyword: this.keyword,
  30. shipCategoryId: '',
  31. }
  32. const res = await getServerShipProgramPage(params)
  33. this.list = res.list
  34. console.log(res);
  35. },
  36. search(){
  37. this.getVideoPage()
  38. }
  39. },
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .search{
  44. padding-bottom: var(--window-bottom);
  45. .input_box{
  46. padding: 20rpx;
  47. }
  48. }
  49. </style>