mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 13:56:45 +08:00
讲师管理bug
This commit is contained in:
@@ -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 ){
|
||||
|
||||
Reference in New Issue
Block a user