GengDuoShiPin.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="文物视频" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <view class="" style="width: 92%; margin: auto; display: flex; flex-wrap: wrap; justify-content: space-between">
  5. <view v-for="item in research" :key="item.id" class="yx_box" @click="$common.navigateTo('/xueYuan_fenbao/wenWu/ShiPin?id=' + item.id)">
  6. <view>
  7. <image style="width: 330rpx; height: 190rpx" :src="item.image"></image>
  8. </view>
  9. <view class="wwd">{{ item.title }}</view>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. let that;
  16. export default {
  17. data() {
  18. return {
  19. page: 1,
  20. isLoading: false,
  21. research: []
  22. };
  23. },
  24. onLoad() {
  25. that = this;
  26. this.getContentList();
  27. },
  28. methods: {
  29. // 文物故事视频
  30. getContentList() {
  31. this.isLoading = true;
  32. this.$api.getContentList({ main_body_id: 1, model_id: 11, main_body_column_id: 78, page: this.page, pageSize: 6 }, function (res) {
  33. that.isLoading = false;
  34. console.log(res, '视频');
  35. that.research = [...that.research, ...res.data];
  36. });
  37. }
  38. },
  39. /* 页面触底 */
  40. onReachBottom() {
  41. if (this.isLoading) {
  42. return;
  43. } else {
  44. this.page++;
  45. this.getContentList();
  46. }
  47. }
  48. };
  49. </script>
  50. <style>
  51. .box {
  52. width: 100%;
  53. padding-bottom: 50rpx;
  54. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xy_bgt.png');
  55. background-size: 100% 100%;
  56. background-attachment: fixed;
  57. background-repeat: repeat-y;
  58. min-height: 100%;
  59. height: auto;
  60. /* background-color: #fff9e9; */
  61. }
  62. .yx_box {
  63. position: relative;
  64. margin-bottom: 30rpx;
  65. }
  66. .wwd {
  67. position: absolute;
  68. bottom: 7rpx;
  69. width: 100%;
  70. font-size: 30rpx;
  71. font-weight: 400;
  72. color: #ffffff;
  73. padding-left: 6rpx;
  74. line-height: 52rpx;
  75. white-space: nowrap;
  76. overflow: hidden;
  77. text-overflow: ellipsis;
  78. background-color: rgba(0, 0, 0, 0.5);
  79. }
  80. </style>