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
5d6b8e10
Commit
5d6b8e10
authored
Jul 20, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理B跳C直接登录
parent
b2c30729
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
src/common/js/user.ts
+9
-1
src/modules/root/Header.jsx
+3
-2
No files found.
src/common/js/user.ts
View file @
5d6b8e10
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-31 09:34:25
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-0
6-23 16:08:50
* @LastEditTime: 2021-0
7-20 17:21:16
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -48,6 +48,10 @@ class User {
return
window
.
currentStoreUserInfo
.
userId
||
Storage
.
get
(
`
${
PREFIX
}
_userId`
);
}
getAvatar
(){
return
Storage
.
get
(
`
${
PREFIX
}
_avatar`
);
}
getUserRole
()
{
return
Storage
.
get
(
`
${
PREFIX
}
_userRole`
);
}
...
...
@@ -96,6 +100,10 @@ class User {
return
Storage
.
set
(
`
${
PREFIX
}
_userId`
,
value
);
}
setAvatar
(
value
:
any
)
{
return
Storage
.
set
(
`
${
PREFIX
}
_avatar`
,
value
);
}
setUserRole
(
value
:
any
)
{
return
Storage
.
set
(
`
${
PREFIX
}
_userRole`
,
value
);
}
...
...
src/modules/root/Header.jsx
View file @
5d6b8e10
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-07-
14 14:14:16
* @LastEditTime: 2021-07-
20 17:39:52
* @Description:
*/
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
'react'
;
...
...
@@ -79,6 +79,7 @@ function Header(props) {
setNickName
(
nickName
);
setPhone
(
phone
);
setAvatar
(
res
.
result
.
avatar
);
User
.
setAvatar
(
res
.
result
.
avatar
);
});
}
...
...
@@ -336,7 +337,7 @@ function Header(props) {
<
div
className=
'url-link'
onClick=
{
()
=>
{
window
.
open
(
htmlUrl
);
window
.
open
(
`${LIVE_SHARE}store/index?id=${window.currentStoreUserInfo.storeId||User.getStoreId()}&userId=${window.currentStoreUserInfo.userId||User.getUserId()}&enterpriseId=${window.currentStoreUserInfo.enterpriseId||User.getEnterpriseId()}&from=admin&avatar=${avatar}`
);
}
}
>
{
'立即前往 >'
}
</
div
>
...
...
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