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
a114bbc7
Commit
a114bbc7
authored
Aug 22, 2019
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amadd versionnotice
parent
9ac14c14
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
139 additions
and
1 deletion
+139
-1
app.js
app.js
+7
-0
app.json
app.json
+2
-1
image_01.png
images/announcement/image_01.png
+0
-0
image_02.png
images/announcement/image_02.png
+0
-0
image_03.png
images/announcement/image_03.png
+0
-0
image_04.png
images/announcement/image_04.png
+0
-0
index.js
src/pages/versionnotice/index.js
+71
-0
index.json
src/pages/versionnotice/index.json
+4
-0
index.wxml
src/pages/versionnotice/index.wxml
+7
-0
index.wxss
src/pages/versionnotice/index.wxss
+40
-0
index.js
wechatinfoget/index.js
+8
-0
No files found.
app.js
View file @
a114bbc7
...
...
@@ -57,6 +57,13 @@ App({
},
canEnterSystem
(
path
)
{
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
// 新版本通知
if
(
LocalStorage
.
getItem
(
'versionNotice'
)
!=
1
&&
path
!=
'src/pages/versionnotice/index'
)
{
wx
.
redirectTo
({
url
:
'/src/pages/versionnotice/index'
})
return
;
}
if
(
!
visitor
||
!
visitor
.
id
||
!
visitor
.
token
||
visitor
.
version
!=
constants
.
storageVersion
)
{
LocalStorage
.
removeItem
(
'teacher'
);
LocalStorage
.
removeItem
(
'user'
);
...
...
app.json
View file @
a114bbc7
...
...
@@ -5,7 +5,8 @@
"src/pages/activityindex/index"
,
"business/pages/loginregistermgt/login"
,
"business/pages/loginregistermgt/register"
,
"business/pages/loginregistermgt/findpsd"
"business/pages/loginregistermgt/findpsd"
,
"src/pages/versionnotice/index"
],
"subpackages"
:
[
{
...
...
images/announcement/image_01.png
0 → 100644
View file @
a114bbc7
44.8 KB
images/announcement/image_02.png
0 → 100644
View file @
a114bbc7
39.6 KB
images/announcement/image_03.png
0 → 100644
View file @
a114bbc7
47.4 KB
images/announcement/image_04.png
0 → 100644
View file @
a114bbc7
22 KB
src/pages/versionnotice/index.js
0 → 100644
View file @
a114bbc7
// src/pages/versionnotice/index.js
import
{
LocalStorage
}
from
'../../../utilities/index.js'
;
var
app
=
getApp
();
Page
({
data
:
{
imageRoot
:
app
.
globalData
.
imageRoot
,
imageVersion
:
app
.
globalData
.
imageVersion
,
localImageRoot
:
'../../../images/'
,
},
onLoad
:
function
(
options
)
{
},
onReady
:
function
()
{
},
onShow
:
function
()
{
},
onHide
:
function
()
{
},
onUnload
:
function
()
{
},
urlMath
()
{
const
fromUrl
=
app
.
globalData
.
fromUrl
;
console
.
log
(
fromUrl
,
'fromUrlfromUrlfromUrl'
);
if
(
!
fromUrl
||
fromUrl
==
'src/pages/versionnotice/index'
)
{
return
''
;
}
let
_fromUrl
=
`
${
fromUrl
}
`
;
if
(
fromUrl
.
substr
(
0
,
1
)
!=
'/'
)
{
_fromUrl
=
`/
${
fromUrl
}
`
}
const
query
=
app
.
globalData
.
query
;
let
queryArr
=
[];
for
(
let
key
in
query
)
{
if
(
query
.
hasOwnProperty
(
key
))
{
queryArr
.
push
(
`
${
key
}
=
${
query
[
key
]}
`
)
}
}
if
(
queryArr
.
length
)
{
return
`
${
_fromUrl
}
?
${
queryArr
.
join
(
'&'
)}
`
;
}
return
_fromUrl
;
},
doEnter
(){
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
LocalStorage
.
setItem
(
'versionNotice'
,
1
);
let
url
=
this
.
urlMath
()
||
'/ucenter/index'
;
// 新版本通知 未授权跳转
if
(
!
visitor
||
!
visitor
.
token
){
wx
.
redirectTo
({
url
:
'/wechatinfoget/index'
})
return
}
if
(
url
==
'/ucenter/index'
||
url
.
indexOf
(
'
\
/schoolindex
\
/'
)
!=
-
1
)
{
wx
.
reLaunch
({
url
:
url
,
})
}
else
{
wx
.
reLaunch
({
url
:
url
})
}
}
})
\ No newline at end of file
src/pages/versionnotice/index.json
0 → 100644
View file @
a114bbc7
{
"navigationStyle"
:
"custom"
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/pages/versionnotice/index.wxml
0 → 100644
View file @
a114bbc7
<view class="container">
<image class="version-image" mode="widthFix" src="{{localImageRoot}}announcement/image_01.png?{{imageVersion}}"/>
<image class="version-image" mode="widthFix" src="{{localImageRoot}}announcement/image_02.png?{{imageVersion}}"/>
<image class="version-image" mode="widthFix" src="{{localImageRoot}}announcement/image_03.png?{{imageVersion}}"/>
<image class="version-image" mode="widthFix" src="{{localImageRoot}}announcement/image_04.png?{{imageVersion}}"/>
<view class="btn" bindtap="doEnter">我知道了</view>
</view>
\ No newline at end of file
src/pages/versionnotice/index.wxss
0 → 100644
View file @
a114bbc7
.container{
padding: 100rpx 0 160rpx;
}
.version-image{
width: 100%;
display: block;
}
.btn{
position: fixed;
left: 50%;
transform: translateX(-50%) scale(1);
bottom: 80rpx;
width: 365rpx;
height: 80rpx;
background: #65B8F4;
border-radius: 40rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
color: #fff;
animation: doScale linear 1s infinite;
}
@keyframes doScale{
20% {
transform: translateX(-50%) scale(1)
}
40% {
transform: translateX(-50%) scale(1.05)
}
60% {
transform: translateX(-50%) scale(1.1)
}
80% {
transform: translateX(-50%) scale(1.05)
}
100% {
transform: translateX(-50%) rotate(1)
}
}
\ No newline at end of file
wechatinfoget/index.js
View file @
a114bbc7
...
...
@@ -100,6 +100,14 @@ Page({
openid
:
_data
.
user
.
open_id
,
});
LocalStorage
.
setItem
(
'visitor'
,
visitor
);
// 授权成功,新版本通知未读 跳转
if
(
LocalStorage
.
getItem
(
'versionNotice'
)
!=
1
){
wx
.
redirectTo
({
url
:
'/src/pages/versionnotice/index'
})
return
}
let
url
=
that
.
urlMath
()
||
'/ucenter/index'
;
if
(
url
==
'/ucenter/index'
||
url
.
indexOf
(
'
\
/schoolindex
\
/'
)
!=
-
1
)
{
wx
.
reLaunch
({
...
...
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