前台用户界面基本完成
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div style="display: flex;flex-direction: row;align-items: center;width: 11vw;justify-content: space-between">
|
||||
<div @click="toUserPage" style="display: flex;flex-direction: row;align-items: center">
|
||||
<!-- <el-avatar v-if="imageUrl===''" shape="square" style=" cursor: pointer;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)" size="large"></el-avatar>-->
|
||||
<el-avatar shape="square" style=" cursor: pointer;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)" :src="imageUrl" size="large">{{this.$cookie.get('username')}}</el-avatar>
|
||||
<el-avatar v-if="this.$cookie.get('username')!==null" shape="square" style=" cursor: pointer;box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)" :src="'http://localhost:8082/helloGithub_war_exploded/retUserAv?username='+this.$cookie.get('username')" size="large">{{this.$cookie.get('username')}}</el-avatar>
|
||||
<div style="margin-left: 5px;display: flex;flex-direction: column;justify-content: space-evenly">
|
||||
<span style="cursor: pointer;font-weight: bold">{{this.$cookie.get('username')}}</span>
|
||||
<span style="cursor: pointer;font-weight: 800;font-size: 13px;color: #3b82f6">Lv.{{userLevel}}</span>
|
||||
@@ -156,6 +156,21 @@ export default {
|
||||
return;
|
||||
}
|
||||
},
|
||||
// changeAvatarByLocal(){
|
||||
// var that=this;
|
||||
// axios({
|
||||
// method: 'post',
|
||||
// // 请求的地址
|
||||
// url: '/api/retUserAv',
|
||||
// // URL 中的查询参数
|
||||
// params:{
|
||||
// username:this.$cookie.get('username'),
|
||||
// },
|
||||
// responseType:'blob'
|
||||
// }).then((res)=>{
|
||||
// that.imageUrl = window.URL.createObjectURL(res.data)//这里也是关键,调用window的这个方法URL方法
|
||||
// })
|
||||
// },
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user