qrCodePopup.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <popup v-model:show="showValue" round :close-on-click-overlay="closeOnClickOverlay" class="qr-code-popup" teleport="body">
  3. <div class="qr-code-content">
  4. <div class="qr-code-title">
  5. <slot name="success"></slot>
  6. <div class="title-text">
  7. <div class="text-item">扫码进入 <span class="blue">飞鸟管家</span> 小程序</div>
  8. <div class="text-item">查看农场更多详细信息</div>
  9. </div>
  10. </div>
  11. <div class="qr-code-img">
  12. <img src="@/assets/img/home/qrcode.png" alt="">
  13. </div>
  14. <div class="img-tips">长按图片扫码或保存</div>
  15. </div>
  16. </popup>
  17. </template>
  18. <script setup>
  19. import { ref } from "vue";
  20. import { Popup } from "vant";
  21. const showValue = ref(false);
  22. const props = defineProps({
  23. closeOnClickOverlay: {
  24. type: Boolean,
  25. default: false,
  26. },
  27. });
  28. function showPopup() {
  29. showValue.value = true;
  30. }
  31. defineExpose({
  32. showPopup,
  33. });
  34. </script>
  35. <style lang="scss" scoped>
  36. .qr-code-popup {
  37. width: 321px;
  38. background: linear-gradient(0deg, #FFFFFF 5%, #FFFFFF 65%, #B2DCFD 123.05%, #2199F8 137.88%);
  39. .qr-code-content {
  40. display: flex;
  41. flex-direction: column;
  42. align-items: center;
  43. justify-content: center;
  44. padding: 20px 20px 28px 20px;
  45. }
  46. .qr-code-img {
  47. width: 212px;
  48. img {
  49. width: 100%;
  50. }
  51. }
  52. .title-text {
  53. text-align: center;
  54. padding: 6px 0 8px 0;
  55. .text-item {
  56. font-size: 20px;
  57. color: #000;
  58. line-height: 32px;
  59. .blue {
  60. color: #2199F8;
  61. font-weight: 500;
  62. padding: 0 2px;
  63. }
  64. }
  65. }
  66. .img-tips {
  67. font-size: 16px;
  68. color: #7A7A7A;
  69. padding-top: 28px;
  70. }
  71. }
  72. </style>