index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="modal">
  3. <view class="dialog-border">
  4. <image class="top-icon"
  5. src="https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/aDrawbTdSWjg1742dea71dd1c645b6b398a619bfc9fe.png/1.png"
  6. mode=""></image>
  7. <view class="dialog-content">
  8. <image class="title-icon"
  9. :src="titleIcon"
  10. mode=""></image>
  11. <slot></slot>
  12. </view>
  13. <view class="btn-box">
  14. <view class="btn" @click="submit">
  15. {{btnText}}
  16. </view>
  17. </view>
  18. <image class="close" src="@/static/close.png" mode="" @click="handleClose('show')"></image>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. props: {
  25. titleIcon: {
  26. type: String,
  27. default: 'https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/ApX9kwEUYgE84e54016e951eaab20c5a504e8c5df6f2.png/1.png'
  28. },
  29. btnText: {
  30. type: String,
  31. default: '确认'
  32. },
  33. },
  34. data() {
  35. return {
  36. }
  37. },
  38. methods: {
  39. submit(){
  40. this.$emit('submit')
  41. },
  42. handleClose() {
  43. this.$emit('close')
  44. }
  45. },
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .modal {
  50. position: fixed;
  51. top: 0%;
  52. left: 0;
  53. width: 100%;
  54. height: 100%;
  55. display: flex;
  56. justify-content: center;
  57. align-items: center;
  58. background: rgba(0, 0, 0, .4);
  59. }
  60. .dialog-border {
  61. width: 590rpx;
  62. height: 672rpx;
  63. background: #FF5642;
  64. box-shadow: inset 0rpx 6rpx 12rpx 2rpx #FFFFFF;
  65. border-radius: 24rpx 24rpx 24rpx 24rpx;
  66. border: 1rpx solid #FFFFFF;
  67. display: flex;
  68. justify-content: center;
  69. align-items: center;
  70. position: relative;
  71. .close{
  72. width: 40rpx;
  73. height: 40rpx;
  74. position: absolute;
  75. bottom: -70rpx;
  76. left: calc(50% - 20rpx);
  77. }
  78. .top-icon {
  79. width: 332rpx;
  80. height: 142rpx;
  81. position: absolute;
  82. top: -130rpx;
  83. left: calc(50% - 166rpx);
  84. vertical-align: bottom;
  85. }
  86. .btn-box {
  87. position: absolute;
  88. left: 0%;
  89. bottom: 0%;
  90. z-index: 2;
  91. width: 590rpx;
  92. height: 134rpx;
  93. background: linear-gradient(180deg, #FFF3E2 0%, #F4AF9E 100%);
  94. border-radius: 0rpx 0rpx 24rpx 24rpx;
  95. display: flex;
  96. align-items: center;
  97. justify-content: center;
  98. .btn {
  99. width: 258rpx;
  100. height: 80rpx;
  101. line-height: 80rpx;
  102. text-align: center;
  103. background: #FF4D3A;
  104. box-shadow: 0rpx 6rpx 12rpx 2rpx #FF4D3A, inset 0rpx 16rpx 4rpx 2rpx #E8422F;
  105. border-radius: 72rpx 72rpx 72rpx 72rpx;
  106. border: 2rpx solid #FFFFFF;
  107. font-weight: bold;
  108. font-size: 32rpx;
  109. color: #FFFFFF;
  110. }
  111. }
  112. .dialog-content {
  113. width: 542rpx;
  114. height: 612rpx;
  115. overflow: auto;
  116. background: linear-gradient(151deg, #FFFFFF 0%, #FFFFFF 0%, #FFD9BF 100%);
  117. border-radius: 24rpx 24rpx 24rpx 24rpx;
  118. .title-icon {
  119. width: 430rpx;
  120. height: 84rpx;
  121. margin-left: 84rpx;
  122. margin-top: 30rpx;
  123. }
  124. }
  125. }
  126. </style>