GengDuoGuShi.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 v-for="item in research" :key="item.id" class="yx_box" @click="$common.navigateTo('/xueYuan_fenbao/wenWu/guShi?id=' + item.id)">
  5. <view style="position: absolute; left: 6rpx; top: 6rpx">
  6. <image mode="scaleToFill" style="width: 160rpx; height: 240rpx" :src="item.image"></image>
  7. </view>
  8. <view style="margin-left: 200rpx">
  9. <view class="wwd">{{ item.title }}</view>
  10. </view>
  11. <view class="baoming">
  12. <text>查看</text>
  13. <image style="margin-left: 10rpx; width: 32rpx; height: 32rpx" src="/static/img/arrow-right-line.png"></image>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. let that;
  20. export default {
  21. data() {
  22. return {
  23. page: 1,
  24. isLoading: false,
  25. research: []
  26. };
  27. },
  28. onLoad() {
  29. that = this;
  30. this.getContentList();
  31. },
  32. methods: {
  33. // 文物故事视频
  34. getContentList() {
  35. this.isLoading = true;
  36. this.$api.getContentList({ main_body_id: 1, model_id: 11, main_body_column_id: 77, page: this.page, pageSize: 10 }, function (res) {
  37. that.isLoading = false;
  38. console.log(res, '文物');
  39. that.research = [...that.research, ...res.data];
  40. });
  41. }
  42. },
  43. /* 页面触底 */
  44. onReachBottom() {
  45. if (this.isLoading) {
  46. return;
  47. } else {
  48. this.page++;
  49. this.getContentList();
  50. }
  51. }
  52. };
  53. </script>
  54. <style>
  55. .box {
  56. width: 100%;
  57. padding-bottom: 50rpx;
  58. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xy_bgt.png');
  59. background-size: 100% 100%;
  60. background-attachment: fixed;
  61. background-repeat: repeat-y;
  62. min-height: 100%;
  63. height: auto;
  64. /* background-color: #fff9e9; */
  65. }
  66. .yx_box {
  67. position: relative;
  68. width: 670rpx;
  69. height: 252rpx;
  70. display: flex;
  71. align-items: center;
  72. margin: auto;
  73. margin-top: 34rpx;
  74. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/hh_item_bg.png');
  75. background-size: 100% 100%;
  76. }
  77. .wwd {
  78. width: 300rpx;
  79. font-size: 36rpx;
  80. font-weight: 400;
  81. color: #444444;
  82. line-height: 52rpx;
  83. }
  84. .baoming {
  85. display: flex;
  86. width: 116rpx;
  87. height: 56rpx;
  88. line-height: 56rpx;
  89. justify-content: center;
  90. align-items: center;
  91. margin-left: 32rpx;
  92. font-size: 28rpx;
  93. color: #eba869;
  94. border: 2rpx solid #eba869;
  95. }
  96. </style>