Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
pingan-life-index-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
9f5f5094
authored
2020-05-11 18:14:02 +0800
by
joe
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
產品頁下載電子檔信息通過cms管理
1 parent
db98d45f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
7 deletions
src/api/api.js
src/pages/gen-rich/gen-rich.js
src/pages/gen-rich/gen-rich.vue
src/pages/vhis-detail/vhis-detail.js
src/pages/vhis-detail/vhis-detail.vue
src/api/api.js
View file @
9f5f509
...
...
@@ -63,6 +63,8 @@ module.exports = {
policyReceipt
:
"/pingan_hklife_webapi/policy/policyReceipt"
,
// 获取电子保单下载code
getDownloadPath
:
"/pingan_hklife_webapi/policy/getDownloadPath"
,
// 获取OBS文件下載code
getObsDownloadPath
:
"/pingan_hklife_webapi/policy/getObsDownloadPath"
,
// 下载电子保单
downloadPolicy
:
"/pingan_hklife_webapi/policy/d"
,
// 上传电子文档
...
...
src/pages/gen-rich/gen-rich.js
View file @
9f5f509
...
...
@@ -6,7 +6,8 @@
import
api
from
'@/api/api'
import
{
httpGet
,
httpPost
httpPost
,
requestDomain
}
from
'@/api/fetch-api.js'
import
{
mapGetters
,
...
...
@@ -184,6 +185,24 @@ export default {
this
.
bottomBtnLink
=
targetData
.
bottomUrlLink
;
}
},
downloadFile
(
key
)
{
let
sourceData
=
this
.
sourceData
;
if
(
sourceData
.
exts
&&
sourceData
.
exts
.
iobsKey
&&
sourceData
.
exts
.
iobsKey
[
key
])
{
let
iobsKey
=
sourceData
.
exts
.
iobsKey
[
key
];
httpPost
({
url
:
api
.
getObsDownloadPath
,
data
:
{
key
:
iobsKey
}
}).
then
(
res
=>
{
if
(
res
)
{
let
url
=
requestDomain
()
+
api
.
downloadPolicy
+
"/"
+
res
;
window
.
open
(
url
);
}
else
{
this
.
showDownloadError
=
true
;
}
});
}
},
initActivity
()
{
let
d
=
localStorage
.
getItem
(
"voluntaryInfo"
);
if
(
d
)
{
...
...
src/pages/gen-rich/gen-rich.vue
View file @
9f5f509
...
...
@@ -190,7 +190,7 @@
<!-- 下载 -->
<div
class=
"download"
>
<div
class=
"border2 download-item"
>
<div
class=
"cont"
>
<div
class=
"cont"
@
click=
"downloadFile('k1')"
>
<div
class=
"icon-wrap"
>
<img
class=
"icon"
src=
"@/assets/images/vhis/vhis-download.png"
/>
</div>
...
...
@@ -198,7 +198,7 @@
</div>
</div>
<div
class=
"border2 download-item"
>
<div
class=
"cont"
>
<div
class=
"cont"
@
click=
"downloadFile('k2')"
>
<div
class=
"icon-wrap"
>
<img
class=
"icon"
src=
"@/assets/images/vhis/vhis-download.png"
/>
</div>
...
...
src/pages/vhis-detail/vhis-detail.js
View file @
9f5f509
...
...
@@ -6,7 +6,8 @@
import
api
from
'@/api/api'
import
{
httpGet
,
httpPost
httpPost
,
requestDomain
}
from
'@/api/fetch-api.js'
import
{
mapGetters
,
...
...
@@ -184,6 +185,24 @@ export default {
this
.
bottomBtnLink
=
targetData
.
bottomUrlLink
;
}
},
downloadFile
(
key
)
{
let
sourceData
=
this
.
sourceData
;
if
(
sourceData
.
exts
&&
sourceData
.
exts
.
iobsKey
&&
sourceData
.
exts
.
iobsKey
[
key
])
{
let
iobsKey
=
sourceData
.
exts
.
iobsKey
[
key
];
httpPost
({
url
:
api
.
getObsDownloadPath
,
data
:
{
key
:
iobsKey
}
}).
then
(
res
=>
{
if
(
res
)
{
let
url
=
requestDomain
()
+
api
.
downloadPolicy
+
"/"
+
res
;
window
.
open
(
url
);
}
else
{
this
.
showDownloadError
=
true
;
}
});
}
},
initActivity
()
{
let
d
=
localStorage
.
getItem
(
"voluntaryInfo"
);
if
(
d
)
{
...
...
src/pages/vhis-detail/vhis-detail.vue
View file @
9f5f509
...
...
@@ -363,17 +363,17 @@
<!-- 下载 -->
<div
class=
"download"
>
<div
class=
"border2 download-item"
>
<div
class=
"cont"
>
<div
class=
"cont"
@
click=
"downloadFile('k1')"
>
<div
class=
"icon-wrap"
><img
class=
"icon"
src=
"@/assets/images/vhis/vhis-download.png"
></div>
{{
$t
(
'vhisDetail.download.t1'
)
}}
</div>
</div>
<div
class=
"border2 download-item"
>
<div
class=
"cont"
>
<div
class=
"cont"
@
click=
"downloadFile('k2')"
>
<div
class=
"icon-wrap"
><img
class=
"icon"
src=
"@/assets/images/vhis/vhis-download.png"
></div>
{{
$t
(
'vhisDetail.download.t2'
)
}}
</div>
</div>
<div
class=
"border2 download-item"
>
<div
class=
"cont"
>
<div
class=
"cont"
@
click=
"downloadFile('k3')"
>
<div
class=
"icon-wrap"
><img
class=
"icon"
src=
"@/assets/images/vhis/vhis-download.png"
></div>
{{
$t
(
'vhisDetail.download.t3'
)
}}
</div>
</div>
...
...
Please
register
or
sign in
to post a comment