Ver código fonte

feat(服务解析-服务列表接口更换)

liujing 3 semanas atrás
pai
commit
d5d05975dc
2 arquivos alterados com 11 adições e 10 exclusões
  1. 6 2
      src/api/service.js
  2. 5 8
      src/views/service/InterfaceSublist/index.vue

+ 6 - 2
src/api/service.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 import Request from '@/utils/requestOther'
 const instance = new Request()
-
+const instance2 = new Request('/core')
 // 服务列表/api/v1/service 1和2是一套,拿到1的id请求2的接口,两套数据进行整合。
 export function listService(query) {
   return request({
@@ -85,4 +85,8 @@ export function getChartData(data) {
   const url = `/api/v1/url-mapping/chart`
   return instance.get(url, data)
 }
-
+// 10. 接口解析--服务列表
+export function fatchServiceList(data) {
+  const url = `/v1/service/simple-list`
+  return instance2.get(url, data)
+}

+ 5 - 8
src/views/service/InterfaceSublist/index.vue

@@ -104,7 +104,7 @@
                 <el-option
                   v-for="item in serviceList"
                   :key="item.id"
-                  :label="item.name"
+                  :label="item.service_name_cn"
                   :value="item.service_name"
                 />
               </el-select>
@@ -299,7 +299,7 @@
 <script>
 import { urlMappingSubdigits, urlMappingSublist, updateUrlMapping, addUrlMapping, getUrlMapping, favor, uploadExcel } from '@/api/mapping'
 import storage from '@/utils/storage'
-import { listService } from '@/api/service'
+import { fatchServiceList } from '@/api/service'
 export default {
   data() {
     return {
@@ -368,9 +368,7 @@ export default {
       serviceParams: {
         app_alias: '',
         start_time: '',
-        end_time: '',
-        pageIndex: 1,
-        pageSize: 200
+        end_time: ''
       },
       total: 0,
       subList: [],
@@ -388,7 +386,6 @@ export default {
         if (newValue) {
           this.serviceParams.start_time = newValue.startTime
           this.serviceParams.end_time = newValue.endTime
-          this.serviceParams.pageIndex = 1
 
           this.subdigitsQuery.start_time = newValue.startTime
           this.subdigitsQuery.end_time = newValue.endTime
@@ -461,9 +458,9 @@ export default {
     },
     // 获取该业务的服务list
     getServiceList() {
-      listService(this.serviceParams).then(res => {
+      fatchServiceList(this.serviceParams).then(res => {
         if (res.code == 200) {
-          this.serviceList = res.data.list
+          this.serviceList = res.data.service_list
         } else {
           this.serviceList = []
         }