App.vue 769 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <script>
  2. import store from './store';
  3. export default {
  4. async onLaunch() {
  5. store.dispatch('getAppSystemInfo')
  6. if(store.getters.scope === 'CUSTOMER'){
  7. uni.switchTab({
  8. url:'/pages/client/tabBar/home/index'
  9. })
  10. }else{
  11. uni.navigateTo({
  12. url:'/pages/merchant/order/index'
  13. })
  14. }
  15. },
  16. onShow() {
  17. uni.hideTabBar({
  18. success: () => {
  19. console.log('hide tabber success');
  20. },fail: () => {
  21. console.log('hide tabber fail');
  22. }
  23. })
  24. }
  25. };
  26. </script>
  27. <style lang="scss">
  28. @import 'uview-ui/index.scss';
  29. @import 'design/index.scss';
  30. @import url('design/common.css');
  31. page {
  32. background-color: #f5f5f5;
  33. color: $uni-text-color;
  34. font-size: $uni-font-size-base;
  35. }
  36. </style>