1
0

app-goods-poster-one.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="app-goods-poster-one main-center">
  3. <view class="box" :style="{'background': `${background}`,'transform' : `scale(${multiple},${multiple})`}">
  4. <view class="head cross-center">
  5. <image :src="info.avatar"></image>
  6. <view class="nickname main-center cross-center">
  7. {{info.nickname}}{{customize}}
  8. </view>
  9. </view>
  10. <view class="goods-image">
  11. <app-poster-image :form="form" :info="info"></app-poster-image>
  12. </view>
  13. <view class="end dir-left-nowrap">
  14. <view class="dir-top-nowrap goods-info">
  15. <view class="goods-name t-omit-two">{{info.goods_name}}</view>
  16. <view class="goods-price">
  17. <app-poster-price :info="info"></app-poster-price>
  18. </view>
  19. <view class="goods-remark">{{info.extra_mark[0] ? info.extra_mark[0] : `长按识别小程序码进入`}}</view>
  20. </view>
  21. <view class="poster cross-center">
  22. <image :src="info.qrcode_url"></image>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. </template>
  28. <script>
  29. import appPosterImage from "./app-poster-image.vue";
  30. import appPosterPrice from "./app-poster-price.vue";
  31. export default {
  32. name: "app-goods-poster-one",
  33. components: {
  34. appPosterImage,
  35. appPosterPrice
  36. },
  37. props: {
  38. multiple: Number,
  39. info: Object,
  40. form: Object
  41. },
  42. computed: {
  43. customize() {
  44. if (this.info.customize_text) {
  45. return this.info.customize_text;
  46. } else {
  47. return '向您推荐一个好物';
  48. }
  49. },
  50. background() {
  51. if (parseInt(this.form.type) === 2) {
  52. return `linear-gradient(${this.form.color},${this.$utils.colorRgba(this.form.color, 0.5)})`;
  53. } else {
  54. return this.form.color;
  55. }
  56. }
  57. },
  58. }
  59. </script>
  60. <style scoped lang="scss">
  61. .app-goods-poster-one {
  62. height: 100%;
  63. width: 100%;
  64. padding: #{24rpx} 0;
  65. .box {
  66. transform: scale(0.46, 0.46);
  67. transform-origin: center top;
  68. /*zoom: 0.46;*/
  69. width: #{750rpx};
  70. height: #{1334rpx};
  71. padding: 0 #{24rpx};
  72. margin: auto;
  73. .head {
  74. padding-top: #{96rpx};
  75. margin-bottom: #{39rpx};
  76. width: 100%;
  77. image {
  78. height: #{90rpx};
  79. width: #{90rpx};
  80. display: block;
  81. border-radius: 50%;
  82. }
  83. .nickname {
  84. line-height: #{54rpx};
  85. padding: 0 #{24rpx};
  86. margin-left: #{24rpx};
  87. font-size: #{24rpx};
  88. background: #f1f1f1;
  89. color: #4b4b4b;
  90. border-radius: #{30rpx};
  91. }
  92. }
  93. .goods-image {
  94. height: #{702rpx};
  95. width: 100%;
  96. border-radius: #{16rpx} #{16rpx} 0 0;
  97. overflow: hidden;
  98. }
  99. .end {
  100. background: #ffffff;
  101. height: #{311rpx};
  102. border-radius: 0 0 #{16rpx} #{16rpx};
  103. padding: #{28rpx};
  104. margin-top: -1px;
  105. .goods-info {
  106. max-width: #{450rpx};
  107. .goods-name {
  108. font-size: #{34rpx};
  109. color: #353535;
  110. }
  111. .goods-price {
  112. margin-top: auto;
  113. padding-bottom: #{65rpx};
  114. }
  115. .goods-remark {
  116. line-height: 1;
  117. color: #999999;
  118. padding-bottom: #{40rpx - 28rpx};
  119. font-size: #{28rpx};
  120. }
  121. }
  122. .poster {
  123. height: 100%;
  124. margin-left: auto;
  125. image {
  126. height: #{230rpx};
  127. width: #{230rpx};
  128. display: block;
  129. }
  130. }
  131. }
  132. }
  133. }
  134. </style>