goodsInformation.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="detail" @click="$emit('toDetail')">
  3. <view class="content">
  4. <image
  5. src="https://img14.360buyimg.com/jdcms/s460x460_jfs/t1/229465/15/14432/86913/6631bc7cF31d5200b/63dd6b0e1dc4e73c.jpg.webp"
  6. mode="" class="content-img"></image>
  7. <view class="mask" v-if="status!=1">
  8. <view class="text-1" v-if="status == 2">
  9. 审核中
  10. </view>
  11. <view class="text-1" v-if="status == 3">
  12. 审核失败
  13. </view>
  14. <view class="text-1" v-if="status == 4">
  15. 已下架
  16. </view>
  17. </view>
  18. <view class="content-right">
  19. <view class="goods-title">
  20. La Chapelle Sport拉夏贝尔高级感收…
  21. </view>
  22. <view class="inventory">
  23. <text>库存:</text>
  24. <text>222</text>
  25. </view>
  26. <view class="commodity-price">
  27. <text style="font-size: 20rpx;">¥</text>
  28. <text>133</text>.
  29. <text style="font-size: 20rpx;">22</text>
  30. </view>
  31. </view>
  32. </view>
  33. <view class="btn-list" v-if="productAndCommodity=='product'">
  34. <button class="btn-1" v-if="status == 1">下架商品</button>
  35. <button class="btn-1" v-if="status == 2">查看详情</button>
  36. <button class="btn-2" v-if="status == 3">重新提交</button>
  37. <button class="btn-1" v-if="status == 4">编辑</button>
  38. <button class="btn-1" v-if="status == 4">上架商品</button>
  39. </view>
  40. <view class="btn-list" v-else>
  41. <button class="btn-1" v-if="status == 1">我要打折</button>
  42. <button class="btn-1" v-if="status == 1">下架</button>
  43. <button class="btn-1" v-if="status == 4">删除</button>
  44. <button class="btn-1" v-if="status == 4">商家</button>
  45. <button class="btn-2" v-if="status == 3">编辑</button>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. props: {
  52. status: {
  53. typeof: String,
  54. default: ""
  55. },
  56. productAndCommodity:{
  57. typeof: String,
  58. default:""
  59. }
  60. },
  61. data() {
  62. return {}
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .detail {
  68. padding: 24rpx 20rpx;
  69. background-color: #fff;
  70. border-radius: 16rpx;
  71. .content {
  72. display: flex;
  73. position: relative;
  74. flex-shrink: 0;
  75. justify-content: flex-start;
  76. .content-img {
  77. width: 164rpx;
  78. height: 164rpx;
  79. border-radius: 12rpx;
  80. margin-right: 20rpx;
  81. flex-shrink: 0;
  82. }
  83. .mask {
  84. width: 164rpx;
  85. height: 164rpx;
  86. border-radius: 12rpx;
  87. position: absolute;
  88. background-color: rgba(255, 255, 255, .3);
  89. z-index: 100;
  90. display: flex;
  91. justify-content: center;
  92. align-items: center;
  93. .text-1 {
  94. width: 108rpx;
  95. height: 44rpx;
  96. text-align: center;
  97. line-height: 44rpx;
  98. color: #fff;
  99. background-color: rgba(0, 0, 0, .4);
  100. border-radius: 22rpx;
  101. font-size: 20rpx;
  102. }
  103. }
  104. .content-right {
  105. .goods-title {
  106. color: #333;
  107. margin-bottom: 20rpx;
  108. width: 88%;
  109. overflow: hidden;
  110. text-overflow: ellipsis;
  111. white-space: nowrap;
  112. word-break: break-word;
  113. }
  114. .inventory {
  115. color: rgba(54, 54, 54, .5);
  116. font-size: 24rpx;
  117. margin-bottom: 30rpx;
  118. }
  119. .commodity-price {
  120. color: #f83224;
  121. font-size: 32rpx;
  122. font-weight: 600;
  123. }
  124. }
  125. }
  126. .btn-list {
  127. display: flex;
  128. justify-content: flex-end;
  129. .btn-1 {
  130. width: 152rpx;
  131. height: 60rpx;
  132. margin: 0;
  133. padding: 0;
  134. font-size: 26rpx;
  135. color: #333;
  136. border: 2rpx solid rgba(151, 151, 151, .3);
  137. border-radius: 30rpx;
  138. background-color: #fff;
  139. line-height: 60rpx;
  140. margin-left: 20rpx;
  141. }
  142. .btn-2 {
  143. width: 152rpx;
  144. height: 60rpx;
  145. margin: 0;
  146. padding: 0;
  147. font-size: 26rpx;
  148. color: #f83224;
  149. border: 2rpx solid #f83224;
  150. border-radius: 30rpx;
  151. background-color: #fff;
  152. line-height: 60rpx;
  153. }
  154. }
  155. }
  156. </style>