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
78cfafb3
Commit
78cfafb3
authored
Aug 04, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Plain Diff
fix:rtyuiopk
parents
55c978bb
7dfb2fb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
src/modules/root/App.tsx
+14
-3
No files found.
src/modules/root/App.tsx
View file @
78cfafb3
...
...
@@ -32,14 +32,13 @@ const App: React.FC = (props: any) => {
const
[
versionInfo
,
setVersionInfo
]
=
useState
<
VersionInfo
|
null
>
(
null
)
const
userId
=
User
.
getUserId
();
const
[
menuType
,
setMenuType
]
=
useState
(
true
);
const
[
initWechat
,
setInitWechat
]
=
useState
(
false
);
const
enterpriseId
=
User
.
getEnterpriseId
();
window
.
ctx
=
ctx
;
useEffect
(()
=>
{
initWechatConfig
();
getStoreAndUserInfo
();
console
.
log
(
'拉取数据'
)
getVersion
();
if
(
window
.
location
.
hash
===
"#/"
)
{
window
.
RCHistory
.
replace
({
...
...
@@ -49,8 +48,20 @@ const App: React.FC = (props: any) => {
},
[])
async
function
initWechatConfig
()
{
WechatApi
.
initConfig
({
isAgentConfig
:
true
,
url
:
window
.
location
.
href
.
split
(
'#'
)[
0
]
}).
then
(()
=>
{
console
.
log
(
'注册完成'
)
if
(
!
initWechat
)
{
getStoreAndUserInfo
();
setInitWechat
(
true
)
}
})
setTimeout
(()
=>
{
if
(
!
initWechat
)
{
getStoreAndUserInfo
();
setInitWechat
(
true
)
}
},
1000
)
}
useEffect
(()
=>
{
getStorePermission
();
...
...
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