爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
2.2 KiB

1 week ago
  1. <template>
  2. <view class="email-popup" v-if="show">
  3. <view class="popup-mask" @tap="onClose"></view>
  4. <view class="popup-content">
  5. <view class="popup-header">
  6. <text class="close" @tap="onClose">关闭</text>
  7. <text class="title">客服邮箱</text>
  8. </view>
  9. <view class="email-content" @tap="copyEmail">
  10. <text>hanhaihuishouhf@hh.com</text>
  11. <uni-icons type="email" size="23" class="copy-icon"></uni-icons>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'email-popup',
  19. props: {
  20. show: {
  21. type: Boolean,
  22. default: false
  23. }
  24. },
  25. methods: {
  26. onClose() {
  27. this.$emit('close')
  28. },
  29. copyEmail() {
  30. uni.setClipboardData({
  31. data: 'hanhaihuishouhf@hh.com',
  32. success: () => {
  33. uni.showToast({
  34. title: '邮箱已复制',
  35. icon: 'success'
  36. })
  37. }
  38. })
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss" scoped>
  44. .email-popup {
  45. position: fixed;
  46. top: 0;
  47. left: 0;
  48. right: 0;
  49. bottom: 0;
  50. z-index: 999;
  51. .popup-mask {
  52. position: absolute;
  53. top: 0;
  54. left: 0;
  55. right: 0;
  56. bottom: 0;
  57. background: rgba(0, 0, 0, 0.4);
  58. }
  59. .popup-content {
  60. position: absolute;
  61. left: 0;
  62. right: 0;
  63. bottom: 0;
  64. background: #fff;
  65. border-radius: 20rpx 20rpx 0 0;
  66. overflow: hidden;
  67. transform: translateY(0);
  68. transition: transform 0.3s ease-out;
  69. .popup-header {
  70. position: relative;
  71. height: 160rpx;
  72. display: flex;
  73. align-items: center;
  74. justify-content: center;
  75. border-bottom: 1rpx solid #f5f5f5;
  76. .title {
  77. font-size: 34rpx;
  78. color: #333;
  79. font-weight: 500;
  80. }
  81. .close {
  82. position: absolute;
  83. left: 30rpx;
  84. font-size: 32rpx;
  85. color: #333;
  86. }
  87. }
  88. .email-content {
  89. height: 140rpx;
  90. display: flex;
  91. align-items: center;
  92. justify-content: center;
  93. padding: 0 40rpx;
  94. margin-bottom: env(safe-area-inset-bottom);
  95. text {
  96. font-size: 36rpx;
  97. color: #333;
  98. font-weight: 400;
  99. }
  100. .copy-icon {
  101. background: #f5f5f5;
  102. padding: 20rpx;
  103. border-radius: 50%;
  104. }
  105. }
  106. }
  107. }
  108. </style>