Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8f04b84a
authored
Oct 20, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
08e154a0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
4 deletions
api/usersApi/UsersApi.js
login/index/components/Box/Box.js
router/router.js
api/usersApi/UsersApi.js
View file @
8f04b84
...
@@ -143,6 +143,7 @@ class UsersApi {
...
@@ -143,6 +143,7 @@ class UsersApi {
/**获取微信用户信息 */
/**获取微信用户信息 */
async
getWXUserInfo
()
{
async
getWXUserInfo
()
{
let
wx_user_info
=
wx
.
$storage
.
get
(
'wx_user_info'
)
let
wx_user_info
=
wx
.
$storage
.
get
(
'wx_user_info'
)
console
.
log
(
wx_user_info
)
if
(
!
wx_user_info
)
{
if
(
!
wx_user_info
)
{
const
data
=
await
this
.
getUserProfile
()
const
data
=
await
this
.
getUserProfile
()
wx
.
$storage
.
set
(
'wx_user_info'
,
data
)
wx
.
$storage
.
set
(
'wx_user_info'
,
data
)
...
...
login/index/components/Box/Box.js
View file @
8f04b84
...
@@ -273,9 +273,6 @@ Component({
...
@@ -273,9 +273,6 @@ Component({
disabled
:
false
disabled
:
false
})
})
this
.
loginToken
=
data
this
.
loginToken
=
data
USERAPI
.
getUserProfile
(
data
).
then
(
data
=>
{
wx
.
$storage
.
set
(
'wx_user_info'
,
data
)
})
}
else
this
.
reLogin
(
message
)
}
else
this
.
reLogin
(
message
)
wx
.
hideLoading
()
wx
.
hideLoading
()
}
catch
({
}
catch
({
...
...
router/router.js
View file @
8f04b84
...
@@ -16,7 +16,7 @@ class Router {
...
@@ -16,7 +16,7 @@ class Router {
wx
.
onAppRoute
(
async
e
=>
{
wx
.
onAppRoute
(
async
e
=>
{
let
thisPage
=
this
.
getPageInstance
()
let
thisPage
=
this
.
getPageInstance
()
if
(
thisPage
)
{
if
(
thisPage
)
{
await
USERAPI
.
getWXUserInfo
()
if
(
!
thisPage
.
route
.
includes
(
'login'
))
await
USERAPI
.
getWXUserInfo
()
thisPage
.
setData
({
IMG_URL
})
thisPage
.
setData
({
IMG_URL
})
if
(
Object
.
keys
(
this
[
_query
]).
length
)
thisPage
.
options
=
this
[
_query
]
if
(
Object
.
keys
(
this
[
_query
]).
length
)
thisPage
.
options
=
this
[
_query
]
this
.
setNavigationBarTitleText
(
thisPage
)
this
.
setNavigationBarTitleText
(
thisPage
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment