Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
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 0c883958
authored
Jan 15, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
ac0f9a38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
app.js
router/router.js
app.js
View file @
0c88395
...
...
@@ -17,7 +17,6 @@ import TRACK from './utils/track/Track'
import
'~/utils/share'
App
({
onLaunch
(
options
)
{
wx
.
$LoginStatus
=
true
getUpdateManager
();
/**挂载到wx对象 */
wx
.
p
=
{
...
...
router/router.js
View file @
0c88395
...
...
@@ -88,8 +88,9 @@ class Router {
* @param {*} callBack true未登录 false已登录
*/
async
intercept
(
auto
=
true
)
{
const
authStatus
=
wx
.
$LoginStatus
if
(
authStatus
)
{
const
authStatus
=
wx
.
$LoginStatus
,
userInfo
=
wx
.
p
.
cache
.
userInfo
.
getUserInfo
()
||
{}
if
(
!
userInfo
.
phone
||
authStatus
)
{
if
(
auto
)
wx
.
navigateTo
({
url
:
'/pages/Login/Login'
,
})
...
...
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