doll_press_sure.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <template>
  2. <view class="cu-modal" :class="{ show: visible }">
  3. <view class="mask" @click="close"></view>
  4. <view class="cu-dialog" style="background-color: transparent; width: 100%">
  5. <view class="relative wrapper">
  6. <view class="textBox">
  7. <view class="text">是否抓{{ pressType === 1 ? '一' : '五' }}次?</view>
  8. </view>
  9. <view class="cancel">
  10. <image :src="ossurl.welfare.toys.cancel" class="x" @click="close" />
  11. </view>
  12. <view class="confirm">
  13. <image :src="ossurl.welfare.toys.submit" class="x" @click="submit" />
  14. </view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import ossurl from '@/utils/ossurl'
  21. export default {
  22. data() {
  23. return {
  24. ossurl,
  25. visible: false,
  26. pressType: 1
  27. }
  28. },
  29. methods: {
  30. show(type) {
  31. this.pressType = type
  32. this.visible = true
  33. },
  34. close() {
  35. this.visible = false
  36. },
  37. submit() {
  38. this.visible = false
  39. this.$emit('press', this.pressType)
  40. }
  41. }
  42. }
  43. </script>
  44. <style lang="scss" scoped>
  45. .mask {
  46. position: absolute;
  47. left: 0;
  48. right: 0;
  49. top: 0;
  50. bottom: 0;
  51. }
  52. .wrapper {
  53. padding-bottom: 150rpx;
  54. }
  55. .textBox {
  56. margin: auto;
  57. position: relative;
  58. width: 588rpx;
  59. height: 226rpx;
  60. border-radius: 27rpx 27rpx 27rpx 27rpx;
  61. opacity: 1;
  62. border: 15rpx solid #ffedb9;
  63. background: #fed151;
  64. padding: 15rpx;
  65. }
  66. .text {
  67. background: #fffaee;
  68. height: 100%;
  69. line-height: 160rpx;
  70. font-weight: bold;
  71. font-size: 40rpx;
  72. color: #491700;
  73. text-align: center;
  74. }
  75. .cancel {
  76. position: absolute;
  77. bottom: 0rpx;
  78. left: 120rpx;
  79. }
  80. .confirm {
  81. position: absolute;
  82. bottom: 0rpx;
  83. right: 120rpx;
  84. }
  85. .x {
  86. width: 208rpx;
  87. height: 96rpx;
  88. }
  89. </style>