c_bargain.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view :class="{borderShow:isBorader}">
  3. <view class="combination" v-if="bargList.length">
  4. <view class="title acea-row row-between">
  5. <view class="acea-row row-column">
  6. <image src="../../../static/images/kanjia.png" class="pic"></image>
  7. </view>
  8. <navigator url="/pages/activity/goods_bargain/index" hover-class="none" class="more acea-row row-center-wrapper">GO<text class="iconfont icon-xiangyou"></text></navigator>
  9. </view>
  10. <view class="conter acea-row">
  11. <scroll-view scroll-x="true" style="white-space: nowrap; vertical-align: middle;" show-scrollbar="false">
  12. <view class="itemCon" v-for="(item, index) in bargList" :key="index" @click="bargDetail(item)">
  13. <view class="item">
  14. <view class="pictrue">
  15. <image :src="item.image"></image>
  16. </view>
  17. <view class="text lines1">
  18. <view class="name line1">{{item.title}}</view>
  19. <view class="money">¥<text class="num">{{item.minPrice}}</text></view>
  20. <view class="btn">参与砍价</view>
  21. </view>
  22. </view>
  23. </view>
  24. </scroll-view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. let app = getApp();
  31. import {
  32. toLogin
  33. } from '@/libs/login.js';
  34. import {
  35. getBargainIndexApi
  36. } from '@/api/activity.js';
  37. import { mapGetters } from 'vuex';
  38. export default {
  39. name: 'c_bargain',
  40. computed: mapGetters({
  41. 'userData': 'userInfo',
  42. 'uid': 'uid'
  43. }),
  44. data() {
  45. return {
  46. bargList: [],
  47. isBorader:false
  48. };
  49. },
  50. created() {
  51. this.getBargainList();
  52. },
  53. mounted() {
  54. },
  55. methods: {
  56. // 砍价列表
  57. getBargainList() {
  58. getBargainIndexApi().then(res => {
  59. this.bargList = res.data ? res.data.productList : [];
  60. })
  61. },
  62. bargDetail(item){
  63. uni.navigateTo({
  64. url: `/pages/activity/goods_bargain_details/index?id=${item.id}&startBargainUid=${this.uid}`
  65. });
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .pic{
  72. width: 130rpx;
  73. height: 30rpx;
  74. }
  75. .default{
  76. width: 690rpx;
  77. height: 300rpx;
  78. border-radius: 14rpx;
  79. margin: 26rpx auto 0 auto;
  80. background-color: #ccc;
  81. text-align: center;
  82. line-height: 300rpx;
  83. .iconfont{
  84. font-size: 80rpx;
  85. }
  86. }
  87. .combination{
  88. width: auto;
  89. background-image: url(../../../static/images/kjbj.png);
  90. background-repeat: no-repeat;
  91. background-size: 100%;
  92. background-color: #fff;
  93. border-radius: 14rpx;
  94. margin: 30rpx auto 0 auto;
  95. padding: 25rpx 20rpx 25rpx 20rpx;
  96. .title {
  97. .sign {
  98. font-size: 32rpx;
  99. color: $theme-color;
  100. margin-bottom: 2rpx;
  101. font-weight: bold;
  102. margin-bottom: 10rpx;
  103. }
  104. .name {
  105. text {
  106. color: #333333;
  107. font-size: 26rpx;
  108. font-weight: 400;
  109. }
  110. }
  111. .more {
  112. width: 86rpx;
  113. height: 40rpx;
  114. background: linear-gradient(142deg, #FFE9CE 0%, #FFD6A7 100%);
  115. opacity: 1;
  116. border-radius: 18px;
  117. font-size: 22rpx;
  118. color: #FE960F;
  119. padding-left: 8rpx;
  120. font-weight: 800;
  121. .iconfont {
  122. font-size: 21rpx;
  123. }
  124. }
  125. }
  126. .conter{
  127. margin-top: 28rpx;
  128. .itemCon {
  129. display: inline-block;
  130. width: 220rpx;
  131. margin-right: 24rpx;
  132. }
  133. .item{
  134. width:100%;
  135. .pictrue{
  136. width: 100%;
  137. height: 220rpx;
  138. border-radius: 6rpx;
  139. image{
  140. width: 100%;
  141. height: 100%;
  142. border-radius: 6rpx;
  143. }
  144. }
  145. .text{
  146. margin-top: 4rpx;
  147. .y_money {
  148. font-size: 24rpx;
  149. color: #999999;
  150. text-decoration: line-through;
  151. }
  152. .name {
  153. font-size: 24rpx;
  154. color: #000;
  155. margin-top: 14rpx;
  156. }
  157. .money {
  158. color: #FD502F;
  159. font-size: 28rpx;
  160. height: 100%;
  161. font-weight: bold;
  162. margin: 10rpx 0;
  163. .num {
  164. font-size: 28rpx;
  165. }
  166. }
  167. .btn{
  168. width: 220rpx;
  169. height: 48rpx;
  170. line-height: 48rpx;
  171. text-align: center;
  172. background: linear-gradient(129deg, #FF5555 0%, #FF0000 100%);
  173. opacity: 1;
  174. border-radius: 0px 0px 14rpx 14rpx;
  175. color: #FFFFFF;
  176. font-size: 26rpx;
  177. margin-top: 6rpx;
  178. }
  179. }
  180. }
  181. }
  182. }
  183. </style>