adMask.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <view class="ad-mask" v-show="show">
  3. <view class="adbox">
  4. <view class="adbox-close">
  5. <image src="@/static/ad/close_icon.png" @click="close"></image>
  6. </view>
  7. <image class="adbox-bg" src="@/static/ad/tc_kcc_bg.png" mode="aspectFill"></image>
  8. <image class="adbtn" src="@/static/ad/adbtn.gif"></image>
  9. <image class="pointer" src="@/static/ad/pointer.gif"></image>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. props: {
  16. show: {
  17. type: Boolean,
  18. default: false
  19. }
  20. },
  21. data() {
  22. return {
  23. }
  24. },
  25. methods: {
  26. close() {
  27. this.$emit("close")
  28. }
  29. }
  30. }
  31. </script>
  32. <style scoped lang="scss">
  33. @mixin u-flex($flexD, $alignI, $justifyC) {
  34. display: flex;
  35. flex-direction: $flexD;
  36. align-items: $alignI;
  37. justify-content: $justifyC;
  38. }
  39. .ad-mask {
  40. width: 100vw;
  41. height: 100vh;
  42. background-color: rgba(0,0,0,0.6);
  43. position: fixed;
  44. top: 0;
  45. left: 0;
  46. z-index: 999;
  47. @include u-flex(column, center, center)
  48. .adbox {
  49. position: relative;
  50. @include u-flex(column, center, center);
  51. &-close{
  52. width: 100%;
  53. margin-bottom: 74rpx;
  54. @include u-flex(row, center, flex-end);
  55. image {
  56. width: 64rpx;
  57. height: 64rpx;
  58. }
  59. }
  60. &-bg {
  61. width: 580rpx;
  62. height: 620rpx;
  63. }
  64. }
  65. .adbtn{
  66. width: 412rpx;
  67. height: 104rpx;
  68. position: absolute;
  69. bottom: 80rpx;
  70. left: 50%;
  71. transform: translate(-50%,0);
  72. }
  73. .pointer {
  74. width: 180rpx;
  75. height: 194rpx;
  76. position: absolute;
  77. bottom: -52rpx;
  78. right: -42rpx;
  79. }
  80. }
  81. </style>