index.vue 387 B

1234567891011121314151617181920212223242526
  1. <template>
  2. </template>
  3. <script>
  4. export default {
  5. onShow() {
  6. let role = uni.getStorageSync('role');
  7. let userInfo = uni.getStorageSync('userInfo');
  8. if(role === '4' && userInfo){
  9. uni.switchTab({
  10. url: '/pages/index/index'
  11. });
  12. }else{
  13. uni.navigateTo({
  14. url: '/pages/login/index?id=4'
  15. });
  16. }
  17. },
  18. methods:{
  19. }
  20. }
  21. </script>
  22. <style>
  23. </style>