You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
911 B

8 months ago
  1. <!-- 页面初始界面 -->
  2. <template>
  3. <view v-show="show" class="pageInit bx">
  4. <image src="@/static/loading/logo.png" mode="aspectFit"></image>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. show: true,
  12. num: 1,
  13. interval: null
  14. }
  15. },
  16. created() {
  17. this.interval = setInterval(() => {
  18. if (this.num <= 0) {
  19. this.show = false;
  20. this.num = 1;
  21. clearInterval(this.interval);
  22. }
  23. this.num--;
  24. }, 1000)
  25. },
  26. destroyed() {
  27. if (this.interval) {
  28. clearInterval(this.interval);
  29. }
  30. },
  31. methods: {
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .pageInit{
  37. display: flex;
  38. align-items: center;
  39. justify-content: center;
  40. position: fixed;
  41. left: 50%;
  42. top: 0;
  43. width: 100%;
  44. height: 100vh;
  45. background: black;
  46. margin: 0rpx auto;
  47. z-index: 999;
  48. transform: translateX(-50%);
  49. image {
  50. width: calc(750rpx / 2);
  51. }
  52. }
  53. </style>