share.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <template>
  2. <view class="content">
  3. <view class="list-scroll-content" v-for="(item, index) in bjsclist" :key="index" @click="navTo('/pages/share/wzDetail?id=' + item.id)">
  4. <view class="main">
  5. <view class="main-userInfo">
  6. <view class="avatar">
  7. <image :src="item.image_input[0]" mode=""></image>
  8. </view>
  9. <view class="main-user-info">
  10. <view class="main-userName">{{item.title}}</view>
  11. <view class="main-user-time">{{item.add_time}}</view>
  12. </view>
  13. <view class="fenxiang flex">
  14. <image class="img-lj" src="../../static/icon/lj.png"></image>
  15. <view class="wen-lj">{{item.visit}}</view>
  16. </view>
  17. </view>
  18. <view class="text">
  19. <view>{{ item.synopsis }}</view>
  20. </view>
  21. <view class="fh-im">
  22. <image v-for="img in item.image_input" class="fh-img" :src="img" mode=""></image>
  23. </view>
  24. </view>
  25. </view>
  26. <navigator url="/pages/user/release">
  27. <button class="butt">我要发布</button>
  28. </navigator>
  29. <u-tabbar activeColor="#01A6A8" inactive-color='#666666' :list="tabbar"></u-tabbar>
  30. </view>
  31. </template>
  32. <script>
  33. import {
  34. article
  35. } from '@/api/user.js';
  36. import {
  37. tabbar1
  38. } from '@/utils/tabbar.js'; //底部导航栏
  39. export default {
  40. data() {
  41. return {
  42. bjsclist:[],
  43. tabbar: tabbar1,
  44. };
  45. },
  46. onLoad() {
  47. },
  48. onShow() {
  49. this.loadData();
  50. },
  51. onReachBottom() {},
  52. methods: {
  53. navTo(url) {
  54. uni.navigateTo({
  55. url
  56. });
  57. },
  58. async loadData(source) {
  59. let obj = this;
  60. article({
  61. page: 1,
  62. limit: 1000
  63. },
  64. 1
  65. )
  66. .then(({
  67. data
  68. }) => {
  69. this.bjsclist = data;
  70. })
  71. .catch(e => {
  72. console.log(e);
  73. });
  74. }
  75. }
  76. };
  77. </script>
  78. <style lang="scss">
  79. page,
  80. .content {
  81. min-height: 100%;
  82. height: auto;
  83. position: relative;
  84. }
  85. .butt {
  86. display: flex;
  87. align-items: center;
  88. justify-content: center;
  89. height: 64rpx;
  90. position: fixed;
  91. bottom: 120rpx;
  92. right: 0rpx;
  93. color: #FFFFFF;
  94. font-size: 28rpx;
  95. background-color: #FF6F0F;
  96. border: none;
  97. border-radius: 40rpx 0% 0% 40rpx;
  98. }
  99. .main {
  100. margin: 20rpx;
  101. padding: 35rpx 20rpx 24rpx;
  102. background: #ffffff;
  103. width: 702rpx;
  104. border-radius: 30rpx;
  105. image {
  106. width: 100%;
  107. height: 100%;
  108. }
  109. .main-userInfo {
  110. display: flex;
  111. align-items: center;
  112. .avatar {
  113. width: 80rpx;
  114. height: 80rpx;
  115. background: #ffffff;
  116. border-radius: 50%;
  117. }
  118. .main-user-info {
  119. margin-left: 14rpx;
  120. line-height: 1;
  121. .main-userName {
  122. font-size: 28rpx;
  123. font-weight: bold;
  124. color: #000000;
  125. }
  126. .main-user-time {
  127. margin-top: 14rpx;
  128. font-size: 21rpx;
  129. font-weight: 500;
  130. color: #666666;
  131. }
  132. }
  133. .fenxiang {
  134. padding-left: 310rpx;
  135. .img-lj {
  136. width: 28rpx;
  137. height: 28rpx;
  138. }
  139. .wen-lj {
  140. font-size: 28rpx;
  141. color: #FF6F0F;
  142. padding-left: 10rpx;
  143. }
  144. }
  145. }
  146. .text {
  147. word-wrap: break-word;
  148. word-break: normal;
  149. margin: 20rpx 0rpx;
  150. font-size: 28rpx;
  151. font-weight: 500;
  152. color: #666666;
  153. }
  154. .fh-im {
  155. .fh-img {
  156. margin: 10rpx 21rpx 0rpx 0rpx ;
  157. width: 200rpx;
  158. height: 200rpx;
  159. }
  160. }
  161. }
  162. </style>