launch.vue 532 B

12345678910111213141516171819202122232425262728293031323334
  1. <template>
  2. <view class="launch-container"></view>
  3. </template>
  4. <script>
  5. export default {
  6. data(){
  7. return {
  8. }
  9. },
  10. onLoad() {
  11. if(uni.getStorageSync('token')){
  12. uni.reLaunch({ url:'/pages/home' })
  13. }else{
  14. uni.reLaunch({ url:'/pages/login' })
  15. }
  16. },
  17. methods:{
  18. }
  19. }
  20. </script>
  21. <style scoped lang="less">
  22. .launch-container {
  23. display: flex;
  24. align-items: center;
  25. justify-content: center;
  26. height: 100vh;
  27. width: 100vw;
  28. background-color: #FFFFFF;
  29. }
  30. </style>