popup_platform.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <!-- 遮罩:点击自己关闭,点击子元素不关闭 -->
  3. <view class="popup-mask" @click="closePopup">
  4. <view class="popup-box">
  5. <!-- 标题 -->
  6. <view class="popup-title">提示</view>
  7. <!-- 内容 -->
  8. <view class="popup-content">
  9. 平台可提供代建广告服务,内容更优质
  10. </view>
  11. <!-- 按钮 -->
  12. <button class="popup-btn" @click="handleContact">
  13. 联系平台
  14. </button>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. name: "AdServicePopup",
  21. props: {
  22. visible: {
  23. type: Boolean,
  24. default: false,
  25. },
  26. },
  27. methods: {
  28. // 联系平台
  29. handleContact() {
  30. // uni.showToast({
  31. // title: "正在联系平台",
  32. // icon: "none",
  33. // });
  34. this.$emit("contact");
  35. },
  36. // 关闭弹窗
  37. closePopup() {
  38. this.$emit("update:visible", false);
  39. },
  40. },
  41. };
  42. </script>
  43. <style scoped>
  44. /* 遮罩 */
  45. .popup-mask {
  46. position: fixed;
  47. top: 0;
  48. left: 0;
  49. right: 0;
  50. bottom: 0;
  51. background: rgba(0, 0, 0, 0.7);
  52. display: flex;
  53. align-items: center;
  54. justify-content: center;
  55. z-index: 999;
  56. }
  57. /* 弹窗内容盒子 */
  58. .popup-box {
  59. width: 80%;
  60. height:408rpx;
  61. background: #fff;
  62. border-radius: 16rpx;
  63. padding: 48rpx 32rpx;
  64. display: flex;
  65. flex-direction: column;
  66. align-items: center;
  67. justify-content: space-between;
  68. }
  69. .popup-title {
  70. font-size: 36rpx;
  71. font-weight: bold;
  72. color: #333;
  73. /* margin-bottom: 86rpx; */
  74. }
  75. .popup-content {
  76. font-size: 32rpx;
  77. color: #333;
  78. text-align: center;
  79. /* margin-bottom: 97rpx; */
  80. }
  81. .popup-btn {
  82. width: 100%;
  83. height: 68rpx;
  84. line-height: 68rpx;
  85. background: #409eff;
  86. color: #fff;
  87. border-radius: 44rpx;
  88. font-size: 32rpx;
  89. border: none;
  90. }
  91. </style>