<template>
  <div class="main">
    <!-- <commonHead></commonHead>
    <div><v-button type="primary" v-loading-action.full="myTest">全局加载</v-button></div>
    <div><v-button type="primary" v-loading-action="changeNameHandel">局部加载</v-button></div>
    <div><router-link :to="{path:'test',query:{id:1}}">to test</router-link></div> -->
    
  </div>
</template>

<script>
  import { Button } from 'vant'
  import {mapState,mapMutations} from 'vuex'
  import {getPicCode,getPicCode1,getPicCode2} from '../../interface/user'

  export default {
    data(){
      return{
        test:666
      }
    },
    components: {
      vButton: Button
    },
    computed:{
      ...mapState('user',['name'])
    },
    methods:{
      ...mapMutations('user',['changeName']),
      async changeNameHandel(){
        try {
          let res = await Promise.all([getPicCode1({}),getPicCode({}),getPicCode1({})]);
          // this.$mytoast({})
        }catch (e) {
          console.log(e)
        }
      },
      async myTest(){
        try {
          let result = await getPicCode1({})
          // this.$mytoast({})
        }catch (e) {
          console.log(e)
        }
      }
    }
  }
</script>

<style scoped lang="stylus">
  .main{
    color #ccc
    p{
      color red
      font-size setrem(30)
    }
  }
</style>