lcl 11 月之前
父节点
当前提交
433f0f2328
共有 2 个文件被更改,包括 71 次插入71 次删除
  1. 2 2
      src/utils/getUrl/getUrl.js
  2. 69 69
      src/views/Template/ApiGroup/hook.tsx

+ 2 - 2
src/utils/getUrl/getUrl.js

@@ -64,7 +64,7 @@ const getURL = () => {
 const getAllPlate = () => {
   return new Promise(async (resolve, reject) => {
     postRequest(
-      "http://test.skbconfig.kexiaoshuang.com/api/apiinfo/groupsforadmin",
+      "http://test.config.kexiaoshuang.com/api/apiinfo/groupsforadmin",
       {
         key: "kxs#2024"
       }
@@ -99,7 +99,7 @@ const getGroupUrl = async (checkPlate = []) => {
       );
     }, 5000);
     postRequest(
-      "http://test.skbconfig.kexiaoshuang.com/api/apiinfo/listforadmin",
+      "http://test.config.kexiaoshuang.com/api/apiinfo/listforadmin",
       parameters
     )
       .then(async res => {

+ 69 - 69
src/views/Template/ApiGroup/hook.tsx

@@ -71,79 +71,79 @@ export function useApiGroup() {
       });
     };
     loading.value = true;
-    console.log('form:', form);
-    console.log('pagination:', pagination);
-    const { data, other }: any = http.Request({ method: UrlList.KxsConfigServer.ApiGrouplist.method, url: UrlList.KxsConfigServer.ApiGrouplist.url, { ...form, page_size: pagination.pageSize, page_num: pagination.currentPage }});
-  console.log('data:', data);
-  console.log('other:', other);
-  dataList.value = data;
-  pagination.total = other.Count;
-  setTimeout(() => {
-    loading.value = false;
-  }, 500);
-}
-onMounted(() => {
-  onSearch();
-});
+    var sss = await http.Request({ method: UrlList.KxsConfigServer.ApiGrouplist.method, url: UrlList.KxsConfigServer.ApiGrouplist.url, params: { ...form, page_size: pagination.pageSize, page_num: pagination.currentPage } });
+    console.log('sss:', sss);
+    const { data, other }: any = http.Request({ method: UrlList.KxsConfigServer.ApiGrouplist.method, url: UrlList.KxsConfigServer.ApiGrouplist.url, params: { ...form, page_size: pagination.pageSize, page_num: pagination.currentPage } });
+    console.log('data:', data);
+    console.log('other:', other);
+    dataList.value = data;
+    pagination.total = other.Count;
+    setTimeout(() => {
+      loading.value = false;
+    }, 500);
+  }
+  onMounted(() => {
+    onSearch();
+  });
 
-// 删除
-function handleDelete(row) {
-  ElMessageBox.confirm(
-    `是否删除该api接口分组? `,
-    "提示",
-    {
-      confirmButtonText: "删除",
-      cancelButtonText: "取消",
-      type: "warning"
-    }
-  ).then(async () => {
-    const { status, info }: any = await http.request(KxsConfigServer.ApiGroupdelete.method, KxsConfigServer.ApiGroupdelete.url, { Id: row.Id });
-    if (status === "1") {
-      ElMessage({
-        message: "删除成功",
-        type: "success"
-      });
-      onSearch();
-    } else {
-      ElMessageBox.alert(info, "提示", {
-        confirmButtonText: "关闭",
+  // 删除
+  function handleDelete(row) {
+    ElMessageBox.confirm(
+      `是否删除该api接口分组? `,
+      "提示",
+      {
+        confirmButtonText: "删除",
+        cancelButtonText: "取消",
         type: "warning"
-      });
-    };
-  })
-}
+      }
+    ).then(async () => {
+      const { status, info }: any = await http.request(KxsConfigServer.ApiGroupdelete.method, KxsConfigServer.ApiGroupdelete.url, { Id: row.Id });
+      if (status === "1") {
+        ElMessage({
+          message: "删除成功",
+          type: "success"
+        });
+        onSearch();
+      } else {
+        ElMessageBox.alert(info, "提示", {
+          confirmButtonText: "关闭",
+          type: "warning"
+        });
+      };
+    })
+  }
 
-// 新增
-const addVisible = ref(false);
-function handleAdd() {
-  addVisible.value = true;
-};
+  // 新增
+  const addVisible = ref(false);
+  function handleAdd() {
+    addVisible.value = true;
+  };
 
-// 修改
-const editVisible = ref(false);
-const editFormData = ref({});
-function handleUpdate(row) {
-  editVisible.value = true;
-  // 表格数据赋值
-  editFormData.value = row;
-};
+  // 修改
+  const editVisible = ref(false);
+  const editFormData = ref({});
+  function handleUpdate(row) {
+    editVisible.value = true;
+    // 表格数据赋值
+    editFormData.value = row;
+  };
 
-return {
-  form,
-  loading,
-  columns,
-  dataList,
-  pagination,
-  onSearch,
-  handleSizeChange,
-  handleCurrentChange,
-  handleSelectionChange,
-  handleAdd,
-  addVisible,
-  handleUpdate,
-  editVisible,
-  editFormData,
-  handleDelete,
+  return {
+    form,
+    loading,
+    columns,
+    dataList,
+    pagination,
+    onSearch,
+    handleSizeChange,
+    handleCurrentChange,
+    handleSelectionChange,
+    handleAdd,
+    addVisible,
+    handleUpdate,
+    editVisible,
+    editFormData,
+    handleDelete,
 
-};
+  };
 }