gift.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <view class="hotgoods">
  3. <view class="item" v-for="item in list" :key="item.id" @click="nav(item.id)">
  4. <view class="item_left">
  5. <image :src="item.image" alt="" />
  6. </view>
  7. <view class="item_right">
  8. <div class="lienTwo">{{item.store_name}}</div>
  9. <div class="item_right_bottom">
  10. <p>
  11. <i>¥{{item.ot_price}}</i>
  12. <!-- <u-icon name="arrow-downward" class="icon"></u-icon> -->
  13. <!-- <b>直降{{item.ot_price - item.price}}元</b> -->
  14. </p>
  15. <span>
  16. <i>¥{{item.price}}</i>
  17. <!-- <div class="em">
  18. 赠{{item.gain_award_integral}}积分
  19. </div> -->
  20. </span>
  21. </div>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import { groom6 } from "@/api/index.js";
  28. import {uview} from 'uview-ui';
  29. export default {
  30. data() {
  31. return {
  32. list: [],
  33. };
  34. },
  35. onLoad() {
  36. this.groom6();
  37. },
  38. methods: {
  39. // 获取列表数据
  40. async groom6() {
  41. try {
  42. this.res = await groom6()
  43. this.list = this.res.data.list
  44. // console.log('11111111', this.res)
  45. console.log('11111111', this.res.data.list)
  46. } catch (error) {
  47. console.log(error)
  48. }
  49. },
  50. nav(id) {
  51. uni.navigateTo({
  52. url: "/pages/product/product?id=" + id
  53. })
  54. }
  55. },
  56. };
  57. </script>
  58. <!-- Dengxia -->
  59. <style lang="scss">
  60. .extend {
  61. transition: 0.2s;
  62. &:hover {
  63. transform: translateY(-2px);
  64. box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.15);
  65. cursor: pointer;
  66. }
  67. }
  68. h3 {
  69. font-weight: normal;
  70. }
  71. i,
  72. em {
  73. font-style: normal;
  74. }
  75. b {
  76. font-weight: 400;
  77. }
  78. .hotgoods {
  79. font-family: PingFang SC;
  80. width: 100vw;
  81. min-height: 100vh;
  82. background-color: #f7f7f7;
  83. padding: 31rpx 21rpx;
  84. .item {
  85. // @extend .extend;
  86. margin-bottom: 20rpx;
  87. width: 100%;
  88. height: 276rpx;
  89. background: #ffffff;
  90. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
  91. // opacity: 0.53;
  92. border-radius: 10rpx;
  93. display: flex;
  94. align-items: center;
  95. padding: 15rpx;
  96. // justify-content: space-between;
  97. .item_left {
  98. margin-right: 10px;
  99. // margin-left: 15rpx;
  100. image {
  101. width: 236rpx;
  102. height: 236rpx;
  103. }
  104. }
  105. .item_right {
  106. height: 236rpx;
  107. display: flex;
  108. // 奇怪
  109. flex-direction: column;
  110. justify-content: space-between;
  111. min-width: 0;
  112. .lienTwo {
  113. word-break: break-all;
  114. font-size: 16px;
  115. color: #333333;
  116. font-weight: bold;
  117. width: 318rpx;
  118. text-overflow: -o-ellipsis-lastline;
  119. overflow: hidden; //溢出内容隐藏
  120. text-overflow: ellipsis; //文本溢出部分用省略号表示
  121. display: -webkit-box; //特别显示模式
  122. -webkit-line-clamp: 2; //行数
  123. line-clamp: 2;
  124. -webkit-box-orient: vertical; //盒子中内容竖直排列
  125. }
  126. .item_right_bottom {
  127. display: flex;
  128. flex-direction: column;
  129. justify-content: space-between;
  130. p {
  131. display: inline-block;
  132. margin-bottom: 15rpx;
  133. i {
  134. color: #999999;
  135. margin-right: 15rpx;
  136. text-decoration: line-through
  137. }
  138. .icon{
  139. color: #b59467;
  140. }
  141. b {
  142. color: #B59467;
  143. margin-left: 15rpx;
  144. }
  145. }
  146. span {
  147. // display: inline-block;
  148. display: flex;
  149. // justify-content: center;
  150. align-items: center;
  151. i {
  152. color: #FF4C4C;
  153. font-size: 36rpx;
  154. margin-right: 10rpx;
  155. }
  156. .em {
  157. display: inline-block;
  158. width: 120rpx;
  159. height: 37rpx;
  160. background: linear-gradient(90deg, #FF834D, #FF2600);
  161. border-radius: 12rpx 0rpx 12rpx 0rpx;
  162. color: #FFFFFF;
  163. font-weight: 500;
  164. font-size: 10px;
  165. text-align: center;
  166. }
  167. }
  168. }
  169. }
  170. }
  171. }
  172. </style>