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
b7f2ca0f
Commit
b7f2ca0f
authored
Aug 18, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 添加活动和智能评测
parent
4ebc8fcc
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
287 additions
and
120 deletions
+287
-120
goodsList.mock.js
src/api/goodsList.mock.js
+29
-19
smartMeasure.js
src/api/smartMeasure.js
+1
-1
report_18-59@2x.png
src/assets/images/home/report_18-59@2x.png
+0
-0
report_60-80@2x.png
src/assets/images/home/report_60-80@2x.png
+0
-0
dev.config.js
src/config/dev.config.js
+1
-1
routes.js
src/router/routes.js
+1
-1
index.vue
src/views/Home/Activity/index.vue
+6
-2
index.vue
src/views/Home/SmartMeasure/Report/index.vue
+117
-39
constants.js
src/views/Home/SmartMeasure/constants.js
+31
-1
index.vue
src/views/Home/SmartMeasure/index.vue
+52
-34
Age.vue
src/views/Home/SmartMeasure/modules/Age.vue
+3
-0
index.vue
src/views/Home/index.vue
+18
-6
index.less
src/views/Policy/Detail/index.less
+1
-1
Phone.vue
src/views/Policy/Detail/modules/Phone.vue
+6
-2
index.vue
src/views/Policy/PaymentRecord/index.vue
+5
-5
index.less
src/views/User/index.less
+7
-6
UserFamily.vue
src/views/User/modules/UserFamily.vue
+9
-2
No files found.
src/api/goodsList.mock.js
View file @
b7f2ca0f
...
@@ -30,10 +30,12 @@ export default [
...
@@ -30,10 +30,12 @@ export default [
guarantee_sub
:
"
看病报销医药费,最高600万
"
,
guarantee_sub
:
"
看病报销医药费,最高600万
"
,
company
:
"
泰康在线
"
,
company
:
"
泰康在线
"
,
payType
:
[
payType
:
[
{
label
:
"
月缴
"
,
value
:
"
1
"
},
{
label
:
"
月缴
"
,
value
:
1
},
{
label
:
"
一次交清
"
,
value
:
"
2
"
}
{
label
:
"
一次交清
"
,
value
:
2
}
],
],
policyPeriod
:
[]
policyPeriod
:
[],
paymentInstruction
:
"
因责任内“医疗和住院”所产生的费用,医疗险100%报销,赔多少钱,取决于您实际花费多少
"
},
},
{
{
id
:
"
HTDQZJX001
"
,
id
:
"
HTDQZJX001
"
,
...
@@ -53,10 +55,12 @@ export default [
...
@@ -53,10 +55,12 @@ export default [
guarantee_sub
:
"
100种重症+40种轻症
"
,
guarantee_sub
:
"
100种重症+40种轻症
"
,
company
:
"
华泰财险
"
,
company
:
"
华泰财险
"
,
payType
:
[
payType
:
[
{
label
:
"
月缴
"
,
value
:
"
1
"
},
{
label
:
"
月缴
"
,
value
:
1
},
{
label
:
"
一次交清
"
,
value
:
"
2
"
}
{
label
:
"
一次交清
"
,
value
:
2
}
],
],
policyPeriod
:
[]
policyPeriod
:
[],
paymentInstruction
:
"
“确诊”责任内的重大疾病,重疾险即100%赔付,赔多少钱,取决于您投保的保额是多少
"
},
},
{
{
id
:
"
ZAYWX001
"
,
id
:
"
ZAYWX001
"
,
...
@@ -76,7 +80,9 @@ export default [
...
@@ -76,7 +80,9 @@ export default [
guarantee_sub
:
"
意外风险覆盖全,最高100万保额
"
,
guarantee_sub
:
"
意外风险覆盖全,最高100万保额
"
,
company
:
"
众安保险
"
,
company
:
"
众安保险
"
,
payType
:
[],
payType
:
[],
policyPeriod
:
[]
policyPeriod
:
[],
paymentInstruction
:
"
因意外导致的身故,意外险100%赔付,伤残,按比例赔付,赔多少钱,取决于您投保的保额是多少
"
},
},
{
{
id
:
"
BNZJX001
"
,
id
:
"
BNZJX001
"
,
...
@@ -96,11 +102,13 @@ export default [
...
@@ -96,11 +102,13 @@ export default [
guarantee_title
:
"
重疾保障
"
,
guarantee_title
:
"
重疾保障
"
,
guarantee_sub
:
"
100种重症+40种轻症
"
,
guarantee_sub
:
"
100种重症+40种轻症
"
,
company
:
"
华泰财险
"
,
company
:
"
华泰财险
"
,
payType
:
[{
label
:
"
年缴
"
,
value
:
"
1
"
}],
payType
:
[{
label
:
"
年缴
"
,
value
:
1
}],
policyPeriod
:
[
policyPeriod
:
[
{
label
:
"
保至70周岁
"
,
value
:
"
1
"
},
{
label
:
"
保至70周岁
"
,
value
:
1
},
{
label
:
"
保至终身
"
,
value
:
"
2
"
}
{
label
:
"
保至终身
"
,
value
:
2
}
]
],
paymentInstruction
:
"
“确诊”责任内的重大疾病,重疾险即100%赔付,赔多少钱,取决于您投保的保额是多少
"
},
},
{
{
id
:
"
HGSX001
"
,
id
:
"
HGSX001
"
,
...
@@ -119,14 +127,16 @@ export default [
...
@@ -119,14 +127,16 @@ export default [
guarantee_title
:
"
人寿保障
"
,
guarantee_title
:
"
人寿保障
"
,
guarantee_sub
:
"
最高350万保额,顶梁柱必备
"
,
guarantee_sub
:
"
最高350万保额,顶梁柱必备
"
,
company
:
"
华泰财险
"
,
company
:
"
华泰财险
"
,
payType
:
[{
label
:
"
年缴
"
,
value
:
"
1
"
}],
payType
:
[{
label
:
"
年缴
"
,
value
:
1
}],
policyPeriod
:
[
policyPeriod
:
[
{
label
:
"
10年
"
,
value
:
"
1
"
},
{
label
:
"
10年
"
,
value
:
1
},
{
label
:
"
20年
"
,
value
:
"
2
"
},
{
label
:
"
20年
"
,
value
:
2
},
{
label
:
"
30年
"
,
value
:
"
3
"
},
{
label
:
"
30年
"
,
value
:
3
},
{
label
:
"
保至60周岁
"
,
value
:
"
4
"
},
{
label
:
"
保至60周岁
"
,
value
:
4
},
{
label
:
"
保至65周岁
"
,
value
:
"
5
"
},
{
label
:
"
保至65周岁
"
,
value
:
5
},
{
label
:
"
保至70周岁
"
,
value
:
"
6
"
}
{
label
:
"
保至70周岁
"
,
value
:
6
}
]
],
paymentInstruction
:
"
“家庭顶梁柱”的身故,寿险100%赔付收入损失 ,赔多少钱,取决于您投保的保额是多少
"
}
}
];
];
src/api/smartMeasure.js
View file @
b7f2ca0f
...
@@ -2,7 +2,7 @@ import req from "@/service/http";
...
@@ -2,7 +2,7 @@ import req from "@/service/http";
// 申请风险测评
// 申请风险测评
export
const
addRiskEvaluation
=
param
=>
{
export
const
addRiskEvaluation
=
param
=>
{
return
req
.
post
(
"
riskE
valuation
"
,
param
);
return
req
.
post
(
"
/user/risk_e
valuation
"
,
param
);
};
};
// 查询风险测评
// 查询风险测评
...
...
src/assets/images/home/report@2x.png
→
src/assets/images/home/report
_18-59
@2x.png
View file @
b7f2ca0f
File moved
src/assets/images/home/report_60-80@2x.png
0 → 100644
View file @
b7f2ca0f
58.8 KB
src/config/dev.config.js
View file @
b7f2ca0f
export
default
{
export
default
{
basicHost
:
"
http://yapi.quantgroups.com/mock/329/
"
,
basicHost
:
"
http://yapi.quantgroups.com/mock/329/
"
,
// basicHost: "http://192.168.29.
211:8964/
",
// basicHost: "http://192.168.29.
100:8964
",
wxAppId
:
"
wx514de17b23d53a20
"
wxAppId
:
"
wx514de17b23d53a20
"
};
};
src/router/routes.js
View file @
b7f2ca0f
...
@@ -15,7 +15,7 @@ export default [
...
@@ -15,7 +15,7 @@ export default [
component
:
()
=>
import
(
"
../views/Home/SmartMeasure/index.vue
"
)
component
:
()
=>
import
(
"
../views/Home/SmartMeasure/index.vue
"
)
},
},
{
{
path
:
"
/home/smart-measure/report
/:age/:gender
"
,
path
:
"
/home/smart-measure/report
"
,
name
:
"
Report
"
,
name
:
"
Report
"
,
component
:
()
=>
import
(
"
../views/Home/SmartMeasure/Report/index.vue
"
)
component
:
()
=>
import
(
"
../views/Home/SmartMeasure/Report/index.vue
"
)
},
},
...
...
src/views/Home/Activity/index.vue
View file @
b7f2ca0f
...
@@ -106,6 +106,7 @@ import Modal from "../modules/Modal";
...
@@ -106,6 +106,7 @@ import Modal from "../modules/Modal";
import
localStorage
from
"
@/service/localStorage
"
;
import
localStorage
from
"
@/service/localStorage
"
;
import
personList
from
"
./constants
"
;
import
personList
from
"
./constants
"
;
import
{
getLotteryRecord
,
drawLottery
}
from
"
@/api/activity
"
;
import
{
getLotteryRecord
,
drawLottery
}
from
"
@/api/activity
"
;
import
{
parseTime
}
from
"
@/service/utils
"
;
export
default
{
export
default
{
name
:
"
Activity
"
,
name
:
"
Activity
"
,
...
@@ -148,13 +149,16 @@ export default {
...
@@ -148,13 +149,16 @@ export default {
return
`获奖时间:
${
this
.
record
.
time
}
`
;
return
`获奖时间:
${
this
.
record
.
time
}
`
;
},
},
winningIntroText
()
{
winningIntroText
()
{
return
`奖品说明:您的奖品将在
${
this
.
record
.
time
}
,保单成功续期交费后,发放至您的“微信零钱”中,请注意查收。`
;
return
`奖品说明:您的奖品将在
${
parseTime
(
this
.
record
.
toTime
,
"
{y}年{m}月{d}日
"
)}
,保单成功续期交费后,发放至您的“微信零钱”中,请注意查收。`
;
}
}
},
},
methods
:
{
methods
:
{
async
gameStart
()
{
async
gameStart
()
{
const
result
=
await
drawLottery
();
const
result
=
await
drawLottery
();
if
(
result
.
amount
===
"
5
"
)
{
if
(
result
.
amount
===
5
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
if
(
this
.
isGoing
)
return
;
if
(
this
.
isGoing
)
return
;
this
.
isGoing
=
true
;
this
.
isGoing
=
true
;
...
...
src/views/Home/SmartMeasure/Report/index.vue
View file @
b7f2ca0f
...
@@ -2,16 +2,9 @@
...
@@ -2,16 +2,9 @@
<div
class=
"report"
>
<div
class=
"report"
>
<div
class=
"report-container"
>
<div
class=
"report-container"
>
<div
class=
"report-container-head"
>
<div
class=
"report-container-head"
>
<cr-image
<cr-image
class=
"Rc-head-left"
round
width=
""
height=
""
fit=
"cover"
:src=
"avatar"
/>
class=
"Rc-head-left"
round
width=
""
height=
""
fit=
"cover"
src=
"@/assets/images/user/avatar@2x.png"
/>
<div
class=
"Rc-head-right"
>
<div
class=
"Rc-head-right"
>
<p>
王小闹
</p>
<p>
{{
username
}}
</p>
<p>
风险测评报告
</p>
<p>
风险测评报告
</p>
</div>
</div>
</div>
</div>
...
@@ -28,73 +21,158 @@
...
@@ -28,73 +21,158 @@
<div
class=
"report-container-analyze"
>
<div
class=
"report-container-analyze"
>
<p
class=
"Rc-analyze-title"
>
风险分析
</p>
<p
class=
"Rc-analyze-title"
>
风险分析
</p>
<p
class=
"Rc-analyze-desc"
>
<p
class=
"Rc-analyze-desc"
>
您是家庭的重要成员,健康的生活习惯会让您未来受益匪浅,必要的配备健康保障,也是对个人和家庭更负责任的体现,奋斗的同时也要关注保障哦~
{{
analyzeObj
.
text
}}
</p>
</p>
<cr-image
<cr-image
class=
"Rc-analyze-image"
width=
""
height=
""
fit=
"contain"
:src=
"analyzeObj.img"
/>
class=
"Rc-analyze-image"
width=
""
height=
""
fit=
"contain"
src=
"@/assets/images/home/report@2x.png"
/>
</div>
</div>
<div
class=
"report-container-plan"
>
<div
class=
"report-container-plan"
>
<p
class=
"Rc-plan-title"
>
适合你的保险方案
</p>
<p
class=
"Rc-plan-title"
>
适合你的保险方案
</p>
<p
class=
"Rc-plan-advice"
>
建议投保优先级
</p>
<p
class=
"Rc-plan-advice"
>
建议投保优先级
</p>
<p
class=
"Rc-plan-priority"
>
<p
class=
"Rc-plan-priority"
>
<span>
1.医疗险
</span>
<span
v-for=
"item in priority"
:key=
"item"
>
{{
item
}}
</span>
<span>
2.重疾险
</span>
<span>
3.意外险
</span>
<span>
4.寿险
</span>
</p>
</p>
<p
class=
"Rc-plan-desc"
>
<p
class=
"Rc-plan-desc"
>
你的身体处在黄金期,但不可以掉以轻心,话习惯会影响到未来,适当的运动很重要,奋斗的同时一定也要合理的休息。
你的身体处在黄金期,但不可以掉以轻心,话习惯会影响到未来,适当的运动很重要,奋斗的同时一定也要合理的休息。
</p>
</p>
<div
class=
"Rc-plan-card"
>
<div
class=
"Rc-plan-card"
v-for=
"item in planList"
:key=
"item.id"
>
<div
class=
"Rcp-card-head"
>
<div
class=
"Rcp-card-head"
>
<cr-image
<cr-image
class=
"Rcpc-head-left"
class=
"Rcpc-head-left"
width=
""
width=
""
height=
""
height=
""
fit=
"cover"
fit=
"cover"
src=
"@/assets/images/home/medical@2x.png
"
:src=
"productImg(item.itype)
"
/>
/>
<span
class=
"Rcpc-head-right"
<span
class=
"Rcpc-head-right"
>
{{
item
.
paymentInstruction
}}
</span>
>
因责任内“医疗和住院”所产生的费用,医疗险100%报销,赔多少钱,取决于您实际花费多少
</span
>
</div>
</div>
<div
class=
"Rcp-card-body"
>
<div
class=
"Rcp-card-body"
>
<p
class=
"Rcpc-body-title"
>
万家保·百万医疗险
</p>
<p
class=
"Rcpc-body-title"
>
{{
item
.
title
}}
</p>
<p
class=
"Rcpc-body-desc"
>
看病报销医药费,最高600万
</p>
<p
class=
"Rcpc-body-desc"
>
{{
item
.
sub
}}
</p>
<div
class=
"Rcpc-body-opera"
>
<div
class=
"Rcpc-body-opera"
>
<p
class=
"Rcpcb-opera-left"
><span>
¥1
</span>
首月
</p>
<p
class=
"Rcpcb-opera-left"
>
<cr-button
class=
"Rcpcb-opera-right"
>
<span>
{{
`¥${item.price
}
`
}}
<
/spa
n
>
{{
item
.
unit
}}
<
/p
>
<
cr
-
button
class
=
"
Rcpcb-opera-right
"
@
click
=
"
goDetail(item)
"
>
去投保
去投保
<
/cr-button
>
<
/cr-button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<div
class=
"report-container-retest"
>
<
div
class
=
"
report-container-retest
"
@
click
=
"
goBack
"
>
<svg-icon
icon-class=
"retest"
class-name=
"Rc-retest-svg"
/>
<
svg
-
icon
icon
-
class
=
"
retest
"
class
-
name
=
"
Rc-retest-svg
"
/>
<
span
class
=
"
Rc-retest-text
"
>
重测一遍
<
/span
>
<
span
class
=
"
Rc-retest-text
"
>
重测一遍
<
/span
>
<
/div
>
<
/div
>
<div
class=
"report-container-explain"
></div>
<
div
class
=
"
report-container-explain
"
@
click
=
"
$router.push('/consultant')
"
><
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
male
from
"
@/assets/images/user/male@2x.png
"
;
import
female
from
"
@/assets/images/user/female@2x.png
"
;
import
reportLessThan60
from
"
@/assets/images/home/report_18-59@2x.png
"
;
import
reportGreaterThan59
from
"
@/assets/images/home/report_60-80@2x.png
"
;
import
medical
from
"
@/assets/images/home/medical@2x.png
"
;
import
illness
from
"
@/assets/images/home/illness@2x.png
"
;
import
life
from
"
@/assets/images/home/life@2x.png
"
;
import
casualty
from
"
@/assets/images/home/casualty@2x.png
"
;
import
{
mapState
}
from
"
vuex
"
;
import
GOODS_LIST
from
"
@/api/goodsList.mock
"
;
import
{
list
}
from
"
@/api/product
"
;
import
{
getRiskEvaluation
}
from
"
@/api/smartMeasure
"
;
export
default
{
export
default
{
name
:
"
PolicyLis
t
"
,
name
:
"
Repor
t
"
,
data
()
{
data
()
{
return
{
return
{
avatar
:
""
,
answers
:
{
age
:
0
age
:
18
,
gender
:
1
}
,
goodsList
:
GOODS_LIST
}
;
}
;
}
,
}
,
create
()
{
async
created
()
{
const
answer
=
this
.
$route
.
query
.
answer
;
if
(
!
this
.
$route
.
query
.
age
&&
!
this
.
$route
.
query
.
gender
)
{
console
.
log
(
answer
);
const
result
=
await
getRiskEvaluation
();
if
(
result
.
age
&&
result
.
gender
)
{
this
.
answers
=
result
;
}
}
else
{
this
.
answers
=
this
.
$route
.
query
;
}
this
.
refreshGoodsList
();
}
,
computed
:
{
...
mapState
(
"
user
"
,
[
"
userInfo
"
]),
username
()
{
return
this
.
userInfo
?.
name
===
"
未登录
"
?
"
您
"
:
this
.
userInfo
.
name
;
}
,
avatar
()
{
return
+
this
.
answers
?.
gender
===
1
?
male
:
female
;
}
,
analyzeObj
()
{
return
{
text
:
this
.
answers
?.
age
<
60
?
"
您是家庭的重要成员,健康的生活习惯会让您未来受益匪浅,必要的配备健康保障,也是对个人和家庭更负责任的体现,奋斗的同时也要关注保障哦~
"
:
"
您是家庭中健康风险较高的成员,合理规避医疗风险,能够为家庭减轻生活压力和收入损失。同时,也要保持良好的生活习惯和心态哦~
"
,
img
:
this
.
answers
?.
age
<
60
?
reportLessThan60
:
reportGreaterThan59
}
;
}
,
planList
()
{
const
ids
=
this
.
answers
?.
age
<
60
?
[
"
TKYLX001
"
,
"
HTDQZJX001
"
,
"
ZAYWX001
"
,
"
HGSX001
"
]
:
[
"
TKYLX001
"
,
"
ZAYWX001
"
];
const
goods
=
this
.
goodsList
.
filter
(
v
=>
ids
.
includes
(
v
.
id
));
return
goods
;
}
,
priority
()
{
const
types
=
this
.
answers
?.
age
<
60
?
[
"
医疗险
"
,
"
重疾险
"
,
"
意外险
"
,
"
寿险
"
]
:
[
"
医疗险
"
,
"
意外险
"
];
return
types
.
map
((
v
,
index
)
=>
`${index + 1
}
.${v
}
`
);
}
}
,
methods
:
{
goDetail
(
item
)
{
this
.
$router
.
push
({
path
:
"
/goods/detail
"
,
query
:
{
id
:
item
.
id
,
type
:
item
.
itype
}
}
);
}
,
goBack
()
{
this
.
$router
.
push
(
"
/home/smart-measure
"
);
}
,
productImg
(
itype
)
{
let
result
=
""
;
switch
(
itype
)
{
case
"
mi
"
:
result
=
medical
;
break
;
case
"
cii
"
:
result
=
illness
;
break
;
case
"
ai
"
:
result
=
casualty
;
break
;
case
"
li
"
:
result
=
life
;
break
;
}
return
result
;
}
,
async
refreshGoodsList
()
{
const
goods
=
await
list
();
this
.
goodsList
.
forEach
(
item
=>
{
goods
.
forEach
(
it
=>
{
if
(
it
.
productNo
===
item
.
id
)
{
item
.
price
=
it
.
downPayPrice
??
item
.
price
;
}
}
);
}
);
}
}
}
}
;
}
;
<
/script
>
<
/script
>
...
...
src/views/Home/SmartMeasure/constants.js
View file @
b7f2ca0f
...
@@ -123,4 +123,34 @@ const selectList = {
...
@@ -123,4 +123,34 @@ const selectList = {
}
}
};
};
export
{
questionList
,
ageScope
,
genderList
,
selectList
};
const
answerMap
=
{
gender
:
{
男神
:
1
,
女神
:
0
},
marrige
:
{
单身贵族爱自由
:
1
,
幸福的二人世界
:
2
,
家有儿女初长成
:
3
},
income
:
{
"
3000元以下
"
:
1
,
"
3000~5000元
"
:
2
,
"
5000~8000元
"
:
3
,
"
8000~12000元
"
:
4
,
"
12000~18000元
"
:
5
,
"
18000元以上
"
:
6
}
};
const
paramsMap
=
{
gender
:
"
gender
"
,
age
:
"
age
"
,
marrige
:
"
married
"
,
income
:
"
monthlyIncome
"
,
environment
:
"
hobbit
"
,
travel
:
"
travelWay
"
,
insurance
:
"
otherPolicy
"
};
export
{
questionList
,
ageScope
,
genderList
,
selectList
,
answerMap
,
paramsMap
};
src/views/Home/SmartMeasure/index.vue
View file @
b7f2ca0f
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
:type=
"item.type"
:type=
"item.type"
:disabled=
"isLoading"
:disabled=
"isLoading"
@
nextQuestion=
"nextQuestion"
@
nextQuestion=
"nextQuestion"
@
submit=
"submit"
:currentAnswer.sync=
"currentAnswer"
:currentAnswer.sync=
"currentAnswer"
></component>
></component>
</div>
</div>
...
@@ -60,9 +59,14 @@ import Age from "./modules/Age";
...
@@ -60,9 +59,14 @@ import Age from "./modules/Age";
import
Gender
from
"
./modules/Gender
"
;
import
Gender
from
"
./modules/Gender
"
;
import
Select
from
"
./modules/Select
"
;
import
Select
from
"
./modules/Select
"
;
import
{
questionList
}
from
"
./constants
"
;
import
{
questionList
}
from
"
./constants
"
;
import
{
addRiskEvaluation
}
from
"
@/api/smartMeasure
"
;
import
autoSaveForm
from
"
@/mixins/autoSaveForm.mixin
"
;
import
{
answerMap
,
paramsMap
}
from
"
./constants
"
;
import
localStorage
from
"
@/service/localStorage
"
;
export
default
{
export
default
{
name
:
"
SmartMeasure
"
,
name
:
"
SmartMeasure
"
,
mixins
:
[
autoSaveForm
],
components
:
{
components
:
{
Age
,
Age
,
Gender
,
Gender
,
...
@@ -75,50 +79,41 @@ export default {
...
@@ -75,50 +79,41 @@ export default {
currentAnswer
:
""
currentAnswer
:
""
};
};
},
},
created
()
{
if
(
this
.
hasAutoSaveData
(
"
smartMeasureList
"
))
{
this
.
getSaveInfoHandler
(
"
smartMeasureList
"
,
"
dataList
"
);
}
},
computed
:
{
computed
:
{
smartMeasure
()
{
smartMeasure
()
{
let
result
=
this
.
dataList
.
filter
(
data
=>
data
.
answer
);
let
result
=
this
.
dataList
.
filter
(
data
=>
data
.
answer
);
if
(
result
.
length
<
this
.
dataList
.
length
)
{
if
(
result
.
length
<
this
.
dataList
.
length
)
{
result
.
push
(
this
.
dataList
[
result
.
length
]);
result
.
push
(
this
.
dataList
[
result
.
length
]);
}
}
this
.
autoSaveHandler
(
"
dataList
"
,
"
smartMeasureList
"
,
0
);
this
.
scrollToBottom
();
this
.
scrollToBottom
();
return
JSON
.
parse
(
JSON
.
stringify
(
result
));
return
JSON
.
parse
(
JSON
.
stringify
(
result
));
}
}
},
},
methods
:
{
methods
:
{
// select(answer) {
// console.log(answer, this.isLoading);
// if (this.isLoading) return;
// currentAnswer = answer;
// const id = this.smartMeasure[this.smartMeasure.length - 1].id;
// this.smartMeasure[this.smartMeasure.length - 1].answer = answer;
// if (this.smartMeasure[this.smartMeasure.length - 1].selectType === "radio") {
// this.nextQuestion();
// }
// this.$forceUpdate();
// if (this.smartMeasure.length
<
this
.
dataList
.
length
)
{
// setTimeout(() => {
// this.dataList = this.dataList.map(data => {
// if (data.id === id) data.answer = answer;
// return data;
// });
// }, 600);
// }
// },
nextQuestion
()
{
nextQuestion
()
{
this
.
$forceUpdate
();
this
.
$forceUpdate
();
const
id
=
this
.
smartMeasure
[
this
.
smartMeasure
.
length
-
1
].
id
;
const
id
=
this
.
smartMeasure
[
this
.
smartMeasure
.
length
-
1
].
id
;
if
(
this
.
smartMeasure
.
length
<
this
.
dataList
.
length
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
dataList
=
this
.
dataList
.
map
(
data
=>
{
const
smartMeasureLength
=
this
.
smartMeasure
.
length
;
if
(
data
.
id
===
id
)
data
.
answer
=
this
.
currentAnswer
;
this
.
dataList
=
this
.
dataList
.
map
(
data
=>
{
return
data
;
if
(
data
.
id
===
id
)
data
.
answer
=
this
.
currentAnswer
;
});
return
data
;
});
console
.
log
(
smartMeasureLength
,
this
.
dataList
.
length
);
if
(
smartMeasureLength
===
this
.
dataList
.
length
)
{
this
.
submit
();
}
else
{
this
.
currentAnswer
=
""
;
this
.
currentAnswer
=
""
;
},
600
);
}
}
else
if
(
this
.
smartMeasure
.
length
===
this
.
dataList
.
length
)
{
},
600
);
this
.
submit
();
}
},
},
goBack
(
id
)
{
goBack
(
id
)
{
if
(
this
.
isLoading
)
return
;
if
(
this
.
isLoading
)
return
;
...
@@ -128,10 +123,33 @@ export default {
...
@@ -128,10 +123,33 @@ export default {
submit
()
{
submit
()
{
this
.
isLoading
=
true
;
this
.
isLoading
=
true
;
this
.
scrollToBottom
();
this
.
scrollToBottom
();
setTimeout
(()
=>
{
setTimeout
(
async
()
=>
{
// this.$router.push({ path: "/home/smart-measure/report", query: { answer: this.dataList } });
const
params
=
this
.
dataList
},
2000
);
.
map
(
v
=>
{
console
.
log
(
"
submit
"
,
this
.
dataList
);
let
answerTransformed
=
v
.
answer
;
if
([
"
gender
"
,
"
marrige
"
,
"
income
"
].
includes
(
v
.
type
))
{
answerTransformed
=
answerMap
[
v
.
type
][
answerTransformed
];
}
else
if
(
v
.
type
===
"
age
"
)
{
answerTransformed
=
+
answerTransformed
.
slice
(
0
,
answerTransformed
.
length
-
1
);
}
else
if
(
answerTransformed
===
"
没有,下一题
"
)
{
answerTransformed
=
""
;
}
return
{
...
v
,
answerTransformed
,
keyTransformed
:
paramsMap
[
v
.
type
]
};
})
.
reduce
((
a
,
b
)
=>
{
return
Object
.
assign
(
a
,
{
[
b
.
keyTransformed
]:
b
.
answerTransformed
});
},
{});
if
(
localStorage
.
get
(
"
mongoToken
"
))
{
await
addRiskEvaluation
(
params
);
}
this
.
clearSaveHandler
(
"
smartMeasureList
"
);
this
.
$router
.
push
({
path
:
"
/home/smart-measure/report
"
,
query
:
{
gender
:
params
.
gender
,
age
:
params
.
age
}
});
console
.
log
(
"
submit
"
,
params
);
},
1500
);
},
},
scrollToBottom
()
{
scrollToBottom
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
...
...
src/views/Home/SmartMeasure/modules/Age.vue
View file @
b7f2ca0f
...
@@ -39,6 +39,9 @@ export default {
...
@@ -39,6 +39,9 @@ export default {
this
.
showPopup
=
true
;
this
.
showPopup
=
true
;
if
(
!
this
.
refreshed
)
{
if
(
!
this
.
refreshed
)
{
this
.
$refs
.
picker
.
refreshColumns
();
this
.
$refs
.
picker
.
refreshColumns
();
setTimeout
(()
=>
{
this
.
$refs
.
picker
.
setColumnIndex
(
0
,
12
);
});
this
.
refreshed
=
true
;
this
.
refreshed
=
true
;
}
}
},
},
...
...
src/views/Home/index.vue
View file @
b7f2ca0f
...
@@ -9,10 +9,10 @@
...
@@ -9,10 +9,10 @@
/>
/>
<div
class=
"home-button"
@
click=
"$router.push('/home/activity')"
></div>
<div
class=
"home-button"
@
click=
"$router.push('/home/activity')"
></div>
<div
class=
"home-service"
>
<div
class=
"home-service"
>
<
router-link
tag=
"div"
to=
"/home/smart-m
easure"
class=
"home-service-item"
>
<
div
@
click=
"goSmartM
easure"
class=
"home-service-item"
>
<svg-icon
icon-class=
"risk-assessment"
class-name=
"Hs-item-svg"
/>
<svg-icon
icon-class=
"risk-assessment"
class-name=
"Hs-item-svg"
/>
<span
class=
"Hs-item-text"
>
智能风险评测
</span>
<span
class=
"Hs-item-text"
>
智能风险评测
</span>
</
router-link
>
</
div
>
<router-link
tag=
"div"
to=
"/consultant"
class=
"home-service-item"
>
<router-link
tag=
"div"
to=
"/consultant"
class=
"home-service-item"
>
<svg-icon
icon-class=
"consult-service"
class-name=
"Hs-item-svg"
/>
<svg-icon
icon-class=
"consult-service"
class-name=
"Hs-item-svg"
/>
<span
class=
"Hs-item-text"
>
1对1咨询服务
</span>
<span
class=
"Hs-item-text"
>
1对1咨询服务
</span>
...
@@ -103,6 +103,8 @@ import Copyright from "@/components/Copyright";
...
@@ -103,6 +103,8 @@ import Copyright from "@/components/Copyright";
import
{
list
,
getLink
}
from
"
@/api/product
"
;
import
{
list
,
getLink
}
from
"
@/api/product
"
;
import
goodsList
from
"
@/api/goodsList.mock
"
;
import
goodsList
from
"
@/api/goodsList.mock
"
;
import
settings
from
"
@/api/settings
"
;
import
settings
from
"
@/api/settings
"
;
import
{
getRiskEvaluation
}
from
"
@/api/smartMeasure
"
;
import
_
from
"
lodash
"
;
export
default
{
export
default
{
name
:
"
Home
"
,
name
:
"
Home
"
,
...
@@ -129,11 +131,13 @@ export default {
...
@@ -129,11 +131,13 @@ export default {
title
:
"
常见保险有几类,作用是什么?
"
,
title
:
"
常见保险有几类,作用是什么?
"
,
url
:
"
https://mp.weixin.qq.com/s/rIhVsxnxcxHfiYHIwq11hQ
"
url
:
"
https://mp.weixin.qq.com/s/rIhVsxnxcxHfiYHIwq11hQ
"
}
}
]
],
report
:
{}
};
};
},
},
mounted
()
{
async
mounted
()
{
this
.
getList
();
this
.
getList
();
this
.
report
=
await
getRiskEvaluation
();
},
},
methods
:
{
methods
:
{
clickUsefulOption
(
val
)
{
clickUsefulOption
(
val
)
{
...
@@ -147,8 +151,6 @@ export default {
...
@@ -147,8 +151,6 @@ export default {
res
.
forEach
(
it
=>
{
res
.
forEach
(
it
=>
{
if
(
it
.
productNo
===
item
.
id
)
{
if
(
it
.
productNo
===
item
.
id
)
{
item
.
price
=
it
.
downPayPrice
??
item
.
price
;
item
.
price
=
it
.
downPayPrice
??
item
.
price
;
item
.
regularPrice
=
it
.
regularPrice
??
0
;
// item.title = it.title ?? item.title;
}
}
});
});
});
});
...
@@ -161,6 +163,16 @@ export default {
...
@@ -161,6 +163,16 @@ export default {
if
(
res
)
{
if
(
res
)
{
this
.
goodsList
[
3
].
url
=
res
.
url
;
this
.
goodsList
[
3
].
url
=
res
.
url
;
}
}
},
async
goSmartMeasure
()
{
if
(
_
.
has
(
this
.
report
,
"
age
"
)
&&
_
.
has
(
this
.
report
,
"
gender
"
))
{
this
.
$router
.
push
({
path
:
"
/home/smart-measure/report
"
,
query
:
this
.
report
});
}
else
{
this
.
$router
.
push
(
"
/home/smart-measure
"
);
}
}
}
}
}
};
};
...
...
src/views/Policy/Detail/index.less
View file @
b7f2ca0f
...
@@ -446,7 +446,7 @@
...
@@ -446,7 +446,7 @@
line-height: 16px;
line-height: 16px;
}
}
span:last-child
{
a
{
font-size: 20px;
font-size: 20px;
font-weight: 600;
font-weight: 600;
color: #666666;
color: #666666;
...
...
src/views/Policy/Detail/modules/Phone.vue
View file @
b7f2ca0f
<
template
>
<
template
>
<div
class=
"Pdb-footer"
>
<div
class=
"Pdb-footer"
>
<span>
如遇问题请拨打客服电话
</span>
<span>
如遇问题请拨打客服电话
</span>
<
span>
00000000000
</span
>
<
a
:href=
"`tel:$
{phone}`">
{{
phone
}}
</a
>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
setting
from
"
@/api/settings
"
;
console
.
log
(
setting
);
export
default
{
export
default
{
name
:
"
Phone
"
,
name
:
"
Phone
"
,
data
()
{
data
()
{
return
{};
return
{
phone
:
setting
.
tel
};
}
}
};
};
</
script
>
</
script
>
...
...
src/views/Policy/PaymentRecord/index.vue
View file @
b7f2ca0f
...
@@ -105,7 +105,7 @@ export default {
...
@@ -105,7 +105,7 @@ export default {
}
}
} else if (["8", "9-5", "9-6", "10"].includes(status)) {
} else if (["8", "9-5", "9-6", "10"].includes(status)) {
result = {
result = {
titelText: `
共缴纳
$
{
this
.
record
.
totalAmount
}
元
`,
titelText: `
共缴纳
$
{
this
.
record
.
total
Paid
Amount
}
元
`,
refundTimeText: "保障已终止",
refundTimeText: "保障已终止",
amount: `
$
{
this
.
record
?.
nextTermAmount
||
0
}
元
`,
amount: `
$
{
this
.
record
?.
nextTermAmount
||
0
}
元
`,
amountText: "应退金额",
amountText: "应退金额",
...
@@ -130,17 +130,17 @@ export default {
...
@@ -130,17 +130,17 @@ export default {
if
([
"
9-5
"
,
"
9-6
"
].
includes
(
status
))
{
if
([
"
9-5
"
,
"
9-6
"
].
includes
(
status
))
{
list
.
unshift
({
list
.
unshift
({
termNoText
:
termNoText
:
this
.
record
?.
refundRecord
?.
currentState
===
"
2
"
this
.
record
?.
refundRecord
?.
currentState
===
2
?
"
退款中
"
?
"
退款中
"
:
this
.
record
?.
refundRecord
?.
currentState
===
"
3
"
:
this
.
record
?.
refundRecord
?.
currentState
===
3
?
"
退款成功
"
?
"
退款成功
"
:
"
-
"
,
:
"
-
"
,
recordDate
:
this
.
record
?.
refundRecord
?.
payTime
||
"
-
"
,
recordDate
:
this
.
record
?.
refundRecord
?.
payTime
||
"
-
"
,
amountText
:
`
${
this
.
record
?.
refundRecord
?.
amount
}
元
`,
amountText
:
`
${
this
.
record
?.
refundRecord
?.
amount
}
元
`,
payStatusText:
payStatusText:
this.record?.refundRecord?.currentState ===
"2"
this.record?.refundRecord?.currentState ===
2
? "应退金额"
? "应退金额"
: this.record?.refundRecord?.currentState ===
"3"
: this.record?.refundRecord?.currentState ===
3
? "已退金额"
? "已退金额"
: "-"
: "-"
});
});
...
...
src/views/User/index.less
View file @
b7f2ca0f
...
@@ -218,14 +218,15 @@
...
@@ -218,14 +218,15 @@
}
}
&-right {
&-right {
width: 72px;
width: 72px;
padding: 6px 0
;
height: 24px
;
line-height: normal
;
padding: 0 !important
;
text-align: center
;
border: 0 !important
;
background: @orange-light;
background: @orange-light
!important
;
border-radius: @border-radius-sm;
border-radius: @border-radius-sm
!important
;
font-size: @font-size-12;
font-size: @font-size-12;
font-weight: 600;
font-weight: 600;
color: @black;
line-height: 24px;
color: @black !important;
}
}
&:not(:last-child) {
&:not(:last-child) {
border-bottom: 1px solid #EBEBEB;
border-bottom: 1px solid #EBEBEB;
...
...
src/views/User/modules/UserFamily.vue
View file @
b7f2ca0f
...
@@ -57,13 +57,20 @@
...
@@ -57,13 +57,20 @@
</div>
</div>
<div
class=
"Ufii-middle-footer"
>
{{
item
.
guarantee_sub
}}
</div>
<div
class=
"Ufii-middle-footer"
>
{{
item
.
guarantee_sub
}}
</div>
</div>
</div>
<p
<
!--
<
p
class=
"user-family-insurance-item-right"
class=
"user-family-insurance-item-right"
v-if=
"!item.productNo"
v-if=
"!item.productNo"
@
click.stop=
"go('/goods/detail', item)"
@
click.stop=
"go('/goods/detail', item)"
>
>
开启保障
开启保障
</p>
</p>
-->
<cr-button
class=
"user-family-insurance-item-right"
v-if=
"!item.productNo"
@
click.stop=
"go('/goods/detail', item)"
>
开启保障
</cr-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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