shop.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <view class="one">
  5. <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
  6. <view class="list-scroll-view">
  7. <view class="list" v-for="(item, index) in list" :key="index" @click="toView(item)">
  8. <image class="image" :src="item.file" mode=""></image>
  9. <view class="other">
  10. <view class="name">{{item.name}}</view>
  11. <view class="other_1">
  12. 关注人数 <text>{{item.num}}</text>
  13. </view>
  14. <view class="other_1">
  15. 关注时间 <text>{{item.time}}</text>
  16. </view>
  17. </view>
  18. <view class="btn">
  19. <text @click="toDel(item)" class="iconfont icon-del"></text>
  20. </view>
  21. </view>
  22. </view>
  23. </scroll-view>
  24. </view>
  25. </view>
  26. </mobile-frame>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. list: [{
  33. file: require('@/static/test.png'),
  34. name: '官方自营店',
  35. num: 2,
  36. time: '2022-09-27'
  37. },
  38. {
  39. file: require('@/static/test.png'),
  40. name: '官方自营店',
  41. num: 2,
  42. time: '2022-09-27'
  43. },
  44. {
  45. file: require('@/static/test.png'),
  46. name: '官方自营店',
  47. num: 2,
  48. time: '2022-09-27'
  49. }
  50. ]
  51. };
  52. },
  53. onShow: function() {
  54. },
  55. methods: {
  56. // 详细信息
  57. toView(e) {
  58. const that = this;
  59. console.log(e);
  60. },
  61. // 删除
  62. toDel(e) {
  63. const that = this;
  64. console.log(e);
  65. },
  66. // 分页
  67. toPage(e) {
  68. },
  69. }
  70. }
  71. </script>
  72. <style lang="scss">
  73. .main {
  74. display: flex;
  75. flex-direction: column;
  76. width: 100vw;
  77. height: 100vh;
  78. .one {
  79. padding: 2vw 0 0 0;
  80. .list {
  81. display: flex;
  82. flex-direction: row;
  83. justify-content: space-between;
  84. width: 95vw;
  85. border: 1px solid var(--f1Color);
  86. margin: 2vw 2vw 0 2vw;
  87. padding: 2vw;
  88. border-radius: 5px;
  89. .image {
  90. width: 25vw;
  91. height: 25vw;
  92. margin: 0 2vw 0 0;
  93. }
  94. .other {
  95. display: flex;
  96. flex-direction: column;
  97. flex-grow: 1;
  98. .name {
  99. font-size: var(--font16Size);
  100. font-weight: bold;
  101. }
  102. .other_1 {
  103. font-size: var(--font14Size);
  104. color: var(--f85Color);
  105. text {
  106. font-weight: bold;
  107. padding: 0 2vw;
  108. color: var(--ff0Color);
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }
  115. .scroll-view {
  116. position: absolute;
  117. top: 0;
  118. left: 0;
  119. right: 0;
  120. bottom: 0;
  121. .list-scroll-view {
  122. display: flex;
  123. flex-direction: row;
  124. flex-wrap: wrap;
  125. }
  126. }
  127. </style>