feat(app): 初始化项目配置和页面结构
- 添加 .dockerignore 和 .env.example 配置文件 - 添加 .gitignore 忽略规则配置 - 创建服务端代理API路由(_file、_modules、_server) - 集成 Ant Design Vue 组件库并配置SSR样式提取 - 定义API响应类型封装 - 创建基础布局组件(blank、console) - 实现应用中心页面和组件(AppsCenter) - 添加文章列表测试页面 - 配置控制台导航菜单结构 - 实现控制台头部组件 - 创建联系页面表单
This commit is contained in:
106
app/api/shop/shopUser/index.ts
Normal file
106
app/api/shop/shopUser/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopUser, ShopUserParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询用户记录表
|
||||
*/
|
||||
export async function pageShopUser(params: ShopUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopUser>>>(
|
||||
MODULES_API_URL + '/shop/shop-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户记录表列表
|
||||
*/
|
||||
export async function listShopUser(params?: ShopUserParam) {
|
||||
const res = await request.get<ApiResult<ShopUser[]>>(
|
||||
MODULES_API_URL + '/shop/shop-user',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加用户记录表
|
||||
*/
|
||||
export async function addShopUser(data: ShopUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户记录表
|
||||
*/
|
||||
export async function updateShopUser(data: ShopUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户记录表
|
||||
*/
|
||||
export async function removeShopUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户记录表
|
||||
*/
|
||||
export async function removeBatchShopUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询用户记录表
|
||||
*/
|
||||
export async function getShopUser(id: number) {
|
||||
const res = await request.get<ApiResult<ShopUser>>(
|
||||
MODULES_API_URL + '/shop/shop-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
163
app/api/shop/shopUser/model/index.ts
Normal file
163
app/api/shop/shopUser/model/index.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 用户记录表
|
||||
*/
|
||||
export interface ShopUser {
|
||||
// 用户id
|
||||
userId?: number;
|
||||
// 用户类型 0个人用户 1企业用户 2其他
|
||||
type?: number;
|
||||
// 账号
|
||||
username?: string;
|
||||
// 密码
|
||||
password?: string;
|
||||
// 昵称
|
||||
nickname?: string;
|
||||
// 手机号
|
||||
phone?: string;
|
||||
// 性别 1男 2女
|
||||
sex?: number;
|
||||
// 职务
|
||||
position?: string;
|
||||
// 注册来源客户端 (APP、H5、MP-WEIXIN等)
|
||||
platform?: string;
|
||||
// 邮箱
|
||||
email?: string;
|
||||
// 邮箱是否验证, 0否, 1是
|
||||
emailVerified?: number;
|
||||
// 别名
|
||||
alias?: string;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 证件号码
|
||||
idCard?: string;
|
||||
// 出生日期
|
||||
birthday?: string;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 街道地址
|
||||
address?: string;
|
||||
// 经度
|
||||
longitude?: string;
|
||||
// 纬度
|
||||
latitude?: string;
|
||||
// 用户可用余额
|
||||
balance?: string;
|
||||
// 已提现金额
|
||||
cashedMoney?: string;
|
||||
// 用户可用积分
|
||||
points?: number;
|
||||
// 用户总支付的金额
|
||||
payMoney?: string;
|
||||
// 实际消费的金额(不含退款)
|
||||
expendMoney?: string;
|
||||
// 密码
|
||||
payPassword?: string;
|
||||
// 会员等级ID
|
||||
gradeId?: number;
|
||||
// 行业分类
|
||||
category?: string;
|
||||
// 个人简介
|
||||
introduction?: string;
|
||||
// 机构id
|
||||
organizationId?: number;
|
||||
// 会员分组ID
|
||||
groupId?: number;
|
||||
// 头像
|
||||
avatar?: string;
|
||||
// 背景图
|
||||
bgImage?: string;
|
||||
// 用户编码
|
||||
userCode?: string;
|
||||
// 是否已实名认证
|
||||
certification?: number;
|
||||
// 年龄
|
||||
age?: number;
|
||||
// 是否线下会员
|
||||
offline?: string;
|
||||
// 关注数
|
||||
followers?: number;
|
||||
// 粉丝数
|
||||
fans?: number;
|
||||
// 点赞数
|
||||
likes?: number;
|
||||
// 评论数
|
||||
commentNumbers?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 微信openid
|
||||
openid?: string;
|
||||
// 微信公众号openid
|
||||
officeOpenid?: string;
|
||||
// 微信unionID
|
||||
unionid?: string;
|
||||
// 客户端ID
|
||||
clientId?: string;
|
||||
// 不允许办卡
|
||||
notAllowVip?: string;
|
||||
// 是否管理员
|
||||
isAdmin?: string;
|
||||
// 是否企业管理员
|
||||
isOrganizationAdmin?: string;
|
||||
// 累计登录次数
|
||||
loginNum?: number;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 可管理的场馆
|
||||
merchants?: string;
|
||||
// 商户ID
|
||||
merchantId?: number;
|
||||
// 商户名称
|
||||
merchantName?: string;
|
||||
// 商户头像
|
||||
merchantAvatar?: string;
|
||||
// 第三方系统的用户ID
|
||||
uid?: number;
|
||||
// 专家角色
|
||||
expertType?: string;
|
||||
// 过期时间
|
||||
expireTime?: number;
|
||||
// 最后结算时间
|
||||
settlementTime?: string;
|
||||
// 资质
|
||||
aptitude?: string;
|
||||
// 行业类型(父级)
|
||||
industryParent?: string;
|
||||
// 行业类型(子级)
|
||||
industryChild?: string;
|
||||
// 头衔
|
||||
title?: string;
|
||||
// 安装的产品ID
|
||||
templateId?: number;
|
||||
// 插件安装状态(仅对超超管判断) 0未安装 1已安装
|
||||
installed?: number;
|
||||
// 特长
|
||||
speciality?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0在线, 1离线
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 注册时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户记录表搜索条件
|
||||
*/
|
||||
export interface ShopUserParam extends PageParam {
|
||||
userId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user