launch.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="content">
  3. <view class="loadding" v-if="loadding==true">
  4. <view class="circlebox">
  5. <view class="circle"></view>
  6. <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/logo.png"></image>
  7. </view>
  8. <text class="text">岚财良品</text>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import {getDicts} from '@/api/index'
  14. export default {
  15. data() {
  16. return {
  17. loadding:true,
  18. };
  19. },
  20. methods: {
  21. getDicts:function(){
  22. getDicts().then(
  23. res => {
  24. if(res.code==200){
  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: '/pages/home/newindex',
  37. //url:"/pages/home/index",
  38. animationType: 'pop-in',
  39. animationDuration: 100
  40. })
  41. },
  42. },
  43. onLoad() {
  44. this.getDicts()
  45. }
  46. };
  47. </script>
  48. <style lang="scss">
  49. content {
  50. height: 100%;
  51. width: 100%;
  52. position: relative;
  53. padding-top: 0;
  54. }
  55. .circlebox {
  56. position: relative;
  57. width: 132rpx;
  58. height:132rpx;
  59. }
  60. .circle {
  61. width: 120rpx;
  62. height:120rpx;
  63. border: 6rpx solid #00c250;
  64. border-radius: 50%;
  65. border-right-color: transparent;
  66. animation: progress linear 1s infinite;
  67. }
  68. @keyframes progress {
  69. 0% {
  70. transform: rotate(0);
  71. }
  72. 100% {
  73. transform: rotate(360deg);
  74. }
  75. }
  76. .loadding{
  77. background-color: #fff;
  78. display: flex;
  79. flex-direction: column;
  80. align-items: center;
  81. justify-content: center;
  82. position: absolute;
  83. top: 0;
  84. left: 0;
  85. width: 100%;
  86. height: 100%;
  87. z-index: 9999;
  88. image{
  89. border-radius: 50%;
  90. // animation: load linear 1s infinite;
  91. width: 120rpx;
  92. height:120rpx;
  93. position: absolute;
  94. top: 6rpx;
  95. left: 6rpx;
  96. }
  97. .text{
  98. font-size: 28rpx;
  99. margin-top: 20rpx;
  100. }
  101. }
  102. </style>