index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <mobile-frame :frameStyle="frameStyle" @toPath="toPath">
  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. 微店
  8. <!-- <view class="list" v-for="(item,index) in list" :key="index">
  9. <view class="list_1">
  10. <view class="l">
  11. <image class="image" :src="item.url" mode=""></image>
  12. </view>
  13. <view class="c">
  14. <view class="name">
  15. {{item.name}}
  16. </view>
  17. <view class="other">
  18. <text>宝贝数<text>{{item.market_num}}</text></text>
  19. <text>关注数<text>{{item.follow_num}}</text></text>
  20. </view>
  21. </view>
  22. <view class="r" @tap="toFolllow(item)">
  23. <text class="iconfont icon-yduishoucangshixin-copy" v-if="item.is_follow==true"></text>
  24. <text class="iconfont icon-yduishoucangkongxin-copy" v-else></text>
  25. </view>
  26. </view>
  27. <view class="list_2">
  28. <view class="market" v-for="(tag,indexs) in item.market" :key="indexs">
  29. <image class="image" :src="tag.url" mode=""></image>
  30. <view class="money">
  31. ¥{{tag.money}}
  32. </view>
  33. </view>
  34. </view>
  35. </view> -->
  36. </view>
  37. </scroll-view>
  38. </view>
  39. </view>
  40. </mobile-frame>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. frameStyle: {
  47. useBar: true
  48. },
  49. list: [ //
  50. {
  51. url: require('@/static/test.png'),
  52. name: '官方自营店',
  53. market_num: 12,
  54. follow_num: 12,
  55. is_follow: true,
  56. market: [ //
  57. {
  58. url: require('@/static/test.png'),
  59. money: 10
  60. },
  61. {
  62. url: require('@/static/test.png'),
  63. money: 10
  64. },
  65. {
  66. url: require('@/static/test.png'),
  67. money: 10
  68. }
  69. ]
  70. },
  71. {
  72. url: require('@/static/test.png'),
  73. name: '官方自营店',
  74. market_num: 12,
  75. follow_num: 12,
  76. is_follow: false,
  77. market: [ //
  78. {
  79. url: require('@/static/test.png'),
  80. money: 10
  81. }
  82. ]
  83. }
  84. ]
  85. };
  86. },
  87. onShow: function() {},
  88. methods: {
  89. // 分页
  90. toPage() {
  91. },
  92. // 关注
  93. toFolllow(e) {
  94. console.log(e);
  95. },
  96. toPath(e) {
  97. if (e && e.route) uni.redirectTo({
  98. url: `/${e.route}`
  99. })
  100. },
  101. }
  102. }
  103. </script>
  104. <style lang="scss">
  105. .main {
  106. .one {
  107. .list {
  108. margin: 2vw 2vw 0 2vw;
  109. padding: 2vw;
  110. border-radius: 5px;
  111. background-color: #f5f5f5;
  112. .list_1 {
  113. display: flex;
  114. flex-direction: row;
  115. margin: 0 0 1vw 0;
  116. .l {
  117. width: 20vw;
  118. .image {
  119. width: 100%;
  120. height: 20vw;
  121. border-radius: 5px;
  122. }
  123. }
  124. .c {
  125. padding: 0 0 0 2vw;
  126. width: 60vw;
  127. .name {
  128. font-size: 16px;
  129. font-weight: bold;
  130. margin: 0 0 1vw 0;
  131. }
  132. .other {
  133. font-size: 14px;
  134. text {
  135. padding: 0 2vw 0 0;
  136. }
  137. }
  138. }
  139. .r {
  140. width: 10vw;
  141. text-align: right;
  142. text {
  143. font-size: 30px;
  144. }
  145. }
  146. }
  147. .list_2 {
  148. display: flex;
  149. flex-direction: row;
  150. flex-wrap: wrap;
  151. .market {
  152. position: relative;
  153. margin: 0 2vw 2vw 0;
  154. width: 29vw;
  155. .image {
  156. width: 100%;
  157. height: 20vw;
  158. }
  159. .money {
  160. position: absolute;
  161. bottom: 0;
  162. font-size: 10px;
  163. width: 100%;
  164. background-color: #0000005f;
  165. color: #fff;
  166. padding: 0.2vw 0;
  167. text-align: center;
  168. font-size: 14px;
  169. }
  170. }
  171. .market:nth-child(3n) {
  172. margin: 0 0 2vw 0;
  173. }
  174. }
  175. }
  176. }
  177. }
  178. .scroll-view {
  179. position: absolute;
  180. top: 0;
  181. left: 0;
  182. right: 0;
  183. bottom: 0;
  184. .list-scroll-view {
  185. display: flex;
  186. flex-direction: column;
  187. }
  188. }
  189. </style>