接口调整

This commit is contained in:
yuping
2023-07-02 18:21:27 +08:00
parent 4e2ed3c456
commit 0e8341f980
14 changed files with 98 additions and 74 deletions

View File

@@ -141,7 +141,35 @@ export function useBoeUserListPage(_url, params = {}, init = true) {
fetch,
};
}
export function useNewRowsPageNoInit(_url, params) {
const state = reactive({
data: [],
total: 1,
pageNo: 1,
pages: 1,
loading: false
});
function reset() {
state.data = [];
state.loading = false;
}
function fetch() {
state.loading = true;
return request(unref(_url), unref(params)).then(r => {
state.data = r.data.list;
state.total = r.data.total;
state.loading = false;
});
}
return {
...toRefs(state),
fetch,
reset,
};
}
export function useRowsPageNoInit(_url, params) {
const state = reactive({
data: [],