帧视界壹通告,付费看视频的微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
3.0 KiB

  1. <template>
  2. <view class="publishList">
  3. <view class="item" v-for="(item, index) in list"
  4. @click="gotoDetail(item)"
  5. :key="index">
  6. <image :src="item.cover" style="width: 40%"></image>
  7. <view class="text">
  8. <view class="title">
  9. {{ item.title }}
  10. </view>
  11. <view class="createBy">
  12. <view class="">
  13. 是否置顶{{ item.createBy }}
  14. </view>
  15. </view>
  16. <view class="isPay">
  17. <view class="">
  18. 是否付费{{ item.isPay }}
  19. </view>
  20. </view>
  21. <view class="createTime">
  22. 发布时间{{ item.createTime }}
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. name: "releaseList",
  31. props: ['list'],
  32. data() {
  33. return {
  34. total: 0,
  35. queryParams: {
  36. pageNo: 1,
  37. pageSize: 10,
  38. }
  39. };
  40. },
  41. onShow() {
  42. this.getData()
  43. },
  44. onReachBottom() {
  45. let allTotal = this.queryParams.pageNo * this.queryParams.pageSize
  46. if (allTotal < this.total) {
  47. //当前条数小于总条数 则增加请求数
  48. this.queryParams.pageSize += 10
  49. this.getData() //调用加载数据方法
  50. }
  51. },
  52. methods: {
  53. getData() {
  54. this.$api('infoGetMyReleasePage', {
  55. pageNo: this.queryParams.pageNo,
  56. pageSize: this.queryParams.pageSize,
  57. // 缺少id参数,需要补充
  58. }, res => {
  59. if (res.code == 200) {
  60. this.list = res.result.records
  61. this.total = res.result.total
  62. }
  63. })
  64. },
  65. gotoDetail(item) {
  66. // 根据字段区分跳转到不同页面
  67. if (1==1){
  68. // 跳转到动态详情页面
  69. this.$utils.navigateTo('/publish/postDetail?id=' + item.id)
  70. }else{
  71. // 跳转到演员详情页面
  72. this.$utils.navigateTo('/publish/actorDetail?id=' + item.id)
  73. }
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. .publishList {
  80. width: 90%;
  81. .item {
  82. height: 200rpx;
  83. width: 100%;
  84. background-color: #fff;
  85. overflow: hidden;
  86. border-radius: 10rpx;
  87. color: #777;
  88. display: flex;
  89. font-size: 24rpx;
  90. margin: 30rpx 0;
  91. image {
  92. width: 50%;
  93. height: 100%;
  94. }
  95. .text {
  96. display: flex;
  97. flex-direction: column;
  98. padding: 16rpx;
  99. width: 50%;
  100. .title {
  101. font-size: 30rpx;
  102. font-weight: 600;
  103. color: #000;
  104. }
  105. .createBy {
  106. display: flex;
  107. margin-top: auto;
  108. margin-bottom: 10rpx;
  109. justify-content: space-between;
  110. & > view {
  111. display: flex;
  112. align-items: center;
  113. justify-content: center;
  114. }
  115. }
  116. .isPay {
  117. display: flex;
  118. margin-top: auto;
  119. margin-bottom: 10rpx;
  120. color: #7395f4;
  121. justify-content: space-between;
  122. & > view {
  123. display: flex;
  124. align-items: center;
  125. justify-content: center;
  126. }
  127. }
  128. }
  129. }
  130. }
  131. </style>