launch.vue 1.3 KB

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