Commit b8db2bba authored by 刘殿昕's avatar 刘殿昕

重构超市

parent 832ae09a
<template> <template>
<div class="service_info apaas_button" v-if="data"> <div class="service_info apaas_button" v-if="data && showItem">
<div class="service_title"> <div class="service_title">
<span class="service_name" v-text="data.name"></span> <span class="service_name" v-text="data.name"></span>
<span class="service_type" v-if="data.type" v-text="data.type"></span> <span class="service_type" v-if="data.type" v-text="data.type"></span>
...@@ -89,7 +89,13 @@ ...@@ -89,7 +89,13 @@
class="commodity_text" class="commodity_text"
>暂无</span >暂无</span
> >
<div v-else class="btn_container"> <div
v-else-if="
data.serviceRequestSpcs.spcs_type_1 &&
data.serviceRequestSpcs.spcs_type_1.length != 0
"
class="btn_container"
>
<el-button <el-button
v-for="(item, index) in data.serviceRequestSpcs.spcs_type_1" v-for="(item, index) in data.serviceRequestSpcs.spcs_type_1"
:key="'spcs_' + index" :key="'spcs_' + index"
...@@ -191,6 +197,7 @@ export default { ...@@ -191,6 +197,7 @@ export default {
specification: {}, // 规格 specification: {}, // 规格
duration: 1, // 时长 duration: 1, // 时长
showTime: false, showTime: false,
showItem: false,
}), }),
computed: { computed: {
actionDisabled() { actionDisabled() {
...@@ -268,10 +275,15 @@ export default { ...@@ -268,10 +275,15 @@ export default {
mounted() { mounted() {
// 初始化购买方式 // 初始化购买方式
if (this.data.serviceRequestSpcs && this.data.serviceRequestSpcs.length) { if (this.data.serviceRequestSpcs && this.data.serviceRequestSpcs.length) {
if (!this.data.serviceRequestSpcs.spcs_type_1) {
this.data.serviceRequestSpcs.spcs_type_1 = [];
}
if (!this.data.serviceRequestSpcs.spcs_type_2) {
this.data.serviceRequestSpcs.spcs_type_2 = [];
}
let types = Array.from( let types = Array.from(
new Set(this.data.serviceRequestSpcs.map((item) => item.type)) new Set(this.data.serviceRequestSpcs.map((item) => item.type))
); );
if (types.indexOf(3) > -1) { if (types.indexOf(3) > -1) {
this.types = [ this.types = [
{ {
...@@ -316,6 +328,7 @@ export default { ...@@ -316,6 +328,7 @@ export default {
) { ) {
this.specification = this.data.serviceRequestSpcs.spcs_type_2[0]; this.specification = this.data.serviceRequestSpcs.spcs_type_2[0];
} }
this.showItem = true;
}, },
}; };
</script> </script>
......
...@@ -65,32 +65,32 @@ export default { ...@@ -65,32 +65,32 @@ export default {
} }
switch (uri) { switch (uri) {
case "data_service_list": case "data_service_list":
item.active = "tool_ic_shujufw_sel"; item.active = "shop_tool_ic_sjfw_sel";
item.default = "tool_ic_shujufw"; item.default = "shop_tool_ic_sjfw";
break; break;
case "space_time_service_list": case "space_time_service_list":
item.active = "tool_ic_shikongfw_sel"; item.active = "shop_tool_ic_skfw_sel";
item.default = "tool_ic_shikongfw"; item.default = "shop_tool_ic_skfw";
break; break;
case "video_service_list": case "video_service_list":
item.active = "tool_ic_shipinfw_sel"; item.active = "shop_tool_ic_spfw_sel";
item.default = "tool_ic_shipinfw"; item.default = "shop_tool_ic_spfw";
break; break;
case "perception_service_list": case "perception_service_list":
item.active = "tool_ic_ganzhifw_sel"; item.active = "shop_tool_ic_ganzhifw_sel";
item.default = "tool_ic_ganzhifw"; item.default = "shop_tool_ic_ganzhifw";
break; break;
case "comprehensive_app_list": case "comprehensive_app_list":
item.active = "tool_ic_zongheyyfw_sel"; item.active = "shop_tool_ic_zhyyfw_sel";
item.default = "tool_ic_zongheyyfw"; item.default = "shop_tool_ic_zhyyfw";
break; break;
case "cloud": case "cloud":
item.active = "tool_ic_yunziyuanfw_sel"; item.active = "shop_tool_ic_yzyfw_sel";
item.default = "tool_ic_yunziyuanfw"; item.default = "shop_tool_ic_yzyfw";
break; break;
case "app_store_list": case "app_store_list":
item.active = "tool_ic_yingyongsd_sel"; item.active = "shop_ic_yysd_sel";
item.default = "tool_ic_yingyongsd"; item.default = "shop_ic_yysd";
break; break;
default: default:
item.active = "1"; item.active = "1";
...@@ -111,24 +111,25 @@ export default { ...@@ -111,24 +111,25 @@ export default {
.service_shop_menu { .service_shop_menu {
background-color: #0d1847; background-color: #0d1847;
position: fixed; position: fixed;
top: 58px; top: 76px;
left: 0; left: calc(50% - 600px);
width: 180px; width: 180px;
height: 100%; padding: 8px;
padding-top: 30px; background-color: #ffffff;
box-shadow: 0px 3px 6px 0px
rgba(15, 19, 65, 0.04);
border-radius: 8px;
} }
.service_shop_menu_list > li { .service_shop_menu_list > li {
padding: 16px 10px 8px 22px; padding: 16px 10px 8px 22px;
border-left: 5px solid #0d1847;
font-size: 15px; font-size: 15px;
line-height: 24px; line-height: 24px;
cursor: pointer; cursor: pointer;
} }
.service_shop_menu_list > li:hover, .service_shop_menu_list > li:hover,
.service_shop_menu_list > li.current { .service_shop_menu_list > li.current {
border-left: 5px solid #e56600; background-color: rgba(242, 246, 253, 0.4);
background-color: #182665; color: #515fe7;
color: #e6ebfe;
} }
.menu_img { .menu_img {
width: 25px; width: 25px;
...@@ -136,12 +137,16 @@ export default { ...@@ -136,12 +137,16 @@ export default {
} }
.menu_item { .menu_item {
position: relative; position: relative;
color: #6573ae; font-weight: bold;
font-size: 15px;
color: #96a0c5;
top: -6px; top: -6px;
} }
.menu_item_active { .menu_item_active {
position: relative; position: relative;
color: #e6ebfe; font-weight: bold;
font-size: 15px;
color: #515fe7;
top: -6px; top: -6px;
} }
</style> </style>
<template> <template>
<div> <div class="shop_list_cont">
<el-container> <el-container>
<el-aside width="180px"> <el-aside width="180px">
<service-shop-menu></service-shop-menu> <service-shop-menu></service-shop-menu>
...@@ -123,4 +123,9 @@ export default { ...@@ -123,4 +123,9 @@ export default {
background: url("~@/assets/imgs/img_default_quesheng.png") no-repeat center background: url("~@/assets/imgs/img_default_quesheng.png") no-repeat center
center; center;
} }
.shop_list_cont {
width: 1200px;
margin: 0 auto;
position: relative;
}
</style> </style>
\ No newline at end of file
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<service-tabs <service-tabs
:detail-data="detailData" :detail-data="detailData"
:specification-data="specificationData"
:provider-data="providerData" :provider-data="providerData"
:comments-data="commentsData" :comments-data="commentsData"
:comments-url="commentsUrl" :comments-url="commentsUrl"
...@@ -34,7 +33,6 @@ export default { ...@@ -34,7 +33,6 @@ export default {
data: () => ({ data: () => ({
baseInfo: null, baseInfo: null,
detailData: null, detailData: null,
specificationData: null,
providerData: null, providerData: null,
commentsData: null, commentsData: null,
}), }),
...@@ -61,17 +59,6 @@ export default { ...@@ -61,17 +59,6 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
let datas = data.data; let datas = data.data;
let specificationData =
(datas.serviceRequestSpcs &&
datas.serviceRequestSpcs.map((item) => ({
id: item.id,
type: item.type,
pv: item.pv,
count: item.count,
name: `访问次数:${item.pv}次/日 访问量:${item.count}次/日`,
descript: item.des,
}))) ||
[];
this.baseInfo = { this.baseInfo = {
portal_id: datas.portal_id || "", // 时空服务id portal_id: datas.portal_id || "", // 时空服务id
...@@ -93,9 +80,9 @@ export default { ...@@ -93,9 +80,9 @@ export default {
datas.data_service_type3_name, datas.data_service_type3_name,
], ],
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: specificationData,
scoreDetail: datas.scoreDetail, scoreDetail: datas.scoreDetail,
month_sale: data.month_sale, month_sale: data.month_sale,
serviceRequestSpcs: datas.serviceRequestSpcs,
}; };
this.detailData = [ this.detailData = [
...@@ -145,7 +132,6 @@ export default { ...@@ -145,7 +132,6 @@ export default {
], ],
}, */ }, */
]; ];
this.specificationData = specificationData;
this.providerData = { this.providerData = {
organization_name: datas.organization_name, organization_name: datas.organization_name,
picture_path: datas.organization_picture, picture_path: datas.organization_picture,
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<service-tabs <service-tabs
:detail-data="detailData" :detail-data="detailData"
:specification-data="specificationData"
:provider-data="providerData" :provider-data="providerData"
:comments-data="commentsData" :comments-data="commentsData"
:comments-url="commentsUrl" :comments-url="commentsUrl"
...@@ -34,7 +33,6 @@ export default { ...@@ -34,7 +33,6 @@ export default {
data: () => ({ data: () => ({
baseInfo: null, baseInfo: null,
detailData: null, detailData: null,
specificationData: null,
providerData: null, providerData: null,
commentsData: null, commentsData: null,
}), }),
...@@ -56,18 +54,6 @@ export default { ...@@ -56,18 +54,6 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
let datas = data.data; let datas = data.data;
let specificationData =
(datas.serviceRequestSpcs &&
datas.serviceRequestSpcs.map((item) => ({
id: item.id,
type: item.type,
pv: item.pv,
count: item.count,
name: `访问次数:${item.pv}次/日 访问量:${item.count}次/日`,
descript: item.des,
}))) ||
[];
this.baseInfo = { this.baseInfo = {
service_id: this.id, service_id: this.id,
app_id: 0, app_id: 0,
...@@ -88,7 +74,7 @@ export default { ...@@ -88,7 +74,7 @@ export default {
datas.data_service_type3_name, datas.data_service_type3_name,
], ],
descript: datas.descript, descript: datas.descript,
serviceRequestSpcs: specificationData, serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail, scoreDetail: datas.scoreDetail,
month_sale: data.month_sale, month_sale: data.month_sale,
}; };
...@@ -141,7 +127,6 @@ export default { ...@@ -141,7 +127,6 @@ export default {
value: datas.workflows_id, value: datas.workflows_id,
}); });
} }
this.specificationData = specificationData;
this.providerData = { this.providerData = {
organization_name: datas.organization_name, organization_name: datas.organization_name,
picture_path: datas.organization_picture, picture_path: datas.organization_picture,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment