index.vue 626 B

12345678910111213141516171819202122232425
  1. <template></template>
  2. <script>
  3. export default {
  4. async onLoad(props) {
  5. const { path } = props;
  6. await this.initParams();
  7. if(this.$isEmpty(path)){
  8. uni.switchTab({
  9. url: '/pages/index/home'
  10. })
  11. }else{
  12. this.$jump( path );
  13. }
  14. },
  15. methods :{
  16. async initParams(){
  17. const {ACTIVE_SETTING,PAGE_INTERFACE_SHOW} = (await this.$api.platform.getPlatformParams({
  18. keys: 'ACTIVE_SETTING,PAGE_INTERFACE_SHOW'
  19. })).data.data;
  20. this.$u.vuex('vuex_active_setting', JSON.parse(ACTIVE_SETTING));
  21. this.$u.vuex('vuex_page_interface_show', JSON.parse(PAGE_INTERFACE_SHOW));
  22. }
  23. },
  24. };
  25. </script>