| | |
| | | <view class="form-item flex j-c-s-b a-i-c"> |
| | | <text class="f-30">昵称</text> |
| | | <view class="nickname"> |
| | | <input class="nickname-value" type="nickname" placeholder="请输入昵称" v-model="info.nick_name" @blur="getInputValue" /> |
| | | <input class="nickname-value" type="nickname" placeholder="请输入昵称" v-model="info.realName" @blur="getInputValue" /> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | import { |
| | | prodUrl, |
| | | clientId, |
| | | clientSecret |
| | | clientSecret, |
| | | minioBaseUrl |
| | | } from '@/common/setting' |
| | | export default { |
| | | data(){ |
| | |
| | | avatar:"", |
| | | info:{ |
| | | avatar:"", |
| | | nick_name:"", |
| | | id:"" |
| | | realName:"", |
| | | id:"", |
| | | deptId:"" |
| | | }, |
| | | header: {}, |
| | | uploadConfig: { |
| | |
| | | }, |
| | | onLoad() { |
| | | this.getHeader() |
| | | this.avatar = this.userInfo.avatar; |
| | | this.info.avatar = this.userInfo.avatar; |
| | | this.info.nick_name = this.userInfo.nick_name; |
| | | this.info.id = uni.getStorageSync("userInfo").user_id |
| | | this.info.deptId = uni.getStorageSync("userInfo").dept_id |
| | | let { avatar,real_name,user_id,dept_id } = uni.getStorageSync("userInfo"); |
| | | if(avatar){ |
| | | this.avatar = `${minioBaseUrl}${avatar}` |
| | | }else { |
| | | this.avatar = avatar; |
| | | } |
| | | this.info.avatar = avatar; |
| | | this.info.realName = real_name |
| | | this.info.id = user_id |
| | | this.info.deptId = dept_id |
| | | }, |
| | | methods:{ |
| | | |
| | |
| | | |
| | | getInputValue(e){ |
| | | console.log(e); |
| | | this.info.nickname = e.detail.value; |
| | | this.info.realName = e.detail.value; |
| | | }, |
| | | |
| | | |
| | |
| | | title:res.msg |
| | | }) |
| | | setTimeout(()=>{ |
| | | let userInfo = uni.getStorageSync("userInfo"); |
| | | userInfo.avatar = this.info.avatar; |
| | | userInfo.real_name = this.info.realName; |
| | | this.$u.vuex('userInfo',userInfo); |
| | | uni.navigateBack() |
| | | },300) |
| | | } |