app-goods-poster-three.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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[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[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. iconPlugin: Object,
  42. multiple: Number,
  43. info: Object,
  44. form: Object,
  45. },
  46. data() {
  47. return {
  48. colorWhite: ['linear-gradient(#000000,rgba(0,0,0,0.5))', '#000000'],
  49. colorBlock: ['linear-gradient(#fc4a3b,rgba(252,74,59,0.5))', '#fc4a3b'],
  50. }
  51. },
  52. computed: {
  53. background() {
  54. if (parseInt(this.form.type) === 2) {
  55. let top = this.form.color;
  56. let bottom = this.$utils.colorRgba(this.form.color, 0.5);
  57. return 'linear-gradient(' + top + ',' + bottom + ')';
  58. } else {
  59. return this.form.color;
  60. }
  61. },
  62. },
  63. }
  64. </script>
  65. <style scoped lang="scss">
  66. .app-goods-poster-three {
  67. height: 100%;
  68. width: 100%;
  69. padding: #{24rpx} 0;
  70. .white {
  71. color: #d9d9d9 !important;
  72. }
  73. .box {
  74. transform: scale(0.46, 0.46);
  75. transform-origin: center top;
  76. /*zoom: 0.46;*/
  77. width: #{750rpx};
  78. height: #{1334rpx};
  79. margin: 0 auto;
  80. .user {
  81. padding: #{40rpx} #{35rpx} #{38rpx} #{35rpx};
  82. image {
  83. display: block;
  84. width: #{97rpx};
  85. height: #{97rpx};
  86. margin-right: #{30rpx};
  87. border-radius: 50%;
  88. }
  89. .poster-three-love {
  90. font-size: #{26rpx};
  91. color: #353535;
  92. }
  93. .poster-three-love:after {
  94. content: "";
  95. background-repeat: no-repeat;
  96. background-size: 100% 100%;
  97. background-image: url("../../../static/image/poster/three-love.png");
  98. height: #{24rpx};
  99. width: #{24rpx};
  100. display: inline-block;
  101. margin-left: #{10rpx};
  102. }
  103. }
  104. .goods-image {
  105. height: #{680rpx};
  106. width: #{680rpx};
  107. margin: 0 auto;
  108. }
  109. .goods {
  110. width: 100%;
  111. .goods-name {
  112. font-size: #{34rpx};
  113. color: #353535;
  114. max-width: #{600rpx};
  115. text-align: center;
  116. padding-top: #{28rpx};
  117. }
  118. .goods-price {
  119. margin-top: auto;
  120. margin-bottom: #{55rpx};
  121. }
  122. }
  123. .end-box {
  124. width: #{702rpx};
  125. height: #{230rpx + 24rpx + 24rpx};
  126. border-top: 1px solid #c9c9c9;
  127. margin: 0 auto;
  128. image {
  129. height: #{230rpx};
  130. width: #{230rpx};
  131. del-border-radius: 50%;
  132. display: block;
  133. }
  134. text {
  135. color: #353535;
  136. padding-left: #{30rpx};
  137. font-size: #{26rpx};
  138. }
  139. }
  140. }
  141. }
  142. </style>