mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-21 15:00:28 +08:00
Compare commits
1 Commits
30459741d4
...
refactor/f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c31f9245ed |
@@ -6,7 +6,8 @@ export default defineFakeRoute([
|
||||
method: "post",
|
||||
response: () => {
|
||||
return {
|
||||
success: true,
|
||||
code: 0,
|
||||
message: "操作成功",
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { http } from "@/utils/http";
|
||||
|
||||
type Result = {
|
||||
success: boolean;
|
||||
code: number;
|
||||
message: string;
|
||||
data?: {
|
||||
/** 列表数据 */
|
||||
list: Array<any>;
|
||||
|
||||
@@ -38,12 +38,14 @@ const dataLoading = ref(true);
|
||||
|
||||
const getCardListData = async () => {
|
||||
try {
|
||||
const { data } = await getCardList();
|
||||
productList.value = data.list;
|
||||
pagination.value = {
|
||||
...pagination.value,
|
||||
total: data.list.length
|
||||
};
|
||||
const { code, data } = await getCardList();
|
||||
if (code === 0) {
|
||||
productList.value = data.list;
|
||||
pagination.value = {
|
||||
...pagination.value,
|
||||
total: data.list.length
|
||||
};
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user