index.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view class="landing-page-section flex justify-center align-center "
  3. :class="animateClass"
  4. @touchmove.stop.prevent="clear" v-show="showPopup">
  5. <view class="popup_content flex justify-center align-center">
  6. <image style="width: 180rpx;height: 700rpx;" :src="pageLogoSrc" />
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import __config from '@/config/env';// 配置文件
  12. const util = require("utils/util.js");
  13. export default {
  14. name: "landing-page",
  15. props: {
  16. },
  17. data() {
  18. return {
  19. showPopup: false,
  20. animateClass: '',
  21. timeoutIns: undefined,
  22. timeoutNum: 1800,
  23. pageLogoSrc: require('@/static/public/img/landing-page-logo.png'),
  24. };
  25. },
  26. created: function() {
  27. var that = this;
  28. this.initAnimate()
  29. },
  30. methods: {
  31. /**
  32. * 初始化动画css
  33. */
  34. initAnimate(){
  35. let that = this;
  36. let rsLandingPageFlag = uni.getStorageSync('rs_landing_page_flag')
  37. if(rsLandingPageFlag && rsLandingPageFlag == '1'){
  38. return
  39. }
  40. that.showPopup = true
  41. that.$nextTick(()=> {
  42. if(that.timeoutIns) clearTimeout(that.timeoutIns)
  43. that.timeoutIns = setTimeout(()=> {
  44. that.animateClass = ' animated landing-page fadeOutUp '
  45. setTimeout(()=> {
  46. that.showPopup = false
  47. uni.setStorageSync('rs_landing_page_flag', '1')
  48. }, 2400)
  49. }, that.timeoutNum)
  50. })
  51. },
  52. // 禁止滚动
  53. clear() {
  54. return;
  55. },
  56. back() {
  57. },
  58. // 关闭弹框
  59. confirm() {
  60. this.showPopup = false;
  61. this.$emit('popupState', true);
  62. uni.setStorage({
  63. key: this.policyStorageKey,
  64. data: true
  65. });
  66. }
  67. }
  68. };
  69. </script>
  70. <style lang="scss" scoped>
  71. .landing-page-section{
  72. position: fixed;
  73. bottom: 0;
  74. top: 0;
  75. left: 0;
  76. right: 0;
  77. background-color: #3B3838;
  78. transition-property: opacity;
  79. transition-duration: 0.3s;
  80. z-index: 99999999999999;
  81. }
  82. .animated.landing-page {
  83. -webkit-animation-duration: 2.3s;
  84. animation-duration: 2.3s;
  85. }
  86. </style>