<template>

</template>

<script>
  import {
    memberGradeInfo
  } from '@/api/member.js';

  export default {
    name: "member_loding",
    data() {
      return {
        };
    },

    async onLoad() {
      try{
        uni.showLoading({
        	title: '加载中'
        });
        const res = await memberGradeInfo()
             if(res.data.some((item) => !!parseInt(item.isExist))){
               uni.setTabBarItem({
                 index: 2,
                 pagePath: '/pages/member_equity/index'
               })
               uni.switchTab({
                 url:'/pages/member_equity/index'
               })
             }else{
               uni.setTabBarItem({
                 index: 2,
                 pagePath: '/pages/member_application/index'
               })
               uni.switchTab({
                 url:'/pages/member_application/index'
               })
             }
      } finally{
        uni.hideLoading();
      }
    },
    methods: {

    }
  };
</script>

<style lang="scss" scoped>

</style>
