list.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <view>
  3. <view class="data" v-for="(item,index) in 6" :key="index" >
  4. <view class="top">
  5. <view class="left">
  6. <u-icon name="hourglass-half-fill" :size="28" top="4" color="rgb(94,94,94)"></u-icon>
  7. <view class="title text-cut-1">标题:<text >代拿一个滑板到二楼,代拿一个滑板到二楼</text></view>
  8. </view>
  9. <view class="right">
  10. 2020-10-27
  11. </view>
  12. </view>
  13. <view class="item">
  14. <view class="left">
  15. <image src="https://img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg" mode="aspectFill"></image>
  16. <view class="desc">
  17. <text>宁夏冬美小区</text>
  18. <text>发布人:19124812874</text>
  19. <text>价格:4元</text>
  20. </view>
  21. </view>
  22. <view @click="goDetail(item)" class="right">
  23. <view class="cu-btn bg-red-btn sm round">
  24. 查看详情
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <navigator url="./publish" class="cu-btn cuIcon round lg bg-red-btn add" >
  30. <text class="cuIcon-add"></text>
  31. </navigator>
  32. <u-divider height="80" bg-color="#f1f1f1">没有更多了</u-divider>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. }
  40. },
  41. methods: {
  42. goDetail(item){
  43. console.log("111")
  44. uni.navigateTo({
  45. url:"./detail"
  46. })
  47. }
  48. }
  49. }
  50. </script>
  51. <style lang="scss">
  52. .add{
  53. position: fixed;
  54. bottom: 20%;
  55. right: 4%;
  56. color: #FFFFFF;
  57. text{
  58. font-size: 50rpx;
  59. }
  60. }
  61. .data:first-child{
  62. margin-top: 20rpx;
  63. }
  64. .data {
  65. border-bottom: 1rpx solid #b6b6b6;
  66. background-color: #FFFFFF;
  67. width: 700rpx;
  68. margin:10rpx auto;
  69. border-radius: 10rpx;
  70. box-sizing: border-box;
  71. padding: 20rpx;
  72. font-size: 28rpx;
  73. .top {
  74. display: flex;
  75. justify-content: space-between;
  76. padding-bottom: 20rpx;
  77. border-bottom: 1rpx solid #e2e2e2;
  78. .left {
  79. flex: 3;
  80. display: flex;
  81. align-items: center;
  82. .title {
  83. margin: 0 10rpx;
  84. font-size: 28rpx;
  85. font-weight: bold;
  86. text{
  87. font-weight: 500;
  88. }
  89. }
  90. }
  91. .right{
  92. flex: 1;
  93. text-align: right;
  94. margin-top: 6rpx;
  95. font-size: 28rpx;
  96. color: #a1a1a1;
  97. }
  98. }
  99. .item {
  100. display: flex;
  101. flex-direction: row;
  102. justify-content: space-between;
  103. margin: 30rpx 0 20rpx 0;
  104. .left{
  105. display: flex;
  106. image{
  107. margin: 10rpx 24rpx 10rpx 30rpx ;
  108. width: 116rpx;
  109. height: 116rpx;
  110. border-radius: 50%;
  111. }
  112. .desc{
  113. display: flex;
  114. flex-direction: column;
  115. text{
  116. font-size: 26rpx;
  117. color: #a1a1a1;
  118. margin-bottom: 10rpx;
  119. }
  120. text:first-child{
  121. font-size: 30rpx;
  122. color: #333;
  123. font-weight: 800;
  124. }
  125. }
  126. }
  127. .right {
  128. display: flex;
  129. flex-direction: column;
  130. justify-content: center;
  131. }
  132. }
  133. }
  134. </style>