From 9e3a9c17a084ffa24ba6309f6437bb7ea2cfdd34 Mon Sep 17 00:00:00 2001 From: xuyiming Date: Thu, 11 Jun 2020 18:00:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=B6=85=E5=B8=82=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/service-info/service-info.vue | 7 +- src/pages/service_shop/sjfwDetail.vue | 6 +- src/pages/service_shop/skfwDetail.vue | 135 +++++++++++++++---- src/pages/service_shop/zhfwDetail.vue | 129 ++++++++++++++---- 4 files changed, 223 insertions(+), 54 deletions(-) diff --git a/src/components/service-info/service-info.vue b/src/components/service-info/service-info.vue index c85b865..58a5bb4 100644 --- a/src/components/service-info/service-info.vue +++ b/src/components/service-info/service-info.vue @@ -18,7 +18,7 @@
- +
    @@ -199,9 +199,14 @@ export default { margin-top: 25px; } .main_container-left { + width: 466px; padding: 3px; background-color: #f9fafc; margin-right: 30px; + font-size: 0; +} +.main_container-left img { + width: 100%; } .main_container-right { flex-grow: 1; diff --git a/src/pages/service_shop/sjfwDetail.vue b/src/pages/service_shop/sjfwDetail.vue index edad4e5..94ce368 100644 --- a/src/pages/service_shop/sjfwDetail.vue +++ b/src/pages/service_shop/sjfwDetail.vue @@ -180,9 +180,9 @@ export default { this.specificationData = specificationData; this.providerData = { organization_name: datas.organization_name, - picture_path: datas.picture_path, - user_name: "张先生", - phone: "010-66666666", + picture_path: datas.userInfo.picture_path, + user_name: datas.userInfo.user_name, + phone: datas.userInfo.phone, }; this.commentsData = datas.scoreDetail; }) diff --git a/src/pages/service_shop/skfwDetail.vue b/src/pages/service_shop/skfwDetail.vue index f8448b3..34cbec8 100644 --- a/src/pages/service_shop/skfwDetail.vue +++ b/src/pages/service_shop/skfwDetail.vue @@ -3,20 +3,21 @@
    服务超市 - + 时空服务 服务详情信息
    - +
@@ -32,34 +33,118 @@ export default { }, data: () => ({ baseInfo: null, + detailData: null, + specificationData: null, + providerData: null, + commentsData: null, }), computed: { id() { return this.$route.params.id; }, }, - methods: { - getDataFromApi(_url) { - return new Promise((resolve, reject) => { - this.$http - .get(_url) - .then((response) => { - resolve(response.body); - }) - .catch(function(error) { - reject(error); - }); - }); + computed: { + id() { + return this.$route.params.id; + }, + commentsUrl() { + return `/apaas/serviceapp/v3/servicemarket/estimates?serviceId=${this.id}`; }, + }, + methods: { init() { - this.getDataFromApi(`/static/serviceBaseInfo.json`).then( - ({ skfw }) => { - this.baseInfo = skfw; - }, - (error) => { + this.$http + .get("/apaas/serviceapp/v3/servicemarket/detail", { + params: { + serviceId: this.id, + }, + }) + .then(({ data }) => { + let datas = data.data; + let specificationData = datas.serviceRequestSpcs.map((item) => ({ + id: item.id, + type: item.type, + name: `访问次数:${item.pv}/日 访问量:${item.count}/日`, + descript: item.des, + })); + + this.baseInfo = { + service_id: this.id, + app_id: 0, + name: datas.name, + type: "Map Service", + openness: datas.openness, + view_count: datas.view_count, + apply_count: datas.apply_count, + cover: datas.cover, + organization_name: datas.organization_name, + create_time: datas.create_time, + update_date: datas.update_date, + sectors_name: datas.sectors_name, + data_service_type3_str: datas.data_service_type3_str, + descript: datas.descript, + serviceRequestSpcs: specificationData, + }; + + this.detailData = [ + { + name: "获取流程", + type: "step", + value: ["服务申请", "信息填写", "审核确认", "服务获取"], + }, + { + name: "服务描述", + type: "text", + value: datas.descript, + }, + { + name: "服务属性", // TODO: replace + type: "list", + value: [ + { + name: "大小", + value: "66kb", + }, + { + name: "API", + value: "Java", + }, + { + name: "用途", + value: "即用型", + }, + { + name: "空间范围", + value: + "111.8915040799999, 114.25605481900004, 28.762848204000022", + }, + { + name: "标签", + value: "T003 智能地图 T001", + }, + { + name: "制作单位", + value: "贵州省应急管理应急管理厅", + }, + { + name: "离线模式", + value: "禁用", + }, + ], + }, + ]; + this.specificationData = specificationData; + this.providerData = { + organization_name: datas.organization_name, + picture_path: datas.userInfo.picture_path, + user_name: datas.userInfo.user_name, + phone: datas.userInfo.phone, + }; + this.commentsData = datas.scoreDetail; + }) + .catch(function(error) { console.log(error); - } - ); + }); }, }, mounted() { diff --git a/src/pages/service_shop/zhfwDetail.vue b/src/pages/service_shop/zhfwDetail.vue index ac46384..0854c74 100644 --- a/src/pages/service_shop/zhfwDetail.vue +++ b/src/pages/service_shop/zhfwDetail.vue @@ -3,20 +3,21 @@
服务超市 - + 综合服务 服务详情信息
- +
@@ -32,34 +33,112 @@ export default { }, data: () => ({ baseInfo: null, + detailData: null, + specificationData: null, + providerData: null, + commentsData: null, }), computed: { id() { return this.$route.params.id; }, }, - methods: { - getDataFromApi(_url) { - return new Promise((resolve, reject) => { - this.$http - .get(_url) - .then((response) => { - resolve(response.body); - }) - .catch(function(error) { - reject(error); - }); - }); + computed: { + id() { + return this.$route.params.id; + }, + commentsUrl() { + return `/apaas/serviceapp/v3/servicemarket/estimates?serviceId=${this.id}`; }, + }, + methods: { init() { - this.getDataFromApi(`/static/serviceBaseInfo.json`).then( - ({ zhyyfw }) => { - this.baseInfo = zhyyfw; - }, - (error) => { + this.$http + .get("/apaas/serviceapp/v3/servicemarket/detail", { + params: { + serviceId: this.id, + }, + }) + .then(({ data }) => { + let datas = data.data; + let specificationData = datas.serviceRequestSpcs.map((item) => ({ + id: item.id, + type: item.type, + name: `访问次数:${item.pv}/日 访问量:${item.count}/日`, + descript: item.des, + })); + + this.baseInfo = { + service_id: this.id, + app_id: 0, + name: datas.name, + openness: datas.openness, + view_count: datas.view_count, + apply_count: datas.apply_count, + cover: datas.cover, + organization_name: datas.organization_name, + create_time: datas.create_time, + update_date: datas.update_date, + sectors_name: datas.sectors_name, + data_service_type3_str: datas.data_service_type3_str, + descript: datas.descript, + serviceRequestSpcs: specificationData, + }; + + this.detailData = [ + { + name: "获取流程", + type: "step", + value: ["服务申请", "信息填写", "审核确认", "服务获取"], + }, + { + name: "服务描述", + type: "text", + value: datas.descript, + }, + { + name: "微服务响应列表", // TODO: replace + type: "table", + value: { + datas: [ + { + name: "apaas-mapvideos-1", + description: "地图视频融合应用服务", + }, + { + name: "apaas-mapvideos-2", + description: "地图视频融合应用服务", + }, + { + name: "apaas-mapvideos-3", + description: "地图视频融合应用服务", + }, + ], + columns: [ + { + prop: "name", + label: "微服务名称", + }, + { + prop: "description", + label: "微服务描述", + }, + ], + }, + }, + ]; + this.specificationData = specificationData; + this.providerData = { + organization_name: datas.organization_name, + picture_path: datas.userInfo.picture_path, + user_name: datas.userInfo.user_name, + phone: datas.userInfo.phone, + }; + this.commentsData = datas.scoreDetail; + }) + .catch(function(error) { console.log(error); - } - ); + }); }, }, mounted() { -- 2.26.0