GengDuoRenWu.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <view class="box">
  3. <u-navbar title="历史人物" :placeholder="true" bgColor="rgba(255,255,255,0.3)" :autoBack="true"
  4. titleStyle="font-weight:bold;color:#000000"></u-navbar>
  5. <view>
  6. <view>
  7. <u-swiper
  8. :list="bannerlist"
  9. imgMode="scaleToFill"
  10. :height="160"
  11. :indicator="true"
  12. radius="5"
  13. :autoplay="true"
  14. :circular="true"
  15. indicatorStyle="bottom: 10px"
  16. indicatorMode="dot"
  17. indicatorActiveColor="#fff"
  18. indicatorInactiveColor="rgba(255, 255, 255, 0.35)"
  19. ></u-swiper>
  20. </view>
  21. </view>
  22. <view style="margin-top: 10px; margin-left: 10px;">
  23. <view class="boxs">
  24. <view @click="expertDetails(item.id)" v-for="(item,index) in peoplelist" :key="item.id">
  25. <image style="width: 380rpx; height: 320rpx" mode="aspectFill" :src="item.image" >
  26. </image>
  27. <view class="flex justify-between">
  28. <view style="margin-top:10rpx;padding: 10rpx;">
  29. {{item.title}}
  30. </view>
  31. <view style="margin-top:10rpx;padding: 10rpx;">{{item.age}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. let that;
  41. export default {
  42. data() {
  43. return {
  44. page:1,
  45. isLoading:false,
  46. bannerlist:[
  47. 'https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/renwu.jpg'
  48. ],
  49. peoplelist:[],
  50. }
  51. },
  52. onLoad(){
  53. that=this;
  54. this.getContentList();
  55. },
  56. methods: {
  57. getContentList() {
  58. this.isLoading=true
  59. this.$api.getContentList({ page: this.page, pageSize: 10, main_body_id: 1, model_id: 7, main_body_column_id: 39 }, function (res) {
  60. // console.log(res, '人物');
  61. that.isLoading=false
  62. that.peoplelist = [...that.peoplelist,...res.data];
  63. });
  64. },
  65. // 人物详情
  66. expertDetails(id) {
  67. uni.navigateTo({
  68. url: '/xueYuan_fenbao/wenWu/renWuXiangQing?id=' + id
  69. });
  70. },
  71. },
  72. /* 页面触底 */
  73. onReachBottom() {
  74. if (this.isLoading) {
  75. return;
  76. } else {
  77. this.page++;
  78. this.getContentList();
  79. }
  80. },
  81. }
  82. </script>
  83. <style>
  84. .box {
  85. width: 100%;
  86. padding-bottom: 50rpx;
  87. background-image: url("https://huli-app.wenlvti.net/app_static/wuyuan/static/shouhu/wyj-feiyi3-001.png");
  88. background-size: 100% 100%;
  89. background-repeat: repeat-y;
  90. height: auto;
  91. }
  92. .boxs {
  93. display: flex;
  94. justify-content: space-between;
  95. margin-right: 10px;
  96. flex-wrap: wrap;
  97. }
  98. .boxs>view {
  99. width: 48%;
  100. border-radius: 14px;
  101. overflow: hidden;
  102. background-color: white;
  103. margin-bottom: 20px;
  104. }
  105. .body {
  106. background-image: url("https://huli-app.wenlvti.net/app_static/wuyuan/static/wenwu/wyj-jiemian1-BJ.png");
  107. background-size: 100% 100%;
  108. background-attachment: fixed;
  109. height: 900px;
  110. }/deep/.u-swiper-indicator__wrapper__dot--active {
  111. width: 5px !important;
  112. }
  113. </style>