app-goods-poster-four.vue 4.6 KB

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