Ver Fonte

游戏分组

ith5 há 6 meses atrás
pai
commit
4ffdd1bd50
1 ficheiros alterados com 11 adições e 12 exclusões
  1. 11 12
      src/views/v1/center/gameGroup/edit.vue

+ 11 - 12
src/views/v1/center/gameGroup/edit.vue

@@ -87,28 +87,26 @@ const open = async (type = "add") => {
 
 // 初始化页面数据
 const initPage = async () => {
-  if (mode.value === "add") {
+  if (mode.value == "add") {
     await getGameListOptionsByGroupApi();
-  } else {
-    await getGameList();
   }
 };
 
 // 新增显示的游戏列表
-const getGameListOptionsByGroupApi = async () => {
-  const resp = await commonApi.getGameListOptionsByGroupApi();
+const getGameListOptionsByGroupApi = async (params) => {
+  const resp = await commonApi.getGameListOptionsByGroupApi(params);
   if (resp.code === 200) {
     gameOptions.value = resp.data;
   }
 };
 
-// 获取游戏列表
-const getGameList = async () => {
-  const resp = await commonApi.getGameListTreeNoAuthApi();
-  if (resp.code === 200) {
-    gameOptions.value = resp.data;
-  }
-};
+// // 获取游戏列表
+// const getGameList = async () => {
+//   const resp = await commonApi.getGameListTreeNoAuthApi();
+//   if (resp.code === 200) {
+//     gameOptions.value = resp.data;
+//   }
+// };
 
 // 设置数据
 const setFormData = async (data) => {
@@ -120,6 +118,7 @@ const setFormData = async (data) => {
       }
     }
   }
+  await getGameListOptionsByGroupApi({game_group_id:data.id});
 };
 
 // 数据保存