diff --git a/src/api/shop/shop.ts b/src/api/shop/shop.ts index 3c9e644..95c428c 100644 --- a/src/api/shop/shop.ts +++ b/src/api/shop/shop.ts @@ -98,6 +98,13 @@ export const getShopList = (params?: ShopQuery) => { }); }; +/** 获取商店列表 */ +export const getShopListApi = (params?: ShopQuery) => { + return http.request>('get', '/shop/shops/list', { + params + }); +}; + /** 获取商店详情 */ export const getShopById = (id: number) => { return http.request>('get', `/shop/shops/${id}`); diff --git a/src/views/cabinet/smart-cabinet-card/index.vue b/src/views/cabinet/smart-cabinet-card/index.vue index a98b5ac..1ff7b59 100644 --- a/src/views/cabinet/smart-cabinet-card/index.vue +++ b/src/views/cabinet/smart-cabinet-card/index.vue @@ -6,6 +6,7 @@ import { type PaginationProps } from "@pureadmin/table"; import { CommonUtils } from "@/utils/common"; import { useRouter } from "vue-router"; import { CabinetImgMap } from "@/utils/cabinetImgMap"; +import { getShopListApi, type ShopDTO } from "@/api/shop/shop"; import Search from "@iconify-icons/ep/search"; import Refresh from "@iconify-icons/ep/refresh"; @@ -27,11 +28,13 @@ const formRef = ref(); const modalVisible = ref(false); const searchFormParams = ref({ cabinetName: "", - cabinetType: null + cabinetType: null, + shopId: null }); const pageLoading = ref(false); const dataList = ref([]); +const shopList = ref([]); const pagination = ref({ total: 0, pageSize: 12, @@ -59,6 +62,15 @@ async function getList() { } } +async function getShopList() { + try { + const { data } = await getShopListApi(); + shopList.value = data; + } catch (error) { + console.error("获取店铺列表失败", error); + } +} + const resetForm = formEl => { if (!formEl) return; formEl.resetFields(); @@ -86,6 +98,7 @@ const handleViewDetail = (row: SmartCabinetDTO) => { onMounted(() => { getList(); + getShopList(); }); @@ -98,10 +111,9 @@ onMounted(() => { - - - - + + + diff --git a/src/views/shop/approvalCenter/index.vue b/src/views/shop/approvalCenter/index.vue new file mode 100644 index 0000000..e8cd5ce --- /dev/null +++ b/src/views/shop/approvalCenter/index.vue @@ -0,0 +1,307 @@ + + + + + + + \ No newline at end of file