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
2b8eed7a
Commit
2b8eed7a
authored
Aug 05, 2020
by
郭志伟
Committed by
郝聪敏
Aug 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: 产品列表数据调整
parent
d0100803
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
134 additions
and
100 deletions
+134
-100
goodsList.mock.js
src/api/goodsList.mock.js
+77
-96
product.js
src/api/product.js
+15
-0
index.vue
src/components/GoodList/index.vue
+18
-2
index.vue
src/views/Goods/index.vue
+23
-1
paytest.vue
src/views/paytest.vue
+1
-1
No files found.
src/api/goodsList.mock.js
View file @
2b8eed7a
...
...
@@ -13,107 +13,88 @@ import life from "@/assets/images/user/life@2x.png";
export
default
[
{
title
:
"
住院医疗险
"
,
sub
:
"
报销医药费,有无社保均可保
"
,
children
:
[
{
id
:
1
,
itype
:
"
mi
"
,
img
:
good01
,
title
:
"
万家保·百万医疗险
"
,
sub
:
"
产品优势
"
,
glory
:
"
好评榜第1名
"
,
price
:
"
0
"
,
unit
:
""
,
allow
:
true
,
termType
:
"
short
"
,
icon_closed
:
medical_closed
,
icon
:
medical
,
guarantee_title
:
"
医疗保障
"
,
guarantee_sub
:
"
看病报销医药费,最高600万
"
}
]
id
:
1
,
itype
:
"
mi
"
,
scope
:
[
1
,
2
,
3
],
// 范围,列表中区分类型用,1成人 2老年 3少儿
img
:
good01
,
title
:
"
万家保·百万医疗险
"
,
sub
:
"
产品优势
"
,
glory
:
"
好评榜第1名
"
,
price
:
"
0
"
,
unit
:
""
,
allow
:
true
,
termType
:
"
short
"
,
icon_closed
:
medical_closed
,
icon
:
medical
,
guarantee_title
:
"
医疗保障
"
,
guarantee_sub
:
"
看病报销医药费,最高600万
"
},
{
title
:
"
重大疾病险
"
,
sub
:
"
责任内疾病确诊即赔
"
,
children
:
[
{
id
:
2
,
itype
:
"
cii
"
,
img
:
good02
,
title
:
"
万家保·重疾轻症险
"
,
sub
:
"
100种重疾+40种轻症
"
,
glory
:
""
,
price
:
"
3
"
,
unit
:
"
首月
"
,
allow
:
true
,
termType
:
"
short
"
,
icon_closed
:
illness_closed
,
icon
:
illness
,
guarantee_title
:
"
重疾保障
"
,
guarantee_sub
:
"
100种重症+40种轻症
"
},
{
id
:
3
,
itype
:
"
cii
"
,
img
:
good02
,
title
:
"
康惠保2020终身重疾险
"
,
sub
:
"
100种重疾+40种轻症
"
,
glory
:
""
,
price
:
"
3
"
,
unit
:
"
首月
"
,
allow
:
true
,
termType
:
"
long
"
,
icon_closed
:
illness_closed
,
icon
:
illness
,
guarantee_title
:
"
重疾保障
"
,
guarantee_sub
:
"
100种重症+40种轻症
"
}
]
id
:
2
,
itype
:
"
cii
"
,
scope
:
[
1
,
2
,
3
],
img
:
good02
,
title
:
"
万家保·重疾轻症险
"
,
sub
:
"
100种重疾+40种轻症
"
,
glory
:
""
,
price
:
"
3
"
,
unit
:
"
首月
"
,
allow
:
true
,
termType
:
"
short
"
,
icon_closed
:
illness_closed
,
icon
:
illness
,
guarantee_title
:
"
重疾保障
"
,
guarantee_sub
:
"
100种重症+40种轻症
"
},
{
title
:
"
意外伤害险
"
,
sub
:
"
意外保障无等待期
"
,
children
:
[
{
id
:
4
,
itype
:
"
ai
"
,
img
:
good03
,
title
:
"
万家保·综合意外险
"
,
sub
:
"
产品优势
"
,
glory
:
"
开车必备
"
,
price
:
"
0
"
,
unit
:
""
,
allow
:
true
,
termType
:
"
short
"
,
icon_closed
:
casualty_closed
,
icon
:
casualty
,
guarantee_title
:
"
意外保障
"
,
guarantee_sub
:
"
意外风险覆盖全,最高100万保额
"
}
]
id
:
3
,
itype
:
"
cii
"
,
scope
:
[
1
,
2
],
img
:
good02
,
title
:
"
康惠保2020终身重疾险
"
,
sub
:
"
100种重疾+40种轻症
"
,
glory
:
""
,
price
:
"
3
"
,
unit
:
"
首月
"
,
allow
:
true
,
termType
:
"
long
"
,
icon_closed
:
illness_closed
,
icon
:
illness
,
guarantee_title
:
"
重疾保障
"
,
guarantee_sub
:
"
100种重症+40种轻症
"
},
{
title
:
"
人寿保险
"
,
sub
:
"
家庭顶梁柱必备
"
,
children
:
[
{
id
:
5
,
itype
:
"
li
"
,
img
:
good04
,
title
:
"
华贵大麦2020定期寿险
"
,
sub
:
"
产品优势
"
,
glory
:
""
,
price
:
"
0
"
,
unit
:
""
,
allow
:
true
,
termType
:
"
long
"
,
icon_closed
:
life_closed
,
icon
:
life
,
guarantee_title
:
"
人寿保障
"
,
guarantee_sub
:
"
最高350万保额,顶梁柱必备
"
}
]
id
:
4
,
itype
:
"
ai
"
,
scope
:
[
1
,
2
,
3
],
img
:
good03
,
title
:
"
万家保·综合意外险
"
,
sub
:
"
产品优势
"
,
glory
:
"
开车必备
"
,
price
:
"
0
"
,
unit
:
""
,
allow
:
true
,
termType
:
"
short
"
,
icon_closed
:
casualty_closed
,
icon
:
casualty
,
guarantee_title
:
"
意外保障
"
,
guarantee_sub
:
"
意外风险覆盖全,最高100万保额
"
},
{
id
:
5
,
itype
:
"
li
"
,
scope
:
[
1
,
3
],
img
:
good04
,
title
:
"
华贵大麦2020定期寿险
"
,
sub
:
"
产品优势
"
,
glory
:
""
,
price
:
"
0
"
,
unit
:
""
,
allow
:
true
,
termType
:
"
long
"
,
icon_closed
:
life_closed
,
icon
:
life
,
guarantee_title
:
"
人寿保障
"
,
guarantee_sub
:
"
最高350万保额,顶梁柱必备
"
}
];
src/api/
order
.js
→
src/api/
product
.js
View file @
2b8eed7a
import
req
from
"
@/service/http
"
;
// 产品列表
export
const
list
=
param
=>
{
return
req
.
get
(
"
product/list
"
,
param
);
};
// 产品详情
export
const
addPolicyDetail
=
param
=>
{
return
req
.
get
(
"
product/detail
"
,
param
);
};
// 产品算价
export
const
trail
=
param
=>
{
return
req
.
post
(
"
product/price/trail
"
,
param
);
};
// 下单流程
export
const
placeOrder
=
{
// 创建保单订单
...
...
src/components/GoodList/index.vue
View file @
2b8eed7a
<
template
>
<div
class=
"goods-list"
>
<div
v-if=
"hasChildren"
>
<template
v-for=
"(item, index) in
l
ist"
>
<template
v-for=
"(item, index) in
goodsL
ist"
>
<div
class=
"goods-list-head"
:key=
"'head' + index"
>
<slot
:data=
"item"
>
<h5>
{{
item
.
title
||
"
-
"
}}
</h5>
...
...
@@ -44,7 +44,7 @@
type=
"flex"
class=
"goods-list-item"
:class=
"{ 'not-allow': !it.allow }"
v-for=
"(it, idx) in
l
ist"
v-for=
"(it, idx) in
goodsL
ist"
:key=
"idx"
@
click.native=
"clickItem(it)"
>
...
...
@@ -80,12 +80,28 @@ export default {
default
()
{
return
[];
}
},
sort
:
{
type
:
Number
,
default
:
0
}
},
computed
:
{
// TODO
hasChildren
:
function
()
{
return
this
.
list
[
0
]
&&
this
.
list
[
0
].
children
&&
this
.
list
[
0
].
children
.
length
>
0
;
},
goodsList
()
{
const
{
sort
,
list
,
hasChildren
}
=
this
;
if
(
sort
===
0
)
{
return
list
;
}
else
{
if
(
hasChildren
)
{
return
list
;
}
else
{
return
list
.
filter
(
item
=>
item
.
scope
.
includes
(
sort
));
}
}
}
},
methods
:
{
...
...
src/views/Goods/index.vue
View file @
2b8eed7a
...
...
@@ -36,7 +36,29 @@ export default {
return
{
active
:
0
,
showLayer
:
false
,
goodsList
:
[]
goodsList
:
[],
goodsLists
:
[
{
title
:
"
住院医疗险
"
,
sub
:
"
报销医药费,有无社保均可保
"
,
children
:
[]
},
{
title
:
"
重大疾病险
"
,
sub
:
"
责任内疾病确诊即赔
"
,
children
:
[]
},
{
title
:
"
意外伤害险
"
,
sub
:
"
意外保障无等待期
"
,
children
:
[]
},
{
title
:
"
人寿保险
"
,
sub
:
"
家庭顶梁柱必备
"
,
children
:
[]
}
]
};
},
mounted
()
{
...
...
src/views/paytest.vue
View file @
2b8eed7a
...
...
@@ -42,7 +42,7 @@
* @return:
*/
import
{
loginByPhone
,
getwxOpenId
}
from
"
@/api/user
"
;
import
{
placeOrder
}
from
"
@/api/
order
"
;
import
{
placeOrder
}
from
"
@/api/
product
"
;
import
cfg
from
"
@/config
"
;
import
{
payByWay
}
from
"
@/service/pay
"
;
let
pollTimer
=
null
;
...
...
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