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
b61e44e4
Commit
b61e44e4
authored
Dec 07, 2020
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:解决接口依赖问题
parent
0e42e759
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
src/modules/personalInfo/index.tsx
+3
-3
src/modules/root/App.tsx
+7
-4
No files found.
src/modules/personalInfo/index.tsx
View file @
b61e44e4
/*
/*
* @Author: zhangleyuan
* @Author: zhangleyuan
* @Date: 2020-11-27 15:06:31
* @Date: 2020-11-27 15:06:31
* @LastEditors:
zhangleyu
an
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-07
15:59:26
* @LastEditTime: 2020-12-07
20:09:22
* @Description: 描述一下
* @Description: 描述一下
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -35,7 +35,7 @@ function PersonalInfoPage() {
...
@@ -35,7 +35,7 @@ function PersonalInfoPage() {
const
[
phone
,
setPhone
]
=
useState
(
""
);
const
[
phone
,
setPhone
]
=
useState
(
""
);
const
storeUserId
=
User
.
getStoreUserId
()
const
storeUserId
=
User
.
getStoreUserId
()
useEffect
(()
=>
{
useEffect
(()
=>
{
getUserInfo
();
storeUserId
&&
getUserInfo
();
},[
storeUserId
])
},[
storeUserId
])
function
getUserInfo
(){
function
getUserInfo
(){
const
param
=
{
const
param
=
{
...
...
src/modules/root/App.tsx
View file @
b61e44e4
/*
/*
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2019-07-10 10:30:49
* @Date: 2019-07-10 10:30:49
* @LastEditors:
zhangleyu
an
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-0
4 15:19:59
* @LastEditTime: 2020-12-0
7 20:09:55
* @Description:
* @Description:
*/
*/
import
React
,
{
useContext
,
useEffect
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
}
from
'react'
;
...
@@ -32,7 +32,6 @@ const App: React.FC = (props: any) => {
...
@@ -32,7 +32,6 @@ const App: React.FC = (props: any) => {
async
function
getStoreAndUserInfo
(){
async
function
getStoreAndUserInfo
(){
await
getStoreGroupAndStoreList
();
await
getStoreGroupAndStoreList
();
await
getUserPermission
();
}
}
function
getStoreGroupAndStoreList
()
{
function
getStoreGroupAndStoreList
()
{
...
@@ -43,14 +42,18 @@ const App: React.FC = (props: any) => {
...
@@ -43,14 +42,18 @@ const App: React.FC = (props: any) => {
User
.
setStoreId
(
id
);
User
.
setStoreId
(
id
);
User
.
setStoreUserId
(
storeUserId
);
User
.
setStoreUserId
(
storeUserId
);
console
.
log
(
"getUserStore"
,
id
,
storeUserId
)
ctx
.
dispatch
(
setStoreGroupList
(
storeGroupVOS
))
ctx
.
dispatch
(
setStoreGroupList
(
storeGroupVOS
))
ctx
.
dispatch
(
setStoreList
(
storeVOS
))
ctx
.
dispatch
(
setStoreList
(
storeVOS
));
getUserPermission
();
});
});
}
}
function
getUserPermission
()
{
function
getUserPermission
()
{
const
storeId
=
User
.
getStoreId
();
const
storeId
=
User
.
getStoreId
();
const
storeUserId
=
User
.
getStoreUserId
();
const
storeUserId
=
User
.
getStoreUserId
();
console
.
log
(
"getUserPermission"
,
storeId
,
storeUserId
)
BaseService
.
getUserPermission
({
storeId
,
storeUserId
}).
then
((
res
)
=>
{
BaseService
.
getUserPermission
({
storeId
,
storeUserId
}).
then
((
res
)
=>
{
console
.
log
(
res
.
result
);
console
.
log
(
res
.
result
);
...
...
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