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
fab31a41
Commit
fab31a41
authored
Jun 22, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理店铺员工显示不存在的问题
parent
29fec6f1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
9 deletions
+22
-9
src/common/js/user.ts
+1
-2
src/index.tsx
+2
-1
src/modules/root/App.tsx
+4
-5
src/modules/root/CollegeManagePage.jsx
+8
-0
src/modules/root/Header.jsx
+7
-1
No files found.
src/common/js/user.ts
View file @
fab31a41
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-31 09:34:25
* @Date: 2020-08-31 09:34:25
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-2
1 19:38
:53
* @LastEditTime: 2021-06-2
2 11:16
:53
* @Description:
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -12,7 +12,6 @@ import { PREFIX, USER_PREFIX } from '@/domains/basic-domain/constants';
...
@@ -12,7 +12,6 @@ import { PREFIX, USER_PREFIX } from '@/domains/basic-domain/constants';
declare
var
window
:
any
;
declare
var
window
:
any
;
class
User
{
class
User
{
getStoreId
()
{
getStoreId
()
{
console
.
log
(
'storeid'
,
window
.
currentStoreUserInfo
.
storeId
)
return
window
.
currentStoreUserInfo
.
storeId
||
Storage
.
get
(
`
${
PREFIX
}
_storeId`
);
return
window
.
currentStoreUserInfo
.
storeId
||
Storage
.
get
(
`
${
PREFIX
}
_storeId`
);
}
}
...
...
src/index.tsx
View file @
fab31a41
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-04-27 20:35:34
* @Date: 2020-04-27 20:35:34
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-22 1
0:04:27
* @LastEditTime: 2021-06-22 1
1:43:51
* @Description:
* @Description:
*/
*/
...
@@ -25,6 +25,7 @@ import Service from "@/common/js/service";
...
@@ -25,6 +25,7 @@ import Service from "@/common/js/service";
declare
var
getParameterByName
:
any
;
declare
var
getParameterByName
:
any
;
declare
var
window
:
any
;
declare
var
window
:
any
;
if
(
!
window
.
currentStoreUserInfo
){
if
(
!
window
.
currentStoreUserInfo
){
console
.
log
(
'我走进了此流程'
)
window
.
currentStoreUserInfo
=
{}
window
.
currentStoreUserInfo
=
{}
}
}
...
...
src/modules/root/App.tsx
View file @
fab31a41
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2019-07-10 10:30:49
* @Date: 2019-07-10 10:30:49
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-2
1 20:09:5
8
* @LastEditTime: 2021-06-2
2 10:58:4
8
* @Description:
* @Description:
*/
*/
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
...
@@ -21,7 +21,6 @@ import Bus from '@/core/tbus';
...
@@ -21,7 +21,6 @@ import Bus from '@/core/tbus';
import
{
func
}
from
'prop-types'
;
import
{
func
}
from
'prop-types'
;
declare
var
window
:
any
;
declare
var
window
:
any
;
// window.currentStoreUserInfo = {};
const
App
:
React
.
FC
=
(
props
:
any
)
=>
{
const
App
:
React
.
FC
=
(
props
:
any
)
=>
{
const
[
storeUserId
,
setStoreUserId
]
=
useState
(
''
)
const
[
storeUserId
,
setStoreUserId
]
=
useState
(
''
)
...
@@ -87,9 +86,9 @@ const App: React.FC = (props: any) => {
...
@@ -87,9 +86,9 @@ const App: React.FC = (props: any) => {
function
setCurrentStoreUserInfo
(
storeId
:
any
,
storeUserId
:
any
){
function
setCurrentStoreUserInfo
(
storeId
:
any
,
storeUserId
:
any
){
window
.
currentStoreUserInfo
.
storeId
=
storeId
;
window
.
currentStoreUserInfo
.
storeId
=
storeId
;
window
.
currentStoreUserInfo
.
storeUserId
=
storeUserId
;
window
.
currentStoreUserInfo
.
storeUserId
=
storeUserId
;
window
.
currentStoreUserInfo
.
userId
=
User
.
getUserId
();
//
window.currentStoreUserInfo.userId = User.getUserId();
window
.
currentStoreUserInfo
.
token
=
User
.
getToken
();
//
window.currentStoreUserInfo.token = User.getToken();
window
.
currentStoreUserInfo
.
enterpriseId
=
User
.
getEnterpriseId
();
//
window.currentStoreUserInfo.enterpriseId = User.getEnterpriseId();
}
}
function
getStoreGroupAndStoreList
()
{
function
getStoreGroupAndStoreList
()
{
...
...
src/modules/root/CollegeManagePage.jsx
View file @
fab31a41
...
@@ -179,7 +179,9 @@ export default class CollegeManagePage extends React.Component {
...
@@ -179,7 +179,9 @@ export default class CollegeManagePage extends React.Component {
return
null
;
return
null
;
};
};
User
.
setStoreId
(
item
.
id
);
User
.
setStoreId
(
item
.
id
);
User
.
setStoreUserId
(
item
.
storeUserId
);
window
.
currentStoreUserInfo
.
storeId
=
item
.
id
;
window
.
currentStoreUserInfo
.
storeId
=
item
.
id
;
window
.
currentStoreUserInfo
.
storeUserId
=
item
.
storeUserId
;
window
.
RCHistory
.
push
(
'/home'
)
window
.
RCHistory
.
push
(
'/home'
)
}
}
}
}
>
>
...
@@ -197,7 +199,9 @@ export default class CollegeManagePage extends React.Component {
...
@@ -197,7 +199,9 @@ export default class CollegeManagePage extends React.Component {
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
User
.
setStoreId
(
item
.
id
);
User
.
setStoreId
(
item
.
id
);
User
.
setStoreUserId
(
item
.
storeUserId
);
window
.
currentStoreUserInfo
.
storeId
=
item
.
id
;
window
.
currentStoreUserInfo
.
storeId
=
item
.
id
;
window
.
currentStoreUserInfo
.
storeUserId
=
item
.
storeUserId
;
window
.
RCHistory
.
push
(
'/college-info'
)
window
.
RCHistory
.
push
(
'/college-info'
)
}
}
}
}
>
编辑
</
span
>
>
编辑
</
span
>
...
@@ -252,7 +256,9 @@ export default class CollegeManagePage extends React.Component {
...
@@ -252,7 +256,9 @@ export default class CollegeManagePage extends React.Component {
return
null
;
return
null
;
};
};
User
.
setStoreId
(
item
.
id
);
User
.
setStoreId
(
item
.
id
);
User
.
setStoreUserId
(
item
.
storeUserId
);
window
.
currentStoreUserInfo
.
storeId
=
item
.
id
;
window
.
currentStoreUserInfo
.
storeId
=
item
.
id
;
window
.
currentStoreUserInfo
.
storeUserId
=
item
.
storeUserId
;
window
.
RCHistory
.
push
(
'/home'
)
window
.
RCHistory
.
push
(
'/home'
)
}
}
}
}
>
>
...
@@ -270,7 +276,9 @@ export default class CollegeManagePage extends React.Component {
...
@@ -270,7 +276,9 @@ export default class CollegeManagePage extends React.Component {
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
User
.
setStoreId
(
item
.
id
);
User
.
setStoreId
(
item
.
id
);
User
.
setStoreUserId
(
item
.
storeUserId
);
window
.
currentStoreUserInfo
.
storeId
=
item
.
id
;
window
.
currentStoreUserInfo
.
storeId
=
item
.
id
;
window
.
currentStoreUserInfo
.
storeUserId
=
item
.
storeUserId
;
window
.
RCHistory
.
push
(
'/college-info'
)
window
.
RCHistory
.
push
(
'/college-info'
)
}
}
}
}
>
编辑
</
span
>
>
编辑
</
span
>
...
...
src/modules/root/Header.jsx
View file @
fab31a41
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2019-09-10 18:26:03
* @Date: 2019-09-10 18:26:03
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-2
1 17:05:59
* @LastEditTime: 2021-06-2
2 11:07:28
* @Description:
* @Description:
*/
*/
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useRef
,
useContext
,
useEffect
,
useState
}
from
"react"
;
...
@@ -272,6 +272,12 @@ function Header(props) {
...
@@ -272,6 +272,12 @@ function Header(props) {
setStoreId
(
e
.
target
.
value
)
setStoreId
(
e
.
target
.
value
)
User
.
setStoreId
(
e
.
target
.
value
);
User
.
setStoreId
(
e
.
target
.
value
);
window
.
currentStoreUserInfo
.
storeId
=
e
.
target
.
value
;
window
.
currentStoreUserInfo
.
storeId
=
e
.
target
.
value
;
list
.
map
((
item
)
=>
{
if
(
item
.
id
===
e
.
target
.
value
){
User
.
setStoreUserId
(
item
.
storeUserId
);
window
.
currentStoreUserInfo
.
storeUserId
=
item
.
storeUserId
;
}
})
window
.
RCHistory
.
push
(
'/home'
);
window
.
RCHistory
.
push
(
'/home'
);
window
.
location
.
reload
();
window
.
location
.
reload
();
}
}
}
}
...
...
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