index.vue 329 B

123456789101112131415
  1. <script setup>
  2. import { onLoad } from '@dcloudio/uni-app'
  3. import { userToken } from '@/composables/config'
  4. onLoad(() => {
  5. if (!userToken.value) {
  6. uni.reLaunch({
  7. url: '/pages/login/index'
  8. })
  9. } else {
  10. uni.reLaunch({
  11. url: '/pages/customer/index'
  12. })
  13. }
  14. })
  15. </script>