activity.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 flex-column-align-center">
  6. <image :src="resource.award_activity" webp class="poster" mode="widthFix" />
  7. </view>
  8. <view class="paddingT30 flex-align-center">
  9. <image :src="resource.close" class="x" @click="close" />
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import resource from '@/utils/resource'
  16. export default {
  17. data() {
  18. return {
  19. resource,
  20. visible: false
  21. }
  22. },
  23. methods: {
  24. show(data) {
  25. this.data = data
  26. this.visible = true
  27. },
  28. close() {
  29. this.data = null
  30. this.visible = false
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .mask {
  37. position: absolute;
  38. left: 0;
  39. right: 0;
  40. top: 0;
  41. bottom: 0;
  42. }
  43. .wrapper {
  44. z-index: 2001;
  45. width: 100%;
  46. margin: 0 auto;
  47. position: relative;
  48. .poster {
  49. width: 551rpx;
  50. height: 600rpx;
  51. }
  52. }
  53. .x {
  54. width: 60rpx;
  55. height: 60rpx;
  56. }
  57. </style>