newPeople.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <view class="newPeople">
  3. <!-- <view class="header">
  4. <view class="inputSearch" @click="clickSearch">
  5. <image src="@/static/img/search.png"></image>
  6. 请输入关键词
  7. </view>
  8. </view> -->
  9. <!-- <data-list :data='data'></data-list> -->
  10. <view class="good-wrap">
  11. <view class="good" v-for="item in 9" @click="navto('/pages/product/wholesaleDetail')">
  12. <image src="" mode="" class="goo-img"></image>
  13. <view class="good-tit clamp">
  14. 无患子植物家居眼罩无患子植物家居眼罩无患子植物家居眼罩
  15. </view>
  16. <view class="good-price flex">
  17. <view class="new-price">
  18. ¥2690
  19. </view>
  20. <view class="old-price">
  21. ¥3600
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import { loadIndexs } from '@/api/index.js';
  30. import dataList from '@/components/datalist.vue'
  31. import { getNewList } from '@/api/whole.js'
  32. export default {
  33. data() {
  34. return {
  35. // data: {
  36. // page: 1,
  37. // limit: 10,
  38. // sum: 0,
  39. // loadingType: 'loadmore',
  40. // data: []
  41. // }
  42. }
  43. },
  44. components: {
  45. dataList
  46. },
  47. onLoad() {
  48. this.getNewList()
  49. },
  50. // mounted() {
  51. // this.init()
  52. // },
  53. methods: {
  54. // 點擊搜索框
  55. clickSearch() {
  56. uni.navigateTo({
  57. url: '/pages/product/search'
  58. });
  59. },
  60. init() {
  61. this.getData()
  62. },
  63. getNewList() {
  64. getNewList().then(res => {
  65. console.log(res,'getNewList')
  66. })
  67. },
  68. getData() {
  69. loadIndexs().then(res => {
  70. this.data = res.data.info.bastList
  71. this.loadingType = 'nomore'
  72. })
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. $grey: #95A0B1;
  79. $text: #333333;
  80. $red: #FF4C4C;
  81. .newPeople {
  82. .header {
  83. background-color: #fff;
  84. padding: 30rpx;
  85. .inputSearch {
  86. line-height: 35rpx;
  87. text-align: center;
  88. color: $grey;
  89. padding: 10rpx 20rpx;
  90. border-radius: 50rpx;
  91. background-color: $page-color-base;
  92. image {
  93. width: 32rpx;
  94. height: 32rpx;
  95. margin: 0 20rpx;
  96. margin-bottom: -3rpx;
  97. }
  98. }
  99. }
  100. .list {
  101. padding: 20rpx;
  102. display: flex;
  103. justify-content: space-between;
  104. flex-wrap: wrap;
  105. .item {
  106. background-color: #fff;
  107. border-radius: 10rpx;
  108. overflow: hidden;
  109. // box-shadow: 2rpx 2rpx 10rpx #e1e1e1;
  110. margin: 10rpx 0;
  111. width: 48%;
  112. height: 0;
  113. padding-bottom: calc(48% + 120rpx);
  114. .img {
  115. border-radius: 10rpx;
  116. overflow: hidden;
  117. width: 100%;
  118. height: 0;
  119. padding-bottom: 100%;
  120. image {
  121. width: 100%;
  122. height: 100%;
  123. }
  124. }
  125. .name {
  126. margin: 0 10rpx;
  127. font-size: 30rpx;
  128. font-weight: bold;
  129. }
  130. .allprice {
  131. padding: 20rpx 0;
  132. .price {
  133. color: $red;
  134. }
  135. .ot-price {
  136. color: $grey;
  137. text-decoration: line-through;
  138. font-size: 26rpx;
  139. }
  140. }
  141. }
  142. }
  143. .load {
  144. text-align: center;
  145. color: $grey;
  146. font-size: 28rpx;
  147. }
  148. }
  149. .good-wrap {
  150. display: flex;
  151. // padding: 0 0 20rpx 20rpx;
  152. padding-left: 20rpx;
  153. padding-top: 20rpx;
  154. flex-wrap: wrap;
  155. }
  156. .good {
  157. width: 345rpx;
  158. height: 480rpx;
  159. margin-right: 20rpx;
  160. margin-bottom: 20rpx;
  161. background: #FFFFFF;
  162. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  163. border-radius: 10rpx;
  164. .goo-img {
  165. width: 345rpx;
  166. height: 345rpx;
  167. border-radius: 10rpx 10rpx 0 0;
  168. background-color: #bfa;
  169. }
  170. .good-tit {
  171. padding: 15rpx 20rpx;
  172. font-size: 30rpx;
  173. font-family: PingFang SC;
  174. font-weight: bold;
  175. color: #333333;
  176. line-height: 35rpx;
  177. }
  178. .good-price {
  179. padding-left: 20rpx;
  180. justify-content: flex-start;
  181. .new-price {
  182. font-size: 36rpx;
  183. font-family: PingFang SC;
  184. font-weight: bold;
  185. color: #FF4C4C;
  186. }
  187. .old-price {
  188. padding-left: 8rpx;
  189. font-size: 26rpx;
  190. font-family: PingFang SC;
  191. font-weight: bold;
  192. text-decoration: line-through;
  193. color: #999999;
  194. }
  195. }
  196. }
  197. </style>