wjx 1 rok temu
rodzic
commit
5d5803f053
1 zmienionych plików z 22 dodań i 8 usunięć
  1. 22 8
      src/services/gameData/roleOperate.ts

+ 22 - 8
src/services/gameData/roleOperate.ts

@@ -459,14 +459,14 @@ export interface CreateRoleConfigProps {
  * @returns 
  */
 export async function getCreateRoleConfigListApi(data: CreateRoleConfigProps) {
-    return request(apiManage + '/gameUser/config/list', {
+    // return request(apiManage + '/gameUser/config/list', {
+    //     method: 'POST',
+    //     data
+    // });
+    return request(wapi + '/gameUserConfig/list', {
         method: 'POST',
         data
     });
-//     return request('/role/validRoleConfig/list', {
-//         method: 'POST',
-//         data
-//     });
 }
 
 interface AeGameServerProps {
@@ -480,7 +480,17 @@ interface AeGameServerProps {
  * @returns 
  */
 export async function aeGameUserConfigApi(data: AeGameServerProps) {
-    return request(apiManage + '/gameUser/config/add/or/update', {
+    // return request(apiManage + '/gameUser/config/add/or/update', {
+    //     method: 'POST',
+    //     data
+    // });
+    if (data?.id) { // 修改
+        return request(wapi + '/gameUserConfig/update', {
+            method: 'POST',
+            data
+        });
+    }
+    return request(wapi + '/gameUserConfig/create', {
         method: 'POST',
         data
     });
@@ -492,8 +502,12 @@ export async function aeGameUserConfigApi(data: AeGameServerProps) {
  * @returns 
  */
 export async function delGameUserConfigApi(params: { id: number }) {
-    return request(apiManage + '/gameUser/config/delete', {
-        method: 'DELETE',
+    // return request(apiManage + '/gameUser/config/delete', {
+    //     method: 'DELETE',
+    //     params
+    // });
+    return request(wapi + '/gameUserConfig/delete', {
+        method: 'POST',
         params
     });
 }