增加上传的动态路径方法 增加用户录入功能 修复了切换账号必须刷新才能改变菜单的bug

This commit is contained in:
pixel
2019-12-15 15:10:40 +08:00
parent 4e704c484a
commit 13c7653462
10 changed files with 191 additions and 113 deletions
+7 -1
View File
@@ -5,7 +5,7 @@
:headers="{'x-token':token}"
:on-success="handleAvatarSuccess"
:show-file-list="false"
action="api/user/uploadHeaderImg"
:action="`${path}/user/uploadHeaderImg`"
class="avatar-uploader"
name="headerImg"
>
@@ -24,8 +24,14 @@
</template>
<script>
import { mapGetters, mapMutations } from 'vuex'
const path = process.env.VUE_APP_BASE_API
export default {
name: 'Person',
data(){
return {
path:path
}
},
computed: {
...mapGetters('user', ['userInfo', 'token'])
},