mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 20:36:45 +08:00
接口调整
This commit is contained in:
@@ -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: [],
|
||||
|
||||
Reference in New Issue
Block a user