Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
2b899b42
Commit
2b899b42
authored
Dec 30, 2019
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5b8fc6e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
app.js
app.js
+19
-0
constants.js
constants/constants.js
+1
-1
No files found.
app.js
View file @
2b899b42
...
...
@@ -41,6 +41,12 @@ App({
},
onShow
:
function
(
params
)
{
// 小程序启动,或从后台进入前台显示时
const
{
path
,
query
,
scene
,
shareTicket
,
referrerInfo
}
=
params
;
// if (visitor.version != constants.storageVersion) {
// LocalStorage.removeItem('teacher');
// LocalStorage.removeItem('user');
// LocalStorage.removeItem('dakarole');
// LocalStorage.removeItem('visitor');
// }
if
(
path
==
'business/pages/loginregistermgt/login'
){
this
.
globalData
.
fromUrl
=
path
;
this
.
globalData
.
query
=
{};
...
...
@@ -54,6 +60,18 @@ App({
this
.
globalData
.
fromUrl
=
'ucenter/index'
;
this
.
globalData
.
query
=
{};
}
if
(
path
==
'ucenter/index'
)
{
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
if
(
visitor
&&
visitor
.
version
!=
constants
.
storageVersion
)
{
LocalStorage
.
removeItem
(
'teacher'
);
LocalStorage
.
removeItem
(
'user'
);
LocalStorage
.
removeItem
(
'dakarole'
);
LocalStorage
.
removeItem
(
'visitor'
);
wx
.
reLaunch
({
url
:
'ucenter/index'
});
}
}
if
(
path
!=
'ucenter/index'
)
{
this
.
canEnterSystem
(
path
);
}
...
...
@@ -117,6 +135,7 @@ App({
},
canEnterSystem
(
path
)
{
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
console
.
log
(
visitor
,
'visitor'
);
// 新版本通知
// if (LocalStorage.getItem('versionNotice') != 1 && path != 'src/pages/versionnotice/index') {
// wx.redirectTo({
...
...
constants/constants.js
View file @
2b899b42
...
...
@@ -2,7 +2,7 @@
imageRoot
:
'https://cdn.img.shangjiadao.cn/qingxiao/daka/images/'
,
// host: 'https://qxapi.qingxiao.online/daka',
// host2: 'https://wx.m.shangjiadao.cn',
storageVersion
:
'
4
.0'
,
storageVersion
:
'
5
.0'
,
imageVersion
:
'20191104'
,
host
:
'https://clock.wp53.cn'
,
host2
:
'https://test.wp53.cn'
,
...
...
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