hidden_task_dialog.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <view class="cu-modal" :class="{ show: visible }">
  3. <view class="mask" @click="close"></view>
  4. <view class="cu-dialog task_dialog">
  5. <view class="relative wrapper">
  6. <image :src="resource.hidden_backImg" webp class="poster" mode="widthFix" />
  7. </view>
  8. <view class="content">
  9. <view class="text">{{ text }}</view>
  10. <view class="btn">
  11. <view class="sub1" @click="close">我知道了</view>
  12. <view class="sub2" @click="submit">{{ btnText }}</view>
  13. </view>
  14. </view>
  15. <view class="close">
  16. <image :src="resource.icon_close" class="x" @click="close" />
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. import resource from '@/utils/resource'
  23. export default {
  24. data() {
  25. return {
  26. resource,
  27. visible: false,
  28. text: '',
  29. btnText: '进入活动'
  30. }
  31. },
  32. methods: {
  33. show(hideTask) {
  34. this.visible = true
  35. this.text =
  36. hideTask === 1
  37. ? '宝箱奖池内抽中特定隐藏任务款,可触发隐藏任务,于活动页面可合成奖品'
  38. : '您的任务所需隐藏任务款已全部抽到,可前往任务页面合成奖品'
  39. this.btnText = hideTask === 1 ? '进入活动' : '立即合成'
  40. },
  41. close() {
  42. this.visible = false
  43. },
  44. async submit() {
  45. this.close()
  46. this.$router.push('hidden_activity')
  47. // await this.$service.award.hidetaskSynthesis(this.hideTaskUserId)
  48. // .then(res => {
  49. // this.$message.success('合成成功!')
  50. // this.visible = false
  51. // this.$emit('refresh')
  52. // console.log(res);
  53. // })
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .mask {
  60. position: absolute;
  61. left: 0;
  62. right: 0;
  63. top: 0;
  64. bottom: 0;
  65. }
  66. .task_dialog {
  67. position: relative;
  68. height: 538rpx;
  69. width: 640rpx;
  70. margin: 0 55rpx;
  71. opacity: 0.9;
  72. background-color: #ffffff00;
  73. .wrapper {
  74. z-index: 1;
  75. width: 100%;
  76. margin: 0 auto;
  77. position: relative;
  78. .poster {
  79. width: 100%;
  80. }
  81. }
  82. .content {
  83. position: absolute;
  84. bottom: 0;
  85. width: 640rpx;
  86. height: 320rpx;
  87. display: flex;
  88. flex-direction: column;
  89. flex-wrap: nowrap;
  90. align-items: center;
  91. justify-content: space-evenly;
  92. font-size: 28rpx;
  93. color: #fff;
  94. line-height: 40rpx;
  95. z-index: 2;
  96. .text {
  97. width: 576rpx;
  98. height: 144rpx;
  99. margin: 0 32rpx;
  100. padding: 32rpx 24rpx;
  101. color: #6e39e7;
  102. border: 2rpx soild #7f34f3;
  103. background-color: #f4ebff;
  104. border-radius: 15rpx;
  105. }
  106. .btn {
  107. display: flex;
  108. justify-content: space-between;
  109. width: 440rpx;
  110. text-align: center;
  111. .sub1 {
  112. width: 204rpx;
  113. height: 64rpx;
  114. line-height: 64rpx;
  115. background: linear-gradient(270deg, #34a7f9 0%, #10cbd4 100%);
  116. border-radius: 44rpx;
  117. }
  118. .sub2 {
  119. width: 204rpx;
  120. height: 64rpx;
  121. line-height: 64rpx;
  122. background: linear-gradient(90deg, #eb9466 0%, #eb3c65 100%);
  123. border-radius: 44rpx;
  124. }
  125. }
  126. }
  127. .close {
  128. position: absolute;
  129. top: 32rpx;
  130. right: 32rpx;
  131. z-index: 2;
  132. .x {
  133. width: 60rpx;
  134. height: 60rpx;
  135. }
  136. }
  137. }
  138. </style>