Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
72746710
Commit
72746710
authored
Dec 08, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:修改头像等样式问题
parent
12a9dd0b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
src/modules/personalInfo/ChangePhoneModal.less
+1
-0
src/modules/personalInfo/IdentificationModal.less
+1
-0
src/modules/personalInfo/index.less
+2
-0
src/modules/personalInfo/index.tsx
+18
-6
No files found.
src/modules/personalInfo/ChangePhoneModal.less
View file @
72746710
...
...
@@ -18,6 +18,7 @@
border-radius: 4px;
margin-left:8px;
color:#666666;
cursor: pointer;
}
.error-input{
border: 1px solid #FF4F4F !important;
...
...
src/modules/personalInfo/IdentificationModal.less
View file @
72746710
...
...
@@ -23,6 +23,7 @@
border-radius: 4px;
margin-left:8px;
color:#666666;
cursor: pointer;
}
.error-input{
border: 1px solid #FF4F4F !important;
...
...
src/modules/personalInfo/index.less
View file @
72746710
...
...
@@ -6,6 +6,8 @@
.avatar{
width:60px;
height:60px;
cursor: pointer;
border-radius: 50%;
}
.label{
width:56px;
...
...
src/modules/personalInfo/index.tsx
View file @
72746710
...
...
@@ -2,13 +2,13 @@
* @Author: zhangleyuan
* @Date: 2020-11-27 15:06:31
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-08 1
1:55:09
* @LastEditTime: 2020-12-08 1
7:07:05
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
,
useContext
}
from
"react"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
Form
,
Button
,
Input
,
message
}
from
"antd"
;
import
Breadcrumbs
from
"@/components/Breadcrumbs"
;
...
...
@@ -23,9 +23,11 @@ import BaseService from "@/domains/basic-domain/baseService";
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
User
from
'@/common/js/user'
;
import
'./index.less'
;
import
{
XMContext
}
from
'@/store/context'
;
import
{
setStoreGroupPermission
,
setStorePermission
,
setStoreGroupList
,
setStoreList
}
from
'@/store/actions/index'
;
const
FormItem
=
Form
.
Item
;
function
PersonalInfoPage
()
{
const
[
avatar
,
setAvatar
]
=
useState
(
baseImg
);
const
[
avatar
,
setAvatar
]
=
useState
(
'https://image.xiaomaiketang.com/xm/rJeQaZxtc7.png'
);
const
[
imgUrl
,
setImgUrl
]
=
useState
(
avatar
);
const
[
nickName
,
setNickName
]
=
useState
(
''
);
const
[
cropperModalVisible
,
setCropperModalVisible
]
=
useState
(
false
);
...
...
@@ -34,6 +36,9 @@ function PersonalInfoPage() {
const
[
roleCodes
,
setRoleCodes
]
=
useState
([])
const
[
phone
,
setPhone
]
=
useState
(
""
);
const
storeUserId
=
User
.
getStoreUserId
()
const
ctx
:
any
=
useContext
(
XMContext
);
const
userId
=
User
.
getUserId
();
window
.
ctx
=
ctx
;
useEffect
(()
=>
{
storeUserId
&&
getUserInfo
();
},[
storeUserId
])
...
...
@@ -85,27 +90,34 @@ function PersonalInfoPage() {
storeUserId
:
User
.
getStoreUserId
()
};
StoreService
.
editEmployee
(
params
).
then
((
res
)
=>
{
getStoreGroupAndStoreList
();
message
.
success
(
"编辑成功"
);
});
}
function
getStoreGroupAndStoreList
()
{
BaseService
.
getUserStore
({
userId
}).
then
((
res
)
=>
{
const
{
storeVOS
=
[]
}
=
res
.
result
;
ctx
.
dispatch
(
setStoreList
(
storeVOS
));
});
}
return
(
<
div
className=
"page personal-info-page"
>
<
div
className=
"page-content"
>
<
div
className=
"content-header"
>
个人设置
个人设置
</
div
>
<
div
className=
"box"
>
<
Form
>
<
div
className=
"avatat-item"
>
<
span
className=
"label"
>
头像:
</
span
>
<
Button
id=
"click_upload_btn"
onClick=
{
_onUpload
}
>
点击上传
</
Button
>
{
/* <Button id="click_upload_btn" >点击上传</Button> */
}
<
input
type=
"file"
accept=
"image/*"
id=
"CrpperAvatarPic"
style=
{
{
display
:
'none'
}
}
onChange=
{
_handleUpdateAvatar
}
/>
<
img
className=
"avatar"
src=
{
avatar
}
></
img
>
<
img
className=
"avatar"
src=
{
avatar
}
onClick=
{
_onUpload
}
></
img
>
{
cropperModalVisible
&&
<
CropperModal
imgUrl=
{
imgUrl
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment