Commit d7306f0a by wufan

feat:上传头像接口联调完成

parent 28176584
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
border-radius: 50%; border-radius: 50%;
img { img {
width: 60px; width: 60px;
border-radius: 50%;
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: wufan * @Author: wufan
* @Date: 2020-11-27 16:21:49 * @Date: 2020-11-27 16:21:49
* @LastEditors: wufan * @LastEditors: wufan
* @LastEditTime: 2020-12-04 15:02:22 * @LastEditTime: 2020-12-07 16:24:51
* @Description: Description * @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有 * @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -66,7 +66,7 @@ function AddEmployeeModal(props: AddEmployeeModalProps) { ...@@ -66,7 +66,7 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
setName(props.choosedItem.nickName); setName(props.choosedItem.nickName);
props.choosedItem.phone && setPhone(props.choosedItem.phone); props.choosedItem.phone && setPhone(props.choosedItem.phone);
props.choosedItem.role && setRole(props.choosedItem.role[0]); props.choosedItem.role && setRole(props.choosedItem.role[0]);
props.choosedItem.avatar && setAvatar(avatar || baseImg); props.choosedItem.avatar && setAvatar(props.choosedItem.avatar || baseImg);
const _role = props.choosedItem.role[0] === "讲师" ? "CloudLecturer" : "CloudManager"; const _role = props.choosedItem.role[0] === "讲师" ? "CloudLecturer" : "CloudManager";
form.setFieldsValue({ form.setFieldsValue({
nickName: props.choosedItem.nickName, nickName: props.choosedItem.nickName,
...@@ -108,6 +108,9 @@ function AddEmployeeModal(props: AddEmployeeModalProps) { ...@@ -108,6 +108,9 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
} }
function changeAvatar(img: string): any { function changeAvatar(img: string): any {
form.setFieldsValue({
avatar: img
});
setAvatar(img); setAvatar(img);
setImgUrl(img); setImgUrl(img);
} }
...@@ -175,7 +178,7 @@ function AddEmployeeModal(props: AddEmployeeModalProps) { ...@@ -175,7 +178,7 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
nickName, nickName,
phone: String(phone), phone: String(phone),
roleCodes:[role], roleCodes:[role],
// avatar, avatar,
storeId:User.getStoreId() storeId:User.getStoreId()
}; };
console.log("params",params); console.log("params",params);
...@@ -190,7 +193,7 @@ function AddEmployeeModal(props: AddEmployeeModalProps) { ...@@ -190,7 +193,7 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
nickName, nickName,
phone: String(phone), phone: String(phone),
roleCodes:[role], roleCodes:[role],
// avatar, avatar,
storeUserId:storeUserId storeUserId:storeUserId
}; };
console.log("params",params); console.log("params",params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment