Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
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
xugong
hls-xcmg-vue-app
Commits
dc107205
Commit
dc107205
authored
Feb 03, 2023
by
jiacheng.mao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix][I-11674]解决ios端查看pdf文件的问题
parent
e301f63b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
repay-detail.vue
src/pages/contractInquire/repay-detail.vue
+21
-9
No files found.
src/pages/contractInquire/repay-detail.vue
View file @
dc107205
...
...
@@ -144,7 +144,7 @@ export default {
let
param
=
{
project_id
:
vm
.
$route
.
params
.
project_id
,
// phone: window.localStorage.user_phone,
bp_id
:
JSON
.
parse
(
window
.
localStorage
.
now_user_bp_bind_id
).
bp_id
,
bp_id
:
JSON
.
parse
(
window
.
localStorage
.
now_user_bp_bind_id
).
bp_id
,
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
...
...
@@ -152,14 +152,26 @@ export default {
if
(
res
.
result
===
'S'
)
{
vm
.
fileArray
=
res
.
info
vm
.
fileArray
.
forEach
(
i
=>
{
//cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes,hideurlbar=no,toolbarposition=top')
//cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes')
if
(
vum
.
Platform
.
isAndroid
())
{
//android终端
window
.
open
(
i
.
fileUrl
,
"_system"
,
"location=yes"
)
}
else
if
(
vum
.
Platform
.
isIOS
()
||
vum
.
Platform
.
isIPad
())
{
//ios终端
window
.
location
.
href
=
i
.
fileUrl
;
}
else
{
window
.
open
(
i
.
fileUrl
,
"_system"
,
"location=yes"
)
// cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes,hideurlbar=no,toolbarposition=top')
// cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes')
if
(
vum
.
Platform
.
isAndroid
())
{
// android终端
window
.
open
(
i
.
fileUrl
,
'_system'
,
'location=yes'
)
}
else
if
(
vum
.
Platform
.
isIOS
()
||
vum
.
Platform
.
isIPad
())
{
// ios终端
// window.location.href = i.fileUrl;
// 模拟 输入框
var
cInput
=
document
.
createElement
(
'input'
)
cInput
.
value
=
i
.
fileUrl
document
.
body
.
appendChild
(
cInput
)
cInput
.
select
()
// 选取文本框内容
// 执行浏览器复制命令
// 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签)
// Input要在正常的编辑状态下原生复制方法才会生效
document
.
execCommand
(
'copy'
)
hlsPopup
.
showLongCenter
(
'复制成功,请在浏览器中打开'
)
// 复制成功后再将构造的标签 移除
document
.
body
.
removeChild
(
cInput
)
}
else
{
window
.
open
(
i
.
fileUrl
,
'_system'
,
'location=yes'
)
}
})
// vm.pdfDownload()
...
...
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