讲师管理bug

This commit is contained in:
zhangsir
2024-11-26 19:21:13 +08:00
parent 67c904c693
commit 62688a0185
16 changed files with 100 additions and 55 deletions

View File

@@ -29,7 +29,7 @@ export const USER_LIST_PAGE = "/admin/thirdApi/user/list";
export const USER_LIST = "/admin/thirdApi/user/list";
export const ORG_LIST = "/admin/thirdApi/org/list";
export const ORG_CHILD_LIST = "/admin/thirdApi/org/info";
export const USER_LIST_NEW = '/xboe/teacher/name'
export const USER_LIST_NEW = '/admin/teacher/selectTeacher'
export const AUDIENCE_LIST = "/admin/thirdApi/audience/userAudiences";
export const USER_PERMISSION = "/admin/thirdApi/permission/listByUser";
export const VALIDATE_TOKEN = "/admin/thirdApi/validateToken";

View File

@@ -1,6 +1,7 @@
import http from "./config";
// 列表查看归属组织
export const queryTrainOrg = (obj) => http.get( '/admin/affiliation/list', {params: obj})
export const queryTrainOrgPor = (obj) => http.get( '/admin/affiliation/getAapprovallist', {params: obj})
//新增归属组织
export const addReviewer = (obj) => http.post('/admin/affiliation/addAffiliation', obj)
// 删除归属组织

View File

@@ -360,17 +360,18 @@ export function usePage(_url, params, init = true,listing = false) {
...params
});
watch(() => params.keyword, throttle(fetch, 600));
watch(() => params.name, throttle(fetch, 600));
watch(() => params.page, fetch);
function fetch() {
state.loading = true;
if (!params.keyword) {
if (!params.name) {
state.loading = false;
return;
}
return request(_url, params).then(r => {
state.data = params.pageNo === 1 ? r.data.list : [...state.data, ...r.data.list];
console.log(r,'rrrrrrrrrrrrrrrr')
state.data = params.pageNo === 1 ? r.data : [...state.data, ...r.data];
state.totalPage = r.data.total/10 || 1;
state.total = r.data.total;
state.loading = false;
@@ -497,7 +498,7 @@ export async function request(_url, params) {
}).then(res => {
return JSONBigIntStr.parse(res);
}).then(res => {
if (res.code === 0 || res.code === 200) {
if (res.code === 0 || res.code === 200 || res.status === 200) {
return res;
}
if (res.code === 4 ){