launch.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="content">
  3. <view class="loadding" v-if="loadding==true">
  4. <image src="https://user.test.ylrztop.com/images/logo.png"></image>
  5. <text class="text">企业端</text>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. import {dicts} from '@/api/common.js'
  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. // dicts().then(
  22. // res => {
  23. // if(res.code==200){
  24. // console.log(res)
  25. // uni.setStorageSync('dicts',JSON.stringify(res));
  26. // }else{
  27. // }
  28. // this.loadding=false;
  29. // this.navigatHandler();
  30. // },
  31. // rej => {}
  32. // );
  33. },
  34. navigatHandler: function() {
  35. uni.reLaunch({
  36. url: '../home/index',
  37. animationType: 'pop-in',
  38. animationDuration: 100
  39. })
  40. },
  41. },
  42. onLoad() {
  43. this.getDicts()
  44. }
  45. };
  46. </script>
  47. .
  48. <style lang="scss">
  49. content {
  50. height: 100%;
  51. width: 100%;
  52. position: relative;
  53. padding-top: 0;
  54. }
  55. .loadding{
  56. background-color: #fff;
  57. display: flex;
  58. flex-direction: column;
  59. align-items: center;
  60. justify-content: center;
  61. position: absolute;
  62. top: 0;
  63. left: 0;
  64. width: 100%;
  65. height: 100%;
  66. z-index: 9999;
  67. image{
  68. border-radius: 50%;
  69. animation: load linear 1s infinite;
  70. width: 120rpx;
  71. height:120rpx;
  72. }
  73. .text{
  74. font-size: 28rpx;
  75. margin-top: 20rpx;
  76. }
  77. }
  78. </style>