App.vue 723 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script setup>
  2. import { onLaunch, onShow, onError } from '@dcloudio/uni-app';
  3. import sheep from '@/common';
  4. onLaunch(() => {
  5. // 隐藏原生导航栏 使用自定义底部导航
  6. uni.hideTabBar({
  7. fail: () => {},
  8. });
  9. //游客游客模式注释
  10. if(!uni.getStorageSync("token")){
  11. uni.reLaunch({
  12. url: '/pages/index/index'
  13. })
  14. }else{
  15. sheep.$store('user').getInfo()
  16. }
  17. })
  18. onShow(() => {
  19. // #ifdef APP-PLUS
  20. // 获取urlSchemes参数
  21. const args = plus.runtime.arguments;
  22. if (args) {
  23. }
  24. // 获取剪贴板
  25. uni.getClipboardData({
  26. success: (res) => {},
  27. });
  28. // #endif
  29. });
  30. </script>
  31. <style lang="scss">
  32. @import '@/common/scss/index.scss';
  33. </style>