gx
queenwuli
2022-03-23 063571a2da8999709b32d434248c85df8a57724f
src/pages/index/account.vue
@@ -129,19 +129,43 @@
</template>
<script scope>
import { ref, onMounted, getCurrentInstance, defineComponent} from 'vue';
import { ref, reactive, onMounted, getCurrentInstance, defineComponent} from 'vue';
export default defineComponent({
  name: 'account',
  setup() {
    const activeNames = ref(['1'])
    const { proxy } = getCurrentInstance();
    let myAccountInfo = reactive({});
    function getWalletInfo(){
        proxy.$axios({
          url: '/dapp/member/walletInfo',
          method: 'post'
        }).then((res) => {
          if(res.code == 200) {
            proxy.myAccountInfo = res.data;
          }
        })
    }
    onMounted(() => {
        
    })
    return { activeNames };
    return {
        activeNames,
        myAccountInfo,
        getWalletInfo
    };
  },
  methods: {
    getWalletInfo(){
        this.$axios({
          url: '/dapp/member/walletInfo',
          method: 'post'
        }).then((res) => {
          if(res.code == 200) {
            this.myAccountInfo = res.data;
          }
        })
    }
  }
})
</script>