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
48762101
Commit
48762101
authored
Aug 03, 2020
by
郭志伟
Committed by
郝聪敏
Aug 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 顾问接口对接
parent
de8499dc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
236 additions
and
85 deletions
+236
-85
consultant.js
src/api/consultant.js
+1
-1
LoginModal.vue
src/components/LoginModal.vue
+3
-3
index.vue
src/views/Consultant/Buy/index.vue
+51
-7
index.vue
src/views/Consultant/Exclusive/index.vue
+15
-9
index.vue
src/views/Consultant/Plan/index.vue
+31
-19
index.vue
src/views/Consultant/Question/index.vue
+74
-34
index.vue
src/views/Consultant/Success/index.vue
+7
-8
index.vue
src/views/Consultant/index.vue
+54
-4
No files found.
src/api/consultant.js
View file @
48762101
...
@@ -22,7 +22,7 @@ export const getCulsuggestion = param => {
...
@@ -22,7 +22,7 @@ export const getCulsuggestion = param => {
// 查询顾问订单信息
// 查询顾问订单信息
export
const
getCulOrder
=
param
=>
{
export
const
getCulOrder
=
param
=>
{
return
req
.
pos
t
(
"
consultant/order/query
"
,
param
);
return
req
.
ge
t
(
"
consultant/order/query
"
,
param
);
};
};
// 查询顾问订单支付状态
// 查询顾问订单支付状态
export
const
getPayState
=
param
=>
{
export
const
getPayState
=
param
=>
{
...
...
src/components/LoginModal.vue
View file @
48762101
...
@@ -82,10 +82,10 @@ export default {
...
@@ -82,10 +82,10 @@ export default {
this
.
formData
.
loginChannel
=
isWeixinBrower
?
1
:
2
;
this
.
formData
.
loginChannel
=
isWeixinBrower
?
1
:
2
;
this
.
formData
.
openId
=
localStorage
.
getItem
(
"
openId
"
)
||
null
;
this
.
formData
.
openId
=
localStorage
.
getItem
(
"
openId
"
)
||
null
;
const
res
=
await
loginByPhone
(
this
.
formData
);
const
res
=
await
loginByPhone
(
this
.
formData
);
if
(
res
.
code
===
"
0
"
)
{
if
(
res
)
{
this
.
$notify
(
"
登录成功
"
);
this
.
$notify
(
"
登录成功
"
);
this
.
setIsShowLogin
(
false
);
this
.
setIsShowLogin
(
false
);
localStorage
.
setItem
(
"
mongoToken
"
,
res
.
data
.
token
);
localStorage
.
setItem
(
"
mongoToken
"
,
res
.
token
);
}
}
},
},
async
getCode
()
{
async
getCode
()
{
...
@@ -97,7 +97,7 @@ export default {
...
@@ -97,7 +97,7 @@ export default {
return
;
return
;
}
}
const
res
=
await
getCaptchaSms
({
phoneNo
});
const
res
=
await
getCaptchaSms
({
phoneNo
});
if
(
res
.
code
===
"
0
"
&&
!
this
.
timer
)
{
if
(
res
&&
!
this
.
timer
)
{
this
.
count
=
TIME_COUNT
;
this
.
count
=
TIME_COUNT
;
this
.
showCount
=
true
;
this
.
showCount
=
true
;
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
...
...
src/views/Consultant/Buy/index.vue
View file @
48762101
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
<div
class=
"cul-hd-stock"
>
<div
class=
"cul-hd-stock"
>
<h4
class=
"cul-hd-stock-title"
>
<h4
class=
"cul-hd-stock-title"
>
还剩
还剩
<strong>
126
</strong>
份
<strong>
{{
remain
}}
</strong>
份
</h4>
</h4>
<div
class=
"cul-hd-progress"
>
<div
class=
"cul-hd-progress"
>
<cr-progress
<cr-progress
...
@@ -31,14 +32,12 @@
...
@@ -31,14 +32,12 @@
</div>
</div>
</div>
</div>
<div
class=
"cul-hd-card-foot"
>
<div
class=
"cul-hd-card-foot"
>
<cr-button
type=
"warning"
block
@
click=
"$router.push('/consultant/success')"
>
<cr-button
type=
"warning"
block
@
click=
"checkLogin"
>
{{
price
[
0
]
}}
元聘请
</cr-button>
0.99元聘请
<cr-tag
class=
"cul-hd-discount"
shape=
"round"
v-if=
"price[0] !== price[1]"
>
</cr-button>
<cr-tag
class=
"cul-hd-discount"
shape=
"round"
>
<strong>
限时优惠
</strong>
<strong>
限时优惠
</strong>
<del>
<del>
<span>
原价
</span>
<span>
原价
</span>
<em>
199
</em>
<em>
{{
price
[
1
]
}}
</em>
<span>
元
</span>
<span>
元
</span>
</del>
</del>
</cr-tag>
</cr-tag>
...
@@ -81,6 +80,9 @@
...
@@ -81,6 +80,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
localStorage
from
"
@/service/localStorage
"
;
import
{
mapActions
,
mapState
}
from
"
vuex
"
;
import
{
create
,
goPay
}
from
"
@/api/consultant
"
;
import
Card
from
"
@/components/Card
"
;
import
Card
from
"
@/components/Card
"
;
import
Collapse
from
"
@/components/Collapse
"
;
import
Collapse
from
"
@/components/Collapse
"
;
import
CpsQa
from
"
../../Goods/Detail/modules/CpsQA
"
;
import
CpsQa
from
"
../../Goods/Detail/modules/CpsQA
"
;
...
@@ -94,6 +96,10 @@ export default {
...
@@ -94,6 +96,10 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
isLogin
:
localStorage
.
get
(
"
mongoToken
"
),
remain
:
126
,
price
:
[
0.99
,
199
],
consultantOrderNo
:
""
,
serviceList
:
[
serviceList
:
[
{
icon
:
"
team
"
,
title
:
"
资深
"
,
sub
:
"
保险精算团队
"
},
{
icon
:
"
team
"
,
title
:
"
资深
"
,
sub
:
"
保险精算团队
"
},
{
icon
:
"
card
"
,
title
:
"
专属
"
,
sub
:
"
保险顾问
"
},
{
icon
:
"
card
"
,
title
:
"
专属
"
,
sub
:
"
保险顾问
"
},
...
@@ -185,7 +191,45 @@ export default {
...
@@ -185,7 +191,45 @@ export default {
]
]
};
};
},
},
mounted
()
{}
computed
:
{
...
mapState
([
"
isShowLogin
"
])
},
watch
:
{
isShowLogin
(
val
)
{
console
.
log
(
111
);
if
(
!
val
)
{
this
.
isLogin
=
localStorage
.
get
(
"
mongoToken
"
);
}
}
},
mounted
()
{},
methods
:
{
...
mapActions
([
"
setIsShowLogin
"
]),
checkLogin
()
{
if
(
!
this
.
isLogin
)
{
this
.
setIsShowLogin
(
true
);
return
;
}
this
.
generateOrder
();
},
async
generateOrder
()
{
const
res
=
await
create
();
if
(
res
)
{
this
.
consultantOrderNo
=
res
.
consultantOrderNo
;
this
.
goPay
();
}
},
async
goPay
()
{
const
res
=
await
goPay
({
consultantOrderNo
:
this
.
consultantOrderNo
});
if
(
res
)
{
this
.
$notify
(
"
支付成功
"
);
setTimeout
(()
=>
{
// this.$router.push("/consultant/success");
this
.
$parent
.
getOrderInfo
();
},
2000
);
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
src=
"./index.less"
scoped
></
style
>
<
style
lang=
"less"
src=
"./index.less"
scoped
></
style
>
src/views/Consultant/Exclusive/index.vue
View file @
48762101
...
@@ -17,7 +17,15 @@
...
@@ -17,7 +17,15 @@
</div>
</div>
<div
class=
"cul-det"
>
<div
class=
"cul-det"
>
<card
title=
""
class=
"cul-card"
>
<card
title=
""
class=
"cul-card"
>
<div
class=
"cul-contact"
>
<router-link
tag=
"div"
class=
"cul-entry"
to=
"/consultant/plan"
v-if=
"hasSuggestion"
>
<div
class=
"cul-entry-title"
>
<h3>
您的专属保险方案
</h3>
<small>
CAPTIVE INSURANC
</small>
<cr-tag>
自己
</cr-tag>
</div>
<svg-icon
icon-class=
"arrow-right"
/>
</router-link>
<div
class=
"cul-contact"
v-else
>
<div
class=
"cul-contact-qrcode"
>
<div
class=
"cul-contact-qrcode"
>
<cr-image
<cr-image
src=
"@/assets/images/consultant/qrcode-demo.png"
src=
"@/assets/images/consultant/qrcode-demo.png"
...
@@ -37,14 +45,6 @@
...
@@ -37,14 +45,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
<router-link
tag=
"div"
class=
"cul-entry"
to=
"/consultant/plan"
>
<div
class=
"cul-entry-title"
>
<h3>
您的专属保险方案
</h3>
<small>
CAPTIVE INSURANC
</small>
<cr-tag>
自己
</cr-tag>
</div>
<svg-icon
icon-class=
"arrow-right"
/>
</router-link>
<div
class=
"cul-tel"
>
<div
class=
"cul-tel"
>
<a
class=
"cul-tel-num"
href=
"tel:13888888888"
>
<a
class=
"cul-tel-num"
href=
"tel:13888888888"
>
<svg-icon
icon-class=
"call"
/>
138 8888 8888
<svg-icon
icon-class=
"call"
/>
138 8888 8888
...
@@ -90,6 +90,12 @@ export default {
...
@@ -90,6 +90,12 @@ export default {
Card
,
Card
,
copyright
copyright
},
},
props
:
{
hasSuggestion
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
data
()
{
return
{
return
{
Info
:
{},
Info
:
{},
...
...
src/views/Consultant/Plan/index.vue
View file @
48762101
...
@@ -10,21 +10,21 @@
...
@@ -10,21 +10,21 @@
<card
title=
"1"
>
<card
title=
"1"
>
<h5
class=
"cul-hd-card-title"
slot=
"header"
>
<h5
class=
"cul-hd-card-title"
slot=
"header"
>
总保费:
总保费:
<strong>
{{
baseInfo
.
a
mount
}}
</strong>
<strong>
{{
goodInfo
.
totalA
mount
}}
</strong>
{{
baseInfo
.
unit
}}
{{
baseInfo
.
unit
}}
</h5>
</h5>
<p
class=
"cul-hd-card-content"
>
<p
class=
"cul-hd-card-content"
>
推荐理由:
推荐理由:
{{
baseInfo
.
reason
}}
{{
goodInfo
.
remarks
}}
</p>
</p>
</card>
</card>
</div>
</div>
<div
class=
"cul-det"
>
<div
class=
"cul-det"
>
<card
title=
"保障分布"
>
<card
title=
"保障分布"
>
<div
class=
"cul-dist"
>
<div
class=
"cul-dist"
>
<div
class=
"cul-dist-item"
v-for=
"(item, index) in
distList
"
:key=
"index"
>
<div
class=
"cul-dist-item"
v-for=
"(item, index) in
goodInfo.ensure
"
:key=
"index"
>
<h3>
{{
item
.
price
}}
</h3>
<h3>
{{
item
.
insuredAmount
}}
</h3>
<p>
{{
item
.
titl
e
}}
</p>
<p>
{{
item
.
productTyp
e
}}
</p>
</div>
</div>
</div>
</div>
</card>
</card>
...
@@ -40,39 +40,41 @@
...
@@ -40,39 +40,41 @@
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
v-for=
"(item, index) in
overviewList
"
:key=
"index"
>
<tr
v-for=
"(item, index) in
goodInfo.ensure
"
:key=
"index"
>
<th>
{{
item
.
titl
e
}}
</th>
<th>
{{
item
.
productTyp
e
}}
</th>
<th>
{{
item
.
a
mount
}}
</th>
<th>
{{
item
.
insuredA
mount
}}
</th>
<th>
{{
item
.
range
}}
</th>
<th>
{{
item
.
term
}}
</th>
<th>
{{
item
.
way
}}
</th>
<th>
{{
item
.
paymentPeriod
}}
</th>
<th>
{{
item
.
price
}}
</th>
<th>
{{
item
.
price
}}
</th>
</tr>
</tr>
</tbody>
</tbody>
</table>
</table>
</card>
</card>
<card
title=
"保障产品"
>
<card
title=
"保障产品"
>
<div
class=
"good-item"
v-for=
"(item, index) in
overviewList
"
:key=
"index"
>
<div
class=
"good-item"
v-for=
"(item, index) in
goodInfo.ensure
"
:key=
"index"
>
<div
class=
"good-title"
>
<div
class=
"good-title"
>
{{
item
.
goods
}}
{{
item
.
goods
||
""
}}
<cr-tag
:type=
"tagFilter(item.
type)"
>
{{
item
.
titl
e
}}
</cr-tag>
<cr-tag
:type=
"tagFilter(item.
productType)"
>
{{
item
.
productTyp
e
}}
</cr-tag>
</div>
</div>
<div
class=
"good-date"
>
<div
class=
"good-date"
>
<span
class=
"good-date-item"
>
<span
class=
"good-date-item"
>
保额 |
<strong>
{{
item
.
a
mount
}}
</strong>
保额 |
<strong>
{{
item
.
insuredA
mount
}}
</strong>
</span>
</span>
<span
class=
"good-date-item"
>
<span
class=
"good-date-item"
>
缴费期 |
<strong>
{{
item
.
way
}}
</strong>
缴费期 |
<strong>
{{
item
.
paymentPeriod
}}
</strong>
</span>
</span>
<span
class=
"good-date-item"
>
<span
class=
"good-date-item"
>
保障期限 |
<strong>
{{
item
.
range
}}
</strong>
保障期限 |
<strong>
{{
item
.
term
}}
</strong>
</span>
</span>
</div>
</div>
<div
class=
"good-price"
>
<div
class=
"good-price"
>
<div
class=
"good-price-item"
>
<div
class=
"good-price-item"
>
<strong>
{{
item
.
goodsPir
ce
}}
</strong>
<strong>
{{
item
.
pri
ce
}}
</strong>
{{
item
.
goodsUnit
}}
{{
item
.
goodsUnit
||
"
-
"
}}
</div>
</div>
<cr-button
type=
"warning"
@
click=
"goDetail(item.id, item.type)"
>
去投保
</cr-button>
<cr-button
type=
"warning"
@
click=
"goDetail(item.productNo, item.productType)"
>
去投保
</cr-button>
</div>
</div>
<div
class=
"good-reason"
>
<div
class=
"good-reason"
>
<div
class=
"good-reason-avator"
>
<div
class=
"good-reason-avator"
>
...
@@ -91,6 +93,7 @@
...
@@ -91,6 +93,7 @@
<
script
>
<
script
>
import
Card
from
"
@/components/Card
"
;
import
Card
from
"
@/components/Card
"
;
import
{
getCulsuggestion
}
from
"
@/api/consultant
"
;
import
avator
from
"
@/assets/images/consultant/avator.png
"
;
import
avator
from
"
@/assets/images/consultant/avator.png
"
;
export
default
{
export
default
{
name
:
"
ConsultantSuccess
"
,
name
:
"
ConsultantSuccess
"
,
...
@@ -100,6 +103,9 @@ export default {
...
@@ -100,6 +103,9 @@ export default {
data
()
{
data
()
{
return
{
return
{
avator
,
avator
,
goodInfo
:
{
ensure
:
[]
},
baseInfo
:
{
baseInfo
:
{
userName
:
"
王斌
"
,
userName
:
"
王斌
"
,
sex
:
1
,
sex
:
1
,
...
@@ -194,6 +200,12 @@ export default {
...
@@ -194,6 +200,12 @@ export default {
},
},
goDetail
(
id
,
type
)
{
goDetail
(
id
,
type
)
{
this
.
$router
.
push
({
url
:
"
/goods/detail
"
,
query
:
{
id
,
type
}
});
this
.
$router
.
push
({
url
:
"
/goods/detail
"
,
query
:
{
id
,
type
}
});
},
async
getSuggestion
()
{
const
res
=
await
getCulsuggestion
();
if
(
res
)
{
this
.
goodInfo
=
res
;
}
}
}
}
}
};
};
...
...
src/views/Consultant/Question/index.vue
View file @
48762101
...
@@ -25,9 +25,9 @@
...
@@ -25,9 +25,9 @@
</h5>
</h5>
<div
class=
"cul-tip"
>
{{
stepTips
[
currentStep
].
sub
}}
</div>
<div
class=
"cul-tip"
>
{{
stepTips
[
currentStep
].
sub
}}
</div>
</
template
>
</
template
>
<cr-form
class=
"cul-hd-card-body"
@
submit=
"onSubmit"
@
failed=
"onFailed"
>
<cr-form
class=
"cul-hd-card-body"
>
<cr-radio-btn
<cr-radio-btn
v-model=
"formData.
who
"
v-model=
"formData.
relation
"
class=
"qus-radio"
class=
"qus-radio"
:radio-data=
"insuredOptions"
:radio-data=
"insuredOptions"
v-show=
"currentStep === 0"
v-show=
"currentStep === 0"
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
:show-toolbar=
"false"
:show-toolbar=
"false"
/>
/>
<cr-radio-btn
<cr-radio-btn
v-model=
"formData.social"
v-model=
"formData.social
Security
"
:radio-data=
"hasSocialOptions"
:radio-data=
"hasSocialOptions"
class=
"qus-radio cul-inline"
class=
"qus-radio cul-inline"
v-show=
"currentStep === 2"
v-show=
"currentStep === 2"
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
:columns=
"incomeOptions"
:columns=
"incomeOptions"
@
change=
"
@
change=
"
(picker, value) => {
(picker, value) => {
onPickerChange(picker, value, '
i
ncome');
onPickerChange(picker, value, '
annualI
ncome');
}
}
"
"
v-show=
"currentStep === 3"
v-show=
"currentStep === 3"
...
@@ -75,21 +75,21 @@
...
@@ -75,21 +75,21 @@
:list=
"areaList"
:list=
"areaList"
@
change=
"
@
change=
"
(picker, value) => {
(picker, value) => {
onPickerChange(picker, value, 'a
rea
');
onPickerChange(picker, value, 'a
ddressCode
');
}
}
"
"
:columns-num=
"2"
:columns-num=
"2"
v-show=
"currentStep === 5"
v-show=
"currentStep === 5"
/>
/>
<cr-radio-btn
<cr-radio-btn
v-model=
"formData.
solv
e"
v-model=
"formData.
questionTyp
e"
:radio-data=
"solveOptions"
:radio-data=
"solveOptions"
class=
"qus-radio cul-inline"
class=
"qus-radio cul-inline"
v-show=
"currentStep === 6"
v-show=
"currentStep === 6"
/>
/>
<div
class=
"qus-form"
v-show=
"currentStep === 7"
>
<div
class=
"qus-form"
v-show=
"currentStep === 7"
>
<cr-field
<cr-field
v-model=
"formData.user
n
ame"
v-model=
"formData.user
N
ame"
name=
"姓名"
name=
"姓名"
label=
"姓名"
label=
"姓名"
placeholder=
"请输入投保人姓名"
placeholder=
"请输入投保人姓名"
...
@@ -101,9 +101,10 @@
...
@@ -101,9 +101,10 @@
label=
"您的性别"
label=
"您的性别"
:rules=
"[{ required: true, message: '请选择性别' }]"
:rules=
"[{ required: true, message: '请选择性别' }]"
>
>
<cr-radio-btn
slot=
"input"
v-model=
"formData.
sex
"
:radio-data=
"sexOptions"
/>
<cr-radio-btn
slot=
"input"
v-model=
"formData.
gender
"
:radio-data=
"sexOptions"
/>
</cr-field>
</cr-field>
<cr-field
<!-- <cr-field
v-if="!isLogin"
v-model="formData.phone"
v-model="formData.phone"
type="password"
type="password"
name="预留手机"
name="预留手机"
...
@@ -112,6 +113,7 @@
...
@@ -112,6 +113,7 @@
:rules="[{ required: true, message: '请输入手机号' }]"
:rules="[{ required: true, message: '请输入手机号' }]"
/>
/>
<cr-field
<cr-field
v-if="!isLogin"
v-model="formData.code"
v-model="formData.code"
name="验证码"
name="验证码"
label="验证码"
label="验证码"
...
@@ -119,7 +121,7 @@
...
@@ -119,7 +121,7 @@
:rules="[{ required: true, message: '输入短信验证码' }]"
:rules="[{ required: true, message: '输入短信验证码' }]"
>
>
<a href="javascript:;" slot="button">发送验证码</a>
<a href="javascript:;" slot="button">发送验证码</a>
</cr-field>
</cr-field>
-->
</div>
</div>
</cr-form>
</cr-form>
<div
slot=
"footer"
class=
"cul-hd-card-footer"
>
<div
slot=
"footer"
class=
"cul-hd-card-footer"
>
...
@@ -145,7 +147,9 @@
...
@@ -145,7 +147,9 @@
<
script
>
<
script
>
import
CrRadioBtn
from
"
@/components/CrRadioBtn
"
;
import
CrRadioBtn
from
"
@/components/CrRadioBtn
"
;
import
Card
from
"
@/components/Card
"
;
import
Card
from
"
@/components/Card
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
areaList
from
"
@qg/cherry-ui/src/area/demo/china
"
;
import
areaList
from
"
@qg/cherry-ui/src/area/demo/china
"
;
import
{
subCulQus
}
from
"
@/api/consultant
"
;
export
default
{
export
default
{
name
:
"
ConsultantQuestion
"
,
name
:
"
ConsultantQuestion
"
,
components
:
{
components
:
{
...
@@ -154,65 +158,94 @@ export default {
...
@@ -154,65 +158,94 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
isLogin
:
localStorage
.
get
(
"
mongoToken
"
),
areaList
,
areaList
,
formData
:
{},
formData
:
{
birthday
:
""
,
socialSecurity
:
""
,
annualIncome
:
""
,
loan
:
""
,
addressCode
:
"
111,111,11
"
,
questionType
:
""
,
userName
:
""
,
gender
:
""
,
relation
:
""
},
currentStep
:
0
,
currentStep
:
0
,
showSubState
:
false
,
showSubState
:
false
,
stepTips
:
[
stepTips
:
[
{
{
title
:
"
您准备为谁买保险?
"
,
title
:
"
您准备为谁买保险?
"
,
tag
:
"
relation
"
,
rule
:
"
请选择关系
"
,
sub
:
sub
:
"
想为多人买保险的情况,请在和保险顾问沟通时说明信息,保险顾问会为每一位家人量身定制方案哦~~
"
"
想为多人买保险的情况,请在和保险顾问沟通时说明信息,保险顾问会为每一位家人量身定制方案哦~~
"
},
},
{
{
title
:
"
请选择TA的出生日期?
"
,
title
:
"
请选择TA的出生日期?
"
,
tag
:
"
birthday
"
,
rule
:
"
请选择出生日期
"
,
sub
:
"
出生日期会影响保费计算,准确的填写可让保险顾问帮您更精准的测算保费~
"
sub
:
"
出生日期会影响保费计算,准确的填写可让保险顾问帮您更精准的测算保费~
"
},
},
{
title
:
"
请选择TA有无社保
"
,
sub
:
"
新农合也算社保哦~~
"
},
{
title
:
"
请选择TA有无社保
"
,
tag
:
"
socialSecurity
"
,
rule
:
"
请选择有无社保
"
,
sub
:
"
新农合也算社保哦~~
"
},
{
{
title
:
"
请选择您的年收入?
"
,
title
:
"
请选择您的年收入?
"
,
tag
:
"
annualIncome
"
,
rule
:
"
请选择您的年收入
"
,
sub
:
"
保险顾问会根据您的年收入,帮您选择合适的额度和保费预算
"
sub
:
"
保险顾问会根据您的年收入,帮您选择合适的额度和保费预算
"
},
},
{
{
title
:
"
请问您每月要还多少贷款呢?
"
,
title
:
"
请问您每月要还多少贷款呢?
"
,
tag
:
"
loan
"
,
rule
:
"
请选择贷款
"
,
sub
:
"
贷款包含房贷、车贷、信用卡等,了解您的贷款情况,能让顾问更好的帮您定制寿险额度
"
sub
:
"
贷款包含房贷、车贷、信用卡等,了解您的贷款情况,能让顾问更好的帮您定制寿险额度
"
},
},
{
{
title
:
"
请选择您的居住城市?
"
,
title
:
"
请选择您的居住城市?
"
,
tag
:
"
addressCode
"
,
rule
:
"
请选择居住城市
"
,
sub
:
"
保险产品的销售会受到地区的限制,了解您的居住城市能让顾问帮您挑选到合适的保险
"
sub
:
"
保险产品的销售会受到地区的限制,了解您的居住城市能让顾问帮您挑选到合适的保险
"
},
},
{
{
title
:
"
您主要想解决哪方面问题?
"
,
title
:
"
您主要想解决哪方面问题?
"
,
tag
:
"
questionType
"
,
rule
:
"
请选择问题类型
"
,
sub
:
"
告诉保险顾问您的咨询意向,可以为您提供更专业的服务哦
"
sub
:
"
告诉保险顾问您的咨询意向,可以为您提供更专业的服务哦
"
},
},
{
{
title
:
"
请填写您的个人信息
"
,
title
:
"
请填写您的个人信息
"
,
rule
:
"
请完善个人信息
"
,
sub
:
"
请预留您的信息,保险师会在您方便时联系您
"
sub
:
"
请预留您的信息,保险师会在您方便时联系您
"
}
}
],
],
insuredOptions
:
[
insuredOptions
:
[
{
label
:
"
本人
"
,
value
:
"
1
"
},
{
label
:
"
本人
"
,
value
:
"
本人
"
},
{
label
:
"
配偶
"
,
value
:
"
2
"
},
{
label
:
"
配偶
"
,
value
:
"
配偶
"
},
{
label
:
"
儿子
"
,
value
:
"
3
"
},
{
label
:
"
儿子
"
,
value
:
"
儿子
"
},
{
label
:
"
女儿
"
,
value
:
"
4
"
},
{
label
:
"
女儿
"
,
value
:
"
女儿
"
},
{
label
:
"
父亲
"
,
value
:
"
5
"
},
{
label
:
"
父亲
"
,
value
:
"
父亲
"
},
{
label
:
"
母亲
"
,
value
:
"
6
"
}
{
label
:
"
母亲
"
,
value
:
"
母亲
"
}
],
],
hasSocialOptions
:
[
hasSocialOptions
:
[
{
label
:
"
有
"
,
value
:
"
1
"
},
{
label
:
"
有
"
,
value
:
"
1
"
},
{
label
:
"
无
"
,
value
:
"
2
"
}
{
label
:
"
无
"
,
value
:
"
0
"
}
],
],
sexOptions
:
[
sexOptions
:
[
{
label
:
"
男
"
,
value
:
"
1
"
},
{
label
:
"
男
"
,
value
:
"
0
"
},
{
label
:
"
女
"
,
value
:
"
2
"
}
{
label
:
"
女
"
,
value
:
"
1
"
}
],
],
incomeOptions
:
[
"
10万
"
,
"
20万
"
,
"
25万
"
,
"
30万
"
],
incomeOptions
:
[
"
10万
"
,
"
20万
"
,
"
25万
"
,
"
30万
"
],
loanOptions
:
[
"
无房贷
"
,
"
1000元
"
,
"
2000元
"
,
"
3000元
"
,
"
4000元
"
],
loanOptions
:
[
"
无房贷
"
,
"
1000元
"
,
"
2000元
"
,
"
3000元
"
,
"
4000元
"
],
solveOptions
:
[
solveOptions
:
[
{
label
:
"
之前从没买过保险,打算配置保险
"
,
value
:
"
1
"
},
{
label
:
"
之前从没买过保险,打算配置保险
"
,
value
:
"
之前从没买过保险,打算配置保险
"
},
{
label
:
"
已配置部分保险,打算再补充一些
"
,
value
:
"
2
"
},
{
label
:
"
已配置部分保险,打算再补充一些
"
,
value
:
"
已配置部分保险,打算再补充一些
"
},
{
label
:
"
不配置保险,就想咨询些保险疑惑
"
,
value
:
"
3
"
},
{
label
:
"
不配置保险,就想咨询些保险疑惑
"
,
value
:
"
不配置保险,就想咨询些保险疑惑
"
},
{
label
:
"
无
"
,
value
:
"
4
"
}
{
label
:
"
无
"
,
value
:
"
无
"
}
],
],
processList
:
[
processList
:
[
{
icon
:
"
package-active
"
,
sub
:
"
聘请成功
"
,
active
:
true
},
{
icon
:
"
package-active
"
,
sub
:
"
聘请成功
"
,
active
:
true
},
...
@@ -241,12 +274,15 @@ export default {
...
@@ -241,12 +274,15 @@ export default {
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
nextQuestion
()
{
nextQuestion
()
{
if
(
this
.
currentStep
===
7
)
{
const
{
currentStep
,
stepTips
,
formData
}
=
this
;
const
userName
=
formData
.
userName
&&
formData
.
gender
;
if
(
currentStep
===
7
&&
userName
)
{
this
.
showSubState
=
true
;
this
.
showSubState
=
true
;
setTimeout
(()
=>
{
this
.
onSubmit
();
this
.
showSubState
=
false
;
return
;
this
.
$router
.
push
(
"
/consultant/exclusive
"
);
}
},
3000
);
if
(
!
formData
[
stepTips
[
currentStep
].
tag
]
||
currentStep
===
7
)
{
this
.
$notify
(
stepTips
[
currentStep
].
rule
);
return
;
return
;
}
}
this
.
currentStep
++
;
this
.
currentStep
++
;
...
@@ -261,10 +297,14 @@ export default {
...
@@ -261,10 +297,14 @@ export default {
this
.
formData
[
type
]
=
value
;
this
.
formData
[
type
]
=
value
;
},
},
async
onSubmit
()
{
async
onSubmit
()
{
// console.log('sucess', values);
const
{
formData
}
=
this
;
},
const
res
=
await
subCulQus
(
formData
);
onFailed
()
{
if
(
res
)
{
// console.log('fail', errorInfo);
setTimeout
(()
=>
{
this
.
showSubState
=
false
;
this
.
$parent
.
getOrderInfo
();
},
2000
);
}
}
}
}
}
};
};
...
...
src/views/Consultant/Success/index.vue
View file @
48762101
...
@@ -22,13 +22,7 @@
...
@@ -22,13 +22,7 @@
为了给您提供更精准的保险定制服务,请花1分钟填写问卷,让顾问更了解您。
为了给您提供更精准的保险定制服务,请花1分钟填写问卷,让顾问更了解您。
</div>
</div>
</div>
</div>
<cr-button
<cr-button
type=
"warning"
size=
"large"
block
slot=
"footer"
@
click=
"startQuestion"
>
type=
"warning"
size=
"large"
block
slot=
"footer"
@
click=
"$router.push('/consultant/question')"
>
开始填写问卷
开始填写问卷
</cr-button>
</cr-button>
</card>
</card>
...
@@ -52,7 +46,12 @@ export default {
...
@@ -52,7 +46,12 @@ export default {
]
]
};
};
},
},
mounted
()
{}
mounted
()
{},
methods
:
{
startQuestion
()
{
this
.
$parent
.
changeQuestion
();
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
src=
"./index.less"
scoped
></
style
>
<
style
lang=
"less"
src=
"./index.less"
scoped
></
style
>
src/views/Consultant/index.vue
View file @
48762101
<
template
>
<
template
>
<div
class=
"container"
>
<div>
<buy
v-if=
"orderState === 1"
/>
<success
v-if=
"orderState === 2 && isLogin && !showQuestion"
/>
<exclusive
v-if=
"(orderState === 3 || orderState === 4) && isLogin"
:has-suggestion=
"orderState === 4"
/>
<question
v-if=
"showQuestion && isLogin"
/>
<tabbar
/>
<tabbar
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Tabbar
from
"
@/components/Tabbar
"
;
import
Tabbar
from
"
@/components/Tabbar
"
;
import
Buy
from
"
./Buy
"
;
import
Success
from
"
./Success
"
;
import
Question
from
"
./Question
"
;
import
Exclusive
from
"
./Exclusive
"
;
import
{
mapState
}
from
"
vuex
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
{
getCulOrder
}
from
"
@/api/consultant
"
;
export
default
{
export
default
{
name
:
"
Consultant
"
,
name
:
"
Consultant
"
,
components
:
{
components
:
{
Tabbar
Tabbar
,
Buy
,
Success
,
Exclusive
,
Question
},
},
data
()
{
data
()
{
return
{};
return
{
isLogin
:
localStorage
.
get
(
"
mongoToken
"
),
showQuestion
:
false
,
orderInfo
:
[
{
consultantOrderNo
:
""
,
state
:
1
}
]
};
},
computed
:
{
orderState
()
{
return
this
.
orderInfo
[
0
].
state
;
},
...
mapState
([
"
isShowLogin
"
])
},
watch
:
{
isShowLogin
(
val
)
{
if
(
!
val
)
{
this
.
isLogin
=
localStorage
.
get
(
"
mongoToken
"
);
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getOrderInfo
();
this
.
getOrderInfo
();
},
},
methods
:
{
methods
:
{
async
getOrderInfo
()
{}
async
getOrderInfo
()
{
if
(
!
this
.
isLogin
)
return
;
const
res
=
await
getCulOrder
();
if
(
res
)
{
this
.
orderInfo
=
res
;
}
},
changeQuestion
()
{
this
.
showQuestion
=
true
;
}
}
}
};
};
</
script
>
</
script
>
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