shopItem.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view class="shop_list">
  3. <view class="shop_list_item">
  4. <view class="shop_list_item_shop">
  5. <view class="shop_list_item_shop_image" v-if="isShowImg"><image :src="itemObject.image" mode="widthFix"></image></view>
  6. <view class="shop_list_item_shop_con">
  7. <view class="shop_list_item_shop_con_title">{{itemObject.store_name}}</view>
  8. <view class="shop_list_item_shop_con_message">
  9. <span>库存:{{itemObject.stock}}</span>
  10. <span>销量:{{itemObject.sales}}</span>
  11. </view>
  12. <view class="shop_list_item_shop_con_price">
  13. <span>{{itemObject.price}}</span>
  14. <del>{{itemObject.ot_price}}</del>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="shop_list_item_handle">
  19. <slot></slot>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. // +----------------------------------------------------------------------
  26. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  27. // +----------------------------------------------------------------------
  28. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  29. // +----------------------------------------------------------------------
  30. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  31. // +----------------------------------------------------------------------
  32. // | Author: CRMEB Team <admin@crmeb.com>
  33. // +----------------------------------------------------------------------
  34. export default {
  35. props: {
  36. isShowImg: {
  37. type: Boolean,
  38. default: false
  39. },
  40. itemObject: {
  41. type: Object,
  42. default() {
  43. return {}
  44. }
  45. },
  46. index: {
  47. type: Number | String,
  48. default: 0
  49. }
  50. },
  51. data() {
  52. return {};
  53. },
  54. created() {
  55. },
  56. methods: {
  57. handleMethod(item, obj) {
  58. this.$emit('handleMethod', item, obj, this.index);
  59. }
  60. }
  61. };
  62. </script>
  63. <style lang="scss" scoped>
  64. .shop_list {
  65. margin-top: 20rpx;
  66. padding: 0 20rpx;
  67. &_item {
  68. padding: 30rpx;
  69. background: #ffffff;
  70. border-radius: 10px;
  71. margin-bottom: 20rpx;
  72. &_shop {
  73. display: flex;
  74. &_image {
  75. width: 150rpx;
  76. height: 150rpx;
  77. background: #eeeeee;
  78. border-radius: 16px;
  79. overflow: hidden;
  80. image {
  81. width: 100%;
  82. }
  83. }
  84. &_con {
  85. flex: 1;
  86. display: flex;
  87. flex-direction: column;
  88. margin-left: 20rpx;
  89. padding-bottom: 12rpx;
  90. &_title {
  91. font-size: 28rpx;
  92. color: #282828;
  93. // font-weight: bold;
  94. padding-top: 4rpx;
  95. }
  96. &_message {
  97. margin-top: 15rpx;
  98. font-size: 22rpx;
  99. color: #868686;
  100. > span:nth-child(1) {
  101. display: inline-block;
  102. margin-right: 20rpx;
  103. }
  104. }
  105. &_price {
  106. margin-top: 10rpx;
  107. > span {
  108. display: inline-block;
  109. margin-right: 7rpx;
  110. font-size: 30rpx;
  111. color: #e93323;
  112. }
  113. > del {
  114. color: #bebebe;
  115. font-size: 26rpx;
  116. }
  117. }
  118. }
  119. }
  120. &_handle {
  121. display: flex;
  122. justify-content: flex-end;
  123. > view {
  124. margin-left: 18rpx;
  125. padding: 0 34rpx;
  126. height: 60rpx;
  127. border: 1px solid #c7c7c7;
  128. border-radius: 30px;
  129. display: flex;
  130. align-items: center;
  131. justify-content: center;
  132. margin-top: 30rpx;
  133. font-size: 26rpx;
  134. color: #999999;
  135. }
  136. }
  137. }
  138. }
  139. </style>