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
d4e822bc
Commit
d4e822bc
authored
Aug 21, 2020
by
郭志伟
Committed by
郭志伟
Aug 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 追加顾问剩余份数接口
parent
3e668e0a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
22 deletions
+29
-22
consultant.js
src/api/consultant.js
+5
-0
index.less
src/views/Consultant/Buy/index.less
+9
-6
index.vue
src/views/Consultant/Buy/index.vue
+13
-14
index.vue
src/views/Consultant/Exclusive/index.vue
+2
-2
No files found.
src/api/consultant.js
View file @
d4e822bc
import
req
from
"
@/service/http
"
;
// 获取顾问剩余份数
export
const
getRemainNum
=
()
=>
{
return
req
.
get
(
"
consultant/surplusNum
"
);
};
// 创建顾问订单
export
const
create
=
param
=>
{
return
req
.
post
(
"
consultant/order/create
"
,
param
);
...
...
src/views/Consultant/Buy/index.less
View file @
d4e822bc
...
...
@@ -175,6 +175,9 @@
}
}
&-list {
background-color: @gray-1;
border-radius: @border-radius-md;
padding: 0 14px;
&-item {
margin-bottom: 5px;
}
...
...
@@ -207,14 +210,13 @@
&-content {
color: @gray-5;
font-size: @font-size-12;
background-color:
@gray-1
;
background-color:
#FBFCFF
;
border-radius: @border-radius-md;
padding: 16px;
padding: 16px
9px
;
line-height: @line-height-sm + 2;
.svg-icon {
height: 13px;
width: 13px;
margin-right: 2px;
height: 12px;
width: 12px;
}
&-item {
display: flex;
...
...
@@ -226,10 +228,11 @@
}
&-title {
font-weight: @font-weight-bold;
color: @orange-dark;
}
&-txt {
margin-left: 8px;
width: 216px;
color: @black;
}
}
}
...
...
src/views/Consultant/Buy/index.vue
View file @
d4e822bc
...
...
@@ -27,7 +27,7 @@
stroke-width=
"6"
color=
"#FFC842"
track-color=
"#F9F3F3"
:percentage=
"
25
"
:percentage=
"
remainPercentage
"
/>
</div>
</div>
...
...
@@ -48,7 +48,7 @@
<card
title=
"想买保险,你是不是也有这些疑问?"
>
<cr-image
src=
"@/assets/images/consultant/intro.png"
width=
"100%"
height=
"auto"
/>
</card>
<card
title=
"芒果保险·1对1保险顾问来帮您
?
"
>
<card
title=
"芒果保险·1对1保险顾问来帮您"
>
<div
class=
"cul-odds-sign"
>
<div
class=
"cul-odds-sign-item"
v-for=
"(item, index) in oddsList"
:key=
"index"
>
<svg-icon
:icon-class=
"item.icon"
/>
...
...
@@ -84,11 +84,11 @@ import localStorage from "@/service/localStorage";
import
{
payByWay
}
from
"
@/service/pay
"
;
import
{
isXyqb
}
from
"
@/service/validation
"
;
import
{
mapActions
,
mapState
}
from
"
vuex
"
;
import
{
create
,
goPay
}
from
"
@/api/consultant
"
;
import
{
create
,
goPay
,
getRemainNum
}
from
"
@/api/consultant
"
;
import
Card
from
"
@/components/Card
"
;
import
Collapse
from
"
@/components/Collapse
"
;
import
CpsQa
from
"
../../Goods/Detail/modules/CpsQA
"
;
const
SUM
=
300
;
export
default
{
name
:
"
ConsultantBuy
"
,
components
:
{
...
...
@@ -144,7 +144,7 @@ export default {
]
},
{
title
:
"
省钱
"
,
title
:
"
投保后
"
,
children
:
[[
"
协助理赔:
"
,
"
申请理赔时,理赔专家全程协助
"
]]
}
],
...
...
@@ -202,7 +202,10 @@ export default {
};
},
computed
:
{
...
mapState
([
"
isShowLogin
"
])
...
mapState
([
"
isShowLogin
"
]),
remainPercentage
()
{
return
Math
.
floor
((
this
.
remain
/
SUM
)
*
100
);
}
},
watch
:
{
isShowLogin
(
val
)
{
...
...
@@ -230,15 +233,11 @@ export default {
this
.
generateOrder
();
}
},
updateRemain
()
{
let
historyRemain
=
localStorage
.
get
(
"
historyRemain
"
);
if
(
historyRemain
&&
+
historyRemain
>
100
)
{
historyRemain
--
;
}
else
{
historyRemain
=
Math
.
floor
(
Math
.
random
()
*
(
200
-
100
)
+
100
);
async
updateRemain
()
{
const
res
=
await
getRemainNum
();
if
(
res
)
{
this
.
remain
=
res
;
}
this
.
remain
=
historyRemain
;
localStorage
.
set
(
"
historyRemain
"
,
historyRemain
);
},
async
generateOrder
()
{
const
res
=
await
create
();
...
...
src/views/Consultant/Exclusive/index.vue
View file @
d4e822bc
...
...
@@ -57,7 +57,7 @@
</div>
<cr-divider
:style=
"
{ marginBottom: 0 }" />
</card>
<card
title=
"芒果保险·1对1保险顾问来帮您
?
"
>
<card
title=
"芒果保险·1对1保险顾问来帮您"
>
<div
class=
"cul-odds-list"
>
<div
class=
"cul-odds-list-item"
v-for=
"(item, index) in oddsInsureList"
:key=
"index"
>
<div
class=
"cul-odds-list-title"
>
...
...
@@ -126,7 +126,7 @@ export default {
]
},
{
title
:
"
省钱
"
,
title
:
"
投保后
"
,
children
:
[[
"
协助理赔:
"
,
"
申请理赔时,理赔专家全程协助
"
]]
}
]
...
...
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