activity_tab.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. <image :src="resource.activity_bg" class="width100 height100"/>
  7. <view class="cancel">
  8. <image :src="resource.doll_close" class="width100 height100" @click="close" />
  9. </view>
  10. <view class="confirm">
  11. <image :src="resource.activity_1" class="x" @click="submit(1)" />
  12. <image :src="resource.activity_2" class="x" @click="submit(2)" />
  13. <image :src="resource.activity_3" class="x" @click="submit(3)" />
  14. <image :src="resource.activity_4" class="x" @click="submit(4)" />
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import resource from '@/utils/resource'
  22. export default {
  23. data() {
  24. return {
  25. resource,
  26. visible: false,
  27. }
  28. },
  29. methods: {
  30. show() {
  31. this.visible = true
  32. },
  33. close() {
  34. this.visible = false
  35. },
  36. submit(type) {
  37. this.visible = false
  38. if(type === 1) this.$router.switchTab('vip')
  39. if(type === 2) {
  40. getApp().globalData.wealActive = 0
  41. this.$router.switchTab('weal')
  42. }
  43. if(type === 3) {
  44. getApp().globalData.wealActive = 3
  45. this.$router.switchTab('weal')
  46. }
  47. if(type === 4) this.$router.pushCheck('exchange')
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .mask {
  54. position: absolute;
  55. left: 0;
  56. right: 0;
  57. top: 0;
  58. bottom: 0;
  59. }
  60. .wrapper {
  61. width: 640rpx;
  62. height: 633rpx;
  63. margin: 200rpx 55rpx 0;
  64. }
  65. .text {
  66. font-size: 40rpx;
  67. color: #fff;
  68. margin: 58rpx auto 0;
  69. text-align: center;
  70. }
  71. .cancel {
  72. position: absolute;
  73. top: -10rpx;
  74. right: -10rpx;
  75. width: 64rpx;
  76. height: 64rpx;
  77. }
  78. .confirm {
  79. position: absolute;
  80. top: 125rpx;
  81. left: 33rpx;
  82. width: 568rpx;
  83. height: 100%;
  84. z-index: 999;
  85. }
  86. .x {
  87. // position: absolute;
  88. // top: 10rpx;
  89. // left: 0;
  90. margin-top: 24rpx;
  91. width: 100%;
  92. height: 88rpx;
  93. }
  94. </style>