Browse Source

geturl请求调整

guicheng 5 months ago
parent
commit
0ca0cc189b

+ 6 - 6
src/views/Template/template/components/add/index.vue

@@ -2,7 +2,7 @@
  * @Author: 
  * @Date: 2023-03-01 19:20:44
  * @LastEditors: guicheng 1625811865@qq.com
- * @LastEditTime: 2024-05-14 14:52:51
+ * @LastEditTime: 2024-05-27 17:32:16
  * @Description: kxs files
  * @filePath: 
 -->
@@ -61,11 +61,11 @@ const transferdata = ref([
 ]);
 // 提交函数
 const submit = async () => {
-  const { status, info }: any = http.request(
-    UserUrl.User.userSearch.method,
-    UserUrl.User.userSearch.url,
-    UpdateForm.value
-  );
+  const { status, info }: any = http.Request({
+    url: UserUrl.User.userSearch.method,
+    method: UserUrl.User.userSearch.url,
+    params: UpdateForm.value
+  });
   if (status === "1") {
     ElMessage({
       message: "新增成功",

+ 5 - 5
src/views/Template/template/components/edit/index.vue

@@ -82,11 +82,11 @@ const submit = async () => {
 const closeVisible = inject("closeEditVisible");
 const openVisible = async () => {
   //通过ID获取表格数据
-  const { data, info }: any = http.request(
-    UserUrl.User.userSearch.method,
-    UserUrl.User.userSearch.url,
-    props.formData.id
-  );
+  const { data, info }: any = http.Request({
+    url: UserUrl.User.userSearch.method,
+    method: UserUrl.User.userSearch.url,
+    params: props.formData.id
+  });
   UpdateForm.value = data;
   // 通过表格项获取数据
   UpdateForm.value = props.formData;

+ 5 - 5
src/views/Template/template/hook.tsx

@@ -121,11 +121,11 @@ export function useUser() {
         type: "warning"
       }
     ).then(async () => {
-      const { status, info }: any = await http.request(
-        UserUrl.User.userDelete.method,
-        UserUrl.User.userDelete.url,
-        { SysAdminId: row.Id }
-      );
+      const { status, info }: any = await http.Request({
+        url: UserUrl.User.userDelete.method,
+        method: UserUrl.User.userDelete.url,
+        params: { SysAdminId: row.Id }
+      });
       if (status === "1") {
         ElMessage({
           message: "删除成功",