feat(app): 初始化项目配置和页面结构
- 添加 .dockerignore 和 .env.example 配置文件 - 添加 .gitignore 忽略规则配置 - 创建服务端代理API路由(_file、_modules、_server) - 集成 Ant Design Vue 组件库并配置SSR样式提取 - 定义API响应类型封装 - 创建基础布局组件(blank、console) - 实现应用中心页面和组件(AppsCenter) - 添加文章列表测试页面 - 配置控制台导航菜单结构 - 实现控制台头部组件 - 创建联系页面表单
This commit is contained in:
15
.dockerignore
Normal file
15
.dockerignore
Normal file
@@ -0,0 +1,15 @@
|
||||
.git
|
||||
.idea
|
||||
.nuxt
|
||||
.output
|
||||
node_modules
|
||||
|
||||
.env
|
||||
.env.*
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
归档.zip
|
||||
12
.env.example
Normal file
12
.env.example
Normal file
@@ -0,0 +1,12 @@
|
||||
# Tenant / headers
|
||||
# - TenantId header will be sent on every request.
|
||||
# - Authorization header is taken from client storage (AccessToken) and forwarded by the Nuxt proxy.
|
||||
NUXT_PUBLIC_TENANT_ID=10398
|
||||
|
||||
# Upstream APIs (required)
|
||||
NUXT_PUBLIC_SERVER_API_BASE=https://server.websoft.top/api
|
||||
NUXT_PUBLIC_MODULES_API_BASE=https://cms-api.websoft.top/api
|
||||
|
||||
# Optional (only if file server is not the same origin as SERVER_API_BASE)
|
||||
# Defaults to the origin of `NUXT_PUBLIC_SERVER_API_BASE` (e.g. https://server.websoft.top)
|
||||
# NUXT_PUBLIC_FILE_SERVER_BASE=https://file.wsdns.cn
|
||||
26
.gitignore
vendored
Normal file
26
.gitignore
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
# Nuxt dev/build outputs
|
||||
.output
|
||||
.data
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
dist
|
||||
|
||||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
.pm2
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
/.npm-cache/
|
||||
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
ARG NODE_VERSION=20.19.0
|
||||
|
||||
FROM node:${NODE_VERSION}-slim AS build
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=development \
|
||||
NUXT_TELEMETRY_DISABLED=1
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
COPY scripts ./scripts
|
||||
|
||||
RUN npm ci --ignore-scripts
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm rebuild
|
||||
RUN npm run postinstall
|
||||
RUN npm run build
|
||||
|
||||
FROM node:${NODE_VERSION}-slim AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production \
|
||||
HOST=0.0.0.0 \
|
||||
PORT=3000 \
|
||||
NUXT_TELEMETRY_DISABLED=1
|
||||
|
||||
COPY --from=build /app/.output ./.output
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
193
README.md
Normal file
193
README.md
Normal file
@@ -0,0 +1,193 @@
|
||||
<div align="center">
|
||||
<h1>🌐 WebSoftAdmin</h1>
|
||||
<p><strong>基于 Vue 3 + Ant Design Vue 的企业级后台管理系统</strong></p>
|
||||
|
||||
<p>
|
||||
<img src="https://img.shields.io/badge/Vue-3.x-4FC08D" alt="Vue">
|
||||
<img src="https://img.shields.io/badge/Ant%20Design%20Vue-3.x-1890FF" alt="Ant Design Vue">
|
||||
<img src="https://img.shields.io/badge/TypeScript-4.x-3178C6" alt="TypeScript">
|
||||
<img src="https://img.shields.io/badge/Vite-4.x-646CFF" alt="Vite">
|
||||
<img src="https://img.shields.io/badge/License-MIT-blue" alt="License">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## 📖 项目简介
|
||||
|
||||
WebSoftAdmin 是一个基于 **Vue 3 + Ant Design Vue** 构建的现代化企业级后台管理系统,采用最新的前端技术栈:
|
||||
|
||||
- **前端框架**:Vue 3 + TypeScript + Vite
|
||||
- **UI 组件库**:Ant Design Vue 3.x
|
||||
- **富文本编辑器**:TinyMCE(支持图片/视频上传、一键排版)
|
||||
- **图表库**:ECharts + G2
|
||||
- **工具库**:Lodash、Day.js、CryptoJS
|
||||
|
||||
|
||||
|
||||
## 项目演示
|
||||
| 后台管理系统 | https://mp.websoft.top |
|
||||
|--------|-------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 账号密码 | [立即注册](https://mp.websoft.top/register/?inviteCode=github) |
|
||||
| 关注公众号 |  |
|
||||
|
||||
|
||||
|
||||
|
||||
## 🛠️ 技术栈
|
||||
|
||||
### 核心技术
|
||||
| 技术 | 版本 | 说明 |
|
||||
|------|------|------|
|
||||
| Vue | 3.x | 渐进式 JavaScript 框架 |
|
||||
| TypeScript | 4.x | JavaScript 的超集 |
|
||||
| Vite | 4.x | 下一代前端构建工具 |
|
||||
| Ant Design Vue | 3.2.11 | 企业级 UI 设计语言 |
|
||||
| EleAdmin Pro | 1.10.1 | 企业级组件库 |
|
||||
|
||||
### 功能组件
|
||||
- **TinyMCE** - 富文本编辑器,支持图片/视频上传
|
||||
- **ECharts** - 数据可视化图表库
|
||||
- **CropperJS** - 图片裁剪组件
|
||||
- **ExcelJS** - Excel 文件处理
|
||||
- **Ali OSS** - 阿里云对象存储
|
||||
|
||||
## 📋 环境要求
|
||||
|
||||
### 基础环境
|
||||
- 🟢 **Node.js 16+**
|
||||
- 📦 **npm 8+ / yarn 1.22+**
|
||||
- 🌐 **现代浏览器**(Chrome 63+、Firefox、Safari、Edge)
|
||||
|
||||
### 开发工具
|
||||
- **推荐**:VS Code / WebStorm
|
||||
- **插件**:Vetur / Volar(Vue 3 支持)
|
||||
|
||||
## 🚀 快速开始
|
||||
|
||||
### 1. 克隆项目
|
||||
```bash
|
||||
git clone https://github.com/websoft-top/mp-vue.git
|
||||
cd mp-vue
|
||||
```
|
||||
|
||||
### 2. 安装依赖
|
||||
```bash
|
||||
# 使用 npm
|
||||
npm install
|
||||
|
||||
# 或使用 yarn
|
||||
yarn install
|
||||
```
|
||||
|
||||
### 3. 配置环境变量
|
||||
```bash
|
||||
# 复制环境变量示例文件
|
||||
cp .env.example .env
|
||||
|
||||
# 编辑 .env 文件,填入您的配置信息
|
||||
# 注意:请不要将 .env 文件提交到版本控制系统
|
||||
```
|
||||
|
||||
### 4. 启动开发服务器
|
||||
```bash
|
||||
# 开发模式
|
||||
npm run dev
|
||||
|
||||
# 或
|
||||
yarn dev
|
||||
```
|
||||
|
||||
访问 `http://localhost:3000` 即可看到管理后台。
|
||||
|
||||
### 5. 构建生产版本
|
||||
```bash
|
||||
# 生产构建
|
||||
npm run build
|
||||
|
||||
# 预览构建结果
|
||||
npm run serve
|
||||
```
|
||||
|
||||
## 🧩 常见问题
|
||||
|
||||
### ERROR: EMFILE: too many open files, watch
|
||||
|
||||
- 项目已在 `nuxt.config.ts` 中配置忽略 `node_modules/.nuxt/.output` 等目录以减少监听数量。
|
||||
- 若仍出现该错误,可在启动前临时提高文件句柄上限后重试:`ulimit -n 8192 && npm run dev`。
|
||||
|
||||
## ⚙️ 环境变量配置
|
||||
|
||||
项目使用环境变量来管理敏感信息和配置。请按照以下步骤配置:
|
||||
|
||||
### 必需配置
|
||||
```bash
|
||||
# API 配置
|
||||
VITE_API_URL=https://your-api.com/api # 后端 API 地址
|
||||
VITE_SERVER_API_URL=https://your-server.com/api # 服务端 API 地址
|
||||
VITE_FILE_SERVER=https://your-file-server.com # 文件服务器地址
|
||||
|
||||
# 应用配置
|
||||
VITE_APP_SECRET=your_app_secret # 应用密钥
|
||||
VITE_TENANT_ID=your_tenant_id # 租户 ID
|
||||
```
|
||||
|
||||
### 可选配置
|
||||
```bash
|
||||
# 高德地图 (如需使用地图功能)
|
||||
VITE_MAP_KEY=your_map_key # 高德地图 Key
|
||||
VITE_MAP_CODE=your_map_security_code # 高德地图安全密钥
|
||||
|
||||
# WebSoftAdmin 授权 (商业版功能)
|
||||
VITE_LICENSE_CODE=your_license_code # 授权码
|
||||
```
|
||||
|
||||
### 获取配置信息
|
||||
- **高德地图密钥**:访问 [高德开放平台](https://lbs.amap.com/) 申请
|
||||
- **WebSoftAdmin 授权码**:联系 [官方网站](https://websoft.top/) 获取
|
||||
- **其他 API 配置**:根据您的后端服务配置
|
||||
|
||||
## 🎯 核心功能
|
||||
|
||||
### 📝 内容管理系统
|
||||
- **文章管理**:支持富文本编辑、图片/视频上传
|
||||
- **一键排版**:智能文章格式优化,包含10种专业排版样式
|
||||
- **媒体库**:图片/视频文件管理,支持分组和搜索
|
||||
- **首行缩进**:中文段落格式智能切换
|
||||
|
||||
### 🛒 商城管理
|
||||
- **商品管理**:商品信息编辑、规格设置
|
||||
- **订单管理**:订单流程跟踪
|
||||
- **库存管理**:商品库存监控
|
||||
|
||||
### 👥 用户权限
|
||||
- **用户管理**:用户信息维护
|
||||
- **角色权限**:基于角色的访问控制
|
||||
- **菜单管理**:动态菜单配置
|
||||
|
||||
## 🎨 富文本编辑器特色功能
|
||||
|
||||
### 📸 媒体上传
|
||||
- **图片上传**:支持拖拽、粘贴、文件选择
|
||||
- **视频上传**:支持多种视频格式
|
||||
- **媒体库**:统一的媒体文件管理
|
||||
- **OSS 存储**:阿里云对象存储集成
|
||||
|
||||
### ✨ 智能排版
|
||||
- **一键排版**:10种专业排版优化
|
||||
- **首行缩进**:中文段落格式切换
|
||||
- **样式优化**:标题、段落、列表、表格等元素美化
|
||||
- **响应式**:适配不同屏幕尺寸
|
||||
|
||||
## 🏗️ 项目结构
|
||||
|
||||
```
|
||||
src/
|
||||
├── components/ # 公共组件
|
||||
├── views/ # 页面组件
|
||||
│ ├── cms/ # 内容管理
|
||||
│ ├── shop/ # 商城管理
|
||||
│ └── system/ # 系统管理
|
||||
├── router/ # 路由配置
|
||||
├── store/ # 状态管理
|
||||
├── utils/ # 工具函数
|
||||
└── assets/ # 静态资源
|
||||
```
|
||||
106
app/api/bszx/bszxBm/index.ts
Normal file
106
app/api/bszx/bszxBm/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxBm, BszxBmParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-报名记录
|
||||
*/
|
||||
export async function pageBszxBm(params: BszxBmParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BszxBm>>>(
|
||||
MODULES_API_URL + '/bszx/bszx-bm/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询百色中学-报名记录列表
|
||||
*/
|
||||
export async function listBszxBm(params?: BszxBmParam) {
|
||||
const res = await request.get<ApiResult<BszxBm[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-bm',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加百色中学-报名记录
|
||||
*/
|
||||
export async function addBszxBm(data: BszxBm) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-bm',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改百色中学-报名记录
|
||||
*/
|
||||
export async function updateBszxBm(data: BszxBm) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-bm',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除百色中学-报名记录
|
||||
*/
|
||||
export async function removeBszxBm(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-bm/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除百色中学-报名记录
|
||||
*/
|
||||
export async function removeBatchBszxBm(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-bm/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询百色中学-报名记录
|
||||
*/
|
||||
export async function getBszxBm(id: number) {
|
||||
const res = await request.get<ApiResult<BszxBm>>(
|
||||
MODULES_API_URL + '/bszx/bszx-bm/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
78
app/api/bszx/bszxBm/model/index.ts
Normal file
78
app/api/bszx/bszxBm/model/index.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 百色中学-报名记录
|
||||
*/
|
||||
export interface BszxBm {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 姓名
|
||||
name?: string;
|
||||
// 性别 1男 2女
|
||||
sex?: number;
|
||||
sexName?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 手机号码(脱敏)
|
||||
mobile?: string;
|
||||
// 捐款金额
|
||||
price?: string;
|
||||
// 分部ID
|
||||
branchId?: number;
|
||||
// 班级ID
|
||||
classId?: number;
|
||||
// 班级
|
||||
className?: string;
|
||||
// 年级
|
||||
gradeName?: string;
|
||||
// 居住地址
|
||||
address?: string;
|
||||
// 工作单位
|
||||
workUnit?: string;
|
||||
// 职务
|
||||
position?: string;
|
||||
// 是否能到场
|
||||
present?: string;
|
||||
// 年龄
|
||||
age?: number;
|
||||
// 人数
|
||||
number?: number;
|
||||
// 额外信息
|
||||
extra?: string;
|
||||
// 生成的邀请函存放路径
|
||||
certificate?: string;
|
||||
// 预定日期
|
||||
dateTime?: string;
|
||||
// 表单数据
|
||||
formData?: string;
|
||||
// 表单ID
|
||||
formId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 百色中学-报名记录搜索条件
|
||||
*/
|
||||
export interface BszxBmParam extends PageParam {
|
||||
id?: number;
|
||||
branchId?: number;
|
||||
gradeName?: string;
|
||||
className?: string;
|
||||
classId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/bszx/bszxBranch/index.ts
Normal file
106
app/api/bszx/bszxBranch/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxBranch, BszxBranchParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-分部
|
||||
*/
|
||||
export async function pageBszxBranch(params: BszxBranchParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BszxBranch>>>(
|
||||
MODULES_API_URL + '/bszx/bszx-branch/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询百色中学-分部列表
|
||||
*/
|
||||
export async function listBszxBranch(params?: BszxBranchParam) {
|
||||
const res = await request.get<ApiResult<BszxBranch[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-branch',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加百色中学-分部
|
||||
*/
|
||||
export async function addBszxBranch(data: BszxBranch) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-branch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改百色中学-分部
|
||||
*/
|
||||
export async function updateBszxBranch(data: BszxBranch) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-branch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除百色中学-分部
|
||||
*/
|
||||
export async function removeBszxBranch(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-branch/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除百色中学-分部
|
||||
*/
|
||||
export async function removeBatchBszxBranch(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-branch/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询百色中学-分部
|
||||
*/
|
||||
export async function getBszxBranch(id: number) {
|
||||
const res = await request.get<ApiResult<BszxBranch>>(
|
||||
MODULES_API_URL + '/bszx/bszx-branch/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
23
app/api/bszx/bszxBranch/model/index.ts
Normal file
23
app/api/bszx/bszxBranch/model/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 百色中学-分部
|
||||
*/
|
||||
export interface BszxBranch {
|
||||
// ID
|
||||
id?: number;
|
||||
// 分部名称
|
||||
name?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 百色中学-分部搜索条件
|
||||
*/
|
||||
export interface BszxBranchParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/bszx/bszxClass/index.ts
Normal file
106
app/api/bszx/bszxClass/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxClass, BszxClassParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-班级
|
||||
*/
|
||||
export async function pageBszxClass(params: BszxClassParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BszxClass>>>(
|
||||
MODULES_API_URL + '/bszx/bszx-class/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询百色中学-班级列表
|
||||
*/
|
||||
export async function listBszxClass(params?: BszxClassParam) {
|
||||
const res = await request.get<ApiResult<BszxClass[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-class',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加百色中学-班级
|
||||
*/
|
||||
export async function addBszxClass(data: BszxClass) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-class',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改百色中学-班级
|
||||
*/
|
||||
export async function updateBszxClass(data: BszxClass) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-class',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除百色中学-班级
|
||||
*/
|
||||
export async function removeBszxClass(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-class/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除百色中学-班级
|
||||
*/
|
||||
export async function removeBatchBszxClass(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-class/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询百色中学-班级
|
||||
*/
|
||||
export async function getBszxClass(id: number) {
|
||||
const res = await request.get<ApiResult<BszxClass>>(
|
||||
MODULES_API_URL + '/bszx/bszx-class/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
48
app/api/bszx/bszxClass/model/index.ts
Normal file
48
app/api/bszx/bszxClass/model/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 百色中学-班级
|
||||
*/
|
||||
export interface BszxClass {
|
||||
// ID
|
||||
id?: number;
|
||||
// 时代ID
|
||||
eraId?: number;
|
||||
// 年级ID
|
||||
gradeId?: number;
|
||||
// 年级
|
||||
gradeName?: string;
|
||||
// 班级
|
||||
className?: string;
|
||||
// 分部
|
||||
branch?: number;
|
||||
// 班级
|
||||
name?: string;
|
||||
// 累计捐款总金额
|
||||
totalMoney?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
value?: number;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 百色中学-班级搜索条件
|
||||
*/
|
||||
export interface BszxClassParam extends PageParam {
|
||||
id?: number;
|
||||
gradeId?: number;
|
||||
eraId?: number;
|
||||
branch?: number;
|
||||
name?: string;
|
||||
className?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/bszx/bszxEra/index.ts
Normal file
106
app/api/bszx/bszxEra/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxEra, BszxEraParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-年代
|
||||
*/
|
||||
export async function pageBszxEra(params: BszxEraParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BszxEra>>>(
|
||||
MODULES_API_URL + '/bszx/bszx-era/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询百色中学-年代列表
|
||||
*/
|
||||
export async function listBszxEra(params?: BszxEraParam) {
|
||||
const res = await request.get<ApiResult<BszxEra[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-era',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加百色中学-年代
|
||||
*/
|
||||
export async function addBszxEra(data: BszxEra) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-era',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改百色中学-年代
|
||||
*/
|
||||
export async function updateBszxEra(data: BszxEra) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-era',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除百色中学-年代
|
||||
*/
|
||||
export async function removeBszxEra(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-era/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除百色中学-年代
|
||||
*/
|
||||
export async function removeBatchBszxEra(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-era/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询百色中学-年代
|
||||
*/
|
||||
export async function getBszxEra(id: number) {
|
||||
const res = await request.get<ApiResult<BszxEra>>(
|
||||
MODULES_API_URL + '/bszx/bszx-era/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
21
app/api/bszx/bszxEra/model/index.ts
Normal file
21
app/api/bszx/bszxEra/model/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 百色中学-年代
|
||||
*/
|
||||
export interface BszxEra {
|
||||
// ID
|
||||
id?: number;
|
||||
// 年代
|
||||
name?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 百色中学-年代搜索条件
|
||||
*/
|
||||
export interface BszxEraParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/bszx/bszxGrade/index.ts
Normal file
106
app/api/bszx/bszxGrade/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxGrade, BszxGradeParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-年级
|
||||
*/
|
||||
export async function pageBszxGrade(params: BszxGradeParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BszxGrade>>>(
|
||||
MODULES_API_URL + '/bszx/bszx-grade/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询百色中学-年级列表
|
||||
*/
|
||||
export async function listBszxGrade(params?: BszxGradeParam) {
|
||||
const res = await request.get<ApiResult<BszxGrade[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-grade',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加百色中学-年级
|
||||
*/
|
||||
export async function addBszxGrade(data: BszxGrade) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-grade',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改百色中学-年级
|
||||
*/
|
||||
export async function updateBszxGrade(data: BszxGrade) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-grade',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除百色中学-年级
|
||||
*/
|
||||
export async function removeBszxGrade(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-grade/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除百色中学-年级
|
||||
*/
|
||||
export async function removeBatchBszxGrade(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-grade/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询百色中学-年级
|
||||
*/
|
||||
export async function getBszxGrade(id: number) {
|
||||
const res = await request.get<ApiResult<BszxGrade>>(
|
||||
MODULES_API_URL + '/bszx/bszx-grade/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
37
app/api/bszx/bszxGrade/model/index.ts
Normal file
37
app/api/bszx/bszxGrade/model/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 百色中学-年级
|
||||
*/
|
||||
export interface BszxGrade {
|
||||
// ID
|
||||
id?: number;
|
||||
// 年级
|
||||
name?: string;
|
||||
// 年代
|
||||
eraId?: number;
|
||||
// 分部
|
||||
branch?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
value?: number;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 百色中学-年级搜索条件
|
||||
*/
|
||||
export interface BszxGradeParam extends PageParam {
|
||||
id?: number;
|
||||
branch?: number;
|
||||
gradeId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
37
app/api/bszx/bszxOrder/index.ts
Normal file
37
app/api/bszx/bszxOrder/index.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model";
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-捐款记录
|
||||
*/
|
||||
export async function pageBszxOrder(params: ShopOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopOrder>>>(
|
||||
MODULES_API_URL + '/bszx/bszx-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 统计订单总金额(只统计有效订单)
|
||||
*/
|
||||
export async function bszxOrderTotal(params?: ShopOrderParam) {
|
||||
const res = await request.get<ApiResult<ShopOrder[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-order/total',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
121
app/api/bszx/bszxPay/index.ts
Normal file
121
app/api/bszx/bszxPay/index.ts
Normal file
@@ -0,0 +1,121 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxPay, BszxPayParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import {ShopOrder} from "@/api/shop/shopOrder/model";
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-捐款记录
|
||||
*/
|
||||
export async function pageBszxPay(params: BszxPayParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BszxPay>>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询百色中学-捐款记录列表
|
||||
*/
|
||||
export async function listBszxPay(params?: BszxPayParam) {
|
||||
const res = await request.get<ApiResult<BszxPay[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加百色中学-捐款记录
|
||||
*/
|
||||
export async function addBszxPay(data: BszxPay) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改百色中学-捐款记录
|
||||
*/
|
||||
export async function updateBszxPay(data: BszxPay) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除百色中学-捐款记录
|
||||
*/
|
||||
export async function removeBszxPay(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除百色中学-捐款记录
|
||||
*/
|
||||
export async function removeBatchBszxPay(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询百色中学-捐款记录
|
||||
*/
|
||||
export async function getBszxPay(id: number) {
|
||||
const res = await request.get<ApiResult<BszxPay>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*/
|
||||
export async function repairOrder(data: ShopOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay/repair',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
69
app/api/bszx/bszxPay/model/index.ts
Normal file
69
app/api/bszx/bszxPay/model/index.ts
Normal file
@@ -0,0 +1,69 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 百色中学-捐款记录
|
||||
*/
|
||||
export interface BszxPay {
|
||||
// ID
|
||||
id?: number;
|
||||
// 年龄
|
||||
age?: number;
|
||||
// 姓名
|
||||
name?: string;
|
||||
// 性别 1男 2女
|
||||
sex?: number;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 班级
|
||||
className?: string;
|
||||
// 年级
|
||||
gradeName?: string;
|
||||
// 居住地址
|
||||
address?: string;
|
||||
// 工作单位
|
||||
workUnit?: string;
|
||||
// 职务
|
||||
position?: string;
|
||||
// 数量
|
||||
number?: number;
|
||||
// 付费金额
|
||||
price?: string;
|
||||
// 额外信息
|
||||
extra?: string;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 预定日期
|
||||
dateTime?: string;
|
||||
// 捐赠证书
|
||||
certificate?: string;
|
||||
// 表单数据
|
||||
formData?: string;
|
||||
// 来源表ID
|
||||
formId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 百色中学-捐款记录搜索条件
|
||||
*/
|
||||
export interface BszxPayParam extends PageParam {
|
||||
id?: number;
|
||||
orderId?: number;
|
||||
orderNo?: string;
|
||||
gradeName?: string;
|
||||
className?: string;
|
||||
keywords?: string;
|
||||
}
|
||||
135
app/api/bszx/bszxPayRanking/index.ts
Normal file
135
app/api/bszx/bszxPayRanking/index.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { BszxPayRanking, BszxPayRankingParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
import {BszxClass, BszxClassParam} from "@/api/bszx/bszxClass/model";
|
||||
|
||||
/**
|
||||
* 分页查询百色中学-捐款排行
|
||||
*/
|
||||
export async function pageBszxPayRanking(params: BszxPayRankingParam) {
|
||||
const res = await request.get<ApiResult<PageResult<BszxPayRanking>>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询百色中学-捐款排行列表
|
||||
*/
|
||||
export async function listBszxPayRanking(params?: BszxPayRankingParam) {
|
||||
const res = await request.get<ApiResult<BszxPayRanking[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function ranking(params?: BszxPayRankingParam) {
|
||||
const res = await request.get<ApiResult<BszxPayRanking[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking/ranking',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function ranking2(params?: BszxClassParam) {
|
||||
const res = await request.get<ApiResult<BszxClass[]>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking/ranking2',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 添加百色中学-捐款排行
|
||||
*/
|
||||
export async function addBszxPayRanking(data: BszxPayRanking) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改百色中学-捐款排行
|
||||
*/
|
||||
export async function updateBszxPayRanking(data: BszxPayRanking) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除百色中学-捐款排行
|
||||
*/
|
||||
export async function removeBszxPayRanking(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除百色中学-捐款排行
|
||||
*/
|
||||
export async function removeBatchBszxPayRanking(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询百色中学-捐款排行
|
||||
*/
|
||||
export async function getBszxPayRanking(id: number) {
|
||||
const res = await request.get<ApiResult<BszxPayRanking>>(
|
||||
MODULES_API_URL + '/bszx/bszx-pay-ranking/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
app/api/bszx/bszxPayRanking/model/index.ts
Normal file
35
app/api/bszx/bszxPayRanking/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 百色中学-捐款排行
|
||||
*/
|
||||
export interface BszxPayRanking {
|
||||
// ID
|
||||
id?: number;
|
||||
// 来源表ID(项目名称)
|
||||
formId?: number;
|
||||
// 数量
|
||||
number?: number;
|
||||
// 获得捐款总金额
|
||||
totalPrice?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 百色中学-捐款排行搜索条件
|
||||
*/
|
||||
export interface BszxPayRankingParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicAppointment/index.ts
Normal file
105
app/api/clinic/clinicAppointment/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicAppointment, ClinicAppointmentParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询挂号
|
||||
*/
|
||||
export async function pageClinicAppointment(params: ClinicAppointmentParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicAppointment>>>(
|
||||
'/clinic/clinic-appointment/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询挂号列表
|
||||
*/
|
||||
export async function listClinicAppointment(params?: ClinicAppointmentParam) {
|
||||
const res = await request.get<ApiResult<ClinicAppointment[]>>(
|
||||
'/clinic/clinic-appointment',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加挂号
|
||||
*/
|
||||
export async function addClinicAppointment(data: ClinicAppointment) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-appointment',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改挂号
|
||||
*/
|
||||
export async function updateClinicAppointment(data: ClinicAppointment) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-appointment',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除挂号
|
||||
*/
|
||||
export async function removeClinicAppointment(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-appointment/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除挂号
|
||||
*/
|
||||
export async function removeBatchClinicAppointment(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-appointment/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询挂号
|
||||
*/
|
||||
export async function getClinicAppointment(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicAppointment>>(
|
||||
'/clinic/clinic-appointment/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
47
app/api/clinic/clinicAppointment/model/index.ts
Normal file
47
app/api/clinic/clinicAppointment/model/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 挂号
|
||||
*/
|
||||
export interface ClinicAppointment {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 类型
|
||||
type?: number;
|
||||
// 就诊原因
|
||||
reason?: string;
|
||||
// 挂号时间
|
||||
evaluateTime?: string;
|
||||
// 医生
|
||||
doctorId?: number;
|
||||
// 医生名称
|
||||
doctorName?: string;
|
||||
// 医生职位
|
||||
doctorPosition?: string;
|
||||
// 患者
|
||||
userId?: number;
|
||||
// 患者名称
|
||||
nickname?: string;
|
||||
// 患者联系电话
|
||||
phone?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除
|
||||
isDelete?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 挂号搜索条件
|
||||
*/
|
||||
export interface ClinicAppointmentParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicDoctorApply/index.ts
Normal file
105
app/api/clinic/clinicDoctorApply/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicDoctorApply, ClinicDoctorApplyParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询医生入驻申请
|
||||
*/
|
||||
export async function pageClinicDoctorApply(params: ClinicDoctorApplyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicDoctorApply>>>(
|
||||
'/clinic/clinic-doctor-apply/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询医生入驻申请列表
|
||||
*/
|
||||
export async function listClinicDoctorApply(params?: ClinicDoctorApplyParam) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorApply[]>>(
|
||||
'/clinic/clinic-doctor-apply',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加医生入驻申请
|
||||
*/
|
||||
export async function addClinicDoctorApply(data: ClinicDoctorApply) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改医生入驻申请
|
||||
*/
|
||||
export async function updateClinicDoctorApply(data: ClinicDoctorApply) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除医生入驻申请
|
||||
*/
|
||||
export async function removeClinicDoctorApply(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除医生入驻申请
|
||||
*/
|
||||
export async function removeBatchClinicDoctorApply(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-apply/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询医生入驻申请
|
||||
*/
|
||||
export async function getClinicDoctorApply(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorApply>>(
|
||||
'/clinic/clinic-doctor-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
75
app/api/clinic/clinicDoctorApply/model/index.ts
Normal file
75
app/api/clinic/clinicDoctorApply/model/index.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 医生入驻申请
|
||||
*/
|
||||
export interface ClinicDoctorApply {
|
||||
// 主键ID
|
||||
applyId?: number;
|
||||
// 类型 0医生
|
||||
type?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 姓名
|
||||
realName?: string;
|
||||
// 性别 1男 2女
|
||||
gender?: number;
|
||||
// 手机号
|
||||
mobile?: string;
|
||||
// 客户名称
|
||||
dealerName?: string;
|
||||
// 证件号码
|
||||
idCard?: string;
|
||||
// 生日
|
||||
birthDate?: string;
|
||||
// 区分职称等级(如主治医师、副主任医师)
|
||||
professionalTitle?: string;
|
||||
// 工作单位
|
||||
workUnit?: string;
|
||||
// 执业资格核心凭证
|
||||
practiceLicense?: string;
|
||||
// 限定可执业科室或疾病类型
|
||||
practiceScope?: string;
|
||||
// 开始工作时间
|
||||
startWorkDate?: string;
|
||||
// 简历
|
||||
resume?: string;
|
||||
// 使用 JSON 存储多个证件文件路径(如执业证、学历证)
|
||||
certificationFiles?: string;
|
||||
// 详细地址
|
||||
address?: string;
|
||||
// 签约价格
|
||||
money?: string;
|
||||
// 推荐人用户ID
|
||||
refereeId?: number;
|
||||
// 申请方式(10需后台审核 20无需审核)
|
||||
applyType?: number;
|
||||
// 审核状态 (10待审核 20审核通过 30驳回)
|
||||
applyStatus?: number;
|
||||
// 申请时间
|
||||
applyTime?: string;
|
||||
// 审核时间
|
||||
auditTime?: string;
|
||||
// 合同时间
|
||||
contractTime?: string;
|
||||
// 过期时间
|
||||
expirationTime?: string;
|
||||
// 驳回原因
|
||||
rejectReason?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 医生入驻申请搜索条件
|
||||
*/
|
||||
export interface ClinicDoctorApplyParam extends PageParam {
|
||||
applyId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicDoctorMedicalRecord/index.ts
Normal file
105
app/api/clinic/clinicDoctorMedicalRecord/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicDoctorMedicalRecord, ClinicDoctorMedicalRecordParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询医疗记录
|
||||
*/
|
||||
export async function pageClinicDoctorMedicalRecord(params: ClinicDoctorMedicalRecordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicDoctorMedicalRecord>>>(
|
||||
'/clinic/clinic-doctor-medical-record/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询医疗记录列表
|
||||
*/
|
||||
export async function listClinicDoctorMedicalRecord(params?: ClinicDoctorMedicalRecordParam) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorMedicalRecord[]>>(
|
||||
'/clinic/clinic-doctor-medical-record',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加医疗记录
|
||||
*/
|
||||
export async function addClinicDoctorMedicalRecord(data: ClinicDoctorMedicalRecord) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-medical-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改医疗记录
|
||||
*/
|
||||
export async function updateClinicDoctorMedicalRecord(data: ClinicDoctorMedicalRecord) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-medical-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除医疗记录
|
||||
*/
|
||||
export async function removeClinicDoctorMedicalRecord(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-medical-record/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除医疗记录
|
||||
*/
|
||||
export async function removeBatchClinicDoctorMedicalRecord(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-medical-record/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询医疗记录
|
||||
*/
|
||||
export async function getClinicDoctorMedicalRecord(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorMedicalRecord>>(
|
||||
'/clinic/clinic-doctor-medical-record/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
61
app/api/clinic/clinicDoctorMedicalRecord/model/index.ts
Normal file
61
app/api/clinic/clinicDoctorMedicalRecord/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 医疗记录
|
||||
*/
|
||||
export interface ClinicDoctorMedicalRecord {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 买家用户ID
|
||||
userId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 分销商用户id(一级)
|
||||
firstUserId?: number;
|
||||
// 分销商用户id(二级)
|
||||
secondUserId?: number;
|
||||
// 分销商用户id(三级)
|
||||
thirdUserId?: number;
|
||||
// 分销佣金(一级)
|
||||
firstMoney?: string;
|
||||
// 分销佣金(二级)
|
||||
secondMoney?: string;
|
||||
// 分销佣金(三级)
|
||||
thirdMoney?: string;
|
||||
// 单价
|
||||
price?: string;
|
||||
// 订单总金额
|
||||
orderPrice?: string;
|
||||
// 结算金额
|
||||
settledPrice?: string;
|
||||
// 换算成度
|
||||
degreePrice?: string;
|
||||
// 实发金额
|
||||
payPrice?: string;
|
||||
// 税率
|
||||
rate?: string;
|
||||
// 结算月份
|
||||
month?: string;
|
||||
// 订单是否失效(0未失效 1已失效)
|
||||
isInvalid?: number;
|
||||
// 佣金结算(0未结算 1已结算)
|
||||
isSettled?: number;
|
||||
// 结算时间
|
||||
settleTime?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 医疗记录搜索条件
|
||||
*/
|
||||
export interface ClinicDoctorMedicalRecordParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicDoctorUser/index.ts
Normal file
105
app/api/clinic/clinicDoctorUser/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicDoctorUser, ClinicDoctorUserParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询分销商用户记录表
|
||||
*/
|
||||
export async function pageClinicDoctorUser(params: ClinicDoctorUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicDoctorUser>>>(
|
||||
'/clinic/clinic-doctor-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分销商用户记录表列表
|
||||
*/
|
||||
export async function listClinicDoctorUser(params?: ClinicDoctorUserParam) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorUser[]>>(
|
||||
'/clinic/clinic-doctor-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 addClinicDoctorUser(data: ClinicDoctorUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分销商用户记录表
|
||||
*/
|
||||
export async function updateClinicDoctorUser(data: ClinicDoctorUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分销商用户记录表
|
||||
*/
|
||||
export async function removeClinicDoctorUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除分销商用户记录表
|
||||
*/
|
||||
export async function removeBatchClinicDoctorUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-doctor-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询分销商用户记录表
|
||||
*/
|
||||
export async function getClinicDoctorUser(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicDoctorUser>>(
|
||||
'/clinic/clinic-doctor-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
app/api/clinic/clinicDoctorUser/model/index.ts
Normal file
55
app/api/clinic/clinicDoctorUser/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 分销商用户记录表
|
||||
*/
|
||||
export interface ClinicDoctorUser {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 类型 0经销商 1企业 2集团
|
||||
type?: number;
|
||||
// 自增ID
|
||||
userId?: number;
|
||||
// 姓名
|
||||
realName?: string;
|
||||
// 手机号
|
||||
phone?: string;
|
||||
// 部门
|
||||
departmentId?: number;
|
||||
// 专业领域
|
||||
specialty?: string;
|
||||
// 职务级别
|
||||
position?: string;
|
||||
// 执业资格
|
||||
qualification?: string;
|
||||
// 医生简介
|
||||
introduction?: string;
|
||||
// 挂号费
|
||||
consultationFee?: string;
|
||||
// 工作年限
|
||||
workYears?: number;
|
||||
// 问诊人数
|
||||
consultationCount?: number;
|
||||
// 专属二维码
|
||||
qrcode?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除
|
||||
isDelete?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分销商用户记录表搜索条件
|
||||
*/
|
||||
export interface ClinicDoctorUserParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicMedicalHistory/index.ts
Normal file
105
app/api/clinic/clinicMedicalHistory/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicMedicalHistory, ClinicMedicalHistoryParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询病例
|
||||
*/
|
||||
export async function pageClinicMedicalHistory(params: ClinicMedicalHistoryParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicMedicalHistory>>>(
|
||||
'/clinic/clinic-medical-history/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询病例列表
|
||||
*/
|
||||
export async function listClinicMedicalHistory(params?: ClinicMedicalHistoryParam) {
|
||||
const res = await request.get<ApiResult<ClinicMedicalHistory[]>>(
|
||||
'/clinic/clinic-medical-history',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加病例
|
||||
*/
|
||||
export async function addClinicMedicalHistory(data: ClinicMedicalHistory) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medical-history',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改病例
|
||||
*/
|
||||
export async function updateClinicMedicalHistory(data: ClinicMedicalHistory) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medical-history',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除病例
|
||||
*/
|
||||
export async function removeClinicMedicalHistory(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medical-history/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除病例
|
||||
*/
|
||||
export async function removeBatchClinicMedicalHistory(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medical-history/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询病例
|
||||
*/
|
||||
export async function getClinicMedicalHistory(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicMedicalHistory>>(
|
||||
'/clinic/clinic-medical-history/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
61
app/api/clinic/clinicMedicalHistory/model/index.ts
Normal file
61
app/api/clinic/clinicMedicalHistory/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 病例
|
||||
*/
|
||||
export interface ClinicMedicalHistory {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 买家用户ID
|
||||
userId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 分销商用户id(一级)
|
||||
firstUserId?: number;
|
||||
// 分销商用户id(二级)
|
||||
secondUserId?: number;
|
||||
// 分销商用户id(三级)
|
||||
thirdUserId?: number;
|
||||
// 分销佣金(一级)
|
||||
firstMoney?: string;
|
||||
// 分销佣金(二级)
|
||||
secondMoney?: string;
|
||||
// 分销佣金(三级)
|
||||
thirdMoney?: string;
|
||||
// 单价
|
||||
price?: string;
|
||||
// 订单总金额
|
||||
orderPrice?: string;
|
||||
// 结算金额
|
||||
settledPrice?: string;
|
||||
// 换算成度
|
||||
degreePrice?: string;
|
||||
// 实发金额
|
||||
payPrice?: string;
|
||||
// 税率
|
||||
rate?: string;
|
||||
// 结算月份
|
||||
month?: string;
|
||||
// 订单是否失效(0未失效 1已失效)
|
||||
isInvalid?: number;
|
||||
// 佣金结算(0未结算 1已结算)
|
||||
isSettled?: number;
|
||||
// 结算时间
|
||||
settleTime?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 病例搜索条件
|
||||
*/
|
||||
export interface ClinicMedicalHistoryParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicMedicine/index.ts
Normal file
105
app/api/clinic/clinicMedicine/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicMedicine, ClinicMedicineParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询药品库
|
||||
*/
|
||||
export async function pageClinicMedicine(params: ClinicMedicineParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicMedicine>>>(
|
||||
'/clinic/clinic-medicine/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品库列表
|
||||
*/
|
||||
export async function listClinicMedicine(params?: ClinicMedicineParam) {
|
||||
const res = await request.get<ApiResult<ClinicMedicine[]>>(
|
||||
'/clinic/clinic-medicine',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加药品库
|
||||
*/
|
||||
export async function addClinicMedicine(data: ClinicMedicine) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品库
|
||||
*/
|
||||
export async function updateClinicMedicine(data: ClinicMedicine) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品库
|
||||
*/
|
||||
export async function removeClinicMedicine(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品库
|
||||
*/
|
||||
export async function removeBatchClinicMedicine(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询药品库
|
||||
*/
|
||||
export async function getClinicMedicine(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicMedicine>>(
|
||||
'/clinic/clinic-medicine/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
43
app/api/clinic/clinicMedicine/model/index.ts
Normal file
43
app/api/clinic/clinicMedicine/model/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 药品库
|
||||
*/
|
||||
export interface ClinicMedicine {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 药名
|
||||
name?: string;
|
||||
// 拼音
|
||||
pinyin?: string;
|
||||
// 分类(如“清热解毒”、“补气养血”)
|
||||
category?: string;
|
||||
// 规格(如“饮片”、“颗粒”)
|
||||
specification?: string;
|
||||
// 单位(如“克”、“袋”)
|
||||
unit?: string;
|
||||
// 描述
|
||||
content?: string;
|
||||
// 单价
|
||||
pricePerUnit?: string;
|
||||
// 是否活跃
|
||||
isActive?: number;
|
||||
// 买家用户ID
|
||||
userId?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 药品库搜索条件
|
||||
*/
|
||||
export interface ClinicMedicineParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicMedicineInout/index.ts
Normal file
105
app/api/clinic/clinicMedicineInout/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicMedicineInout, ClinicMedicineInoutParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询出入库
|
||||
*/
|
||||
export async function pageClinicMedicineInout(params: ClinicMedicineInoutParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicMedicineInout>>>(
|
||||
'/clinic/clinic-medicine-inout/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出入库列表
|
||||
*/
|
||||
export async function listClinicMedicineInout(params?: ClinicMedicineInoutParam) {
|
||||
const res = await request.get<ApiResult<ClinicMedicineInout[]>>(
|
||||
'/clinic/clinic-medicine-inout',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加出入库
|
||||
*/
|
||||
export async function addClinicMedicineInout(data: ClinicMedicineInout) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-inout',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出入库
|
||||
*/
|
||||
export async function updateClinicMedicineInout(data: ClinicMedicineInout) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-inout',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除出入库
|
||||
*/
|
||||
export async function removeClinicMedicineInout(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-inout/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出入库
|
||||
*/
|
||||
export async function removeBatchClinicMedicineInout(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-inout/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询出入库
|
||||
*/
|
||||
export async function getClinicMedicineInout(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicMedicineInout>>(
|
||||
'/clinic/clinic-medicine-inout/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
61
app/api/clinic/clinicMedicineInout/model/index.ts
Normal file
61
app/api/clinic/clinicMedicineInout/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 出入库
|
||||
*/
|
||||
export interface ClinicMedicineInout {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 买家用户ID
|
||||
userId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 分销商用户id(一级)
|
||||
firstUserId?: number;
|
||||
// 分销商用户id(二级)
|
||||
secondUserId?: number;
|
||||
// 分销商用户id(三级)
|
||||
thirdUserId?: number;
|
||||
// 分销佣金(一级)
|
||||
firstMoney?: string;
|
||||
// 分销佣金(二级)
|
||||
secondMoney?: string;
|
||||
// 分销佣金(三级)
|
||||
thirdMoney?: string;
|
||||
// 单价
|
||||
price?: string;
|
||||
// 订单总金额
|
||||
orderPrice?: string;
|
||||
// 结算金额
|
||||
settledPrice?: string;
|
||||
// 换算成度
|
||||
degreePrice?: string;
|
||||
// 实发金额
|
||||
payPrice?: string;
|
||||
// 税率
|
||||
rate?: string;
|
||||
// 结算月份
|
||||
month?: string;
|
||||
// 订单是否失效(0未失效 1已失效)
|
||||
isInvalid?: number;
|
||||
// 佣金结算(0未结算 1已结算)
|
||||
isSettled?: number;
|
||||
// 结算时间
|
||||
settleTime?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 出入库搜索条件
|
||||
*/
|
||||
export interface ClinicMedicineInoutParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicMedicineStock/index.ts
Normal file
105
app/api/clinic/clinicMedicineStock/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicMedicineStock, ClinicMedicineStockParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询药品库存
|
||||
*/
|
||||
export async function pageClinicMedicineStock(params: ClinicMedicineStockParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicMedicineStock>>>(
|
||||
'/clinic/clinic-medicine-stock/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品库存列表
|
||||
*/
|
||||
export async function listClinicMedicineStock(params?: ClinicMedicineStockParam) {
|
||||
const res = await request.get<ApiResult<ClinicMedicineStock[]>>(
|
||||
'/clinic/clinic-medicine-stock',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加药品库存
|
||||
*/
|
||||
export async function addClinicMedicineStock(data: ClinicMedicineStock) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-stock',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改药品库存
|
||||
*/
|
||||
export async function updateClinicMedicineStock(data: ClinicMedicineStock) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-stock',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除药品库存
|
||||
*/
|
||||
export async function removeClinicMedicineStock(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-stock/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除药品库存
|
||||
*/
|
||||
export async function removeBatchClinicMedicineStock(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-medicine-stock/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询药品库存
|
||||
*/
|
||||
export async function getClinicMedicineStock(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicMedicineStock>>(
|
||||
'/clinic/clinic-medicine-stock/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
app/api/clinic/clinicMedicineStock/model/index.ts
Normal file
35
app/api/clinic/clinicMedicineStock/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 药品库存
|
||||
*/
|
||||
export interface ClinicMedicineStock {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 药品
|
||||
medicineId?: number;
|
||||
// 库存数量
|
||||
stockQuantity?: number;
|
||||
// 最小库存预警
|
||||
minStockLevel?: number;
|
||||
// 上次更新时间
|
||||
lastUpdated?: string;
|
||||
// 买家用户ID
|
||||
userId?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 药品库存搜索条件
|
||||
*/
|
||||
export interface ClinicMedicineStockParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicOrder/index.ts
Normal file
105
app/api/clinic/clinicOrder/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicOrder, ClinicOrderParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询处方订单
|
||||
*/
|
||||
export async function pageClinicOrder(params: ClinicOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicOrder>>>(
|
||||
'/clinic/clinic-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询处方订单列表
|
||||
*/
|
||||
export async function listClinicOrder(params?: ClinicOrderParam) {
|
||||
const res = await request.get<ApiResult<ClinicOrder[]>>(
|
||||
'/clinic/clinic-order',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加处方订单
|
||||
*/
|
||||
export async function addClinicOrder(data: ClinicOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改处方订单
|
||||
*/
|
||||
export async function updateClinicOrder(data: ClinicOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除处方订单
|
||||
*/
|
||||
export async function removeClinicOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除处方订单
|
||||
*/
|
||||
export async function removeBatchClinicOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询处方订单
|
||||
*/
|
||||
export async function getClinicOrder(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicOrder>>(
|
||||
'/clinic/clinic-order/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
167
app/api/clinic/clinicOrder/model/index.ts
Normal file
167
app/api/clinic/clinicOrder/model/index.ts
Normal file
@@ -0,0 +1,167 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 处方订单
|
||||
*/
|
||||
export interface ClinicOrder {
|
||||
// 订单号
|
||||
orderId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 订单类型,0商城订单 1预定订单/外卖 2会员卡
|
||||
type?: number;
|
||||
// 订单标题
|
||||
title?: string;
|
||||
// 快递/自提
|
||||
deliveryType?: number;
|
||||
// 下单渠道,0小程序预定 1俱乐部训练场 3活动订场
|
||||
channel?: number;
|
||||
// 微信支付交易号号
|
||||
transactionId?: string;
|
||||
// 微信退款订单号
|
||||
refundOrder?: string;
|
||||
// 商户ID
|
||||
merchantId?: number;
|
||||
// 商户名称
|
||||
merchantName?: string;
|
||||
// 商户编号
|
||||
merchantCode?: string;
|
||||
// 使用的优惠券id
|
||||
couponId?: number;
|
||||
// 使用的会员卡id
|
||||
cardId?: string;
|
||||
// 关联管理员id
|
||||
adminId?: number;
|
||||
// 核销管理员id
|
||||
confirmId?: number;
|
||||
// IC卡号
|
||||
icCard?: string;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 关联收货地址
|
||||
addressId?: number;
|
||||
// 收货地址
|
||||
address?: string;
|
||||
//
|
||||
addressLat?: string;
|
||||
//
|
||||
addressLng?: string;
|
||||
// 买家留言
|
||||
buyerRemarks?: string;
|
||||
// 自提店铺id
|
||||
selfTakeMerchantId?: number;
|
||||
// 自提店铺
|
||||
selfTakeMerchantName?: string;
|
||||
// 配送开始时间
|
||||
sendStartTime?: string;
|
||||
// 配送结束时间
|
||||
sendEndTime?: string;
|
||||
// 发货店铺id
|
||||
expressMerchantId?: number;
|
||||
// 发货店铺
|
||||
expressMerchantName?: string;
|
||||
// 订单总额
|
||||
totalPrice?: string;
|
||||
// 减少的金额,使用VIP会员折扣、优惠券抵扣、优惠券折扣后减去的价格
|
||||
reducePrice?: string;
|
||||
// 实际付款
|
||||
payPrice?: string;
|
||||
// 用于统计
|
||||
price?: string;
|
||||
// 价钱,用于积分赠送
|
||||
money?: string;
|
||||
// 取消时间
|
||||
cancelTime?: string;
|
||||
// 取消原因
|
||||
cancelReason?: string;
|
||||
// 退款金额
|
||||
refundMoney?: string;
|
||||
// 教练价格
|
||||
coachPrice?: string;
|
||||
// 购买数量
|
||||
totalNum?: number;
|
||||
// 教练id
|
||||
coachId?: number;
|
||||
// 商品ID
|
||||
formId?: number;
|
||||
// 支付的用户id
|
||||
payUserId?: number;
|
||||
// 0余额支付,1微信支付,2支付宝支付,3银联支付,4现金支付,5POS机支付,6免费,7积分支付
|
||||
payType?: number;
|
||||
// 微信支付子类型:JSAPI小程序支付,NATIVE扫码支付
|
||||
wechatPayType?: string;
|
||||
// 0余额支付,1微信支付,2支付宝支付,3银联支付,4现金支付,5POS机支付,6免费,7积分支付
|
||||
friendPayType?: number;
|
||||
// 0未付款,1已付款
|
||||
payStatus?: string;
|
||||
// 0未使用,1已完成,2已取消,3取消中,4退款申请中,5退款被拒绝,6退款成功,7客户端申请退款
|
||||
orderStatus?: number;
|
||||
// 发货状态(10未发货 20已发货 30部分发货)
|
||||
deliveryStatus?: number;
|
||||
// 无需发货备注
|
||||
deliveryNote?: string;
|
||||
// 发货时间
|
||||
deliveryTime?: string;
|
||||
// 评价状态(0未评价 1已评价)
|
||||
evaluateStatus?: number;
|
||||
// 评价时间
|
||||
evaluateTime?: string;
|
||||
// 优惠类型:0无、1抵扣优惠券、2折扣优惠券、3、VIP月卡、4VIP年卡,5VIP次卡、6VIP会员卡、7IC月卡、8IC年卡、9IC次卡、10IC会员卡、11免费订单、12VIP充值卡、13IC充值卡、14VIP季卡、15IC季卡
|
||||
couponType?: number;
|
||||
// 优惠说明
|
||||
couponDesc?: string;
|
||||
// 二维码地址,保存订单号,支付成功后才生成
|
||||
qrcode?: string;
|
||||
// vip月卡年卡、ic月卡年卡回退次数
|
||||
returnNum?: number;
|
||||
// vip充值回退金额
|
||||
returnMoney?: string;
|
||||
// 预约详情开始时间数组
|
||||
startTime?: string;
|
||||
// 是否已开具发票:0未开发票,1已开发票,2不能开具发票
|
||||
isInvoice?: string;
|
||||
// 发票流水号
|
||||
invoiceNo?: string;
|
||||
// 商家留言
|
||||
merchantRemarks?: string;
|
||||
// 支付时间
|
||||
payTime?: string;
|
||||
// 退款时间
|
||||
refundTime?: string;
|
||||
// 申请退款时间
|
||||
refundApplyTime?: string;
|
||||
// 过期时间
|
||||
expirationTime?: string;
|
||||
// 自提码
|
||||
selfTakeCode?: string;
|
||||
// 是否已收到赠品
|
||||
hasTakeGift?: string;
|
||||
// 对账情况:0=未对账;1=已对账;3=已对账,金额对不上;4=未查询到该订单
|
||||
checkBill?: number;
|
||||
// 订单是否已结算(0未结算 1已结算)
|
||||
isSettled?: number;
|
||||
// 系统版本号 0当前版本 value=其他版本
|
||||
version?: number;
|
||||
// 用户id
|
||||
userId?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处方订单搜索条件
|
||||
*/
|
||||
export interface ClinicOrderParam extends PageParam {
|
||||
orderId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicPatientUser/index.ts
Normal file
105
app/api/clinic/clinicPatientUser/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicPatientUser, ClinicPatientUserParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询患者
|
||||
*/
|
||||
export async function pageClinicPatientUser(params: ClinicPatientUserParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicPatientUser>>>(
|
||||
'/clinic/clinic-patient-user/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询患者列表
|
||||
*/
|
||||
export async function listClinicPatientUser(params?: ClinicPatientUserParam) {
|
||||
const res = await request.get<ApiResult<ClinicPatientUser[]>>(
|
||||
'/clinic/clinic-patient-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 addClinicPatientUser(data: ClinicPatientUser) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-patient-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改患者
|
||||
*/
|
||||
export async function updateClinicPatientUser(data: ClinicPatientUser) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-patient-user',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除患者
|
||||
*/
|
||||
export async function removeClinicPatientUser(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-patient-user/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除患者
|
||||
*/
|
||||
export async function removeBatchClinicPatientUser(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-patient-user/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询患者
|
||||
*/
|
||||
export async function getClinicPatientUser(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicPatientUser>>(
|
||||
'/clinic/clinic-patient-user/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
49
app/api/clinic/clinicPatientUser/model/index.ts
Normal file
49
app/api/clinic/clinicPatientUser/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 患者
|
||||
*/
|
||||
export interface ClinicPatientUser {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 类型 0经销商 1企业 2集团
|
||||
type?: number;
|
||||
// 自增ID
|
||||
userId?: number;
|
||||
// 姓名
|
||||
realName?: string;
|
||||
// 性别
|
||||
sex?: string;
|
||||
// 手机号
|
||||
phone?: string;
|
||||
// 年龄
|
||||
age?: number;
|
||||
// 身高
|
||||
height?: number;
|
||||
// 体重
|
||||
weight?: number;
|
||||
// 过敏史
|
||||
allergyHistory?: string;
|
||||
// 专属二维码
|
||||
qrcode?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除
|
||||
isDelete?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 患者搜索条件
|
||||
*/
|
||||
export interface ClinicPatientUserParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
112
app/api/clinic/clinicPrescription/index.ts
Normal file
112
app/api/clinic/clinicPrescription/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicPrescription, ClinicPrescriptionParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询处方主表
|
||||
|
||||
*/
|
||||
export async function pageClinicPrescription(params: ClinicPrescriptionParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicPrescription>>>(
|
||||
'/clinic/clinic-prescription/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询处方主表
|
||||
列表
|
||||
*/
|
||||
export async function listClinicPrescription(params?: ClinicPrescriptionParam) {
|
||||
const res = await request.get<ApiResult<ClinicPrescription[]>>(
|
||||
'/clinic/clinic-prescription',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加处方主表
|
||||
|
||||
*/
|
||||
export async function addClinicPrescription(data: ClinicPrescription) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改处方主表
|
||||
|
||||
*/
|
||||
export async function updateClinicPrescription(data: ClinicPrescription) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除处方主表
|
||||
|
||||
*/
|
||||
export async function removeClinicPrescription(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除处方主表
|
||||
|
||||
*/
|
||||
export async function removeBatchClinicPrescription(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询处方主表
|
||||
|
||||
*/
|
||||
export async function getClinicPrescription(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicPrescription>>(
|
||||
'/clinic/clinic-prescription/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
57
app/api/clinic/clinicPrescription/model/index.ts
Normal file
57
app/api/clinic/clinicPrescription/model/index.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
|
||||
*/
|
||||
export interface ClinicPrescription {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 患者
|
||||
userId?: number;
|
||||
// 医生
|
||||
doctorId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 关联就诊表
|
||||
visitRecordId?: number;
|
||||
// 处方类型 0中药 1西药
|
||||
prescriptionType?: number;
|
||||
// 诊断结果
|
||||
diagnosis?: string;
|
||||
// 治疗方案
|
||||
treatmentPlan?: string;
|
||||
// 煎药说明
|
||||
decoctionInstructions?: string;
|
||||
// 订单总金额
|
||||
orderPrice?: string;
|
||||
// 单价
|
||||
price?: string;
|
||||
// 实付金额
|
||||
payPrice?: string;
|
||||
// 订单是否失效(0未失效 1已失效)
|
||||
isInvalid?: number;
|
||||
// 结算(0未结算 1已结算)
|
||||
isSettled?: number;
|
||||
// 结算时间
|
||||
settleTime?: string;
|
||||
// 状态, 0正常, 1已完成,2已支付,3已取消
|
||||
status?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处方主表
|
||||
搜索条件
|
||||
*/
|
||||
export interface ClinicPrescriptionParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
112
app/api/clinic/clinicPrescriptionItem/index.ts
Normal file
112
app/api/clinic/clinicPrescriptionItem/index.ts
Normal file
@@ -0,0 +1,112 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicPrescriptionItem, ClinicPrescriptionItemParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询处方明细表
|
||||
|
||||
*/
|
||||
export async function pageClinicPrescriptionItem(params: ClinicPrescriptionItemParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicPrescriptionItem>>>(
|
||||
'/clinic/clinic-prescription-item/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询处方明细表
|
||||
列表
|
||||
*/
|
||||
export async function listClinicPrescriptionItem(params?: ClinicPrescriptionItemParam) {
|
||||
const res = await request.get<ApiResult<ClinicPrescriptionItem[]>>(
|
||||
'/clinic/clinic-prescription-item',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加处方明细表
|
||||
|
||||
*/
|
||||
export async function addClinicPrescriptionItem(data: ClinicPrescriptionItem) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改处方明细表
|
||||
|
||||
*/
|
||||
export async function updateClinicPrescriptionItem(data: ClinicPrescriptionItem) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除处方明细表
|
||||
|
||||
*/
|
||||
export async function removeClinicPrescriptionItem(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除处方明细表
|
||||
|
||||
*/
|
||||
export async function removeBatchClinicPrescriptionItem(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-prescription-item/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询处方明细表
|
||||
|
||||
*/
|
||||
export async function getClinicPrescriptionItem(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicPrescriptionItem>>(
|
||||
'/clinic/clinic-prescription-item/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
49
app/api/clinic/clinicPrescriptionItem/model/index.ts
Normal file
49
app/api/clinic/clinicPrescriptionItem/model/index.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
|
||||
*/
|
||||
export interface ClinicPrescriptionItem {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 关联处方
|
||||
prescriptionId?: number;
|
||||
// 订单编号
|
||||
prescriptionNo?: string;
|
||||
// 关联药品
|
||||
medicineId?: number;
|
||||
// 剂量(如“10g”)
|
||||
dosage?: string;
|
||||
// 用法频率(如“每日三次”)
|
||||
usageFrequency?: string;
|
||||
// 服用天数
|
||||
days?: number;
|
||||
// 购买数量
|
||||
amount?: number;
|
||||
// 单价
|
||||
unitPrice?: string;
|
||||
// 数量
|
||||
quantity?: number;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 用户id
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 更新时间
|
||||
updateTime?: string;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 处方明细表
|
||||
搜索条件
|
||||
*/
|
||||
export interface ClinicPrescriptionItemParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicReport/index.ts
Normal file
105
app/api/clinic/clinicReport/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicReport, ClinicReportParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询报告
|
||||
*/
|
||||
export async function pageClinicReport(params: ClinicReportParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicReport>>>(
|
||||
'/clinic/clinic-report/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询报告列表
|
||||
*/
|
||||
export async function listClinicReport(params?: ClinicReportParam) {
|
||||
const res = await request.get<ApiResult<ClinicReport[]>>(
|
||||
'/clinic/clinic-report',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加报告
|
||||
*/
|
||||
export async function addClinicReport(data: ClinicReport) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-report',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报告
|
||||
*/
|
||||
export async function updateClinicReport(data: ClinicReport) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-report',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报告
|
||||
*/
|
||||
export async function removeClinicReport(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-report/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除报告
|
||||
*/
|
||||
export async function removeBatchClinicReport(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-report/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询报告
|
||||
*/
|
||||
export async function getClinicReport(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicReport>>(
|
||||
'/clinic/clinic-report/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
61
app/api/clinic/clinicReport/model/index.ts
Normal file
61
app/api/clinic/clinicReport/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 报告
|
||||
*/
|
||||
export interface ClinicReport {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 买家用户ID
|
||||
userId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 分销商用户id(一级)
|
||||
firstUserId?: number;
|
||||
// 分销商用户id(二级)
|
||||
secondUserId?: number;
|
||||
// 分销商用户id(三级)
|
||||
thirdUserId?: number;
|
||||
// 分销佣金(一级)
|
||||
firstMoney?: string;
|
||||
// 分销佣金(二级)
|
||||
secondMoney?: string;
|
||||
// 分销佣金(三级)
|
||||
thirdMoney?: string;
|
||||
// 单价
|
||||
price?: string;
|
||||
// 订单总金额
|
||||
orderPrice?: string;
|
||||
// 结算金额
|
||||
settledPrice?: string;
|
||||
// 换算成度
|
||||
degreePrice?: string;
|
||||
// 实发金额
|
||||
payPrice?: string;
|
||||
// 税率
|
||||
rate?: string;
|
||||
// 结算月份
|
||||
month?: string;
|
||||
// 订单是否失效(0未失效 1已失效)
|
||||
isInvalid?: number;
|
||||
// 佣金结算(0未结算 1已结算)
|
||||
isSettled?: number;
|
||||
// 结算时间
|
||||
settleTime?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 报告搜索条件
|
||||
*/
|
||||
export interface ClinicReportParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
105
app/api/clinic/clinicVisitRecord/index.ts
Normal file
105
app/api/clinic/clinicVisitRecord/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ClinicVisitRecord, ClinicVisitRecordParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询病例
|
||||
*/
|
||||
export async function pageClinicVisitRecord(params: ClinicVisitRecordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ClinicVisitRecord>>>(
|
||||
'/clinic/clinic-visit-record/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询病例列表
|
||||
*/
|
||||
export async function listClinicVisitRecord(params?: ClinicVisitRecordParam) {
|
||||
const res = await request.get<ApiResult<ClinicVisitRecord[]>>(
|
||||
'/clinic/clinic-visit-record',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加病例
|
||||
*/
|
||||
export async function addClinicVisitRecord(data: ClinicVisitRecord) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/clinic/clinic-visit-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改病例
|
||||
*/
|
||||
export async function updateClinicVisitRecord(data: ClinicVisitRecord) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/clinic/clinic-visit-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除病例
|
||||
*/
|
||||
export async function removeClinicVisitRecord(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-visit-record/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除病例
|
||||
*/
|
||||
export async function removeBatchClinicVisitRecord(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/clinic/clinic-visit-record/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询病例
|
||||
*/
|
||||
export async function getClinicVisitRecord(id: number) {
|
||||
const res = await request.get<ApiResult<ClinicVisitRecord>>(
|
||||
'/clinic/clinic-visit-record/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
61
app/api/clinic/clinicVisitRecord/model/index.ts
Normal file
61
app/api/clinic/clinicVisitRecord/model/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 病例
|
||||
*/
|
||||
export interface ClinicVisitRecord {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 买家用户ID
|
||||
userId?: number;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 分销商用户id(一级)
|
||||
firstUserId?: number;
|
||||
// 分销商用户id(二级)
|
||||
secondUserId?: number;
|
||||
// 分销商用户id(三级)
|
||||
thirdUserId?: number;
|
||||
// 分销佣金(一级)
|
||||
firstMoney?: string;
|
||||
// 分销佣金(二级)
|
||||
secondMoney?: string;
|
||||
// 分销佣金(三级)
|
||||
thirdMoney?: string;
|
||||
// 单价
|
||||
price?: string;
|
||||
// 订单总金额
|
||||
orderPrice?: string;
|
||||
// 结算金额
|
||||
settledPrice?: string;
|
||||
// 换算成度
|
||||
degreePrice?: string;
|
||||
// 实发金额
|
||||
payPrice?: string;
|
||||
// 税率
|
||||
rate?: string;
|
||||
// 结算月份
|
||||
month?: string;
|
||||
// 订单是否失效(0未失效 1已失效)
|
||||
isInvalid?: number;
|
||||
// 佣金结算(0未结算 1已结算)
|
||||
isSettled?: number;
|
||||
// 结算时间
|
||||
settleTime?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 商城ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 病例搜索条件
|
||||
*/
|
||||
export interface ClinicVisitRecordParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsAd/index.ts
Normal file
106
app/api/cms/cmsAd/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsAd, CmsAdParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询广告位
|
||||
*/
|
||||
export async function pageCmsAd(params: CmsAdParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsAd>>>(
|
||||
MODULES_API_URL + '/cms/cms-ad/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询广告位列表
|
||||
*/
|
||||
export async function listCmsAd(params?: CmsAdParam) {
|
||||
const res = await request.get<ApiResult<CmsAd[]>>(
|
||||
MODULES_API_URL + '/cms/cms-ad',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加广告位
|
||||
*/
|
||||
export async function addCmsAd(data: CmsAd) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-ad',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改广告位
|
||||
*/
|
||||
export async function updateCmsAd(data: CmsAd) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-ad',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除广告位
|
||||
*/
|
||||
export async function removeCmsAd(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-ad/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除广告位
|
||||
*/
|
||||
export async function removeBatchCmsAd(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-ad/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询广告位
|
||||
*/
|
||||
export async function getCmsAd(id: number) {
|
||||
const res = await request.get<ApiResult<CmsAd>>(
|
||||
MODULES_API_URL + '/cms/cms-ad/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
65
app/api/cms/cmsAd/model/index.ts
Normal file
65
app/api/cms/cmsAd/model/index.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 广告位
|
||||
*/
|
||||
export interface CmsAd {
|
||||
// ID
|
||||
adId?: number;
|
||||
// 类型
|
||||
type?: number;
|
||||
// 唯一标识
|
||||
code?: string;
|
||||
// 栏目分类
|
||||
categoryId?: number;
|
||||
// 栏目名称
|
||||
categoryName?: string;
|
||||
// 页面ID
|
||||
designId?: number;
|
||||
// 广告类型
|
||||
adType?: string;
|
||||
// 广告位名称
|
||||
name?: string;
|
||||
// 宽
|
||||
width?: string;
|
||||
// 高
|
||||
height?: string;
|
||||
// css样式
|
||||
style?: string;
|
||||
// 广告图片
|
||||
images?: any;
|
||||
// 广告图片
|
||||
imageList?: any;
|
||||
// 路由/链接地址
|
||||
path?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 语言
|
||||
lang?: string;
|
||||
// 页面ID
|
||||
pageId?: number;
|
||||
// 页面名称
|
||||
pageName?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
merchantId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 广告位搜索条件
|
||||
*/
|
||||
export interface CmsAdParam extends PageParam {
|
||||
adId?: number;
|
||||
pageId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsAdRecord/index.ts
Normal file
106
app/api/cms/cmsAdRecord/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsAdRecord, CmsAdRecordParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询广告图片
|
||||
*/
|
||||
export async function pageCmsAdRecord(params: CmsAdRecordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsAdRecord>>>(
|
||||
MODULES_API_URL + '/cms/cms-ad-record/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询广告图片列表
|
||||
*/
|
||||
export async function listCmsAdRecord(params?: CmsAdRecordParam) {
|
||||
const res = await request.get<ApiResult<CmsAdRecord[]>>(
|
||||
MODULES_API_URL + '/cms/cms-ad-record',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加广告图片
|
||||
*/
|
||||
export async function addCmsAdRecord(data: CmsAdRecord) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-ad-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改广告图片
|
||||
*/
|
||||
export async function updateCmsAdRecord(data: CmsAdRecord) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-ad-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除广告图片
|
||||
*/
|
||||
export async function removeCmsAdRecord(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-ad-record/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除广告图片
|
||||
*/
|
||||
export async function removeBatchCmsAdRecord(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-ad-record/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询广告图片
|
||||
*/
|
||||
export async function getCmsAdRecord(id: number) {
|
||||
const res = await request.get<ApiResult<CmsAdRecord>>(
|
||||
MODULES_API_URL + '/cms/cms-ad-record/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
app/api/cms/cmsAdRecord/model/index.ts
Normal file
35
app/api/cms/cmsAdRecord/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 广告图片
|
||||
*/
|
||||
export interface CmsAdRecord {
|
||||
// ID
|
||||
adRecordId?: number;
|
||||
// 广告标题
|
||||
title?: string;
|
||||
// 图片地址
|
||||
path?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 广告位ID
|
||||
adId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 广告图片搜索条件
|
||||
*/
|
||||
export interface CmsAdRecordParam extends PageParam {
|
||||
adRecordId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
159
app/api/cms/cmsArticle/index.ts
Normal file
159
app/api/cms/cmsArticle/index.ts
Normal file
@@ -0,0 +1,159 @@
|
||||
import request from '@/utils/request';
|
||||
import type {ApiResult, PageResult} from '@/api';
|
||||
import type {CmsArticle, CmsArticleParam} from './model';
|
||||
|
||||
/**
|
||||
* 分页查询文章
|
||||
*/
|
||||
export async function pageCmsArticle(params: CmsArticleParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsArticle>>>(
|
||||
'/cms/cms-article/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章列表
|
||||
*/
|
||||
export async function listCmsArticle(params?: CmsArticleParam) {
|
||||
const res = await request.get<ApiResult<CmsArticle[]>>(
|
||||
'/cms/cms-article',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加文章
|
||||
*/
|
||||
export async function addCmsArticle(data: CmsArticle) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/cms/cms-article',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文章
|
||||
*/
|
||||
export async function updateCmsArticle(data: CmsArticle) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/cms/cms-article',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改文章
|
||||
*/
|
||||
export async function updateBatchCmsArticle(data: any) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/cms/cms-article/batch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章
|
||||
*/
|
||||
export async function removeCmsArticle(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/cms/cms-article/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除文章
|
||||
*/
|
||||
export async function removeBatchCmsArticle(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/cms/cms-article/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询文章
|
||||
*/
|
||||
export async function getCmsArticle(id: number) {
|
||||
const res = await request.get<ApiResult<CmsArticle>>(
|
||||
'/cms/cms-article/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code查询文章
|
||||
*/
|
||||
export async function getByCode(code: string) {
|
||||
const res = await request.get<ApiResult<CmsArticle>>(
|
||||
'/cms/cms-article/getByCode/' + code
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function getCount(params: CmsArticleParam) {
|
||||
const res = await request.get('/cms/cms-article/data', {
|
||||
params
|
||||
});
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文章批量导入
|
||||
*/
|
||||
export async function importArticles(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/cms/cms-article/import',
|
||||
formData
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
131
app/api/cms/cmsArticle/model/index.ts
Normal file
131
app/api/cms/cmsArticle/model/index.ts
Normal file
@@ -0,0 +1,131 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 文章
|
||||
*/
|
||||
export interface CmsArticle {
|
||||
// 文章ID
|
||||
articleId?: number;
|
||||
// 文章标题
|
||||
title?: string;
|
||||
// 文章类型 0常规 1视频
|
||||
type?: number;
|
||||
// 文章模型
|
||||
model?: string;
|
||||
// 文章编号
|
||||
code?: string;
|
||||
// 文章详情
|
||||
detail?: string;
|
||||
// 列表显示方式(10小图展示 20大图展示)
|
||||
showType?: number;
|
||||
// 话题
|
||||
topic?: string;
|
||||
// 标签
|
||||
tags?: any;
|
||||
// 父级ID
|
||||
parentId?: number;
|
||||
parentName?: string;
|
||||
// 栏目ID
|
||||
categoryId?: number;
|
||||
// 栏目名称
|
||||
categoryName?: string;
|
||||
// 封面图
|
||||
image?: string;
|
||||
// 来源
|
||||
source?: string;
|
||||
// 摘要
|
||||
overview?: string;
|
||||
// 虚拟阅读量(仅用作展示)
|
||||
virtualViews?: number;
|
||||
// 实际阅读量
|
||||
actualViews?: number;
|
||||
// 浏览权限(0公开 1会员 2密码)
|
||||
permission?: number;
|
||||
// 访问密码
|
||||
password?: string;
|
||||
// 确认密码
|
||||
password2?: string;
|
||||
// 发布来源客户端 (APP、H5、小程序等)
|
||||
platform?: string;
|
||||
// 文章附件
|
||||
files?: string;
|
||||
// 视频地址
|
||||
video?: string;
|
||||
// 接受的文件类型
|
||||
accept?: string;
|
||||
// 经度
|
||||
longitude?: string;
|
||||
// 纬度
|
||||
latitude?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 街道地址
|
||||
address?: string;
|
||||
// 点赞数
|
||||
likes?: number;
|
||||
// 评论数
|
||||
commentNumbers?: number;
|
||||
// 提醒谁看
|
||||
toUsers?: string;
|
||||
// 文章内容
|
||||
content?: string;
|
||||
// 编辑器类型
|
||||
editor?: number;
|
||||
// PDF地址
|
||||
pdfUrl?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 商户ID
|
||||
merchantId?: number;
|
||||
// 作者
|
||||
author?: string;
|
||||
// 语言
|
||||
lang?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 是否同步翻译其他语言版本
|
||||
translation?: boolean;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
|
||||
status?: number;
|
||||
// 状态描述
|
||||
statusText?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
// 是否移动端
|
||||
isMobile?: boolean;
|
||||
// 二维码
|
||||
qrcode?: string;
|
||||
// 文章路径
|
||||
url?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章搜索条件
|
||||
*/
|
||||
export interface CmsArticleParam extends PageParam {
|
||||
articleId?: number;
|
||||
model?: string;
|
||||
status?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
export interface CmsArticleCount {
|
||||
totalNum?: number;
|
||||
totalNum2?: number;
|
||||
totalNum3?: number;
|
||||
totalNum4?: number;
|
||||
}
|
||||
108
app/api/cms/cmsArticleCategory/index.ts
Normal file
108
app/api/cms/cmsArticleCategory/index.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsArticleCategory, CmsArticleCategoryParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询文章分类表
|
||||
*/
|
||||
export async function pageCmsArticleCategory(params: CmsArticleCategoryParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsArticleCategory>>>(
|
||||
MODULES_API_URL + '/cms/cms-article-category/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章分类表列表
|
||||
*/
|
||||
export async function listCmsArticleCategory(params?: CmsArticleCategoryParam) {
|
||||
const res = await request.get<ApiResult<CmsArticleCategory[]>>(
|
||||
MODULES_API_URL + '/cms/cms-article-category',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加文章分类表
|
||||
*/
|
||||
export async function addCmsArticleCategory(data: CmsArticleCategory) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-category',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文章分类表
|
||||
*/
|
||||
export async function updateCmsArticleCategory(data: CmsArticleCategory) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-category',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章分类表
|
||||
*/
|
||||
export async function removeCmsArticleCategory(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-category/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除文章分类表
|
||||
*/
|
||||
export async function removeBatchCmsArticleCategory(
|
||||
data: (number | undefined)[]
|
||||
) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-category/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询文章分类表
|
||||
*/
|
||||
export async function getCmsArticleCategory(id: number) {
|
||||
const res = await request.get<ApiResult<CmsArticleCategory>>(
|
||||
MODULES_API_URL + '/cms/cms-article-category/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
app/api/cms/cmsArticleCategory/model/index.ts
Normal file
59
app/api/cms/cmsArticleCategory/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 文章分类表
|
||||
*/
|
||||
export interface CmsArticleCategory {
|
||||
// 文章分类ID
|
||||
categoryId?: number;
|
||||
// 分类标识
|
||||
categoryCode?: string;
|
||||
// 分类名称
|
||||
title?: string;
|
||||
// 类型 0列表 1单页 2外链
|
||||
type?: number;
|
||||
// 分类图片
|
||||
image?: string;
|
||||
// 上级分类ID
|
||||
parentId?: number;
|
||||
// 路由/链接地址
|
||||
path?: string;
|
||||
// 组件路径
|
||||
component?: string;
|
||||
// 绑定的页面
|
||||
pageId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 文章数量
|
||||
count?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
|
||||
hide?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 是否显示在首页
|
||||
showIndex?: number;
|
||||
// 状态, 0正常, 1禁用
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
value?: number;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章分类表搜索条件
|
||||
*/
|
||||
export interface CmsArticleCategoryParam extends PageParam {
|
||||
categoryId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsArticleComment/index.ts
Normal file
106
app/api/cms/cmsArticleComment/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsArticleComment, CmsArticleCommentParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询文章评论表
|
||||
*/
|
||||
export async function pageCmsArticleComment(params: CmsArticleCommentParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsArticleComment>>>(
|
||||
MODULES_API_URL + '/cms/cms-article-comment/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章评论表列表
|
||||
*/
|
||||
export async function listCmsArticleComment(params?: CmsArticleCommentParam) {
|
||||
const res = await request.get<ApiResult<CmsArticleComment[]>>(
|
||||
MODULES_API_URL + '/cms/cms-article-comment',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加文章评论表
|
||||
*/
|
||||
export async function addCmsArticleComment(data: CmsArticleComment) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-comment',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文章评论表
|
||||
*/
|
||||
export async function updateCmsArticleComment(data: CmsArticleComment) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-comment',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章评论表
|
||||
*/
|
||||
export async function removeCmsArticleComment(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-comment/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除文章评论表
|
||||
*/
|
||||
export async function removeBatchCmsArticleComment(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-comment/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询文章评论表
|
||||
*/
|
||||
export async function getCmsArticleComment(id: number) {
|
||||
const res = await request.get<ApiResult<CmsArticleComment>>(
|
||||
MODULES_API_URL + '/cms/cms-article-comment/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
47
app/api/cms/cmsArticleComment/model/index.ts
Normal file
47
app/api/cms/cmsArticleComment/model/index.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 文章评论表
|
||||
*/
|
||||
export interface CmsArticleComment {
|
||||
// 评价ID
|
||||
commentId?: number;
|
||||
// 文章ID
|
||||
articleId?: number;
|
||||
// 评分 (10好评 20中评 30差评)
|
||||
score?: number;
|
||||
// 评价内容
|
||||
content?: string;
|
||||
// 是否为图片评价
|
||||
isPicture?: number;
|
||||
// 评论者ID
|
||||
userId?: number;
|
||||
// 被评价者ID
|
||||
toUserId?: number;
|
||||
// 回复的评论ID
|
||||
replyCommentId?: number;
|
||||
// 回复者ID
|
||||
replyUserId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0未读, 1已读
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章评论表搜索条件
|
||||
*/
|
||||
export interface CmsArticleCommentParam extends PageParam {
|
||||
commentId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsArticleContent/index.ts
Normal file
106
app/api/cms/cmsArticleContent/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsArticleContent, CmsArticleContentParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询文章记录表
|
||||
*/
|
||||
export async function pageCmsArticleContent(params: CmsArticleContentParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsArticleContent>>>(
|
||||
MODULES_API_URL + '/cms/cms-article-content/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章记录表列表
|
||||
*/
|
||||
export async function listCmsArticleContent(params?: CmsArticleContentParam) {
|
||||
const res = await request.get<ApiResult<CmsArticleContent[]>>(
|
||||
MODULES_API_URL + '/cms/cms-article-content',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加文章记录表
|
||||
*/
|
||||
export async function addCmsArticleContent(data: CmsArticleContent) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-content',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文章记录表
|
||||
*/
|
||||
export async function updateCmsArticleContent(data: CmsArticleContent) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-content',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章记录表
|
||||
*/
|
||||
export async function removeCmsArticleContent(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-content/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除文章记录表
|
||||
*/
|
||||
export async function removeBatchCmsArticleContent(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-content/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询文章记录表
|
||||
*/
|
||||
export async function getCmsArticleContent(id: number) {
|
||||
const res = await request.get<ApiResult<CmsArticleContent>>(
|
||||
MODULES_API_URL + '/cms/cms-article-content/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
25
app/api/cms/cmsArticleContent/model/index.ts
Normal file
25
app/api/cms/cmsArticleContent/model/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 文章记录表
|
||||
*/
|
||||
export interface CmsArticleContent {
|
||||
//
|
||||
id?: number;
|
||||
// 文章ID
|
||||
articleId?: number;
|
||||
// 文章内容
|
||||
content?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章记录表搜索条件
|
||||
*/
|
||||
export interface CmsArticleContentParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsArticleCount/index.ts
Normal file
106
app/api/cms/cmsArticleCount/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsArticleCount, CmsArticleCountParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询点赞文章
|
||||
*/
|
||||
export async function pageCmsArticleCount(params: CmsArticleCountParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsArticleCount>>>(
|
||||
MODULES_API_URL + '/cms/cms-article-count/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询点赞文章列表
|
||||
*/
|
||||
export async function listCmsArticleCount(params?: CmsArticleCountParam) {
|
||||
const res = await request.get<ApiResult<CmsArticleCount[]>>(
|
||||
MODULES_API_URL + '/cms/cms-article-count',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加点赞文章
|
||||
*/
|
||||
export async function addCmsArticleCount(data: CmsArticleCount) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-count',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点赞文章
|
||||
*/
|
||||
export async function updateCmsArticleCount(data: CmsArticleCount) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-count',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点赞文章
|
||||
*/
|
||||
export async function removeCmsArticleCount(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-count/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除点赞文章
|
||||
*/
|
||||
export async function removeBatchCmsArticleCount(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-count/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询点赞文章
|
||||
*/
|
||||
export async function getCmsArticleCount(id: number) {
|
||||
const res = await request.get<ApiResult<CmsArticleCount>>(
|
||||
MODULES_API_URL + '/cms/cms-article-count/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
25
app/api/cms/cmsArticleCount/model/index.ts
Normal file
25
app/api/cms/cmsArticleCount/model/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 点赞文章
|
||||
*/
|
||||
export interface CmsArticleCount {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 文章ID
|
||||
articleId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点赞文章搜索条件
|
||||
*/
|
||||
export interface CmsArticleCountParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsArticleLike/index.ts
Normal file
106
app/api/cms/cmsArticleLike/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsArticleLike, CmsArticleLikeParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询点赞文章
|
||||
*/
|
||||
export async function pageCmsArticleLike(params: CmsArticleLikeParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsArticleLike>>>(
|
||||
MODULES_API_URL + '/cms/cms-article-like/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询点赞文章列表
|
||||
*/
|
||||
export async function listCmsArticleLike(params?: CmsArticleLikeParam) {
|
||||
const res = await request.get<ApiResult<CmsArticleLike[]>>(
|
||||
MODULES_API_URL + '/cms/cms-article-like',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加点赞文章
|
||||
*/
|
||||
export async function addCmsArticleLike(data: CmsArticleLike) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-like',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点赞文章
|
||||
*/
|
||||
export async function updateCmsArticleLike(data: CmsArticleLike) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-like',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点赞文章
|
||||
*/
|
||||
export async function removeCmsArticleLike(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-like/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除点赞文章
|
||||
*/
|
||||
export async function removeBatchCmsArticleLike(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-article-like/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询点赞文章
|
||||
*/
|
||||
export async function getCmsArticleLike(id: number) {
|
||||
const res = await request.get<ApiResult<CmsArticleLike>>(
|
||||
MODULES_API_URL + '/cms/cms-article-like/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
25
app/api/cms/cmsArticleLike/model/index.ts
Normal file
25
app/api/cms/cmsArticleLike/model/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 点赞文章
|
||||
*/
|
||||
export interface CmsArticleLike {
|
||||
// 主键ID
|
||||
id?: number;
|
||||
// 文章ID
|
||||
articleId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点赞文章搜索条件
|
||||
*/
|
||||
export interface CmsArticleLikeParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsDesign/index.ts
Normal file
106
app/api/cms/cmsDesign/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsDesign, CmsDesignParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询页面管理记录表
|
||||
*/
|
||||
export async function pageCmsDesign(params: CmsDesignParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsDesign>>>(
|
||||
MODULES_API_URL + '/cms/cms-design/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询页面管理记录表列表
|
||||
*/
|
||||
export async function listCmsDesign(params?: CmsDesignParam) {
|
||||
const res = await request.get<ApiResult<CmsDesign[]>>(
|
||||
MODULES_API_URL + '/cms/cms-design',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加页面管理记录表
|
||||
*/
|
||||
export async function addCmsDesign(data: CmsDesign) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-design',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改页面管理记录表
|
||||
*/
|
||||
export async function updateCmsDesign(data: CmsDesign) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-design',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除页面管理记录表
|
||||
*/
|
||||
export async function removeCmsDesign(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-design/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除页面管理记录表
|
||||
*/
|
||||
export async function removeBatchCmsDesign(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-design/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询页面管理记录表
|
||||
*/
|
||||
export async function getCmsDesign(id: number) {
|
||||
const res = await request.get<ApiResult<CmsDesign>>(
|
||||
MODULES_API_URL + '/cms/cms-design/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
64
app/api/cms/cmsDesign/model/index.ts
Normal file
64
app/api/cms/cmsDesign/model/index.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 页面管理记录表
|
||||
*/
|
||||
export interface CmsDesign {
|
||||
pageId?: number;
|
||||
name?: string;
|
||||
keywords?: string;
|
||||
description?: string;
|
||||
path?: string;
|
||||
component?: string;
|
||||
photo?: string;
|
||||
content?: string;
|
||||
// 类型
|
||||
type?: string;
|
||||
categoryId?: number;
|
||||
// 宽
|
||||
width?: string;
|
||||
// 高
|
||||
height?: string;
|
||||
// 页面样式
|
||||
style?: string;
|
||||
// 附件
|
||||
images?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 设为首页
|
||||
home?: number;
|
||||
// 排序
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 更新时间
|
||||
updateTime?: string;
|
||||
// 页面布局
|
||||
layout?: string;
|
||||
backgroundColor?: string;
|
||||
// 关联网站导航ID
|
||||
navigationId?: number;
|
||||
showLayout?: boolean;
|
||||
btn?: any[];
|
||||
showBanner?: boolean;
|
||||
showButton?: boolean;
|
||||
// 是否同步翻译其他语言版本
|
||||
translation?: boolean;
|
||||
buyUrl?: string;
|
||||
demoUrl?: string;
|
||||
account?: string;
|
||||
docUrl?: string;
|
||||
parentId?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面管理记录表搜索条件
|
||||
*/
|
||||
export interface CmsDesignParam extends PageParam {
|
||||
pageId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
153
app/api/cms/cmsDomain/index.ts
Normal file
153
app/api/cms/cmsDomain/index.ts
Normal file
@@ -0,0 +1,153 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsDomain, CmsDomainParam } from './model';
|
||||
import { SERVER_API_URL} from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询网站域名记录表
|
||||
*/
|
||||
export async function pageCmsDomain(params: CmsDomainParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsDomain>>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网站域名记录表列表
|
||||
*/
|
||||
export async function listCmsDomain(params?: CmsDomainParam) {
|
||||
const res = await request.get<ApiResult<CmsDomain[]>>(
|
||||
SERVER_API_URL + '/cms/cms-domain',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加网站域名记录表
|
||||
*/
|
||||
export async function addCmsDomain(data: CmsDomain) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
SERVER_API_URL + '/cms/cms-domain',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站域名记录表
|
||||
*/
|
||||
export async function updateCmsDomain(data: CmsDomain) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/domain',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网站域名记录表
|
||||
*/
|
||||
export async function removeCmsDomain(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网站域名记录表
|
||||
*/
|
||||
export async function removeBatchCmsDomain(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询网站域名记录表
|
||||
*/
|
||||
export async function getCmsDomain(id: number) {
|
||||
const res = await request.get<ApiResult<CmsDomain>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function resolvable(id: number) {
|
||||
const res = await request.get<ApiResult<CmsDomain>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/resolvable/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据授权主域名
|
||||
*/
|
||||
export async function getAuthorizedDomain() {
|
||||
if(!localStorage.getItem('WebsiteId')){
|
||||
return false;
|
||||
}
|
||||
const res = await request.get<ApiResult<CmsDomain>>(
|
||||
SERVER_API_URL + '/cms/cms-domain/getAuthorizedDomain/' + localStorage.getItem('WebsiteId')
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
43
app/api/cms/cmsDomain/model/index.ts
Normal file
43
app/api/cms/cmsDomain/model/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 网站域名记录表
|
||||
*/
|
||||
export interface CmsDomain {
|
||||
// ID
|
||||
id?: number;
|
||||
// 类型 0赠送域名 1绑定域名
|
||||
type?: number;
|
||||
// 域名
|
||||
domain?: string;
|
||||
// 主机记录
|
||||
hostName?: string;
|
||||
// 记录值
|
||||
hostValue?: string;
|
||||
// 状态
|
||||
status?: number;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 网站ID
|
||||
websiteId?: number;
|
||||
// 租户ID
|
||||
appId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网站域名记录表搜索条件
|
||||
*/
|
||||
export interface CmsDomainParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsForm/index.ts
Normal file
106
app/api/cms/cmsForm/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsForm, CmsFormParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询表单设计表
|
||||
*/
|
||||
export async function pageCmsForm(params: CmsFormParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsForm>>>(
|
||||
MODULES_API_URL + '/cms/cms-form/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询表单设计表列表
|
||||
*/
|
||||
export async function listCmsForm(params?: CmsFormParam) {
|
||||
const res = await request.get<ApiResult<CmsForm[]>>(
|
||||
MODULES_API_URL + '/cms/cms-form',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加表单设计表
|
||||
*/
|
||||
export async function addCmsForm(data: CmsForm) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-form',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改表单设计表
|
||||
*/
|
||||
export async function updateCmsForm(data: CmsForm) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-form',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除表单设计表
|
||||
*/
|
||||
export async function removeCmsForm(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-form/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除表单设计表
|
||||
*/
|
||||
export async function removeBatchCmsForm(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-form/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询表单设计表
|
||||
*/
|
||||
export async function getCmsForm(id: number) {
|
||||
const res = await request.get<ApiResult<CmsForm>>(
|
||||
MODULES_API_URL + '/cms/cms-form/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
53
app/api/cms/cmsForm/model/index.ts
Normal file
53
app/api/cms/cmsForm/model/index.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 表单设计表
|
||||
*/
|
||||
export interface CmsForm {
|
||||
// ID
|
||||
formId?: number;
|
||||
// 表单标题
|
||||
name?: string;
|
||||
// 顶部图片
|
||||
photo?: string;
|
||||
// 背景图片
|
||||
background?: string;
|
||||
// 视频文件
|
||||
video?: string;
|
||||
// 提交次数
|
||||
submitNumber?: number;
|
||||
// 页面布局
|
||||
layout?: string;
|
||||
// 是否隐藏顶部图片
|
||||
hidePhoto?: number;
|
||||
// 是否隐藏背景图片
|
||||
hideBackground?: number;
|
||||
// 是否隐藏视频
|
||||
hideVideo?: number;
|
||||
// 背景图片透明度
|
||||
opacity?: string;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 商户ID
|
||||
merchantId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单设计表搜索条件
|
||||
*/
|
||||
export interface CmsFormParam extends PageParam {
|
||||
formId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsFormRecord/index.ts
Normal file
106
app/api/cms/cmsFormRecord/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsFormRecord, CmsFormRecordParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询表单数据记录表
|
||||
*/
|
||||
export async function pageCmsFormRecord(params: CmsFormRecordParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsFormRecord>>>(
|
||||
MODULES_API_URL + '/cms/cms-form-record/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询表单数据记录表列表
|
||||
*/
|
||||
export async function listCmsFormRecord(params?: CmsFormRecordParam) {
|
||||
const res = await request.get<ApiResult<CmsFormRecord[]>>(
|
||||
MODULES_API_URL + '/cms/cms-form-record',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加表单数据记录表
|
||||
*/
|
||||
export async function addCmsFormRecord(data: CmsFormRecord) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-form-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改表单数据记录表
|
||||
*/
|
||||
export async function updateCmsFormRecord(data: CmsFormRecord) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-form-record',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除表单数据记录表
|
||||
*/
|
||||
export async function removeCmsFormRecord(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-form-record/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除表单数据记录表
|
||||
*/
|
||||
export async function removeBatchCmsFormRecord(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-form-record/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询表单数据记录表
|
||||
*/
|
||||
export async function getCmsFormRecord(id: number) {
|
||||
const res = await request.get<ApiResult<CmsFormRecord>>(
|
||||
MODULES_API_URL + '/cms/cms-form-record/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
41
app/api/cms/cmsFormRecord/model/index.ts
Normal file
41
app/api/cms/cmsFormRecord/model/index.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 表单数据记录表
|
||||
*/
|
||||
export interface CmsFormRecord {
|
||||
// ID
|
||||
formRecordId?: number;
|
||||
// 手机号
|
||||
phone?: string;
|
||||
// 表单数据
|
||||
formData?: string;
|
||||
// 表单ID
|
||||
formId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 商户ID
|
||||
merchantId?: number;
|
||||
// 姓名
|
||||
name?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 表单数据记录表搜索条件
|
||||
*/
|
||||
export interface CmsFormRecordParam extends PageParam {
|
||||
formRecordId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsLang/index.ts
Normal file
106
app/api/cms/cmsLang/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsLang, CmsLangParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询国际化
|
||||
*/
|
||||
export async function pageCmsLang(params: CmsLangParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsLang>>>(
|
||||
MODULES_API_URL + '/cms/cms-lang/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询国际化列表
|
||||
*/
|
||||
export async function listCmsLang(params?: CmsLangParam) {
|
||||
const res = await request.get<ApiResult<CmsLang[]>>(
|
||||
MODULES_API_URL + '/cms/cms-lang',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加国际化
|
||||
*/
|
||||
export async function addCmsLang(data: CmsLang) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-lang',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改国际化
|
||||
*/
|
||||
export async function updateCmsLang(data: CmsLang) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-lang',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除国际化
|
||||
*/
|
||||
export async function removeCmsLang(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-lang/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除国际化
|
||||
*/
|
||||
export async function removeBatchCmsLang(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-lang/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询国际化
|
||||
*/
|
||||
export async function getCmsLang(id: number) {
|
||||
const res = await request.get<ApiResult<CmsLang>>(
|
||||
MODULES_API_URL + '/cms/cms-lang/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
35
app/api/cms/cmsLang/model/index.ts
Normal file
35
app/api/cms/cmsLang/model/index.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 国际化
|
||||
*/
|
||||
export interface CmsLang {
|
||||
// ID
|
||||
id?: number;
|
||||
// 名称
|
||||
name?: string;
|
||||
// 编码
|
||||
code?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 国际化搜索条件
|
||||
*/
|
||||
export interface CmsLangParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsLangLog/index.ts
Normal file
106
app/api/cms/cmsLangLog/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsLangLog, CmsLangLogParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询国际化记录启用
|
||||
*/
|
||||
export async function pageCmsLangLog(params: CmsLangLogParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsLangLog>>>(
|
||||
MODULES_API_URL + '/cms/cms-lang-log/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询国际化记录启用列表
|
||||
*/
|
||||
export async function listCmsLangLog(params?: CmsLangLogParam) {
|
||||
const res = await request.get<ApiResult<CmsLangLog[]>>(
|
||||
MODULES_API_URL + '/cms/cms-lang-log',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加国际化记录启用
|
||||
*/
|
||||
export async function addCmsLangLog(data: CmsLangLog) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-lang-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改国际化记录启用
|
||||
*/
|
||||
export async function updateCmsLangLog(data: CmsLangLog) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-lang-log',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除国际化记录启用
|
||||
*/
|
||||
export async function removeCmsLangLog(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-lang-log/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除国际化记录启用
|
||||
*/
|
||||
export async function removeBatchCmsLangLog(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-lang-log/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询国际化记录启用
|
||||
*/
|
||||
export async function getCmsLangLog(id: number) {
|
||||
const res = await request.get<ApiResult<CmsLangLog>>(
|
||||
MODULES_API_URL + '/cms/cms-lang-log/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
27
app/api/cms/cmsLangLog/model/index.ts
Normal file
27
app/api/cms/cmsLangLog/model/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 国际化记录启用
|
||||
*/
|
||||
export interface CmsLangLog {
|
||||
// ID
|
||||
id?: number;
|
||||
// 名称
|
||||
lang?: string;
|
||||
// 关联ID
|
||||
langId?: number;
|
||||
// 编码
|
||||
code?: string;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 国际化记录启用搜索条件
|
||||
*/
|
||||
export interface CmsLangLogParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
120
app/api/cms/cmsLink/index.ts
Normal file
120
app/api/cms/cmsLink/index.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsLink, CmsLinkParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询常用链接
|
||||
*/
|
||||
export async function pageCmsLink(params: CmsLinkParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsLink>>>(
|
||||
MODULES_API_URL + '/cms/cms-link/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询常用链接列表
|
||||
*/
|
||||
export async function listCmsLink(params?: CmsLinkParam) {
|
||||
const res = await request.get<ApiResult<CmsLink[]>>(
|
||||
MODULES_API_URL + '/cms/cms-link',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加常用链接
|
||||
*/
|
||||
export async function addCmsLink(data: CmsLink) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改常用链接
|
||||
*/
|
||||
export async function updateCmsLink(data: CmsLink) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除常用链接
|
||||
*/
|
||||
export async function removeCmsLink(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-link/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量修改常用链接
|
||||
*/
|
||||
export async function updateBatchCmsLink(data: any) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-link/batch',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除常用链接
|
||||
*/
|
||||
export async function removeBatchCmsLink(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-link/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询常用链接
|
||||
*/
|
||||
export async function getCmsLink(id: number) {
|
||||
const res = await request.get<ApiResult<CmsLink>>(
|
||||
MODULES_API_URL + '/cms/cms-link/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
45
app/api/cms/cmsLink/model/index.ts
Normal file
45
app/api/cms/cmsLink/model/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 常用链接
|
||||
*/
|
||||
export interface CmsLink {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 链接名称
|
||||
name?: string;
|
||||
// 图标
|
||||
icon?: string;
|
||||
// 链接地址
|
||||
url?: string;
|
||||
// 链接分类
|
||||
categoryId?: number;
|
||||
// 应用ID
|
||||
appId?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 语言
|
||||
lang?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 状态, 0正常, 1待确认
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 常用链接搜索条件
|
||||
*/
|
||||
export interface CmsLinkParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsModel/index.ts
Normal file
106
app/api/cms/cmsModel/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsModel, CmsModelParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询模型
|
||||
*/
|
||||
export async function pageCmsModel(params: CmsModelParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsModel>>>(
|
||||
MODULES_API_URL + '/cms/cms-model/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询模型列表
|
||||
*/
|
||||
export async function listCmsModel(params?: CmsModelParam) {
|
||||
const res = await request.get<ApiResult<CmsModel[]>>(
|
||||
MODULES_API_URL + '/cms/cms-model',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加模型
|
||||
*/
|
||||
export async function addCmsModel(data: CmsModel) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-model',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改模型
|
||||
*/
|
||||
export async function updateCmsModel(data: CmsModel) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-model',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除模型
|
||||
*/
|
||||
export async function removeCmsModel(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-model/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除模型
|
||||
*/
|
||||
export async function removeBatchCmsModel(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-model/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询模型
|
||||
*/
|
||||
export async function getCmsModel(id: number) {
|
||||
const res = await request.get<ApiResult<CmsModel>>(
|
||||
MODULES_API_URL + '/cms/cms-model/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
63
app/api/cms/cmsModel/model/index.ts
Normal file
63
app/api/cms/cmsModel/model/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 模型
|
||||
*/
|
||||
export interface CmsModel {
|
||||
// ID
|
||||
modelId?: number;
|
||||
// 模型名称
|
||||
name?: string;
|
||||
// 唯一标识
|
||||
model?: string;
|
||||
// 详情页组件
|
||||
componentDetail?: string;
|
||||
// 菜单组件地址, 目录可为空
|
||||
component?: string;
|
||||
// 模型banner图片
|
||||
banner?: string;
|
||||
// 缩列图
|
||||
thumb?: string;
|
||||
// 文件后缀
|
||||
suffix?: string;
|
||||
// 封面图宽
|
||||
imageWidth?: string;
|
||||
// 封面图高
|
||||
imageHeight?: string;
|
||||
// 样式
|
||||
style?: string;
|
||||
// Banner上的标题
|
||||
title?: string;
|
||||
// Banner上的描述
|
||||
desc?: string;
|
||||
// 列表显示方式(10小图展示 20大图展示)
|
||||
showType?: number;
|
||||
// 是否禁用
|
||||
disabled?: boolean;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 状态, 0已发布, 1待审核 2已驳回 3违规内容
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
label?: string;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模型搜索条件
|
||||
*/
|
||||
export interface CmsModelParam extends PageParam {
|
||||
modelId?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
151
app/api/cms/cmsNavigation/index.ts
Normal file
151
app/api/cms/cmsNavigation/index.ts
Normal file
@@ -0,0 +1,151 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsNavigation, CmsNavigationParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询网站导航记录表
|
||||
*/
|
||||
export async function pageCmsNavigation(params: CmsNavigationParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsNavigation>>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网站导航记录表列表
|
||||
*/
|
||||
export async function listCmsNavigation(params?: CmsNavigationParam) {
|
||||
const res = await request.get<ApiResult<CmsNavigation[]>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询导航列表(树形结构)
|
||||
*/
|
||||
export async function treeNavigation(params?: CmsNavigationParam) {
|
||||
const res = await request.get<ApiResult<CmsNavigation[]>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation/tree',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
/**
|
||||
* 添加网站导航记录表
|
||||
*/
|
||||
export async function addCmsNavigation(data: CmsNavigation) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站导航记录表
|
||||
*/
|
||||
export async function updateCmsNavigation(data: CmsNavigation) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网站导航记录表
|
||||
*/
|
||||
export async function removeCmsNavigation(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网站导航记录表
|
||||
*/
|
||||
export async function removeBatchCmsNavigation(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询网站导航记录表
|
||||
*/
|
||||
export async function getCmsNavigation(id: number) {
|
||||
const res = await request.get<ApiResult<CmsNavigation>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据code查询导航
|
||||
*/
|
||||
export async function getByCode(code: string) {
|
||||
const res = await request.get<ApiResult<CmsNavigation>>(
|
||||
'/cms/cms-navigation/getByCode/' + code
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导航批量导入
|
||||
*/
|
||||
export async function importCmsNavigation(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-navigation/import',
|
||||
formData
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
110
app/api/cms/cmsNavigation/model/index.ts
Normal file
110
app/api/cms/cmsNavigation/model/index.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 网站导航记录表
|
||||
*/
|
||||
export interface CmsNavigation {
|
||||
// ID
|
||||
navigationId?: number;
|
||||
// 上级id, 0是顶级
|
||||
parentId?: number;
|
||||
// 菜单名称
|
||||
title?: string;
|
||||
// 模型
|
||||
model?: string;
|
||||
// 标识
|
||||
code?: string;
|
||||
// 菜单路由地址
|
||||
path?: string;
|
||||
// 菜单组件地址, 目录可为空
|
||||
component?: string;
|
||||
componentPath?: string;
|
||||
// 打开位置
|
||||
target?: string;
|
||||
// 菜单图标
|
||||
icon?: string;
|
||||
// banner图片
|
||||
banner?: string;
|
||||
// 图标颜色
|
||||
color?: string;
|
||||
// 是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)
|
||||
hide?: number;
|
||||
// 可见类型 0所有人 1登录可见 2密码可见
|
||||
permission?: number;
|
||||
// 访问密码
|
||||
password?: string;
|
||||
// 位置 0不限 1顶部 2底部
|
||||
position?: number;
|
||||
// 仅在顶部显示
|
||||
top?: number;
|
||||
// 仅在底部显示
|
||||
bottom?: number;
|
||||
// 菜单侧栏选中的path
|
||||
active?: string;
|
||||
// 其它路由元信息
|
||||
meta?: string;
|
||||
// css样式
|
||||
style?: string;
|
||||
// 父级栏目路由
|
||||
parentPath?: string;
|
||||
// 父级栏目名称
|
||||
parentName?: string;
|
||||
// 父级栏目位置
|
||||
parentPosition?: number;
|
||||
// 模型名称
|
||||
modelName?: string;
|
||||
// 类型(已废弃)
|
||||
type?: number;
|
||||
// 绑定的页面(已废弃)
|
||||
pageId?: number;
|
||||
// 项目ID
|
||||
itemId?: number;
|
||||
// 是否微信小程序菜单
|
||||
isMpWeixin?: string;
|
||||
gutter?: number;
|
||||
span?: number;
|
||||
readNum?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 国际化语言
|
||||
lang?: string;
|
||||
// 设为首页
|
||||
home?: number;
|
||||
// 是否推荐
|
||||
recommend?: boolean;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
children?: CmsNavigation[];
|
||||
disabled?: boolean;
|
||||
label?: string;
|
||||
value?: number;
|
||||
suffix?: string;
|
||||
showBanner?: boolean;
|
||||
showLayout?: boolean;
|
||||
langCategoryId?: number;
|
||||
}
|
||||
|
||||
// Runtime-friendly named export.
|
||||
// Some build tooling may incorrectly generate value imports for type-only exports.
|
||||
export const CmsNavigation = {} as const;
|
||||
|
||||
/**
|
||||
* 网站导航记录表搜索条件
|
||||
*/
|
||||
export interface CmsNavigationParam extends PageParam {
|
||||
navigationId?: number;
|
||||
model?: string;
|
||||
lang?: string;
|
||||
recommend?: boolean;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsOrder/index.ts
Normal file
106
app/api/cms/cmsOrder/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsOrder, CmsOrderParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询订单
|
||||
*/
|
||||
export async function pageCmsOrder(params: CmsOrderParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsOrder>>>(
|
||||
MODULES_API_URL + '/cms/cms-order/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
export async function listCmsOrder(params?: CmsOrderParam) {
|
||||
const res = await request.get<ApiResult<CmsOrder[]>>(
|
||||
MODULES_API_URL + '/cms/cms-order',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加订单
|
||||
*/
|
||||
export async function addCmsOrder(data: CmsOrder) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*/
|
||||
export async function updateCmsOrder(data: CmsOrder) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-order',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
export async function removeCmsOrder(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-order/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*/
|
||||
export async function removeBatchCmsOrder(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-order/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询订单
|
||||
*/
|
||||
export async function getCmsOrder(id: number) {
|
||||
const res = await request.get<ApiResult<CmsOrder>>(
|
||||
MODULES_API_URL + '/cms/cms-order/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
66
app/api/cms/cmsOrder/model/index.ts
Normal file
66
app/api/cms/cmsOrder/model/index.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 订单
|
||||
*/
|
||||
export interface CmsOrder {
|
||||
// 订单号
|
||||
orderId?: number;
|
||||
// 订单标题
|
||||
title?: string;
|
||||
// 订单编号
|
||||
orderNo?: string;
|
||||
// 订单类型,0商城 1询价 2留言
|
||||
type?: number;
|
||||
// 关联项目ID,配合订单类型使用
|
||||
itemId?: number;
|
||||
// 真实姓名
|
||||
realName?: string;
|
||||
// 手机号码
|
||||
phone?: string;
|
||||
// 电子邮箱
|
||||
email?: string;
|
||||
// 收货地址
|
||||
address?: string;
|
||||
// 订单内容
|
||||
content?: string;
|
||||
// 订单附件
|
||||
files?: string;
|
||||
// 订单总额
|
||||
totalPrice?: string;
|
||||
// 实际付款
|
||||
payPrice?: string;
|
||||
// 报价询价
|
||||
price?: string;
|
||||
// 购买数量
|
||||
totalNum?: number;
|
||||
// 二维码地址,保存订单号,支付成功后才生成
|
||||
qrcode?: string;
|
||||
// 下单渠道,0网站 1小程序 2其他
|
||||
channel?: number;
|
||||
// 过期时间
|
||||
expirationTime?: string;
|
||||
// 订单是否已结算(0未结算 1已结算)
|
||||
isSettled?: boolean;
|
||||
// 用户id
|
||||
userId?: number;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单搜索条件
|
||||
*/
|
||||
export interface CmsOrderParam extends PageParam {
|
||||
orderId?: number;
|
||||
isSettled?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsStatistics/index.ts
Normal file
106
app/api/cms/cmsStatistics/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsStatistics, CmsStatisticsParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询站点统计信息表
|
||||
*/
|
||||
export async function pageCmsStatistics(params: CmsStatisticsParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsStatistics>>>(
|
||||
MODULES_API_URL + '/cms/cms-statistics/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点统计信息表列表
|
||||
*/
|
||||
export async function listCmsStatistics(params?: CmsStatisticsParam) {
|
||||
const res = await request.get<ApiResult<CmsStatistics[]>>(
|
||||
MODULES_API_URL + '/cms/cms-statistics',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加站点统计信息表
|
||||
*/
|
||||
export async function addCmsStatistics(data: CmsStatistics) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-statistics',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改站点统计信息表
|
||||
*/
|
||||
export async function updateCmsStatistics(data: CmsStatistics) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-statistics',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除站点统计信息表
|
||||
*/
|
||||
export async function removeCmsStatistics(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-statistics/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除站点统计信息表
|
||||
*/
|
||||
export async function removeBatchCmsStatistics(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-statistics/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询站点统计信息表
|
||||
*/
|
||||
export async function getCmsStatistics(id: number) {
|
||||
const res = await request.get<ApiResult<CmsStatistics>>(
|
||||
MODULES_API_URL + '/cms/cms-statistics/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
79
app/api/cms/cmsStatistics/model/index.ts
Normal file
79
app/api/cms/cmsStatistics/model/index.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 站点统计信息表
|
||||
*/
|
||||
export interface CmsStatistics {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 站点ID
|
||||
websiteId?: number;
|
||||
// 用户总数
|
||||
userCount?: number;
|
||||
// 订单总数
|
||||
orderCount?: number;
|
||||
// 商品总数
|
||||
productCount?: number;
|
||||
// 总销售额
|
||||
totalSales?: number;
|
||||
// 本月销售额
|
||||
monthSales?: number;
|
||||
// 今日销售额
|
||||
todaySales?: number;
|
||||
// 昨日销售额
|
||||
yesterdaySales?: number;
|
||||
// 本周销售额
|
||||
weekSales?: number;
|
||||
// 本年销售额
|
||||
yearSales?: number;
|
||||
// 今日订单数
|
||||
todayOrders?: number;
|
||||
// 本月订单数
|
||||
monthOrders?: number;
|
||||
// 今日新增用户
|
||||
todayUsers?: number;
|
||||
// 本月新增用户
|
||||
monthUsers?: number;
|
||||
// 今日访问量
|
||||
todayVisits?: number;
|
||||
// 总访问量
|
||||
totalVisits?: number;
|
||||
// 商户总数
|
||||
merchantCount?: number;
|
||||
// 活跃用户数
|
||||
activeUsers?: number;
|
||||
// 转化率(%)
|
||||
conversionRate?: string;
|
||||
// 平均订单金额
|
||||
avgOrderAmount?: string;
|
||||
// 统计日期
|
||||
statisticsDate?: string;
|
||||
// 统计类型: 1日统计, 2月统计, 3年统计
|
||||
statisticsType?: number;
|
||||
// 运行天数
|
||||
runDays?: number;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 操作用户ID
|
||||
userId?: number;
|
||||
// 商户ID
|
||||
merchantId?: number;
|
||||
// 状态: 0禁用, 1启用
|
||||
status?: string;
|
||||
// 是否删除: 0否, 1是
|
||||
deleted?: string;
|
||||
// 租户ID
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 站点统计信息表搜索条件
|
||||
*/
|
||||
export interface CmsStatisticsParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
106
app/api/cms/cmsTemplate/index.ts
Normal file
106
app/api/cms/cmsTemplate/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsTemplate, CmsTemplateParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询网站模版
|
||||
*/
|
||||
export async function pageCmsTemplate(params: CmsTemplateParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsTemplate>>>(
|
||||
MODULES_API_URL + '/cms/cms-template/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网站模版列表
|
||||
*/
|
||||
export async function listCmsTemplate(params?: CmsTemplateParam) {
|
||||
const res = await request.get<ApiResult<CmsTemplate[]>>(
|
||||
MODULES_API_URL + '/cms/cms-template',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加网站模版
|
||||
*/
|
||||
export async function addCmsTemplate(data: CmsTemplate) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-template',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站模版
|
||||
*/
|
||||
export async function updateCmsTemplate(data: CmsTemplate) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-template',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网站模版
|
||||
*/
|
||||
export async function removeCmsTemplate(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-template/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网站模版
|
||||
*/
|
||||
export async function removeBatchCmsTemplate(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-template/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询网站模版
|
||||
*/
|
||||
export async function getCmsTemplate(id: number) {
|
||||
const res = await request.get<ApiResult<CmsTemplate>>(
|
||||
MODULES_API_URL + '/cms/cms-template/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
59
app/api/cms/cmsTemplate/model/index.ts
Normal file
59
app/api/cms/cmsTemplate/model/index.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 网站模版
|
||||
*/
|
||||
export interface CmsTemplate {
|
||||
// ID
|
||||
id?: number;
|
||||
// 模版名称
|
||||
name?: string;
|
||||
// 模版标识
|
||||
code?: string;
|
||||
// 缩列图
|
||||
image?: string;
|
||||
// 类型 1企业官网 2其他
|
||||
type?: number;
|
||||
// 网站关键词
|
||||
keywords?: string;
|
||||
// 域名前缀
|
||||
prefix?: string;
|
||||
// 预览地址
|
||||
domain?: string;
|
||||
// 模版下载地址
|
||||
downUrl?: string;
|
||||
// 色系
|
||||
color?: string;
|
||||
// 应用版本 10免费版 20授权版 30永久授权
|
||||
version?: number;
|
||||
// 行业类型(父级)
|
||||
industryParent?: string;
|
||||
// 行业类型(子级)
|
||||
industryChild?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: string;
|
||||
// 是否共享模板
|
||||
share?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网站模版搜索条件
|
||||
*/
|
||||
export interface CmsTemplateParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
175
app/api/cms/cmsWebsite/index.ts
Normal file
175
app/api/cms/cmsWebsite/index.ts
Normal file
@@ -0,0 +1,175 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsWebsite, CmsWebsiteParam } from './model';
|
||||
import {MODULES_API_URL} from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 获取网站信息
|
||||
*/
|
||||
export async function getSiteInfo() {
|
||||
const res = await request.get<ApiResult<CmsWebsite>>(
|
||||
MODULES_API_URL + '/cms/cms-website/getSiteInfo',
|
||||
{
|
||||
params: {}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询网站信息记录表
|
||||
*/
|
||||
export async function pageCmsWebsite(params: CmsWebsiteParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsWebsite>>>(
|
||||
MODULES_API_URL + '/cms/cms-website/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网站信息记录表列表
|
||||
*/
|
||||
export async function listCmsWebsite(params?: CmsWebsiteParam) {
|
||||
const res = await request.get<ApiResult<CmsWebsite[]>>(
|
||||
MODULES_API_URL + '/cms/cms-website',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加网站信息记录表
|
||||
*/
|
||||
export async function addCmsWebsite(data: CmsWebsite) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站信息记录表
|
||||
*/
|
||||
export async function updateCmsWebsite(data: CmsWebsite) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网站信息记录表
|
||||
*/
|
||||
export async function removeCmsWebsite(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网站信息记录表
|
||||
*/
|
||||
export async function removeBatchCmsWebsite(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询网站信息记录表
|
||||
*/
|
||||
export async function getCmsWebsite(id: number) {
|
||||
const res = await request.get<ApiResult<CmsWebsite>>(
|
||||
MODULES_API_URL + '/cms/cms-website/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除缓存
|
||||
*/
|
||||
export async function removeSiteInfoCache(key?: string) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website/clearSiteInfo/' + key
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
export async function pageCmsWebsiteAll(params: CmsWebsiteParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsWebsite>>>(
|
||||
MODULES_API_URL + '/cms/cms-website/pageAll',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询网站
|
||||
*/
|
||||
export async function getCmsWebsiteAll(id: number) {
|
||||
const res = await request.get<ApiResult<CmsWebsite>>(
|
||||
'/cms/cms-website/getAll/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站信息记录表
|
||||
*/
|
||||
export async function updateCmsWebsiteAll(data: CmsWebsite) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/cms/cms-website/updateAll',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
168
app/api/cms/cmsWebsite/model/index.ts
Normal file
168
app/api/cms/cmsWebsite/model/index.ts
Normal file
@@ -0,0 +1,168 @@
|
||||
import type { PageParam } from '@/api';
|
||||
import type { CmsWebsiteSetting } from "@/api/cms/cmsWebsiteSetting/model";
|
||||
import type { CmsNavigation } from "@/api/cms/cmsNavigation/model";
|
||||
|
||||
/**
|
||||
* 网站信息记录表
|
||||
*/
|
||||
export interface CmsWebsite {
|
||||
// 站点ID
|
||||
websiteId?: number;
|
||||
// 网站名称
|
||||
websiteName?: string;
|
||||
// 网站标识
|
||||
websiteCode?: string;
|
||||
// 网站密钥
|
||||
websiteSecret?: string;
|
||||
// 网站LOGO
|
||||
websiteIcon?: string;
|
||||
// 网站LOGO
|
||||
websiteLogo?: string;
|
||||
// 网站LOGO(深色模式)
|
||||
websiteDarkLogo?: string;
|
||||
// 网站类型
|
||||
websiteType?: string;
|
||||
// 网站截图
|
||||
files?: string;
|
||||
// 网站类型
|
||||
type?: number;
|
||||
// 网站关键词
|
||||
keywords?: string;
|
||||
// 域名前缀
|
||||
prefix?: string;
|
||||
// 绑定域名
|
||||
domain?: string;
|
||||
// 全局样式
|
||||
style?: string;
|
||||
// 后台管理地址
|
||||
adminUrl?: string;
|
||||
// 应用版本 10标准版 20专业版 30永久授权
|
||||
version?: number;
|
||||
// 允许展示到插件市场
|
||||
market?: boolean;
|
||||
// 应用类型 0应用 1插件
|
||||
plugin?: boolean;
|
||||
// 默认编辑器
|
||||
editor?: number,
|
||||
// 服务到期时间
|
||||
expirationTime?: string;
|
||||
// 模版ID
|
||||
templateId?: number;
|
||||
// 行业类型
|
||||
category?: string;
|
||||
// 行业类型(父级)
|
||||
industryParent?: string;
|
||||
// 行业类型(子级)
|
||||
industryChild?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所在省份
|
||||
province?: string;
|
||||
// 所在城市
|
||||
city?: string;
|
||||
// 所在辖区
|
||||
region?: string;
|
||||
// 经度
|
||||
longitude?: string;
|
||||
// 纬度
|
||||
latitude?: string;
|
||||
// 街道地址
|
||||
address?: string;
|
||||
// 联系电话
|
||||
phone?: string;
|
||||
// 电子邮箱
|
||||
email?: string;
|
||||
// ICP备案号
|
||||
icpNo?: string;
|
||||
// 公安备案
|
||||
policeNo?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 是否官方
|
||||
official?: boolean;
|
||||
// 是否运行中
|
||||
running?: number;
|
||||
// 状态 0未开通 1运行中 2维护中 3已关闭 4已欠费停机 5违规关停
|
||||
status?: number;
|
||||
// 维护说明
|
||||
statusText?: string;
|
||||
// 关闭说明
|
||||
statusClose?: string;
|
||||
// 全局样式
|
||||
styles?: string;
|
||||
// 语言
|
||||
lang?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
// 网站配置
|
||||
config?: any;
|
||||
// 短信验证码
|
||||
smsCode?: string;
|
||||
// 短信验证码
|
||||
code?: string;
|
||||
// 是否记住密码
|
||||
remember?: boolean;
|
||||
// 企业名称
|
||||
companyName?: string;
|
||||
// 是否注册未超级管理员
|
||||
isSuperAdmin?: boolean;
|
||||
// 用户名
|
||||
username?: string;
|
||||
// 网站配置
|
||||
setting?: CmsWebsiteSetting;
|
||||
}
|
||||
|
||||
export interface AppInfo {
|
||||
appId?: number;
|
||||
appName?: string;
|
||||
description?: string;
|
||||
keywords?: string;
|
||||
appCode?: string;
|
||||
mpQrCode?: string;
|
||||
title?: string;
|
||||
logo?: string;
|
||||
icon?: string;
|
||||
domain?: string;
|
||||
running?: number;
|
||||
version?: number;
|
||||
expirationTime?: string;
|
||||
expired?: boolean;
|
||||
expiredDays?: number;
|
||||
soon?: number;
|
||||
statusIcon?: string;
|
||||
statusText?: string;
|
||||
config?: Object;
|
||||
serverTime?: Object;
|
||||
topNavs?: CmsNavigation[];
|
||||
bottomNavs?: CmsNavigation[];
|
||||
setting?: Object;
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网站信息记录表搜索条件
|
||||
*/
|
||||
export interface CmsWebsiteParam extends PageParam {
|
||||
websiteId?: number;
|
||||
type?: number;
|
||||
status?: number;
|
||||
plugin?: boolean;
|
||||
official?: boolean;
|
||||
keywords?: string;
|
||||
// 按用户过滤(例如:只查询当前登录用户的应用)
|
||||
userId?: number;
|
||||
}
|
||||
167
app/api/cms/cmsWebsiteField/index.ts
Normal file
167
app/api/cms/cmsWebsiteField/index.ts
Normal file
@@ -0,0 +1,167 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type {CmsWebsiteField, CmsWebsiteFieldParam, Config} from './model';
|
||||
import {MODULES_API_URL, TEMPLATE_ID} from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询应用参数
|
||||
*/
|
||||
export async function pageCmsWebsiteField(params: CmsWebsiteFieldParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsWebsiteField>>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应用参数列表
|
||||
*/
|
||||
export async function listCmsWebsiteField(params?: CmsWebsiteFieldParam) {
|
||||
const res = await request.get<ApiResult<CmsWebsiteField[]>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加应用参数
|
||||
*/
|
||||
export async function addCmsWebsiteField(data: CmsWebsiteField) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改应用参数
|
||||
*/
|
||||
export async function updateCmsWebsiteField(data: CmsWebsiteField) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除应用参数
|
||||
*/
|
||||
export async function removeCmsWebsiteField(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除应用参数
|
||||
*/
|
||||
export async function removeBatchCmsWebsiteField(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询应用参数
|
||||
*/
|
||||
export async function getCmsWebsiteField(id: number) {
|
||||
const res = await request.get<ApiResult<CmsWebsiteField>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code查询应用参数
|
||||
*/
|
||||
export async function getCmsWebsiteFieldByCode(code: string) {
|
||||
const res = await request.get<ApiResult<CmsWebsiteField>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field/getByCode/' + code
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复项目参数
|
||||
*/
|
||||
export async function undeleteWebsiteField(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/website-field/undelete/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数批量导入
|
||||
*/
|
||||
export async function importWebsiteField(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field/import',
|
||||
formData
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目参数列表
|
||||
*/
|
||||
export async function configWebsiteField(params?: CmsWebsiteFieldParam) {
|
||||
const res = await request.get<ApiResult<Config>>(
|
||||
MODULES_API_URL + '/cms/cms-website-field/config',
|
||||
{
|
||||
params,
|
||||
headers: {
|
||||
TenantId: TEMPLATE_ID
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
65
app/api/cms/cmsWebsiteField/model/index.ts
Normal file
65
app/api/cms/cmsWebsiteField/model/index.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 应用参数
|
||||
*/
|
||||
export interface CmsWebsiteField {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 类型,0文本 1图片 2其他
|
||||
type?: number;
|
||||
// 名称
|
||||
name?: string;
|
||||
// 默认值
|
||||
defaultValue?: string;
|
||||
// 可修改的值 [on|off]
|
||||
modifyRange?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// css样式
|
||||
style?: string;
|
||||
// 名称
|
||||
value?: any;
|
||||
// 语言
|
||||
lang?: string;
|
||||
// 是否加密
|
||||
encrypted?: boolean;
|
||||
// 模板
|
||||
template?: string;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用参数搜索条件
|
||||
*/
|
||||
export interface CmsWebsiteFieldParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
siteName?: string;
|
||||
siteLogo?: string;
|
||||
domain?: string;
|
||||
icpNo?: string;
|
||||
copyright?: string;
|
||||
loginBgImg?: string;
|
||||
address?: string;
|
||||
tel?: string;
|
||||
kefu2?: string;
|
||||
kefu1?: string;
|
||||
email?: string;
|
||||
loginTitle?: string;
|
||||
sysLogo?: string;
|
||||
// 添加API地址配置项
|
||||
ApiUrl?: string;
|
||||
// 添加主题配置项
|
||||
theme?: string;
|
||||
}
|
||||
106
app/api/cms/cmsWebsiteSetting/index.ts
Normal file
106
app/api/cms/cmsWebsiteSetting/index.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsWebsiteSetting, CmsWebsiteSettingParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询网站设置
|
||||
*/
|
||||
export async function pageCmsWebsiteSetting(params: CmsWebsiteSettingParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsWebsiteSetting>>>(
|
||||
MODULES_API_URL + '/cms/cms-website-setting/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网站设置列表
|
||||
*/
|
||||
export async function listCmsWebsiteSetting(params?: CmsWebsiteSettingParam) {
|
||||
const res = await request.get<ApiResult<CmsWebsiteSetting[]>>(
|
||||
MODULES_API_URL + '/cms/cms-website-setting',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加网站设置
|
||||
*/
|
||||
export async function addCmsWebsiteSetting(data: CmsWebsiteSetting) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-setting',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站设置
|
||||
*/
|
||||
export async function updateCmsWebsiteSetting(data: CmsWebsiteSetting) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-setting',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网站设置
|
||||
*/
|
||||
export async function removeCmsWebsiteSetting(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-setting/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网站设置
|
||||
*/
|
||||
export async function removeBatchCmsWebsiteSetting(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/cms/cms-website-setting/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询网站设置
|
||||
*/
|
||||
export async function getCmsWebsiteSetting(id: number) {
|
||||
const res = await request.get<ApiResult<CmsWebsiteSetting>>(
|
||||
MODULES_API_URL + '/cms/cms-website-setting/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
app/api/cms/cmsWebsiteSetting/model/index.ts
Normal file
55
app/api/cms/cmsWebsiteSetting/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 网站设置
|
||||
*/
|
||||
export interface CmsWebsiteSetting {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 关联网站ID
|
||||
websiteId?: number;
|
||||
// 是否官方插件
|
||||
official?: string;
|
||||
// 是否展示在插件市场
|
||||
market?: string;
|
||||
// 是否允许被搜索
|
||||
search?: string;
|
||||
// 是否共享
|
||||
share?: string;
|
||||
// 文章是否需要审核
|
||||
articleReview?: boolean;
|
||||
// 是否插件 0应用1 插件
|
||||
plugin?: string;
|
||||
// 编辑器类型 1 md-editor-v3, 2 tinymce-editor
|
||||
editor?: number;
|
||||
// 显示站内搜索
|
||||
searchBtn?: string;
|
||||
// 显示登录注册功能
|
||||
loginBtn?: string;
|
||||
// 显示悬浮客服工具
|
||||
floatTool?: boolean;
|
||||
// 显示版权信息
|
||||
showCopyright?: boolean;
|
||||
// 显示版权链接
|
||||
copyrightLink?: string;
|
||||
// 导航栏最多显示数量
|
||||
maxMenuNum?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网站设置搜索条件
|
||||
*/
|
||||
export interface CmsWebsiteSettingParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
113
app/api/cms/link/index.ts
Normal file
113
app/api/cms/link/index.ts
Normal file
@@ -0,0 +1,113 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { Link, LinkParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config/setting';
|
||||
|
||||
/**
|
||||
* 分页查询链接
|
||||
*/
|
||||
export async function pageLink(params: LinkParam) {
|
||||
const res = await request.get<ApiResult<PageResult<Link>>>(
|
||||
MODULES_API_URL + '/oa/link/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询链接列表
|
||||
*/
|
||||
export async function listLink(params?: LinkParam) {
|
||||
const res = await request.get<ApiResult<Link[]>>(
|
||||
MODULES_API_URL + '/oa/link',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加链接
|
||||
*/
|
||||
export async function addLink(data: Link) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改链接
|
||||
*/
|
||||
export async function updateLink(data: Link) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除链接
|
||||
*/
|
||||
export async function removeLink(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除链接
|
||||
*/
|
||||
export async function removeBatchLink(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查IP是否存在
|
||||
*/
|
||||
export async function checkExistence(
|
||||
field: string,
|
||||
value: string,
|
||||
id?: number
|
||||
) {
|
||||
const res = await request.get<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/oa/link/existence',
|
||||
{
|
||||
params: { field, value, id }
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
31
app/api/cms/link/model/index.ts
Normal file
31
app/api/cms/link/model/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 链接
|
||||
*/
|
||||
export interface Link {
|
||||
id?: number;
|
||||
name?: string;
|
||||
icon?: string;
|
||||
url?: string;
|
||||
linkType?: string;
|
||||
appId?: number;
|
||||
categoryId?: number;
|
||||
userId?: number;
|
||||
comments?: string;
|
||||
recommend?: number;
|
||||
sortNumber?: number;
|
||||
deleted?: number;
|
||||
status?: number;
|
||||
createTime?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* 链接搜索条件
|
||||
*/
|
||||
export interface LinkParam extends PageParam {
|
||||
id?: number;
|
||||
linkType?: string;
|
||||
categoryId?: number;
|
||||
name?: string;
|
||||
}
|
||||
126
app/api/credit/creditBreachOfTrust/index.ts
Normal file
126
app/api/credit/creditBreachOfTrust/index.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditBreachOfTrust, CreditBreachOfTrustParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询失信被执行人
|
||||
*/
|
||||
export async function pageCreditBreachOfTrust(params: CreditBreachOfTrustParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditBreachOfTrust>>>(
|
||||
'/credit/credit-breach-of-trust/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询失信被执行人列表
|
||||
*/
|
||||
export async function listCreditBreachOfTrust(params?: CreditBreachOfTrustParam) {
|
||||
const res = await request.get<ApiResult<CreditBreachOfTrust[]>>(
|
||||
'/credit/credit-breach-of-trust',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加失信被执行人
|
||||
*/
|
||||
export async function addCreditBreachOfTrust(data: CreditBreachOfTrust) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改失信被执行人
|
||||
*/
|
||||
export async function updateCreditBreachOfTrust(data: CreditBreachOfTrust) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除失信被执行人
|
||||
*/
|
||||
export async function removeCreditBreachOfTrust(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除失信被执行人
|
||||
*/
|
||||
export async function removeBatchCreditBreachOfTrust(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询失信被执行人
|
||||
*/
|
||||
export async function getCreditBreachOfTrust(id: number) {
|
||||
const res = await request.get<ApiResult<CreditBreachOfTrust>>(
|
||||
'/credit/credit-breach-of-trust/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入失信被执行人
|
||||
*/
|
||||
export async function importCreditBreachOfTrust(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-breach-of-trust/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
app/api/credit/creditBreachOfTrust/model/index.ts
Normal file
55
app/api/credit/creditBreachOfTrust/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 失信被执行人
|
||||
*/
|
||||
export interface CreditBreachOfTrust {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 失信被执行人搜索条件
|
||||
*/
|
||||
export interface CreditBreachOfTrustParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
126
app/api/credit/creditCaseFiling/index.ts
Normal file
126
app/api/credit/creditCaseFiling/index.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CreditCaseFiling, CreditCaseFilingParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询司法大数据
|
||||
*/
|
||||
export async function pageCreditCaseFiling(params: CreditCaseFilingParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CreditCaseFiling>>>(
|
||||
'/credit/credit-case-filing/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询司法大数据列表
|
||||
*/
|
||||
export async function listCreditCaseFiling(params?: CreditCaseFilingParam) {
|
||||
const res = await request.get<ApiResult<CreditCaseFiling[]>>(
|
||||
'/credit/credit-case-filing',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加司法大数据
|
||||
*/
|
||||
export async function addCreditCaseFiling(data: CreditCaseFiling) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改司法大数据
|
||||
*/
|
||||
export async function updateCreditCaseFiling(data: CreditCaseFiling) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除司法大数据
|
||||
*/
|
||||
export async function removeCreditCaseFiling(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除司法大数据
|
||||
*/
|
||||
export async function removeBatchCreditCaseFiling(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询司法大数据
|
||||
*/
|
||||
export async function getCreditCaseFiling(id: number) {
|
||||
const res = await request.get<ApiResult<CreditCaseFiling>>(
|
||||
'/credit/credit-case-filing/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入司法大数据
|
||||
*/
|
||||
export async function importCreditCaseFiling(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/credit/credit-case-filing/import',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
}
|
||||
55
app/api/credit/creditCaseFiling/model/index.ts
Normal file
55
app/api/credit/creditCaseFiling/model/index.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 司法大数据
|
||||
*/
|
||||
export interface CreditCaseFiling {
|
||||
// ID
|
||||
id?: number;
|
||||
// 数据类型
|
||||
dataType?: string;
|
||||
// 原告/上诉人
|
||||
plaintiffAppellant?: string;
|
||||
// 被告/被上诉人
|
||||
appellee?: string;
|
||||
// 其他当事人/第三人
|
||||
otherPartiesThirdParty?: string;
|
||||
// 发生时间
|
||||
occurrenceTime?: string;
|
||||
// 案号
|
||||
caseNumber?: string;
|
||||
// 案由
|
||||
causeOfAction?: string;
|
||||
// 涉案金额
|
||||
involvedAmount?: string;
|
||||
// 法院
|
||||
courtName?: string;
|
||||
// 数据状态
|
||||
dataStatus?: string;
|
||||
// 备注
|
||||
comments?: string;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 排序(数字越小越靠前)
|
||||
sortNumber?: number;
|
||||
// 状态, 0正常, 1冻结
|
||||
status?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 用户ID
|
||||
userId?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 司法大数据搜索条件
|
||||
*/
|
||||
export interface CreditCaseFilingParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user