更改头像,解决账号编辑代码报错
This commit is contained in:
parent
21c11dae32
commit
501101ee36
|
@ -261,13 +261,13 @@ export default class App extends Component {
|
||||||
<Pop className="exitPop" trigger="hover" position="bottom-right" content={<div>
|
<Pop className="exitPop" trigger="hover" position="bottom-right" content={<div>
|
||||||
<div className="exit-box">
|
<div className="exit-box">
|
||||||
<p className="exit-header dflexacsa">
|
<p className="exit-header dflexacsa">
|
||||||
{!this.state.userInfo.head? <Avatar size="large"
|
{this.state.userInfo.head? <Avatar size="large"
|
||||||
src={this.state.userInfo.head}/>:
|
src={this.state.userInfo.head}/>:
|
||||||
<Avatar size="large"
|
<Avatar size="large"
|
||||||
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/default.svg"/>}
|
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/default.svg"/>}
|
||||||
<p className="exit-userInfo dflexacs">
|
<p className="exit-userInfo dflexacs">
|
||||||
<span> {this.state.userInfo.user_name}</span>
|
<span> 姓名:{this.state.userInfo.real_name}</span>
|
||||||
<span> 手机号:{this.state.userInfo.mobile}</span>
|
<span> 账号:{this.state.userInfo.user_name}</span>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -45,7 +45,7 @@ export default class adduserinfo extends React.Component{
|
||||||
if(!companys){
|
if(!companys){
|
||||||
this.getCompanyFn();//获取公司
|
this.getCompanyFn();//获取公司
|
||||||
}
|
}
|
||||||
|
console.log(51,companys);
|
||||||
|
|
||||||
this.getRoleFn();//获取角色
|
this.getRoleFn();//获取角色
|
||||||
let formInfo=this.props;
|
let formInfo=this.props;
|
||||||
|
@ -282,8 +282,9 @@ export default class adduserinfo extends React.Component{
|
||||||
let companyList=response.map(item=>{
|
let companyList=response.map(item=>{
|
||||||
return {key:item.id,text:item.company_name}
|
return {key:item.id,text:item.company_name}
|
||||||
});
|
});
|
||||||
_self.setState({companyList});
|
|
||||||
sessionStorage.setItem('company',JSON.stringify(companyList));
|
sessionStorage.setItem('company',JSON.stringify(companyList));
|
||||||
|
_self.setState({companyList});
|
||||||
|
|
||||||
},(err)=>{
|
},(err)=>{
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -475,7 +476,7 @@ export default class adduserinfo extends React.Component{
|
||||||
this.state.defaultFileList[0].src==''?<ImageUpload
|
this.state.defaultFileList[0].src==''?<ImageUpload
|
||||||
className="zent-image-upload-demo"
|
className="zent-image-upload-demo"
|
||||||
maxSize={5 * 1024 * 1024}
|
maxSize={5 * 1024 * 1024}
|
||||||
tips="建议尺寸 30*30,图片不超过 500kb"
|
tips="建议尺寸 80*80,图片不超过 500kb"
|
||||||
maxAmount={1}
|
maxAmount={1}
|
||||||
onChange={(e)=>{this.onUploadChange(e)}}
|
onChange={(e)=>{this.onUploadChange(e)}}
|
||||||
onUpload={this.onUpload}
|
onUpload={this.onUpload}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import "./list.less"
|
||||||
import {Switch ,Icon ,Sweetalert, Notify,Dialog,Button} from 'zent';
|
import {Switch ,Icon ,Sweetalert, Notify,Dialog,Button} from 'zent';
|
||||||
import TabPage from "../../../../components/tabPage/main.js"
|
import TabPage from "../../../../components/tabPage/main.js"
|
||||||
import "../../../../assets/comm.css"
|
import "../../../../assets/comm.css"
|
||||||
import {getAccountList,handelResponse,putAccountStatus,delAccount} from "../../../../assets/api.js"
|
import {getAccountList,handelResponse,getCompany,putAccountStatus,delAccount} from "../../../../assets/api.js"
|
||||||
import Grid from "../../../../components/gird/main.js"
|
import Grid from "../../../../components/gird/main.js"
|
||||||
import Ipt from "../../../../components/input/main"
|
import Ipt from "../../../../components/input/main"
|
||||||
import Modifypwd from "./modifypwd"
|
import Modifypwd from "./modifypwd"
|
||||||
|
@ -98,7 +98,24 @@ export default class acclistDom extends React.Component{
|
||||||
}
|
}
|
||||||
]}]
|
]}]
|
||||||
sessionStorage.setItem('breaknav',JSON.stringify(activerou));
|
sessionStorage.setItem('breaknav',JSON.stringify(activerou));
|
||||||
|
this.getCompanyFn();
|
||||||
}
|
}
|
||||||
|
//获取公司
|
||||||
|
getCompanyFn(){
|
||||||
|
let _self=this;
|
||||||
|
getCompany().then(res=>{
|
||||||
|
handelResponse(res,(response,msg)=>{
|
||||||
|
let companyList=response.map(item=>{
|
||||||
|
return {key:item.id,text:item.company_name}
|
||||||
|
});
|
||||||
|
sessionStorage.setItem('company',JSON.stringify(companyList));
|
||||||
|
|
||||||
|
},(err)=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
}).catch(err=>{
|
||||||
|
});
|
||||||
|
}
|
||||||
onChange = options => {
|
onChange = options => {
|
||||||
this.setState(options);
|
this.setState(options);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue