bd-info-extra.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="bd-info-extra dir-left-nowrap">
  3. <view v-if="minNumber > 1" class="bd-limit-buy dir-left-nowrap cross-center" :style="{'background': theme.background_o,'color': theme.color}">
  4. <view class="bd-limit-buy-img box-grow-1">
  5. <image :style="{'background': theme.background}" :src="goodsInfo.min_number"></image>
  6. </view>
  7. <view class="bd-limit-buy-text box-grow-0">{{minNumber}}{{unit}}起售</view>
  8. </view>
  9. <view v-if="limitBuy.status == 1" class="bd-limit-buy dir-left-nowrap cross-center" :style="{'background': theme.background_o,'color': theme.color}">
  10. <view class="bd-limit-buy-img box-grow-1">
  11. <image :style="{'background': theme.background}" :src="goodsInfo.limit_buy"></image>
  12. </view>
  13. <view class="bd-limit-buy-text box-grow-0">{{limitBuy.msg}}</view>
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import {mapState} from "vuex";
  19. export default {
  20. name: "bd-info-extra",
  21. props: {
  22. theme: Object,
  23. minNumber: Number,
  24. limitBuy: Object,
  25. goods: Object,
  26. unit: String
  27. },
  28. computed: {
  29. ...mapState({
  30. goodsInfo: state => state.mallConfig.__wxapp_img.goods
  31. })
  32. },
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .bd-limit-buy {
  37. font-size: $uni-font-size-weak-one;
  38. margin-left: 12upx;
  39. margin-top: 20upx;
  40. padding: 12upx 20upx;
  41. border-radius: 5upx;
  42. &:first-child {
  43. margin-left: 0;
  44. }
  45. .bd-limit-buy-img {
  46. width: 28upx;
  47. height: 28upx;
  48. margin-right: 10upx;
  49. image {
  50. width: 100%;
  51. height: 100%;
  52. }
  53. }
  54. }
  55. </style>