Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mongo-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
mongo-ui
Commits
010378fb
Commit
010378fb
authored
Sep 02, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/update_pdf' into 'master'
fix: pdf展示方式改变 See merge request
!194
parents
477e5bec
7fa377e2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
47 deletions
+47
-47
policy.js
src/api/policy.js
+5
-0
http.js
src/service/http.js
+8
-1
SecurityContent.vue
src/views/Policy/Detail/modules/SecurityContent.vue
+3
-4
index.vue
src/views/Policy/VirtualDetail/index.vue
+4
-36
electronicInsurance.mixin.js
src/views/Policy/mixin/electronicInsurance.mixin.js
+17
-0
PolicyItem.vue
src/views/Policy/modules/PolicyItem.vue
+3
-5
index.less
src/views/User/index.less
+7
-1
No files found.
src/api/policy.js
View file @
010378fb
...
@@ -29,3 +29,8 @@ export const updateRenewal = (policySecId, status) => {
...
@@ -29,3 +29,8 @@ export const updateRenewal = (policySecId, status) => {
export
const
returnOnline
=
params
=>
{
export
const
returnOnline
=
params
=>
{
return
req
.
post
(
"
/third/huagui/returnOnline
"
,
params
);
return
req
.
post
(
"
/third/huagui/returnOnline
"
,
params
);
};
};
// 电子保单下载获取下载地址
export
const
getElectronicInsurance
=
params
=>
{
return
req
.
post
(
"
/policy/download/img-state
"
,
params
);
};
src/service/http.js
View file @
010378fb
...
@@ -73,17 +73,24 @@ axios.interceptors.request.use(
...
@@ -73,17 +73,24 @@ axios.interceptors.request.use(
// 响应拦截器即异常处理
// 响应拦截器即异常处理
axios
.
interceptors
.
response
.
use
(
axios
.
interceptors
.
response
.
use
(
response
=>
{
response
=>
{
let
notifyType
=
"
danger
"
;
afterRequest
();
afterRequest
();
delete
pending
[
response
.
config
.
url
];
delete
pending
[
response
.
config
.
url
];
if
(
response
.
data
.
code
===
"
0
"
)
return
response
.
data
.
data
;
if
(
response
.
data
.
code
===
"
0
"
)
return
response
.
data
.
data
;
// 特殊处理,下单已存在时,跳转到保单列表
// 特殊处理,下单已存在时,跳转到保单列表
if
(
response
.
config
.
url
===
"
policy_order
"
&&
response
.
data
.
code
===
"
40601
"
)
{
if
(
response
.
config
.
url
===
"
policy_order
"
&&
response
.
data
.
code
===
"
40601
"
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
router
.
push
(
"
/policy
"
);
router
.
push
(
"
/policy
"
);
},
1000
);
},
1000
);
}
}
Notify
({
type
:
"
danger
"
,
message
:
response
.
data
.
msg
||
"
后端服务异常
"
});
// 后端返回异常信息时提出警告
if
(
response
.
data
.
code
&&
response
.
data
.
msg
)
notifyType
=
"
warning
"
;
Notify
({
type
:
notifyType
,
message
:
response
.
data
.
msg
||
"
后端服务异常
"
});
return
Promise
.
reject
(
response
.
data
);
return
Promise
.
reject
(
response
.
data
);
},
},
async
err
=>
{
async
err
=>
{
...
...
src/views/Policy/Detail/modules/SecurityContent.vue
View file @
010378fb
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Collapse
from
"
./Collapse
"
;
import
Collapse
from
"
./Collapse
"
;
import
electronicInsuranceMixin
from
"
../../mixin/electronicInsurance.mixin
"
;
export
default
{
export
default
{
name
:
"
SecurityContent
"
,
name
:
"
SecurityContent
"
,
...
@@ -69,12 +70,10 @@ export default {
...
@@ -69,12 +70,10 @@ export default {
}
}
}
}
},
},
mixins
:
[
electronicInsuranceMixin
],
methods
:
{
methods
:
{
showPdf
()
{
showPdf
()
{
this
.
$router
.
push
({
this
.
getElectronicInsurance
(
this
.
data
?.
policySecId
);
path
:
"
/policy/virtual-detail
"
,
query
:
{
policySecId
:
this
.
data
.
policySecId
}
});
}
}
},
},
computed
:
{
computed
:
{
...
...
src/views/Policy/VirtualDetail/index.vue
View file @
010378fb
<
template
>
<
template
>
<div
class=
"container"
>
<cr-image
fit=
"cover"
:src=
"url"
/>
<pdf
v-for=
"(item, index) in pdfNumPages"
:key=
"index"
:src=
"pdfUrl"
:page=
"index + 1"
/>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
pdf
from
"
vue-pdf
"
;
import
config
from
"
@/config
"
;
import
{
mapActions
}
from
"
vuex
"
;
import
localStorage
from
"
@/service/localStorage
"
;
// let CMAP_URL = "https://cdn.jsdelivr.net/npm/pdfjs-dist@2.5.207/cmaps/";
export
default
{
export
default
{
name
:
"
PolicyVirtualDetail
"
,
name
:
"
PolicyVirtualDetail
"
,
components
:
{
pdf
},
data
()
{
data
()
{
return
{
return
{
pdfUrl
:
""
,
url
:
""
pdfNumPages
:
null
};
};
},
},
mounted
()
{
created
()
{
this
.
pdfTask
();
this
.
url
=
this
.
$route
.
query
?.
url
;
},
methods
:
{
...
mapActions
([
"
setIsLoading
"
]),
pdfTask
()
{
const
token
=
localStorage
.
get
(
"
mongoToken
"
);
const
policySecId
=
this
.
$route
.
query
?.
policySecId
;
if
(
!
policySecId
||
!
token
)
this
.
$router
.
back
();
const
url
=
`
${
config
.
basicHost
}
policy/download?token=
${
token
}
&policySecId=
${
encodeURIComponent
(
policySecId
)}
`
;
this
.
pdfUrl
=
pdf
.
createLoadingTask
({
url
});
this
.
pdfUrl
.
promise
.
then
(
pdf
=>
{
this
.
pdfNumPages
=
pdf
.
numPages
;
this
.
setIsLoading
(
false
);
})
.
catch
(
err
=>
{
console
.
error
(
"
err
"
,
err
);
});
}
}
}
};
};
</
script
>
</
script
>
...
...
src/views/Policy/mixin/electronicInsurance.mixin.js
0 → 100644
View file @
010378fb
import
{
getElectronicInsurance
}
from
"
@/api/policy
"
;
export
default
{
methods
:
{
async
getElectronicInsurance
(
policySecId
)
{
if
(
!
policySecId
)
{
this
.
$notify
({
type
:
"
warning
"
,
message
:
"
保单不存在
"
});
return
;
}
const
url
=
await
getElectronicInsurance
({
policySecId
});
this
.
$router
.
push
({
path
:
"
/policy/virtual-detail
"
,
query
:
{
url
}
});
}
}
};
src/views/Policy/modules/PolicyItem.vue
View file @
010378fb
...
@@ -79,6 +79,7 @@ import { getPolicyList } from "@/api/policy";
...
@@ -79,6 +79,7 @@ import { getPolicyList } from "@/api/policy";
import
settings
from
"
@/api/settings
"
;
import
settings
from
"
@/api/settings
"
;
import
policyStatusMixin
from
"
../mixin/policyStatus.mixin
"
;
import
policyStatusMixin
from
"
../mixin/policyStatus.mixin
"
;
import
detailPayMixin
from
"
@/views/Goods/Detail/modules/detailPay.mixin
"
;
import
detailPayMixin
from
"
@/views/Goods/Detail/modules/detailPay.mixin
"
;
import
electronicInsurance
from
"
../mixin/electronicInsurance.mixin
"
;
// SELF(1, "本人"),
// SELF(1, "本人"),
// PARENT(2, "父母"),
// PARENT(2, "父母"),
...
@@ -88,7 +89,7 @@ const relations = [-1, 1, 2, 3, 4];
...
@@ -88,7 +89,7 @@ const relations = [-1, 1, 2, 3, 4];
export
default
{
export
default
{
name
:
"
InsuranceRecommend
"
,
name
:
"
InsuranceRecommend
"
,
mixins
:
[
policyStatusMixin
,
detailPayMixin
],
mixins
:
[
policyStatusMixin
,
detailPayMixin
,
electronicInsurance
],
props
:
{
props
:
{
type
:
{
type
:
{
type
:
Number
,
type
:
Number
,
...
@@ -136,10 +137,7 @@ export default {
...
@@ -136,10 +137,7 @@ export default {
query
:
{
id
:
item
.
id
,
type
:
item
.
itype
}
query
:
{
id
:
item
.
id
,
type
:
item
.
itype
}
});
});
}
else
if
(
text
===
"
电子保单
"
)
{
}
else
if
(
text
===
"
电子保单
"
)
{
this
.
$router
.
push
({
this
.
getElectronicInsurance
(
item
.
policySecId
);
path
:
"
/policy/virtual-detail
"
,
query
:
{
policySecId
:
item
.
policySecId
}
});
}
else
if
(
text
===
"
去支付
"
)
{
}
else
if
(
text
===
"
去支付
"
)
{
this
.
orderInfo
=
{
this
.
orderInfo
=
{
payOrderNo
:
item
?.
payInfo
?.
payOrderNo
,
payOrderNo
:
item
?.
payInfo
?.
payOrderNo
,
...
...
src/views/User/index.less
View file @
010378fb
@import "../../style/index.less";
@import "../../style/index.less";
.user {
.user {
&::after {
content: "";
display: block;
height: 80px;
}
width: 100%;
width: 100%;
overflow: hidden;
overflow: hidden;
background-color: @user-background-color;
background-color: @user-background-color;
...
@@ -296,7 +303,6 @@
...
@@ -296,7 +303,6 @@
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
align-items: center;
align-items: center;
padding: 0 130px 82.92px;
font-size: 0;
font-size: 0;
&-svg {
&-svg {
margin-bottom: 8px;
margin-bottom: 8px;
...
...
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