diff --git a/src/main/resources/static/assets/platform/js/tool/businessTool.js b/src/main/resources/static/assets/platform/js/tool/businessTool.js index d949c332..2e0b8c8f 100644 --- a/src/main/resources/static/assets/platform/js/tool/businessTool.js +++ b/src/main/resources/static/assets/platform/js/tool/businessTool.js @@ -3,7 +3,7 @@ const businessTool = { listUnion: (unionId = null) => { return commonUtil .axiosService() - .post("/open/common/unionOptions", { unionId }) + .post("/open/common/unionOptions", {unionId}) .then((resp) => { if (resp.code === 0) { return resp.data @@ -15,7 +15,7 @@ const businessTool = { listClub: (clubId = null) => { return commonUtil .axiosService() - .post("/open/common/clubOptions", { clubId }) + .post("/open/common/clubOptions", {clubId}) .then((resp) => { if (resp.code === 0) { return resp.data @@ -27,7 +27,19 @@ const businessTool = { listUnit(unionId = null) { return commonUtil .axiosService() - .post("/open/common/unitOptions", { unionId }) + .post("/open/common/unitOptions", {unionId}) + .then((resp) => { + if (resp.code === 0) { + return resp.data + } else { + return [] + } + }) + }, + listCLubByRole() { + return commonUtil + .axiosService() + .post("/platform/club/common/listClubByRole", {}) .then((resp) => { if (resp.code === 0) { return resp.data @@ -44,7 +56,7 @@ const businessTool = { getDictOptions(code = null) { return commonUtil .axiosService() - .post("/open/common/dictOptions", { code }) + .post("/open/common/dictOptions", {code}) .then((resp) => { if (resp.code === 0) { return resp.data @@ -61,7 +73,7 @@ const businessTool = { getAllDictOptions(code = null) { return commonUtil .axiosService() - .post("/open/common/dictAllOptions", { code }) + .post("/open/common/dictAllOptions", {code}) .then((resp) => { if (resp.code === 0) { return resp.data @@ -73,7 +85,7 @@ const businessTool = { getConfigKey(key) { return commonUtil .axiosService() - .post("/open/common/getConfigKey", { key }) + .post("/open/common/getConfigKey", {key}) .then((resp) => { if (resp.code === 0) { return resp.data