launch.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="content">
  3. <view class="loadding" v-if="loadding">
  4. <image src="@/static/logo.jpg"></image>
  5. <text class="text">互联网医院</text>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. import {getDicts} from '@/api/index'
  11. export default {
  12. data() {
  13. return {
  14. loadding:true,
  15. };
  16. },
  17. methods: {
  18. getDicts:function(){
  19. this.loadding=false
  20. this.navigatHandler();
  21. },
  22. navigatHandler: function() {
  23. uni.reLaunch({
  24. url: '../home/index',
  25. animationType: 'pop-in',
  26. animationDuration: 100
  27. })
  28. },
  29. },
  30. onLoad() {
  31. this.getDicts()
  32. }
  33. };
  34. </script>
  35. .
  36. <style lang="scss">
  37. content {
  38. height: 100%;
  39. width: 100%;
  40. position: relative;
  41. padding-top: 0;
  42. }
  43. .loadding{
  44. background-color: #fff;
  45. display: flex;
  46. flex-direction: column;
  47. align-items: center;
  48. justify-content: center;
  49. position: absolute;
  50. top: 0;
  51. left: 0;
  52. width: 100%;
  53. height: 100%;
  54. z-index: 9999;
  55. image{
  56. border-radius: 50%;
  57. animation: load linear 1s infinite;
  58. width: 120rpx;
  59. height:120rpx;
  60. }
  61. .text{
  62. font-size: 28rpx;
  63. margin-top: 20rpx;
  64. }
  65. }
  66. </style>