Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
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
Chao Sun
CFFP-HB
Commits
10b4a038
Commit
10b4a038
authored
Jan 09, 2023
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决白屏问题
parent
66b8a79c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
99 additions
and
73 deletions
+99
-73
pages.json
+2
-1
pages/downloadApp/downloadApp.vue
+76
-72
util/router.js
+21
-0
No files found.
pages.json
View file @
10b4a038
...
...
@@ -439,8 +439,9 @@
"navigationBarTitleText"
:
"批量数据计算"
}
}
,{
"path"
:
"pages/downloadApp
Common/downloadAppCommon
"
,
"path"
:
"pages/downloadApp
/downloadApp
"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
...
...
pages/downloadApp
Common/downloadAppCommon
.vue
→
pages/downloadApp
/downloadApp
.vue
View file @
10b4a038
<
template
>
<view
class=
"container downContainer"
>
<view
class=
"logoContainer"
>
<image
src=
"/static/downlogo.png"
mode=
"widthFix"
></image>
</view>
<view
class=
"logoName"
>
CFFP财富中心
</view>
<view
class=
"downBtn"
@
click=
"handleBtnDown"
>
立即下载
</view>
<view
class=
"qrcodeContainer"
>
<image
:src=
"'/static/'+ (iosFlag ? 'iosDownLoadQrcode' : 'androidDownLoadQrcode')+'.png'"
mode=
"widthFix"
></image>
</view>
<view
class=
"footerTitle"
>
【成为注册家庭财务策划师】
</view>
<view
class=
"footerSubtitle"
>
金融·风险管理·咨询·投资组合
</view>
<!-- 遮罩 -->
<view
class=
"markContainer"
v-if=
"markFlag"
>
<view
class=
"tipsIcon"
>
<image
src=
"/static/Group132.png"
mode=
"widthFix"
></image>
<view
class=
"logoContainer"
>
<image
src=
"/static/downlogo.png"
mode=
"widthFix"
></image>
</view>
<view
class=
"logoName"
>
CFFP财富中心
</view>
<view
class=
"downBtn"
@
click=
"handleBtnDown"
>
立即下载
</view>
<view
class=
"qrcodeContainer"
>
<image
:src=
"'/static/'+ (iosFlag ? 'iosDownLoadQrcode' : 'androidDownLoadQrcode')+'.png'"
mode=
"widthFix"
></image>
</view>
<view
class=
"tipsContent"
>
<view
style=
"display: flex;justify-content: center;align-items: center;"
>
戳这里,点击
<image
src=
"/static/browser.png"
mode=
"widthFix"
style=
"width:100rpx!important;height:100rpx;margin:0 30rpx"
></image>
按钮
</view>
<view
class=
""
>
<view>
使用系统浏览器即可安装
</view>
<view
class=
"footerTitle"
>
【成为注册家庭财务策划师】
</view>
<view
class=
"footerSubtitle"
>
金融·风险管理·咨询·投资组合
</view>
<!-- 遮罩 -->
<view
class=
"markContainer"
v-if=
"markFlag"
>
<view
class=
"tipsIcon"
>
<image
src=
"/static/Group132.png"
mode=
"widthFix"
></image>
</view>
<view
class=
"tipsContent"
>
<view
style=
"display: flex;justify-content: center;align-items: center;"
>
戳这里,点击
<image
src=
"/static/browser.png"
mode=
"widthFix"
style=
"width:100rpx!important;height:100rpx;margin:0 30rpx"
></image>
按钮
</view>
<view
class=
""
>
<view>
使用系统浏览器即可安装
</view>
</view>
</view>
<view
class=
"confirmBtn"
>
知道了
</view>
</view>
<view
class=
"confirmBtn"
>
知道了
</view>
</view>
</view>
</
template
>
<
script
>
// 兼容
let
browser
=
{
versions
:
function
()
{
let
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
return
{
trident
:
u
.
indexOf
(
'Trident'
)
>
-
1
,
/*IE内核*/
presto
:
u
.
indexOf
(
'Presto'
)
>
-
1
,
/*opera内核*/
webKit
:
u
.
indexOf
(
'AppleWebKit'
)
>
-
1
,
/*苹果、谷歌内核*/
gecko
:
u
.
indexOf
(
'Gecko'
)
>
-
1
&&
u
.
indexOf
(
'KHTML'
)
==
-
1
,
/*火狐内核*/
mobile
:
!!
u
.
match
(
/AppleWebKit.*Mobile.*/
),
/*是否为移动终端*/
ios
:
!!
u
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
),
/*ios终端*/
android
:
u
.
indexOf
(
'Android'
)
>
-
1
||
u
.
indexOf
(
'Linux'
)
>
-
1
,
/*android终端或者uc浏览器*/
iPhone
:
u
.
indexOf
(
'iPhone'
)
>
-
1
,
/*是否为iPhone或者QQHD浏览器*/
iPad
:
u
.
indexOf
(
'iPad'
)
>
-
1
,
/*是否iPad*/
webApp
:
u
.
indexOf
(
'Safari'
)
==
-
1
,
/*是否web应该程序,没有头部与底部*/
souyue
:
u
.
indexOf
(
'souyue'
)
>
-
1
,
superapp
:
u
.
indexOf
(
'superapp'
)
>
-
1
,
weixin
:
u
.
toLowerCase
().
indexOf
(
'micromessenger'
)
>
-
1
,
Safari
:
u
.
indexOf
(
'Safari'
)
>
-
1
};
}(),
language
:
(
navigator
.
browserLanguage
||
navigator
.
language
).
toLowerCase
()
};
export
default
{
data
()
{
return
{
markFlag
:
false
,
iosFlag
:
false
};
iosFlag
:
false
,
browser
:{}
}
},
methods
:
{
// 下载app
handleBtnDown
()
{
if
(
browser
.
versions
.
weixin
){
this
.
markFlag
=
true
;
return
;
}
if
(
browser
.
versions
.
android
)
{
window
.
location
.
href
=
"https://mdev.anjibao.cn/app.apk"
;
}
else
if
(
browser
.
versions
.
ios
)
{
console
.
log
(
'ios'
)
window
.
location
.
href
=
"http://itunes.apple.com/us/app/id399608199"
;
}
}
},
onLoad
()
{
this
.
browser
=
{
versions
:
function
()
{
let
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
;
return
{
trident
:
u
.
indexOf
(
'Trident'
)
>
-
1
,
/*IE内核*/
presto
:
u
.
indexOf
(
'Presto'
)
>
-
1
,
/*opera内核*/
webKit
:
u
.
indexOf
(
'AppleWebKit'
)
>
-
1
,
/*苹果、谷歌内核*/
gecko
:
u
.
indexOf
(
'Gecko'
)
>
-
1
&&
u
.
indexOf
(
'KHTML'
)
==
-
1
,
/*火狐内核*/
mobile
:
!!
u
.
match
(
/AppleWebKit.*Mobile.*/
),
/*是否为移动终端*/
ios
:
!!
u
.
match
(
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/
),
/*ios终端*/
android
:
u
.
indexOf
(
'Android'
)
>
-
1
||
u
.
indexOf
(
'Linux'
)
>
-
1
,
/*android终端或者uc浏览器*/
iPhone
:
u
.
indexOf
(
'iPhone'
)
>
-
1
,
/*是否为iPhone或者QQHD浏览器*/
iPad
:
u
.
indexOf
(
'iPad'
)
>
-
1
,
/*是否iPad*/
webApp
:
u
.
indexOf
(
'Safari'
)
==
-
1
,
/*是否web应该程序,没有头部与底部*/
souyue
:
u
.
indexOf
(
'souyue'
)
>
-
1
,
superapp
:
u
.
indexOf
(
'superapp'
)
>
-
1
,
weixin
:
u
.
toLowerCase
().
indexOf
(
'micromessenger'
)
>
-
1
,
Safari
:
u
.
indexOf
(
'Safari'
)
>
-
1
};
}(),
language
:
(
navigator
.
browserLanguage
||
navigator
.
language
).
toLowerCase
()
}
if
(
browser
.
versions
.
ios
){
this
.
iosFlag
=
true
}
else
{
...
...
@@ -85,27 +102,13 @@
console
.
log
(
'android'
)
// window.location.href = "cffpapp://" //manifest.json配置的schemes
}
},
methods
:{
// 下载app
handleBtnDown
()
{
if
(
browser
.
versions
.
weixin
){
this
.
markFlag
=
true
;
return
;
}
if
(
browser
.
versions
.
android
)
{
window
.
location
.
href
=
"https://mdev.anjibao.cn/app.apk"
;
}
else
if
(
browser
.
versions
.
ios
)
{
console
.
log
(
'ios'
)
window
.
location
.
href
=
"http://itunes.apple.com/us/app/id399608199"
;
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
.downContainer
{
.downContainer
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
...
...
@@ -189,4 +192,5 @@
color
:
#666
;
}
}
</
style
>
util/router.js
View file @
10b4a038
...
...
@@ -11,6 +11,8 @@ export default function initApp(){
uni
.
addInterceptor
(
'navigateTo'
,
{
// 页面跳转前进行拦截, invoke根据返回值进行判断是否继续执行跳转
invoke
(
e
)
{
let
app
=
getCurrentPages
()
console
.
log
(
'页面站==='
,
app
)
if
(
!
hasPermission
(
e
.
url
)){
uni
.
reLaunch
({
url
:
'/components/login/login'
...
...
@@ -26,6 +28,25 @@ export default function initApp(){
uni
.
addInterceptor
(
'switchTab'
,
{
// tabbar页面跳转前进行拦截
invoke
(
e
)
{
let
app
=
getCurrentPages
()
console
.
log
(
'页面站==='
,
app
)
if
(
!
hasPermission
(
e
.
url
)){
uni
.
reLaunch
({
url
:
'/components/login/login'
})
return
false
}
return
true
},
success
(
e
)
{
}
})
uni
.
addInterceptor
(
'reLaunch'
,
{
// tabbar页面跳转前进行拦截
invoke
(
e
)
{
let
app
=
getCurrentPages
()
console
.
log
(
'页面站==='
,
app
)
if
(
!
hasPermission
(
e
.
url
)){
uni
.
reLaunch
({
url
:
'/components/login/login'
...
...
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