增加版本管理页面,修改店铺添加地图组件使用
This commit is contained in:
108
src/api/account/common.ts
Normal file
108
src/api/account/common.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import request from "@/utils/request";
|
||||
const baseURL = "/account/admin/common";
|
||||
|
||||
const CommonApi = {
|
||||
/**
|
||||
* 上传文件
|
||||
*
|
||||
* @param formData
|
||||
*/
|
||||
upload(formData: FormData) {
|
||||
return request<any, uploadResponse>({
|
||||
url: `${baseURL}/upload`,
|
||||
method: "post",
|
||||
data: formData,
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
uploadFile(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
return request<any, FileInfo>({
|
||||
url: `${baseURL}/upload`,
|
||||
method: "post",
|
||||
data: formData,
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 下载文件
|
||||
* @param url
|
||||
* @param fileName
|
||||
*/
|
||||
download(url: string, fileName?: string) {
|
||||
return request({
|
||||
url: url,
|
||||
method: "get",
|
||||
responseType: "blob",
|
||||
}).then((res) => {
|
||||
const blob = new Blob([res.data]);
|
||||
const a = document.createElement("a");
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
a.href = url;
|
||||
a.download = fileName || "下载文件";
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
sms(data: smsRequest) {
|
||||
return request<any, smsResponse>({
|
||||
url: `${baseURL}/sms`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default CommonApi;
|
||||
|
||||
export interface smsRequest {
|
||||
/**
|
||||
* 验证码类型
|
||||
*/
|
||||
type: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
/**
|
||||
* 是否成功
|
||||
*
|
||||
* CzgResult«Boolean»
|
||||
*/
|
||||
export interface smsResponse {
|
||||
code?: number | null;
|
||||
data?: boolean | null;
|
||||
msg?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件API类型声明
|
||||
*/
|
||||
export interface FileInfo {
|
||||
/** 文件名 */
|
||||
name: string;
|
||||
/** 文件路径 */
|
||||
url: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*
|
||||
* CzgResult«String»
|
||||
*/
|
||||
export interface uploadResponse {
|
||||
code?: number | null;
|
||||
data?: null | string;
|
||||
msg?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
141
src/api/account/register.ts
Normal file
141
src/api/account/register.ts
Normal file
@@ -0,0 +1,141 @@
|
||||
import request from "@/utils/request";
|
||||
const baseURL = "account/admin/";
|
||||
|
||||
const RegisterApi = {
|
||||
/** 获取当前用户菜单列表*/
|
||||
getList(params: getListRequest) {
|
||||
return request<any, getListResponse>({
|
||||
url: `${baseURL}merchantRegister`,
|
||||
method: "get",
|
||||
params: params,
|
||||
});
|
||||
},
|
||||
/**生成激活码 */
|
||||
add(data: addRequest) {
|
||||
return request<any, getListResponse>({
|
||||
url: `${baseURL}merchantRegister`,
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default RegisterApi;
|
||||
|
||||
/** 请求激活码列表参数 */
|
||||
export interface getListRequest {
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
endTime?: string;
|
||||
page: number;
|
||||
size: number;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
startTime?: string;
|
||||
/**
|
||||
* 状态 0未激活 1已激活
|
||||
*/
|
||||
state?: number;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活码列表
|
||||
*
|
||||
* CzgResult«Page«MerchantRegister»»
|
||||
*/
|
||||
export interface getListResponse {
|
||||
code?: number | null;
|
||||
data?: PageMerchantRegister;
|
||||
msg?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Page«MerchantRegister»
|
||||
*/
|
||||
export interface PageMerchantRegister {
|
||||
/**
|
||||
* 每页数据数量最大限制。
|
||||
*/
|
||||
maxPageSize?: number | null;
|
||||
/**
|
||||
* 是否优化分页查询 COUNT 语句。
|
||||
*/
|
||||
optimizeCountQuery?: boolean | null;
|
||||
/**
|
||||
* 当前页码。
|
||||
*/
|
||||
pageNumber?: number | null;
|
||||
/**
|
||||
* 每页数据数量。
|
||||
*/
|
||||
pageSize?: number | null;
|
||||
/**
|
||||
* 当前页数据。
|
||||
*/
|
||||
records?: MerchantRegister[] | null;
|
||||
/**
|
||||
* 总页数。
|
||||
*/
|
||||
totalPage?: number | null;
|
||||
/**
|
||||
* 总数据数量。
|
||||
*/
|
||||
totalRow?: number | null;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活码 实体类。
|
||||
*
|
||||
* MerchantRegister
|
||||
*/
|
||||
export interface MerchantRegister {
|
||||
/**
|
||||
* 激活码金额
|
||||
*/
|
||||
amount?: number | null;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: null | string;
|
||||
id?: number | null;
|
||||
/**
|
||||
* 激活时长(月)
|
||||
*/
|
||||
periodMonth?: number | null;
|
||||
/**
|
||||
* 激活码
|
||||
*/
|
||||
registerCode?: null | string;
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
shopId?: null | string;
|
||||
/**
|
||||
* 状态0未使用1已使用
|
||||
*/
|
||||
status?: number | null;
|
||||
updateTime?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活码信息
|
||||
*
|
||||
* MerchantRegisterDTO
|
||||
*/
|
||||
export interface addRequest {
|
||||
/**
|
||||
* 生成数量
|
||||
*/
|
||||
num: number | null;
|
||||
/**
|
||||
* 激活时长
|
||||
*/
|
||||
periodMonth: number | null;
|
||||
[property: string]: any;
|
||||
}
|
||||
228
src/api/account/role.ts
Normal file
228
src/api/account/role.ts
Normal file
@@ -0,0 +1,228 @@
|
||||
import request from "@/utils/request";
|
||||
const baseURL = "account/admin/role";
|
||||
|
||||
const RoleApi = {
|
||||
/** 获取当前用户菜单列表*/
|
||||
getList(params: getListRequest) {
|
||||
return request<any, getListResponse>({
|
||||
url: `${baseURL}/list`,
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
},
|
||||
add(data: addRequest) {
|
||||
return request<any, addResponse>({
|
||||
url: `${baseURL}`,
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
},
|
||||
update(data: editRequest) {
|
||||
return request<any, editResponse>({
|
||||
url: `${baseURL}`,
|
||||
method: "put",
|
||||
data,
|
||||
});
|
||||
},
|
||||
delete(data: delRequest) {
|
||||
return request<any, delResponse>({
|
||||
url: `${baseURL}`,
|
||||
method: "put",
|
||||
data,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default RoleApi;
|
||||
|
||||
/** getList start*/
|
||||
export interface getListRequest {
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
endTime?: string;
|
||||
/**
|
||||
* 角色名称或描述
|
||||
*/
|
||||
key?: string;
|
||||
page: number;
|
||||
size: number;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
startTime?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页参数
|
||||
*
|
||||
* CzgResult«Page«SysRole»»
|
||||
*/
|
||||
export interface getListResponse {
|
||||
code?: number | null;
|
||||
data?: PageSysRole;
|
||||
msg?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Page«SysRole»
|
||||
*/
|
||||
export interface PageSysRole {
|
||||
maxPageSize?: number | null;
|
||||
optimizeCountQuery?: boolean | null;
|
||||
pageNumber?: number | null;
|
||||
pageSize?: number | null;
|
||||
records?: SysRole[] | null;
|
||||
totalPage?: number | null;
|
||||
totalRow?: number | null;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* 角色表 实体类。
|
||||
*
|
||||
* SysRole
|
||||
*/
|
||||
export interface SysRole {
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
createTime?: null | string;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
description?: null | string;
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
id?: number | null;
|
||||
/**
|
||||
* 角色级别
|
||||
*/
|
||||
level?: number | null;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
name?: null | string;
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
shopId?: number | null;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
updateTime?: null | string;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
/** getList end*/
|
||||
|
||||
/** add start*/
|
||||
/**
|
||||
* 角色信息
|
||||
*
|
||||
* RoleAddDTO
|
||||
*/
|
||||
export interface addRequest {
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
description?: null | string;
|
||||
/**
|
||||
* 角色等级
|
||||
*/
|
||||
level?: number | null;
|
||||
/**
|
||||
* 菜单id集合
|
||||
*/
|
||||
menuIdList: number[] | null;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
name: null | string;
|
||||
[property: string]: any;
|
||||
id?: number | null;
|
||||
}
|
||||
/**
|
||||
* 是否成功
|
||||
*
|
||||
* CzgResult«Boolean»
|
||||
*/
|
||||
export interface addResponse {
|
||||
code?: number | null;
|
||||
data?: boolean | null;
|
||||
msg?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
/**add end */
|
||||
|
||||
/** edit start*/
|
||||
/**
|
||||
* 角色信息
|
||||
*
|
||||
* RoleEditDTO
|
||||
*/
|
||||
export interface editRequest {
|
||||
description?: null | string;
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
id: number | null;
|
||||
/**
|
||||
* 角色等级
|
||||
*/
|
||||
level?: number | null;
|
||||
menuIdList: number[] | null;
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
name: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
/**
|
||||
* 是否成功
|
||||
*
|
||||
* CzgResult«Boolean»
|
||||
*/
|
||||
export interface editResponse {
|
||||
code?: number | null;
|
||||
data?: boolean | null;
|
||||
msg?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
/** edit end */
|
||||
/** delete start*/
|
||||
/**
|
||||
* 角色信息
|
||||
*
|
||||
* RoleRemoveDTO
|
||||
*/
|
||||
export interface delRequest {
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
id: number | null;
|
||||
[property: string]: any;
|
||||
}
|
||||
/**
|
||||
* 是否成功
|
||||
*
|
||||
* CzgResult«Boolean»
|
||||
*/
|
||||
export interface delResponse {
|
||||
code?: number | null;
|
||||
data?: boolean | null;
|
||||
msg?: null | string;
|
||||
[property: string]: any;
|
||||
}
|
||||
/** delete end */
|
||||
Reference in New Issue
Block a user