diff --git a/.env.development b/.env.development index fc90eae..d0b36c9 100644 --- a/.env.development +++ b/.env.development @@ -6,11 +6,8 @@ VITE_APP_BASE_API=/dev-api # 接口地址 -# VITE_APP_API_URL=https://admintestpapi.sxczgkj.cn/ # 线上 VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 正式 -# VITE_APP_API_URL=https://api.youlai.tech # 线上 -# VITE_APP_API_URL=http://localhost:8989 # 本地 # WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss diff --git a/.env.production b/.env.production index 17729b6..72449c3 100644 --- a/.env.production +++ b/.env.production @@ -4,3 +4,14 @@ VITE_APP_BASE_API = '/prod-api' # WebSocket端点(可选) #VITE_APP_WS_ENDPOINT=wss://api.youlai.tech/ws + +# 接口地址 + +VITE_APP_API_URL=https://tapi.cashier.sxczgkj.cn/ # 正式 + + +# WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws +VITE_APP_WS_ENDPOINT=wss://sockets.sxczgkj.com/wss + +# 启用 Mock 服务 +VITE_MOCK_DEV_SERVER=false diff --git a/src/api/account/permission.ts b/src/api/account/permission.ts index 038b653..8530815 100644 --- a/src/api/account/permission.ts +++ b/src/api/account/permission.ts @@ -4,14 +4,14 @@ const baseURL = Account_BaseUrl + "/admin"; const ShopStaffApi = { // 获取店铺权限列表 getshopPermission() { - return request({ + return request({ url: `${baseURL}/shopPermission`, method: "get", }); }, // 获取员工对应的权限id getPermission(id: number | string) { - return request({ + return request({ url: `${baseURL}/shopStaff/permission`, method: "get", params: { id } @@ -20,3 +20,56 @@ const ShopStaffApi = { }; export default ShopStaffApi; + +/** + * 权限列表 + * + * CzgResult«List«ShopPermission»» + */ +export interface PermissionResonpseResponse { + code?: number | null; + data?: ShopPermission[] | null; + msg?: null | string; + [property: string]: any; +} + +/** +* 店铺权限 实体类。 +* +* ShopPermission +*/ +export interface ShopPermission { + children?: ShopPermission[] | null; + /** + * 权限code,为了区分采用汉语拼音 + */ + code?: null | string; + createTime?: null | string; + id: string; + /** + * 是否重要: 重要对应页面红色 + */ + isImportant?: number | null; + /** + * 权限名称 + */ + label?: null | string; + /** + * 层级 + */ + level?: number | null; + /** + * 上级ID + */ + parentId?: number | null; + /** + * 排序 + */ + sort?: number | null; + /** + * 权限类型:staff 员工, + */ + type?: null | string; + updateTime?: null | string; + [property: string]: any; +} \ No newline at end of file diff --git a/src/api/account/shopArea.ts b/src/api/account/shopArea.ts new file mode 100644 index 0000000..db9a4ea --- /dev/null +++ b/src/api/account/shopArea.ts @@ -0,0 +1,78 @@ +import request from "@/utils/request"; +import { Account_BaseUrl } from "@/api/config"; +const baseURL = Account_BaseUrl + "/admin/shopArea"; +const ShopStaffApi = { + getList(params: getListRequest) { + return request({ + url: `${baseURL}`, + method: "get", + params + }); + }, + add(data: addRequest) { + return request({ + url: `${baseURL}`, + method: "post", + data + }); + }, + edit(data: editRequest) { + return request({ + url: `${baseURL}`, + method: "put", + data + }); + }, + delete(id: string | number) { + return request({ + url: `${baseURL}`, + method: "delete", + data: { id } + }); + }, +}; + +export default ShopStaffApi; + +export interface getListRequest { + /** + * 区域名称 + */ + name?: string; + page?: string; + size?: string; + [property: string]: any; +} +/** + * ShopAreaEditDTO + */ +export interface editRequest { + /** + * id + */ + id: number | null; + /** + * 区域名称 + */ + name?: null | string; + /** + * 排序 + */ + sort?: number | null; + [property: string]: any; +} + +/** + * ShopAreaAddDTO + */ +export interface addRequest { + /** + * 区域名称 + */ + name: null | string; + /** + * 排序 + */ + sort?: number | null; + [property: string]: any; +} \ No newline at end of file diff --git a/src/components/CURD/PageModal.vue b/src/components/CURD/PageModal.vue index ef74130..78af5eb 100644 --- a/src/components/CURD/PageModal.vue +++ b/src/components/CURD/PageModal.vue @@ -1,9 +1,20 @@