You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

180 lines
3.7 KiB

3 months ago
  1. <template>
  2. <view class="goodsList">
  3. <view class="item acea-row row-between-wrapper" v-for="(item,index) in tempArr" :key='index' @click="goDetail(item)">
  4. <view class="pic">
  5. <image :src="item.image" mode=""></image>
  6. <view :style="{ backgroundImage: `url(${item.activityStyle})` }" class="border-picture"></view>
  7. </view>
  8. <view class="pictxt">
  9. <view class="text line2">{{item.storeName}}</view>
  10. <view class="bottom acea-row row-between-wrapper">
  11. <view class="money">
  12. <text class="sign"></text>{{item.price}}
  13. </view>
  14. <view v-if="item.stock>0">
  15. <view>
  16. <!-- 多规格 -->
  17. <view class="bnt" @click.stop="goCartDuo(item)">
  18. 选规格
  19. <view class="num" v-if="item.cartNum">{{item.cartNum}}</view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="bnt end" v-else>已售罄</view>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. name: 'd_goodList',
  32. props: {
  33. dataConfig: {
  34. type: Object,
  35. default: () => {}
  36. },
  37. tempArr:{
  38. type: Array,
  39. default:[]
  40. },
  41. isLogin:{
  42. type: Boolean,
  43. default:false
  44. }
  45. },
  46. data() {
  47. return {
  48. };
  49. },
  50. created() {},
  51. mounted() {},
  52. methods: {
  53. goDetail(item){
  54. this.$emit('detail',item);
  55. },
  56. goCartDuo(item){
  57. this.$emit('gocartduo',item);
  58. },
  59. goCartDan(item,index){
  60. this.$emit('gocartdan',item,index);
  61. },
  62. CartNumDes(index,item){
  63. this.$emit('ChangeCartNumDan', false,index,item);
  64. },
  65. CartNumAdd(index,item){
  66. this.$emit('ChangeCartNumDan', true,index,item);
  67. }
  68. }
  69. };
  70. </script>
  71. <style lang="scss">
  72. .goodsList{
  73. padding: 0 30rpx;
  74. .item{
  75. width: 100%;
  76. box-sizing: border-box;
  77. margin-bottom: 63rpx;
  78. .pic{
  79. width: 140rpx;
  80. height: 140rpx;
  81. border-radius: 10rpx;
  82. position: relative;
  83. border-radius: 22rpx;
  84. image{
  85. width: 100%;
  86. height: 100%;
  87. border-radius: 22rpx;
  88. }
  89. }
  90. .pictxt{
  91. width: 372rpx;
  92. .text{
  93. font-size:26rpx;
  94. font-family:PingFang SC;
  95. font-weight:500;
  96. color: $crmeb-font-color;
  97. }
  98. .bottom{
  99. margin-top: 22rpx;
  100. .money{
  101. font-size: 34rpx;
  102. font-weight: 800;
  103. width: 212rpx;
  104. @include price_color(theme);
  105. .sign{
  106. font-size: 24rpx;
  107. }
  108. }
  109. .otPrice{
  110. font-size: 20rpx;
  111. font-family: PingFang SC;
  112. font-weight: 400;
  113. line-height: 24rpx;
  114. padding-left: 14rpx;
  115. color: #999999;
  116. }
  117. .cart{
  118. height: 46rpx;
  119. .pictrue{
  120. color: $crmeb-theme-color;
  121. font-size:46rpx;
  122. width: 46rpx;
  123. height: 46rpx;
  124. text-align: center;
  125. line-height: 46rpx;
  126. &.icon-jiahao{
  127. color: $crmeb-theme-color;
  128. }
  129. }
  130. .num{
  131. font-size: 30rpx;
  132. color: $crmeb-font-color;
  133. font-weight: bold;
  134. width: 60rpx;
  135. text-align: center;
  136. }
  137. }
  138. .icon-gouwuche6{
  139. width: 46rpx;
  140. height: 46rpx;
  141. background-color: $crmeb-theme-color;
  142. border-radius: 50%;
  143. color: $crmeb-font-color-white;
  144. font-size: 30rpx;
  145. }
  146. .bnt{
  147. padding: 0 20rpx;
  148. height: 46rpx;
  149. line-height: 46rpx;
  150. @include main_bg_color(theme);
  151. border-radius:23rpx;
  152. font-size: 22rpx;
  153. color: $crmeb-font-color-white;
  154. position: relative;
  155. &.end{
  156. background:$crmeb-font-color-disable;
  157. }
  158. .num{
  159. min-width: 12rpx;
  160. @include main_color(theme);
  161. @include coupons_border_color(theme);
  162. background: #fff;
  163. border-radius: 15px;
  164. position: absolute;
  165. right: -13rpx;
  166. top: -11rpx;
  167. font-size: 16rpx;
  168. padding: 0 11rpx;
  169. height: 32rpx;
  170. line-height: 32rpx;
  171. }
  172. }
  173. }
  174. }
  175. }
  176. }
  177. </style>