invite-poster.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view>
  3. <l-painter :css="`width: 600rpx;height: 960rpx;`" isCanvasToTempFilePath
  4. @success="handleSuccess" custom-style="position: fixed; left: 200%">
  5. <l-painter-image :src="config.poster"
  6. css="position:absolute; width: 600rpx;height: 960rpx;object-fit: cover; border-radius: 20rpx;" />
  7. <l-painter-view
  8. css="position:absolute;background-color: #ffffff;width:100%;height: 240rpx;border-radius: 14rpx; bottom: 0;left: 0;padding-top: 30rpx;">
  9. <l-painter-view css="width: 330rpx; display: inline-block;padding-left: 30rpx;">
  10. <l-painter-view >
  11. <l-painter-image :src="config.avatar"
  12. css="width: 80rpx; height: 80rpx; border-radius: 50%;" />
  13. <l-painter-text :text="config.nickname"
  14. css="margin-top: 10rpx; margin-left: 20rpx; color: #333333; font-size: 32rpx;line-clamp:1;font-weight: bold; " />
  15. </l-painter-view>
  16. <l-painter-view css="margin-top: 30rpx;line-height: 34rpx;">
  17. <l-painter-text text="邀请您一起进入有机生活!" css="color: #333333; font-size: 28rpx;" />
  18. </l-painter-view>
  19. <l-painter-view css="margin-top: 20rpx;">
  20. <l-painter-text :text="`邀请码:${config.code}`" :css="`color: #FF2C3C; font-size: 28rpx;`" />
  21. </l-painter-view>
  22. </l-painter-view>
  23. <l-painter-view css="display: inline-block;margin-top:10rpx;">
  24. <l-painter-view css="padding-left: 30rpx;">
  25. <!-- #ifdef H5 || APP-PLUS -->
  26. <l-painter-qrcode css="width: 180rpx; height: 180rpx;" :text="config.link">
  27. </l-painter-qrcode>
  28. <!-- #endif -->
  29. <!-- #ifdef MP -->
  30. <l-painter-image :src="config.qrCode" css="width: 180rpx; height: 180rpx;" />
  31. <!-- #endif -->
  32. </l-painter-view>
  33. </l-painter-view>
  34. </l-painter-view>
  35. </l-painter>
  36. </view>
  37. </template>
  38. <script>
  39. import lPainter from '@/components/lime-painter/components/l-painter/l-painter.vue'
  40. import lPainterImage from '@/components/lime-painter/components/l-painter-image/l-painter-image.vue'
  41. import lPainterText from '@/components/lime-painter/components/l-painter-text/l-painter-text.vue'
  42. import lPainterView from '@/components/lime-painter/components/l-painter-view/l-painter-view.vue'
  43. import lPainterQrcode from '@/components/lime-painter/components/l-painter-qrcode/l-painter-qrcode.vue'
  44. export default {
  45. name: "share-poster",
  46. components: {
  47. lPainter,
  48. lPainterImage,
  49. lPainterText,
  50. lPainterView,
  51. lPainterQrcode
  52. },
  53. props: {
  54. config: {
  55. type: Object,
  56. default: () => ({})
  57. },
  58. goodsId: {
  59. type: [Number, String],
  60. default: ''
  61. },
  62. qrcode: {
  63. type: [String],
  64. default: ''
  65. }
  66. },
  67. data() {
  68. return {
  69. };
  70. },
  71. methods: {
  72. handleSuccess(val) {
  73. this.$emit('success', val)
  74. }
  75. }
  76. }
  77. </script>
  78. <style>
  79. </style>