home.vue 692 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="content">
  3. <image src="../../static/index/home.gif" mode=""></image>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. };
  11. },
  12. onShow() {
  13. this.getIndex()
  14. },
  15. methods: {
  16. getIndex() {
  17. console.log('是否执行');
  18. setTimeout(() => {
  19. uni.switchTab({
  20. url: '../index/index',
  21. })
  22. }, 4000)
  23. }
  24. }
  25. }
  26. </script>
  27. <style lang="scss">
  28. .content {
  29. position: relative;
  30. margin: 0;
  31. padding: 0;
  32. width: 750rpx;
  33. height: 100vh;
  34. image {
  35. position: absolute;
  36. left: 0;
  37. top: 0;
  38. width: 100%;
  39. height: 100%;
  40. }
  41. // background-image: url('../../static/index/home.gif') no-repeat;
  42. }
  43. </style>