goldenBean.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="goldenBean">
  3. <view class="title">
  4. <image src="@/static/img/list1.png"></image>
  5. <view class="title-t"> 金豆专区 </view>
  6. <text class="about">超值体验</text>
  7. </view>
  8. <view class="box">
  9. <view class="header">
  10. <view class="left">
  11. <view class="title">
  12. 购买商品赠送金豆
  13. </view>
  14. <view class="about">
  15. 买到就是赚到
  16. </view>
  17. </view>
  18. <view class="right">
  19. <image src="@/static/img/right.png" @click="navto('/pages/product/jindouProduct')"></image>
  20. </view>
  21. </view>
  22. <view class="footer">
  23. <view class="list">
  24. <view class="item" v-for="d in data" @click="navto('/pages/product/product?id=' + d.id + '&is_gold=' + 1)">
  25. <view class="img">
  26. <image :src="d.image" mode=""></image>
  27. </view>
  28. <view class="name nowarp" :title='d.store_name'>
  29. {{ d.store_name }}
  30. </view>
  31. <view class="price">
  32. ¥{{ d.price }}
  33. </view>
  34. <view class="name" style="font-size: 22rpx;color: #999;">
  35. 已售 {{ d.sales || '0'}}
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. props: ['data'],
  46. mounted() {
  47. console.log(this.data);
  48. },
  49. methods: {
  50. navto(url) {
  51. uni.navigateTo({
  52. url: url
  53. });
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. $grey: #95A0B1;
  60. $text: #333333;
  61. $red: #FF4C4C;
  62. // 金豆专区
  63. .goldenBean {
  64. font-family: PingFang-SC-Bold;
  65. margin-top: 20rpx;
  66. padding: 20rpx;
  67. background-color: #fff;
  68. .title {
  69. display: flex;
  70. line-height: 40rpx;
  71. .title-t {
  72. color: $text;
  73. font-weight: bold;
  74. margin: 0 20rpx;
  75. font-size: 34rpx;
  76. }
  77. .about {
  78. font-size: 24rpx;
  79. color: $grey;
  80. }
  81. image {
  82. width: 40rpx;
  83. height: 40rpx;
  84. }
  85. }
  86. .box {
  87. margin: 20rpx 0;
  88. border-radius: 10rpx;
  89. overflow: hidden;
  90. .header {
  91. padding:20rpx;
  92. background: linear-gradient(90deg, #FF8F44 0%, #FFBD70 100%);
  93. padding-bottom: 80rpx;
  94. width: 100%;
  95. display: flex;
  96. justify-content: space-between;
  97. color: #fff;
  98. .left {
  99. line-height: 40rpx;
  100. .title {
  101. font-size: 32rpx;
  102. }
  103. .about {
  104. opacity: 0.9;
  105. font-size: 24rpx;
  106. }
  107. }
  108. .right {
  109. margin: auto 0;
  110. image {
  111. width: 40rpx;
  112. height: 40rpx;
  113. }
  114. }
  115. }
  116. .footer {
  117. height: 300rpx;
  118. background-color: $page-color-base;
  119. padding: 20rpx;
  120. margin-bottom: -50rpx;
  121. .list {
  122. display: flex;
  123. overflow: auto;
  124. border-radius: 10rpx;
  125. position: relative;
  126. top: -90rpx;
  127. background-color: #fff;
  128. .item {
  129. padding: 30rpx;
  130. border-right: solid 1rpx $page-color-base;
  131. .name {
  132. font-size: 24rpx;
  133. color: #3F3F3F;
  134. width: 150rpx;
  135. overflow: hidden;
  136. text-overflow:ellipsis;
  137. }
  138. .price {
  139. font-size: 28rpx;
  140. color: $red;
  141. font-weight: bold;
  142. }
  143. .img {
  144. image {
  145. width: 150rpx;
  146. height: 150rpx;
  147. }
  148. }
  149. }
  150. }
  151. }
  152. }
  153. }
  154. </style>