Browse Source

个人信息界面 修改头像接口

master
邓宏 2 years ago
parent
commit
0223401f37
  1. 2
      pages/home/my.vue
  2. 3
      pages/home/personalInfo.vue

2
pages/home/my.vue

@ -52,7 +52,7 @@
<view class="container">
<image class="head" src="@/static/my_head.png" mode="aspectFit"/>
<view class="card">
<u-image radius="50%" width="140rpx" height="140rpx" :src="`${host('imgUrl')}/${$store.getters['userInfo'].avatar}`" mode="aspectFill" @click="reHeadImg">
<u-image radius="50%" width="140rpx" height="140rpx" :src="`${host('imgUrl')}/${$store.getters['userInfo'].avatar}`" mode="aspectFill">
<image slot="error" style="width:140rpx;height:140rpx;border-radius:50%;" src="@/static/userHeader.png" mode="aspectFill"/>
</u-image>
<text class="name">{{$store.getters.userInfo.realname}}</text>

3
pages/home/personalInfo.vue

@ -67,13 +67,12 @@ import request,{host} from '@/common/request'
success:async e=>{
if(/ok/.test(e.errMsg)){
var res=await request("/sys/common/upload",{
file:e.tempFiles[0],
filePath:e.tempFiles[0].path,
body:{ biz: "temp" }
})
if(res.statu){
var userInfo=await request("/sys/user/editor",{
method:"post",
suffix:"/jeecgboot",
body:{
avatar:res.data,
id: this.$store.getters['userInfo'].id

Loading…
Cancel
Save