app-goods-poster-three.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view class="app-goods-poster-three">
  3. <view class="box dir-top-nowrap" :style="{'background': `${background}`,'transform' : `scale(${multiple},${multiple})`}">
  4. <view class="user dir-left-nowrap box-grow-0">
  5. <image :src="info.avatar"></image>
  6. <view class="poster-three-love" :class="{'white': colorWhite.indexOf(background) !== -1}">
  7. 我看上了这款商品<br>
  8. {{(info.extra_mark && info.extra_mark[4]) ? info.extra_mark[4] : `帮我看看咋样啊~`}}<br>
  9. 比心~
  10. </view>
  11. </view>
  12. <view class="goods-image box-grow-0">
  13. <app-poster-image :form="form" :info="info"></app-poster-image>
  14. </view>
  15. <view class="goods cross-center dir-top-nowrap main-center box-grow-1">
  16. <view class="goods-name t-omit" :class="{'white': colorWhite.indexOf(background) !== -1}">
  17. {{info.goods_name}}
  18. </view>
  19. <view class="goods-price">
  20. <app-poster-price :info="info" :white-color="colorWhite.indexOf(background) !== -1"
  21. :text-color="colorBlock.indexOf(background) !== -1 ? `#353535`: ``"></app-poster-price>
  22. </view>
  23. </view>
  24. <view class="dir-left-nowrap main-center box-grow-0 end-box cross-center">
  25. <image :src="info.qrcode_url"></image>
  26. <text :class="{'white': colorWhite.indexOf(background) !== -1}">{{(info.extra_mark && info.extra_mark[2]) ? info.extra_mark[2] : `长按识别小程序码 即可查看~`}}</text>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import appPosterImage from "./app-poster-image";
  33. import appPosterPrice from "./app-poster-price"
  34. export default {
  35. name: "app-goods-poster-three",
  36. components: {
  37. appPosterImage,
  38. appPosterPrice,
  39. },
  40. props: {
  41. multiple: {
  42. type: Number,
  43. required: true,
  44. },
  45. info: {
  46. type: Object,
  47. required: true,
  48. },
  49. form: {
  50. type: Object,
  51. required: true,
  52. },
  53. },
  54. data() {
  55. return {
  56. colorWhite: ['linear-gradient(#000000,rgba(0,0,0,0.5))', '#000000'],
  57. colorBlock: ['linear-gradient(#fc4a3b,rgba(252,74,59,0.5))', '#fc4a3b'],
  58. }
  59. },
  60. computed: {
  61. background() {
  62. if (parseInt(this.form.type) === 2) {
  63. let top = this.form.color;
  64. let bottom = this.$utils.colorRgba(this.form.color, 0.5);
  65. return 'linear-gradient(' + top + ',' + bottom + ')';
  66. } else {
  67. return this.form.color;
  68. }
  69. },
  70. },
  71. }
  72. </script>
  73. <style scoped lang="scss">
  74. .app-goods-poster-three {
  75. height: 100%;
  76. width: 100%;
  77. padding: #{24rpx} 0;
  78. .white {
  79. color: #d9d9d9 !important;
  80. }
  81. .box {
  82. transform: scale(0.46, 0.46);
  83. transform-origin: center top;
  84. /*zoom: 0.46;*/
  85. width: #{750rpx};
  86. height: #{1334rpx};
  87. margin: 0 auto;
  88. .user {
  89. padding: #{40rpx} #{35rpx} #{38rpx} #{35rpx};
  90. image {
  91. display: block;
  92. width: #{97rpx};
  93. height: #{97rpx};
  94. margin-right: #{30rpx};
  95. border-radius: 50%;
  96. }
  97. .poster-three-love {
  98. font-size: #{26rpx};
  99. color: #353535;
  100. }
  101. .poster-three-love:after {
  102. content: "";
  103. background-repeat: no-repeat;
  104. background-size: 100% 100%;
  105. background-image: url("../../../static/image/poster/three-love.png");
  106. height: #{24rpx};
  107. width: #{24rpx};
  108. display: inline-block;
  109. margin-left: #{10rpx};
  110. }
  111. }
  112. .goods-image {
  113. height: #{680rpx};
  114. width: #{680rpx};
  115. margin: 0 auto;
  116. }
  117. .goods {
  118. width: 100%;
  119. .goods-name {
  120. font-size: #{34rpx};
  121. color: #353535;
  122. max-width: #{600rpx};
  123. text-align: center;
  124. padding-top: #{28rpx};
  125. }
  126. .goods-price {
  127. margin-top: auto;
  128. margin-bottom: #{55rpx};
  129. }
  130. }
  131. .end-box {
  132. width: #{702rpx};
  133. height: #{230rpx + 24rpx + 24rpx};
  134. border-top: 1px solid #c9c9c9;
  135. margin: 0 auto;
  136. image {
  137. height: #{230rpx};
  138. width: #{230rpx};
  139. del-border-radius: 50%;
  140. display: block;
  141. }
  142. text {
  143. color: #353535;
  144. padding-left: #{30rpx};
  145. font-size: #{26rpx};
  146. }
  147. }
  148. }
  149. }
  150. </style>