style(api): 统一代码格式化规范
- 调整 import 语句格式,统一空格和引号风格 - 修复函数参数跨行时的格式对齐问题 - 清理多余空行和注释中的空白字符 - 统一对象属性结尾逗号的使用规范 - 规范化字符串拼接和模板语法的格式 - 优化长参数列表的换行和缩进格式
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
VITE_APP_NAME=后台管理(开发环境)
|
VITE_APP_NAME=后台管理(开发环境)
|
||||||
VITE_API_URL=http://127.0.0.1:9200/api
|
#VITE_API_URL=http://127.0.0.1:9200/api
|
||||||
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
#VITE_SERVER_API_URL=http://127.0.0.1:8000/api
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import { MODULES_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model";
|
import { ShopOrder, ShopOrderParam } from '@/api/shop/shopOrder/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询百色中学-捐款记录
|
* 分页查询百色中学-捐款记录
|
||||||
@@ -19,7 +19,6 @@ export async function pageBszxOrder(params: ShopOrderParam) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计订单总金额(只统计有效订单)
|
* 统计订单总金额(只统计有效订单)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import request from '@/utils/request';
|
|||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { BszxPay, BszxPayParam } from './model';
|
import type { BszxPay, BszxPayParam } from './model';
|
||||||
import { MODULES_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
import {ShopOrder} from "@/api/shop/shopOrder/model";
|
import { ShopOrder } from '@/api/shop/shopOrder/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询百色中学-捐款记录
|
* 分页查询百色中学-捐款记录
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import request from '@/utils/request';
|
|||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { BszxPayRanking, BszxPayRankingParam } from './model';
|
import type { BszxPayRanking, BszxPayRankingParam } from './model';
|
||||||
import { MODULES_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
import {BszxClass, BszxClassParam} from "@/api/bszx/bszxClass/model";
|
import { BszxClass, BszxClassParam } from '@/api/bszx/bszxClass/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询百色中学-捐款排行
|
* 分页查询百色中学-捐款排行
|
||||||
@@ -62,8 +62,6 @@ export async function ranking2(params?: BszxClassParam) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加百色中学-捐款排行
|
* 添加百色中学-捐款排行
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -22,12 +22,9 @@ export async function pageCmsArticle(params: CmsArticleParam) {
|
|||||||
* 查询文章列表
|
* 查询文章列表
|
||||||
*/
|
*/
|
||||||
export async function listCmsArticle(params?: CmsArticleParam) {
|
export async function listCmsArticle(params?: CmsArticleParam) {
|
||||||
const res = await request.get<ApiResult<CmsArticle[]>>(
|
const res = await request.get<ApiResult<CmsArticle[]>>('/cms/cms-article', {
|
||||||
'/cms/cms-article',
|
|
||||||
{
|
|
||||||
params
|
params
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -38,10 +35,7 @@ export async function listCmsArticle(params?: CmsArticleParam) {
|
|||||||
* 添加文章
|
* 添加文章
|
||||||
*/
|
*/
|
||||||
export async function addCmsArticle(data: CmsArticle) {
|
export async function addCmsArticle(data: CmsArticle) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>('/cms/cms-article', data);
|
||||||
'/cms/cms-article',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
}
|
}
|
||||||
@@ -52,10 +46,7 @@ export async function addCmsArticle(data: CmsArticle) {
|
|||||||
* 修改文章
|
* 修改文章
|
||||||
*/
|
*/
|
||||||
export async function updateCmsArticle(data: CmsArticle) {
|
export async function updateCmsArticle(data: CmsArticle) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>('/cms/cms-article', data);
|
||||||
'/cms/cms-article',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
}
|
}
|
||||||
@@ -141,7 +132,6 @@ export async function getCount(params: CmsArticleParam) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文章批量导入
|
* 文章批量导入
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export async function removeCmsArticleComment(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除文章评论表
|
* 批量删除文章评论表
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCmsArticleComment(data: (number | undefined)[]) {
|
export async function removeBatchCmsArticleComment(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/cms/cms-article-comment/batch',
|
MODULES_API_URL + '/cms/cms-article-comment/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export async function removeCmsArticleContent(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除文章记录表
|
* 批量删除文章记录表
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCmsArticleContent(data: (number | undefined)[]) {
|
export async function removeBatchCmsArticleContent(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/cms/cms-article-content/batch',
|
MODULES_API_URL + '/cms/cms-article-content/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ export async function resolvable(id: number) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据授权主域名
|
* 根据授权主域名
|
||||||
*/
|
*/
|
||||||
@@ -144,7 +143,9 @@ export async function getAuthorizedDomain() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const res = await request.get<ApiResult<CmsDomain>>(
|
const res = await request.get<ApiResult<CmsDomain>>(
|
||||||
SERVER_API_URL + '/cms/cms-domain/getAuthorizedDomain/' + localStorage.getItem('WebsiteId')
|
SERVER_API_URL +
|
||||||
|
'/cms/cms-domain/getAuthorizedDomain/' +
|
||||||
|
localStorage.getItem('WebsiteId')
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ export async function getCmsNavigation(id: number) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据code查询导航
|
* 根据code查询导航
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { PageParam } from '@/api';
|
import type { PageParam } from '@/api';
|
||||||
import {CmsWebsiteSetting} from "@/api/cms/cmsWebsiteSetting/model";
|
import { CmsWebsiteSetting } from '@/api/cms/cmsWebsiteSetting/model';
|
||||||
import {CmsNavigation} from "@/api/cms/cmsNavigation/model";
|
import { CmsNavigation } from '@/api/cms/cmsNavigation/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 网站信息记录表
|
* 网站信息记录表
|
||||||
@@ -43,7 +43,7 @@ export interface CmsWebsite {
|
|||||||
// 应用类型 0应用 1插件
|
// 应用类型 0应用 1插件
|
||||||
plugin?: boolean;
|
plugin?: boolean;
|
||||||
// 默认编辑器
|
// 默认编辑器
|
||||||
editor?: number,
|
editor?: number;
|
||||||
// 服务到期时间
|
// 服务到期时间
|
||||||
expirationTime?: string;
|
expirationTime?: string;
|
||||||
// 模版ID
|
// 模版ID
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export async function removeCmsWebsiteSetting(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除网站设置
|
* 批量删除网站设置
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCmsWebsiteSetting(data: (number | undefined)[]) {
|
export async function removeBatchCmsWebsiteSetting(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/cms/cms-website-setting/batch',
|
MODULES_API_URL + '/cms/cms-website-setting/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { CreditAdministrativeLicense, CreditAdministrativeLicenseParam } from './model';
|
import type {
|
||||||
|
CreditAdministrativeLicense,
|
||||||
|
CreditAdministrativeLicenseParam
|
||||||
|
} from './model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询行政许可
|
* 分页查询行政许可
|
||||||
*/
|
*/
|
||||||
export async function pageCreditAdministrativeLicense(params: CreditAdministrativeLicenseParam) {
|
export async function pageCreditAdministrativeLicense(
|
||||||
const res = await request.get<ApiResult<PageResult<CreditAdministrativeLicense>>>(
|
params: CreditAdministrativeLicenseParam
|
||||||
'/credit/credit-administrative-license/page',
|
) {
|
||||||
{
|
const res = await request.get<
|
||||||
|
ApiResult<PageResult<CreditAdministrativeLicense>>
|
||||||
|
>('/credit/credit-administrative-license/page', {
|
||||||
params
|
params
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -21,7 +25,9 @@ export async function pageCreditAdministrativeLicense(params: CreditAdministrati
|
|||||||
/**
|
/**
|
||||||
* 查询行政许可列表
|
* 查询行政许可列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditAdministrativeLicense(params?: CreditAdministrativeLicenseParam) {
|
export async function listCreditAdministrativeLicense(
|
||||||
|
params?: CreditAdministrativeLicenseParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditAdministrativeLicense[]>>(
|
const res = await request.get<ApiResult<CreditAdministrativeLicense[]>>(
|
||||||
'/credit/credit-administrative-license',
|
'/credit/credit-administrative-license',
|
||||||
{
|
{
|
||||||
@@ -37,7 +43,9 @@ export async function listCreditAdministrativeLicense(params?: CreditAdministrat
|
|||||||
/**
|
/**
|
||||||
* 添加行政许可
|
* 添加行政许可
|
||||||
*/
|
*/
|
||||||
export async function addCreditAdministrativeLicense(data: CreditAdministrativeLicense) {
|
export async function addCreditAdministrativeLicense(
|
||||||
|
data: CreditAdministrativeLicense
|
||||||
|
) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-administrative-license',
|
'/credit/credit-administrative-license',
|
||||||
data
|
data
|
||||||
@@ -51,7 +59,9 @@ export async function addCreditAdministrativeLicense(data: CreditAdministrativeL
|
|||||||
/**
|
/**
|
||||||
* 修改行政许可
|
* 修改行政许可
|
||||||
*/
|
*/
|
||||||
export async function updateCreditAdministrativeLicense(data: CreditAdministrativeLicense) {
|
export async function updateCreditAdministrativeLicense(
|
||||||
|
data: CreditAdministrativeLicense
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/credit/credit-administrative-license',
|
'/credit/credit-administrative-license',
|
||||||
data
|
data
|
||||||
@@ -78,7 +88,9 @@ export async function removeCreditAdministrativeLicense(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除行政许可
|
* 批量删除行政许可
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditAdministrativeLicense(data: (number | undefined)[]) {
|
export async function removeBatchCreditAdministrativeLicense(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-administrative-license/batch',
|
'/credit/credit-administrative-license/batch',
|
||||||
{
|
{
|
||||||
@@ -107,7 +119,10 @@ export async function getCreditAdministrativeLicense(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入行政许可
|
* 导入行政许可
|
||||||
*/
|
*/
|
||||||
export async function importCreditAdministrativeLicense(file: File, companyId?: number) {
|
export async function importCreditAdministrativeLicense(
|
||||||
|
file: File,
|
||||||
|
companyId?: number
|
||||||
|
) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
if (companyId != null) {
|
if (companyId != null) {
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeCreditBankruptcy(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除破产重整
|
* 批量删除破产重整
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditBankruptcy(data: (number | undefined)[]) {
|
export async function removeBatchCreditBankruptcy(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-bankruptcy/batch',
|
'/credit/credit-bankruptcy/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import type { CreditBreachOfTrust, CreditBreachOfTrustParam } from './model';
|
|||||||
/**
|
/**
|
||||||
* 分页查询失信被执行人
|
* 分页查询失信被执行人
|
||||||
*/
|
*/
|
||||||
export async function pageCreditBreachOfTrust(params: CreditBreachOfTrustParam) {
|
export async function pageCreditBreachOfTrust(
|
||||||
|
params: CreditBreachOfTrustParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<CreditBreachOfTrust>>>(
|
const res = await request.get<ApiResult<PageResult<CreditBreachOfTrust>>>(
|
||||||
'/credit/credit-breach-of-trust/page',
|
'/credit/credit-breach-of-trust/page',
|
||||||
{
|
{
|
||||||
@@ -21,7 +23,9 @@ export async function pageCreditBreachOfTrust(params: CreditBreachOfTrustParam)
|
|||||||
/**
|
/**
|
||||||
* 查询失信被执行人列表
|
* 查询失信被执行人列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditBreachOfTrust(params?: CreditBreachOfTrustParam) {
|
export async function listCreditBreachOfTrust(
|
||||||
|
params?: CreditBreachOfTrustParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditBreachOfTrust[]>>(
|
const res = await request.get<ApiResult<CreditBreachOfTrust[]>>(
|
||||||
'/credit/credit-breach-of-trust',
|
'/credit/credit-breach-of-trust',
|
||||||
{
|
{
|
||||||
@@ -78,7 +82,9 @@ export async function removeCreditBreachOfTrust(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除失信被执行人
|
* 批量删除失信被执行人
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditBreachOfTrust(data: (number | undefined)[]) {
|
export async function removeBatchCreditBreachOfTrust(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-breach-of-trust/batch',
|
'/credit/credit-breach-of-trust/batch',
|
||||||
{
|
{
|
||||||
@@ -107,7 +113,10 @@ export async function getCreditBreachOfTrust(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入失信被执行人
|
* 导入失信被执行人
|
||||||
*/
|
*/
|
||||||
export async function importCreditBreachOfTrust(file: File, companyId?: number) {
|
export async function importCreditBreachOfTrust(
|
||||||
|
file: File,
|
||||||
|
companyId?: number
|
||||||
|
) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
if (companyId != null) {
|
if (companyId != null) {
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeCreditCaseFiling(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除司法大数据
|
* 批量删除司法大数据
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditCaseFiling(data: (number | undefined)[]) {
|
export async function removeBatchCreditCaseFiling(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-case-filing/batch',
|
'/credit/credit-case-filing/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeCreditCompetitor(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除竞争对手
|
* 批量删除竞争对手
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditCompetitor(data: (number | undefined)[]) {
|
export async function removeBatchCreditCompetitor(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-competitor/batch',
|
'/credit/credit-competitor/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { CreditCourtAnnouncement, CreditCourtAnnouncementParam } from './model';
|
import type {
|
||||||
|
CreditCourtAnnouncement,
|
||||||
|
CreditCourtAnnouncementParam
|
||||||
|
} from './model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询法院公告司法大数据
|
* 分页查询法院公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function pageCreditCourtAnnouncement(params: CreditCourtAnnouncementParam) {
|
export async function pageCreditCourtAnnouncement(
|
||||||
|
params: CreditCourtAnnouncementParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<CreditCourtAnnouncement>>>(
|
const res = await request.get<ApiResult<PageResult<CreditCourtAnnouncement>>>(
|
||||||
'/credit/credit-court-announcement/page',
|
'/credit/credit-court-announcement/page',
|
||||||
{
|
{
|
||||||
@@ -21,7 +26,9 @@ export async function pageCreditCourtAnnouncement(params: CreditCourtAnnouncemen
|
|||||||
/**
|
/**
|
||||||
* 查询法院公告司法大数据列表
|
* 查询法院公告司法大数据列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditCourtAnnouncement(params?: CreditCourtAnnouncementParam) {
|
export async function listCreditCourtAnnouncement(
|
||||||
|
params?: CreditCourtAnnouncementParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditCourtAnnouncement[]>>(
|
const res = await request.get<ApiResult<CreditCourtAnnouncement[]>>(
|
||||||
'/credit/credit-court-announcement',
|
'/credit/credit-court-announcement',
|
||||||
{
|
{
|
||||||
@@ -37,7 +44,9 @@ export async function listCreditCourtAnnouncement(params?: CreditCourtAnnounceme
|
|||||||
/**
|
/**
|
||||||
* 添加法院公告司法大数据
|
* 添加法院公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function addCreditCourtAnnouncement(data: CreditCourtAnnouncement) {
|
export async function addCreditCourtAnnouncement(
|
||||||
|
data: CreditCourtAnnouncement
|
||||||
|
) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-court-announcement',
|
'/credit/credit-court-announcement',
|
||||||
data
|
data
|
||||||
@@ -51,7 +60,9 @@ export async function addCreditCourtAnnouncement(data: CreditCourtAnnouncement)
|
|||||||
/**
|
/**
|
||||||
* 修改法院公告司法大数据
|
* 修改法院公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function updateCreditCourtAnnouncement(data: CreditCourtAnnouncement) {
|
export async function updateCreditCourtAnnouncement(
|
||||||
|
data: CreditCourtAnnouncement
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/credit/credit-court-announcement',
|
'/credit/credit-court-announcement',
|
||||||
data
|
data
|
||||||
@@ -78,7 +89,9 @@ export async function removeCreditCourtAnnouncement(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除法院公告司法大数据
|
* 批量删除法院公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditCourtAnnouncement(data: (number | undefined)[]) {
|
export async function removeBatchCreditCourtAnnouncement(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-court-announcement/batch',
|
'/credit/credit-court-announcement/batch',
|
||||||
{
|
{
|
||||||
@@ -107,7 +120,10 @@ export async function getCreditCourtAnnouncement(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入法院公告司法大数据
|
* 导入法院公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditCourtAnnouncement(file: File, companyId?: number) {
|
export async function importCreditCourtAnnouncement(
|
||||||
|
file: File,
|
||||||
|
companyId?: number
|
||||||
|
) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
if (companyId != null) {
|
if (companyId != null) {
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeCreditCourtSession(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除开庭公告司法大数据
|
* 批量删除开庭公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditCourtSession(data: (number | undefined)[]) {
|
export async function removeBatchCreditCourtSession(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-court-session/batch',
|
'/credit/credit-court-session/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import type { CreditDeliveryNotice, CreditDeliveryNoticeParam } from './model';
|
|||||||
/**
|
/**
|
||||||
* 分页查询送达公告司法大数据
|
* 分页查询送达公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function pageCreditDeliveryNotice(params: CreditDeliveryNoticeParam) {
|
export async function pageCreditDeliveryNotice(
|
||||||
|
params: CreditDeliveryNoticeParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<CreditDeliveryNotice>>>(
|
const res = await request.get<ApiResult<PageResult<CreditDeliveryNotice>>>(
|
||||||
'/credit/credit-delivery-notice/page',
|
'/credit/credit-delivery-notice/page',
|
||||||
{
|
{
|
||||||
@@ -21,7 +23,9 @@ export async function pageCreditDeliveryNotice(params: CreditDeliveryNoticeParam
|
|||||||
/**
|
/**
|
||||||
* 查询送达公告司法大数据列表
|
* 查询送达公告司法大数据列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditDeliveryNotice(params?: CreditDeliveryNoticeParam) {
|
export async function listCreditDeliveryNotice(
|
||||||
|
params?: CreditDeliveryNoticeParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditDeliveryNotice[]>>(
|
const res = await request.get<ApiResult<CreditDeliveryNotice[]>>(
|
||||||
'/credit/credit-delivery-notice',
|
'/credit/credit-delivery-notice',
|
||||||
{
|
{
|
||||||
@@ -78,7 +82,9 @@ export async function removeCreditDeliveryNotice(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除送达公告司法大数据
|
* 批量删除送达公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditDeliveryNotice(data: (number | undefined)[]) {
|
export async function removeBatchCreditDeliveryNotice(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-delivery-notice/batch',
|
'/credit/credit-delivery-notice/batch',
|
||||||
{
|
{
|
||||||
@@ -107,7 +113,10 @@ export async function getCreditDeliveryNotice(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入送达公告司法大数据
|
* 导入送达公告司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditDeliveryNotice(file: File, companyId?: number) {
|
export async function importCreditDeliveryNotice(
|
||||||
|
file: File,
|
||||||
|
companyId?: number
|
||||||
|
) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
if (companyId != null) {
|
if (companyId != null) {
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeCreditFinalVersion(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除终本案件
|
* 批量删除终本案件
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditFinalVersion(data: (number | undefined)[]) {
|
export async function removeBatchCreditFinalVersion(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-final-version/batch',
|
'/credit/credit-final-version/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { CreditHistoricalLegalPerson, CreditHistoricalLegalPersonParam } from './model';
|
import type {
|
||||||
|
CreditHistoricalLegalPerson,
|
||||||
|
CreditHistoricalLegalPersonParam
|
||||||
|
} from './model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询历史法定代表人
|
* 分页查询历史法定代表人
|
||||||
*/
|
*/
|
||||||
export async function pageCreditHistoricalLegalPerson(params: CreditHistoricalLegalPersonParam) {
|
export async function pageCreditHistoricalLegalPerson(
|
||||||
const res = await request.get<ApiResult<PageResult<CreditHistoricalLegalPerson>>>(
|
params: CreditHistoricalLegalPersonParam
|
||||||
'/credit/credit-historical-legal-person/page',
|
) {
|
||||||
{
|
const res = await request.get<
|
||||||
|
ApiResult<PageResult<CreditHistoricalLegalPerson>>
|
||||||
|
>('/credit/credit-historical-legal-person/page', {
|
||||||
params
|
params
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -21,7 +25,9 @@ export async function pageCreditHistoricalLegalPerson(params: CreditHistoricalLe
|
|||||||
/**
|
/**
|
||||||
* 查询历史法定代表人列表
|
* 查询历史法定代表人列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditHistoricalLegalPerson(params?: CreditHistoricalLegalPersonParam) {
|
export async function listCreditHistoricalLegalPerson(
|
||||||
|
params?: CreditHistoricalLegalPersonParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditHistoricalLegalPerson[]>>(
|
const res = await request.get<ApiResult<CreditHistoricalLegalPerson[]>>(
|
||||||
'/credit/credit-historical-legal-person',
|
'/credit/credit-historical-legal-person',
|
||||||
{
|
{
|
||||||
@@ -37,7 +43,9 @@ export async function listCreditHistoricalLegalPerson(params?: CreditHistoricalL
|
|||||||
/**
|
/**
|
||||||
* 添加历史法定代表人
|
* 添加历史法定代表人
|
||||||
*/
|
*/
|
||||||
export async function addCreditHistoricalLegalPerson(data: CreditHistoricalLegalPerson) {
|
export async function addCreditHistoricalLegalPerson(
|
||||||
|
data: CreditHistoricalLegalPerson
|
||||||
|
) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-historical-legal-person',
|
'/credit/credit-historical-legal-person',
|
||||||
data
|
data
|
||||||
@@ -51,7 +59,9 @@ export async function addCreditHistoricalLegalPerson(data: CreditHistoricalLegal
|
|||||||
/**
|
/**
|
||||||
* 修改历史法定代表人
|
* 修改历史法定代表人
|
||||||
*/
|
*/
|
||||||
export async function updateCreditHistoricalLegalPerson(data: CreditHistoricalLegalPerson) {
|
export async function updateCreditHistoricalLegalPerson(
|
||||||
|
data: CreditHistoricalLegalPerson
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/credit/credit-historical-legal-person',
|
'/credit/credit-historical-legal-person',
|
||||||
data
|
data
|
||||||
@@ -78,7 +88,9 @@ export async function removeCreditHistoricalLegalPerson(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除历史法定代表人
|
* 批量删除历史法定代表人
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditHistoricalLegalPerson(data: (number | undefined)[]) {
|
export async function removeBatchCreditHistoricalLegalPerson(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-historical-legal-person/batch',
|
'/credit/credit-historical-legal-person/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import type { CreditJudgmentDebtor, CreditJudgmentDebtorParam } from './model';
|
|||||||
/**
|
/**
|
||||||
* 分页查询被执行人
|
* 分页查询被执行人
|
||||||
*/
|
*/
|
||||||
export async function pageCreditJudgmentDebtor(params: CreditJudgmentDebtorParam) {
|
export async function pageCreditJudgmentDebtor(
|
||||||
|
params: CreditJudgmentDebtorParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<CreditJudgmentDebtor>>>(
|
const res = await request.get<ApiResult<PageResult<CreditJudgmentDebtor>>>(
|
||||||
'/credit/credit-judgment-debtor/page',
|
'/credit/credit-judgment-debtor/page',
|
||||||
{
|
{
|
||||||
@@ -21,7 +23,9 @@ export async function pageCreditJudgmentDebtor(params: CreditJudgmentDebtorParam
|
|||||||
/**
|
/**
|
||||||
* 查询被执行人列表
|
* 查询被执行人列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditJudgmentDebtor(params?: CreditJudgmentDebtorParam) {
|
export async function listCreditJudgmentDebtor(
|
||||||
|
params?: CreditJudgmentDebtorParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditJudgmentDebtor[]>>(
|
const res = await request.get<ApiResult<CreditJudgmentDebtor[]>>(
|
||||||
'/credit/credit-judgment-debtor',
|
'/credit/credit-judgment-debtor',
|
||||||
{
|
{
|
||||||
@@ -78,7 +82,9 @@ export async function removeCreditJudgmentDebtor(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除被执行人
|
* 批量删除被执行人
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditJudgmentDebtor(data: (number | undefined)[]) {
|
export async function removeBatchCreditJudgmentDebtor(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-judgment-debtor/batch',
|
'/credit/credit-judgment-debtor/batch',
|
||||||
{
|
{
|
||||||
@@ -107,7 +113,10 @@ export async function getCreditJudgmentDebtor(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入被执行人
|
* 导入被执行人
|
||||||
*/
|
*/
|
||||||
export async function importCreditJudgmentDebtor(file: File, companyId?: number) {
|
export async function importCreditJudgmentDebtor(
|
||||||
|
file: File,
|
||||||
|
companyId?: number
|
||||||
|
) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
if (companyId != null) {
|
if (companyId != null) {
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export interface CreditJudgmentDebtor {
|
|||||||
updateTime?: string;
|
updateTime?: string;
|
||||||
// 历史ID
|
// 历史ID
|
||||||
historyId?: number;
|
historyId?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { CreditJudgmentDebtorHistory, CreditJudgmentDebtorHistoryParam } from './model';
|
import type {
|
||||||
|
CreditJudgmentDebtorHistory,
|
||||||
|
CreditJudgmentDebtorHistoryParam
|
||||||
|
} from './model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询被执行人
|
* 分页查询被执行人
|
||||||
*/
|
*/
|
||||||
export async function pageCreditJudgmentDebtorHistory(params: CreditJudgmentDebtorHistoryParam) {
|
export async function pageCreditJudgmentDebtorHistory(
|
||||||
const res = await request.get<ApiResult<PageResult<CreditJudgmentDebtorHistory>>>(
|
params: CreditJudgmentDebtorHistoryParam
|
||||||
'/credit/credit-judgment-debtor-history/page',
|
) {
|
||||||
{
|
const res = await request.get<
|
||||||
|
ApiResult<PageResult<CreditJudgmentDebtorHistory>>
|
||||||
|
>('/credit/credit-judgment-debtor-history/page', {
|
||||||
params
|
params
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -21,7 +25,9 @@ export async function pageCreditJudgmentDebtorHistory(params: CreditJudgmentDebt
|
|||||||
/**
|
/**
|
||||||
* 查询被执行人列表
|
* 查询被执行人列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditJudgmentDebtorHistory(params?: CreditJudgmentDebtorHistoryParam) {
|
export async function listCreditJudgmentDebtorHistory(
|
||||||
|
params?: CreditJudgmentDebtorHistoryParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditJudgmentDebtorHistory[]>>(
|
const res = await request.get<ApiResult<CreditJudgmentDebtorHistory[]>>(
|
||||||
'/credit/credit-judgment-debtor-history',
|
'/credit/credit-judgment-debtor-history',
|
||||||
{
|
{
|
||||||
@@ -37,7 +43,9 @@ export async function listCreditJudgmentDebtorHistory(params?: CreditJudgmentDeb
|
|||||||
/**
|
/**
|
||||||
* 添加被执行人
|
* 添加被执行人
|
||||||
*/
|
*/
|
||||||
export async function addCreditJudgmentDebtorHistory(data: CreditJudgmentDebtorHistory) {
|
export async function addCreditJudgmentDebtorHistory(
|
||||||
|
data: CreditJudgmentDebtorHistory
|
||||||
|
) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-judgment-debtor-history',
|
'/credit/credit-judgment-debtor-history',
|
||||||
data
|
data
|
||||||
@@ -51,7 +59,9 @@ export async function addCreditJudgmentDebtorHistory(data: CreditJudgmentDebtorH
|
|||||||
/**
|
/**
|
||||||
* 修改被执行人
|
* 修改被执行人
|
||||||
*/
|
*/
|
||||||
export async function updateCreditJudgmentDebtorHistory(data: CreditJudgmentDebtorHistory) {
|
export async function updateCreditJudgmentDebtorHistory(
|
||||||
|
data: CreditJudgmentDebtorHistory
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/credit/credit-judgment-debtor-history',
|
'/credit/credit-judgment-debtor-history',
|
||||||
data
|
data
|
||||||
@@ -78,7 +88,9 @@ export async function removeCreditJudgmentDebtorHistory(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除被执行人
|
* 批量删除被执行人
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditJudgmentDebtorHistory(data: (number | undefined)[]) {
|
export async function removeBatchCreditJudgmentDebtorHistory(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-judgment-debtor-history/batch',
|
'/credit/credit-judgment-debtor-history/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { CreditJudicialDocument, CreditJudicialDocumentParam } from './model';
|
import type {
|
||||||
|
CreditJudicialDocument,
|
||||||
|
CreditJudicialDocumentParam
|
||||||
|
} from './model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询裁判文书司法大数据
|
* 分页查询裁判文书司法大数据
|
||||||
*/
|
*/
|
||||||
export async function pageCreditJudicialDocument(params: CreditJudicialDocumentParam) {
|
export async function pageCreditJudicialDocument(
|
||||||
|
params: CreditJudicialDocumentParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<CreditJudicialDocument>>>(
|
const res = await request.get<ApiResult<PageResult<CreditJudicialDocument>>>(
|
||||||
'/credit/credit-judicial-document/page',
|
'/credit/credit-judicial-document/page',
|
||||||
{
|
{
|
||||||
@@ -21,7 +26,9 @@ export async function pageCreditJudicialDocument(params: CreditJudicialDocumentP
|
|||||||
/**
|
/**
|
||||||
* 查询裁判文书司法大数据列表
|
* 查询裁判文书司法大数据列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditJudicialDocument(params?: CreditJudicialDocumentParam) {
|
export async function listCreditJudicialDocument(
|
||||||
|
params?: CreditJudicialDocumentParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditJudicialDocument[]>>(
|
const res = await request.get<ApiResult<CreditJudicialDocument[]>>(
|
||||||
'/credit/credit-judicial-document',
|
'/credit/credit-judicial-document',
|
||||||
{
|
{
|
||||||
@@ -51,7 +58,9 @@ export async function addCreditJudicialDocument(data: CreditJudicialDocument) {
|
|||||||
/**
|
/**
|
||||||
* 修改裁判文书司法大数据
|
* 修改裁判文书司法大数据
|
||||||
*/
|
*/
|
||||||
export async function updateCreditJudicialDocument(data: CreditJudicialDocument) {
|
export async function updateCreditJudicialDocument(
|
||||||
|
data: CreditJudicialDocument
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/credit/credit-judicial-document',
|
'/credit/credit-judicial-document',
|
||||||
data
|
data
|
||||||
@@ -78,7 +87,9 @@ export async function removeCreditJudicialDocument(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除裁判文书司法大数据
|
* 批量删除裁判文书司法大数据
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditJudicialDocument(data: (number | undefined)[]) {
|
export async function removeBatchCreditJudicialDocument(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-judicial-document/batch',
|
'/credit/credit-judicial-document/batch',
|
||||||
{
|
{
|
||||||
@@ -107,7 +118,10 @@ export async function getCreditJudicialDocument(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入裁判文书司法大数据
|
* 导入裁判文书司法大数据
|
||||||
*/
|
*/
|
||||||
export async function importCreditJudicialDocument(file: File, companyId?: number) {
|
export async function importCreditJudicialDocument(
|
||||||
|
file: File,
|
||||||
|
companyId?: number
|
||||||
|
) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
if (companyId != null) {
|
if (companyId != null) {
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import type { CreditNearbyCompany, CreditNearbyCompanyParam } from './model';
|
|||||||
/**
|
/**
|
||||||
* 分页查询附近企业
|
* 分页查询附近企业
|
||||||
*/
|
*/
|
||||||
export async function pageCreditNearbyCompany(params: CreditNearbyCompanyParam) {
|
export async function pageCreditNearbyCompany(
|
||||||
|
params: CreditNearbyCompanyParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<CreditNearbyCompany>>>(
|
const res = await request.get<ApiResult<PageResult<CreditNearbyCompany>>>(
|
||||||
'/credit/credit-nearby-company/page',
|
'/credit/credit-nearby-company/page',
|
||||||
{
|
{
|
||||||
@@ -21,7 +23,9 @@ export async function pageCreditNearbyCompany(params: CreditNearbyCompanyParam)
|
|||||||
/**
|
/**
|
||||||
* 查询附近企业列表
|
* 查询附近企业列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditNearbyCompany(params?: CreditNearbyCompanyParam) {
|
export async function listCreditNearbyCompany(
|
||||||
|
params?: CreditNearbyCompanyParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditNearbyCompany[]>>(
|
const res = await request.get<ApiResult<CreditNearbyCompany[]>>(
|
||||||
'/credit/credit-nearby-company',
|
'/credit/credit-nearby-company',
|
||||||
{
|
{
|
||||||
@@ -78,7 +82,9 @@ export async function removeCreditNearbyCompany(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除附近企业
|
* 批量删除附近企业
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditNearbyCompany(data: (number | undefined)[]) {
|
export async function removeBatchCreditNearbyCompany(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-nearby-company/batch',
|
'/credit/credit-nearby-company/batch',
|
||||||
{
|
{
|
||||||
@@ -107,7 +113,10 @@ export async function getCreditNearbyCompany(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 导入附近企业
|
* 导入附近企业
|
||||||
*/
|
*/
|
||||||
export async function importCreditNearbyCompany(file: File, companyId?: number) {
|
export async function importCreditNearbyCompany(
|
||||||
|
file: File,
|
||||||
|
companyId?: number
|
||||||
|
) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
if (companyId != null) {
|
if (companyId != null) {
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeCreditRiskRelation(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除风险关系表
|
* 批量删除风险关系表
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditRiskRelation(data: (number | undefined)[]) {
|
export async function removeBatchCreditRiskRelation(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-risk-relation/batch',
|
'/credit/credit-risk-relation/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { CreditSuspectedRelationship, CreditSuspectedRelationshipParam } from './model';
|
import type {
|
||||||
|
CreditSuspectedRelationship,
|
||||||
|
CreditSuspectedRelationshipParam
|
||||||
|
} from './model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询疑似关系
|
* 分页查询疑似关系
|
||||||
*/
|
*/
|
||||||
export async function pageCreditSuspectedRelationship(params: CreditSuspectedRelationshipParam) {
|
export async function pageCreditSuspectedRelationship(
|
||||||
const res = await request.get<ApiResult<PageResult<CreditSuspectedRelationship>>>(
|
params: CreditSuspectedRelationshipParam
|
||||||
'/credit/credit-suspected-relationship/page',
|
) {
|
||||||
{
|
const res = await request.get<
|
||||||
|
ApiResult<PageResult<CreditSuspectedRelationship>>
|
||||||
|
>('/credit/credit-suspected-relationship/page', {
|
||||||
params
|
params
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -21,7 +25,9 @@ export async function pageCreditSuspectedRelationship(params: CreditSuspectedRel
|
|||||||
/**
|
/**
|
||||||
* 查询疑似关系列表
|
* 查询疑似关系列表
|
||||||
*/
|
*/
|
||||||
export async function listCreditSuspectedRelationship(params?: CreditSuspectedRelationshipParam) {
|
export async function listCreditSuspectedRelationship(
|
||||||
|
params?: CreditSuspectedRelationshipParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<CreditSuspectedRelationship[]>>(
|
const res = await request.get<ApiResult<CreditSuspectedRelationship[]>>(
|
||||||
'/credit/credit-suspected-relationship',
|
'/credit/credit-suspected-relationship',
|
||||||
{
|
{
|
||||||
@@ -37,7 +43,9 @@ export async function listCreditSuspectedRelationship(params?: CreditSuspectedRe
|
|||||||
/**
|
/**
|
||||||
* 添加疑似关系
|
* 添加疑似关系
|
||||||
*/
|
*/
|
||||||
export async function addCreditSuspectedRelationship(data: CreditSuspectedRelationship) {
|
export async function addCreditSuspectedRelationship(
|
||||||
|
data: CreditSuspectedRelationship
|
||||||
|
) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/credit/credit-suspected-relationship',
|
'/credit/credit-suspected-relationship',
|
||||||
data
|
data
|
||||||
@@ -51,7 +59,9 @@ export async function addCreditSuspectedRelationship(data: CreditSuspectedRelati
|
|||||||
/**
|
/**
|
||||||
* 修改疑似关系
|
* 修改疑似关系
|
||||||
*/
|
*/
|
||||||
export async function updateCreditSuspectedRelationship(data: CreditSuspectedRelationship) {
|
export async function updateCreditSuspectedRelationship(
|
||||||
|
data: CreditSuspectedRelationship
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/credit/credit-suspected-relationship',
|
'/credit/credit-suspected-relationship',
|
||||||
data
|
data
|
||||||
@@ -78,7 +88,9 @@ export async function removeCreditSuspectedRelationship(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除疑似关系
|
* 批量删除疑似关系
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCreditSuspectedRelationship(data: (number | undefined)[]) {
|
export async function removeBatchCreditSuspectedRelationship(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/credit/credit-suspected-relationship/batch',
|
'/credit/credit-suspected-relationship/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { UpdatePasswordParam, NoticeResult } from './model';
|
|||||||
import { SERVER_API_URL } from '@/config/setting';
|
import { SERVER_API_URL } from '@/config/setting';
|
||||||
import { Company } from '@/api/system/company/model';
|
import { Company } from '@/api/system/company/model';
|
||||||
import { CmsWebsite } from '@/api/cms/cmsWebsite/model';
|
import { CmsWebsite } from '@/api/cms/cmsWebsite/model';
|
||||||
import {Menu} from "@/api/system/menu/model";
|
import { Menu } from '@/api/system/menu/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前登录的用户信息、菜单、权限、角色
|
* 获取当前登录的用户信息、菜单、权限、角色
|
||||||
@@ -24,12 +24,9 @@ export async function getTenantInfo(): Promise<Company> {
|
|||||||
* 获取网站信息 https://cms-api.websoft.top/api
|
* 获取网站信息 https://cms-api.websoft.top/api
|
||||||
*/
|
*/
|
||||||
export async function getSiteInfo() {
|
export async function getSiteInfo() {
|
||||||
const res = await request.get<ApiResult<CmsWebsite>>(
|
const res = await request.get<ApiResult<CmsWebsite>>('/shop/getShopInfo', {
|
||||||
'/shop/getShopInfo',
|
|
||||||
{
|
|
||||||
params: {}
|
params: {}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -66,9 +63,7 @@ export async function updateLoginUser(data: User) {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
export async function getServerTime() {
|
export async function getServerTime() {
|
||||||
const res = await request.get<ApiResult<any>>(
|
const res = await request.get<ApiResult<any>>('/cms/website/getServerTime');
|
||||||
'/cms/website/getServerTime'
|
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -80,9 +75,7 @@ export async function getServerTime() {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
export async function getNext7day() {
|
export async function getNext7day() {
|
||||||
const res = await request.get<ApiResult<any>>(
|
const res = await request.get<ApiResult<any>>('/cms/website/getNext7day');
|
||||||
'/cms/website/getNext7day'
|
|
||||||
);
|
|
||||||
console.log('res.data.code: ', res.data.code);
|
console.log('res.data.code: ', res.data.code);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
@@ -120,7 +113,8 @@ export async function updatePassword(
|
|||||||
*/
|
*/
|
||||||
export async function createCmsWebSite(data: CmsWebsite) {
|
export async function createCmsWebSite(data: CmsWebsite) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
SERVER_API_URL + '/superAdminRegister',data
|
SERVER_API_URL + '/superAdminRegister',
|
||||||
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ export async function generateQrCode(): Promise<QrCodeResponse> {
|
|||||||
/**
|
/**
|
||||||
* 检查二维码状态
|
* 检查二维码状态
|
||||||
*/
|
*/
|
||||||
export async function checkQrCodeStatus(token: string): Promise<QrCodeStatusResponse> {
|
export async function checkQrCodeStatus(
|
||||||
|
token: string
|
||||||
|
): Promise<QrCodeStatusResponse> {
|
||||||
const res = await request.get<ApiResult<QrCodeStatusResponse>>(
|
const res = await request.get<ApiResult<QrCodeStatusResponse>>(
|
||||||
SERVER_API_URL + `/qr-login/status/${token}`
|
SERVER_API_URL + `/qr-login/status/${token}`
|
||||||
);
|
);
|
||||||
@@ -65,12 +67,14 @@ export async function checkQrCodeStatus(token: string): Promise<QrCodeStatusResp
|
|||||||
/**
|
/**
|
||||||
* 扫码确认登录(移动端调用)
|
* 扫码确认登录(移动端调用)
|
||||||
*/
|
*/
|
||||||
export async function confirmQrLogin(requestData: QrLoginConfirmRequest): Promise<QrCodeStatusResponse> {
|
export async function confirmQrLogin(
|
||||||
|
requestData: QrLoginConfirmRequest
|
||||||
|
): Promise<QrCodeStatusResponse> {
|
||||||
const res = await request.post<ApiResult<QrCodeStatusResponse>>(
|
const res = await request.post<ApiResult<QrCodeStatusResponse>>(
|
||||||
SERVER_API_URL + '/qr-login/confirm',
|
SERVER_API_URL + '/qr-login/confirm',
|
||||||
requestData
|
requestData
|
||||||
);
|
);
|
||||||
console.log(res,'>>>89898989')
|
console.log(res, '>>>89898989');
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -96,7 +100,9 @@ export async function scanQrCode(token: string): Promise<boolean> {
|
|||||||
/**
|
/**
|
||||||
* 微信小程序扫码登录确认
|
* 微信小程序扫码登录确认
|
||||||
*/
|
*/
|
||||||
export async function wechatMiniProgramConfirm(requestData: QrLoginConfirmRequest): Promise<QrCodeStatusResponse> {
|
export async function wechatMiniProgramConfirm(
|
||||||
|
requestData: QrLoginConfirmRequest
|
||||||
|
): Promise<QrCodeStatusResponse> {
|
||||||
const res = await request.post<ApiResult<QrCodeStatusResponse>>(
|
const res = await request.post<ApiResult<QrCodeStatusResponse>>(
|
||||||
SERVER_API_URL + '/qr-login/wechat-confirm',
|
SERVER_API_URL + '/qr-login/wechat-confirm',
|
||||||
requestData
|
requestData
|
||||||
@@ -106,5 +112,7 @@ export async function wechatMiniProgramConfirm(requestData: QrLoginConfirmReques
|
|||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.reject(new Error(res.data.message || '微信小程序登录确认失败'));
|
return Promise.reject(
|
||||||
|
new Error(res.data.message || '微信小程序登录确认失败')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import type {ShopDealerOrder, ShopDealerOrderParam} from './model';
|
|||||||
import { utils, writeFile } from 'xlsx';
|
import { utils, writeFile } from 'xlsx';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { getTenantId } from '@/utils/domain';
|
import { getTenantId } from '@/utils/domain';
|
||||||
import {listShopDealerOrder} from "@/api/shop/shopDealerOrder";
|
import { listShopDealerOrder } from '@/api/shop/shopDealerOrder';
|
||||||
import {MODULES_API_URL} from "@/config/setting";
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入分销商订单
|
* 导入分销商订单
|
||||||
@@ -113,7 +113,6 @@ export async function exportSdyDealerOrder(params?: ShopDealerOrderParam) {
|
|||||||
message.destroy();
|
message.destroy();
|
||||||
message.success(`成功导出 ${list.length} 条记录`);
|
message.success(`成功导出 ${list.length} 条记录`);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(error.message || '导出失败,请重试');
|
message.error(error.message || '导出失败,请重试');
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeShopCommissionRole(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除分红角色
|
* 批量删除分红角色
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopCommissionRole(data: (number | undefined)[]) {
|
export async function removeBatchShopCommissionRole(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/shop/shop-commission-role/batch',
|
'/shop/shop-commission-role/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,12 +22,9 @@ export async function pageShopCoupon(params: ShopCouponParam) {
|
|||||||
* 查询优惠券列表
|
* 查询优惠券列表
|
||||||
*/
|
*/
|
||||||
export async function listShopCoupon(params?: ShopCouponParam) {
|
export async function listShopCoupon(params?: ShopCouponParam) {
|
||||||
const res = await request.get<ApiResult<ShopCoupon[]>>(
|
const res = await request.get<ApiResult<ShopCoupon[]>>('/shop/shop-coupon', {
|
||||||
'/shop/shop-coupon',
|
|
||||||
{
|
|
||||||
params
|
params
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.data.code === 0 && res.data.data) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -38,10 +35,7 @@ export async function listShopCoupon(params?: ShopCouponParam) {
|
|||||||
* 添加优惠券
|
* 添加优惠券
|
||||||
*/
|
*/
|
||||||
export async function addShopCoupon(data: ShopCoupon) {
|
export async function addShopCoupon(data: ShopCoupon) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>('/shop/shop-coupon', data);
|
||||||
'/shop/shop-coupon',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
}
|
}
|
||||||
@@ -52,10 +46,7 @@ export async function addShopCoupon(data: ShopCoupon) {
|
|||||||
* 修改优惠券
|
* 修改优惠券
|
||||||
*/
|
*/
|
||||||
export async function updateShopCoupon(data: ShopCoupon) {
|
export async function updateShopCoupon(data: ShopCoupon) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>('/shop/shop-coupon', data);
|
||||||
'/shop/shop-coupon',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { PageParam } from '@/api/index';
|
import type { PageParam } from '@/api/index';
|
||||||
import {ShopCouponApplyCate} from "@/api/shop/shopCouponApplyCate/model";
|
import { ShopCouponApplyCate } from '@/api/shop/shopCouponApplyCate/model';
|
||||||
import {ShopCouponApplyItem} from "@/api/shop/shopCouponApplyItem/model";
|
import { ShopCouponApplyItem } from '@/api/shop/shopCouponApplyItem/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 优惠券
|
* 优惠券
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 优惠券
|
* 优惠券
|
||||||
*/
|
*/
|
||||||
@@ -7,5 +6,4 @@ export interface ShopCouponApplyCate {
|
|||||||
couponId?: number;
|
couponId?: number;
|
||||||
cateId?: number;
|
cateId?: number;
|
||||||
cateLevel?: number;
|
cateLevel?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 优惠券
|
* 优惠券
|
||||||
*/
|
*/
|
||||||
@@ -7,5 +6,4 @@ export interface ShopCouponApplyItem {
|
|||||||
couponId?: number;
|
couponId?: number;
|
||||||
type?: number;
|
type?: number;
|
||||||
pk?: number;
|
pk?: number;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,10 @@ export async function approveShopDealerApply(id: number) {
|
|||||||
/**
|
/**
|
||||||
* 驳回分销商申请
|
* 驳回分销商申请
|
||||||
*/
|
*/
|
||||||
export async function rejectShopDealerApply(id: number, data: { rejectReason: string }) {
|
export async function rejectShopDealerApply(
|
||||||
|
id: number,
|
||||||
|
data: { rejectReason: string }
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
`/shop/shop-dealer-apply/${id}/reject`,
|
`/shop/shop-dealer-apply/${id}/reject`,
|
||||||
data
|
data
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeShopDealerCapital(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除分销商资金明细表
|
* 批量删除分销商资金明细表
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopDealerCapital(data: (number | undefined)[]) {
|
export async function removeBatchShopDealerCapital(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/shop/shop-dealer-capital/batch',
|
'/shop/shop-dealer-capital/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ export async function exportShopDealerOrder(params?: ShopDealerOrderParam) {
|
|||||||
message.destroy();
|
message.destroy();
|
||||||
message.success(`成功导出 ${list.length} 条记录`);
|
message.success(`成功导出 ${list.length} 条记录`);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(error.message || '导出失败,请重试');
|
message.error(error.message || '导出失败,请重试');
|
||||||
|
|||||||
@@ -104,7 +104,10 @@ export async function removeBatchShopDealerPoster(ids: (number | undefined)[]) {
|
|||||||
* 生成海报
|
* 生成海报
|
||||||
*/
|
*/
|
||||||
export async function generatePoster(userId: number, config?: any) {
|
export async function generatePoster(userId: number, config?: any) {
|
||||||
const res = await request.post('/shop/dealer/poster/generate', { userId, config });
|
const res = await request.post('/shop/dealer/poster/generate', {
|
||||||
|
userId,
|
||||||
|
config
|
||||||
|
});
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -118,11 +121,15 @@ export async function uploadPosterBackground(file: File) {
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
|
|
||||||
const res = await request.post('/shop/dealer/poster/upload/background', formData, {
|
const res = await request.post(
|
||||||
|
'/shop/dealer/poster/upload/background',
|
||||||
|
formData,
|
||||||
|
{
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'multipart/form-data'
|
'Content-Type': 'multipart/form-data'
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export async function removeShopDealerRecord(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除客户跟进情况
|
* 批量删除客户跟进情况
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopDealerRecord(data: (number | undefined)[]) {
|
export async function removeBatchShopDealerRecord(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-dealer-record/batch',
|
MODULES_API_URL + '/shop/shop-dealer-record/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeShopDealerReferee(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除分销商推荐关系表
|
* 批量删除分销商推荐关系表
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopDealerReferee(data: (number | undefined)[]) {
|
export async function removeBatchShopDealerReferee(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/shop/shop-dealer-referee/batch',
|
'/shop/shop-dealer-referee/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeShopDealerSetting(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除分销商设置表
|
* 批量删除分销商设置表
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopDealerSetting(data: (number | undefined)[]) {
|
export async function removeBatchShopDealerSetting(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/shop/shop-dealer-setting/batch',
|
'/shop/shop-dealer-setting/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -129,12 +129,9 @@ export async function importShopDealerUsers(file: File) {
|
|||||||
* 导出分销商用户
|
* 导出分销商用户
|
||||||
*/
|
*/
|
||||||
export async function exportShopDealerUsers(params?: ShopDealerUserParam) {
|
export async function exportShopDealerUsers(params?: ShopDealerUserParam) {
|
||||||
const res = await request.get<Blob>(
|
const res = await request.get<Blob>('/shop/shop-dealer-user/export', {
|
||||||
'/shop/shop-dealer-user/export',
|
|
||||||
{
|
|
||||||
params,
|
params,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
}
|
});
|
||||||
);
|
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,9 @@ export async function removeShopDealerWithdraw(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除分销商提现明细表
|
* 批量删除分销商提现明细表
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopDealerWithdraw(data: (number | undefined)[]) {
|
export async function removeBatchShopDealerWithdraw(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/shop/shop-dealer-withdraw/batch',
|
'/shop/shop-dealer-withdraw/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,10 +52,7 @@ export async function addShopExpress(data: ShopExpress) {
|
|||||||
* 修改物流公司
|
* 修改物流公司
|
||||||
*/
|
*/
|
||||||
export async function updateShopExpress(data: ShopExpress) {
|
export async function updateShopExpress(data: ShopExpress) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>('/shop/shop-express', data);
|
||||||
'/shop/shop-express',
|
|
||||||
data
|
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.message;
|
return res.data.message;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import type { ShopExpressTemplate, ShopExpressTemplateParam } from './model';
|
|||||||
/**
|
/**
|
||||||
* 分页查询运费模板
|
* 分页查询运费模板
|
||||||
*/
|
*/
|
||||||
export async function pageShopExpressTemplate(params: ShopExpressTemplateParam) {
|
export async function pageShopExpressTemplate(
|
||||||
|
params: ShopExpressTemplateParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<ShopExpressTemplate>>>(
|
const res = await request.get<ApiResult<PageResult<ShopExpressTemplate>>>(
|
||||||
'/shop/shop-express-template/page',
|
'/shop/shop-express-template/page',
|
||||||
{
|
{
|
||||||
@@ -21,7 +23,9 @@ export async function pageShopExpressTemplate(params: ShopExpressTemplateParam)
|
|||||||
/**
|
/**
|
||||||
* 查询运费模板列表
|
* 查询运费模板列表
|
||||||
*/
|
*/
|
||||||
export async function listShopExpressTemplate(params?: ShopExpressTemplateParam) {
|
export async function listShopExpressTemplate(
|
||||||
|
params?: ShopExpressTemplateParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<ShopExpressTemplate[]>>(
|
const res = await request.get<ApiResult<ShopExpressTemplate[]>>(
|
||||||
'/shop/shop-express-template',
|
'/shop/shop-express-template',
|
||||||
{
|
{
|
||||||
@@ -78,7 +82,9 @@ export async function removeShopExpressTemplate(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除运费模板
|
* 批量删除运费模板
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopExpressTemplate(data: (number | undefined)[]) {
|
export async function removeBatchShopExpressTemplate(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/shop/shop-express-template/batch',
|
'/shop/shop-express-template/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { ShopExpressTemplateDetail, ShopExpressTemplateDetailParam } from './model';
|
import type {
|
||||||
|
ShopExpressTemplateDetail,
|
||||||
|
ShopExpressTemplateDetailParam
|
||||||
|
} from './model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询运费模板
|
* 分页查询运费模板
|
||||||
*/
|
*/
|
||||||
export async function pageShopExpressTemplateDetail(params: ShopExpressTemplateDetailParam) {
|
export async function pageShopExpressTemplateDetail(
|
||||||
const res = await request.get<ApiResult<PageResult<ShopExpressTemplateDetail>>>(
|
params: ShopExpressTemplateDetailParam
|
||||||
'/shop/shop-express-template-detail/page',
|
) {
|
||||||
{
|
const res = await request.get<
|
||||||
|
ApiResult<PageResult<ShopExpressTemplateDetail>>
|
||||||
|
>('/shop/shop-express-template-detail/page', {
|
||||||
params
|
params
|
||||||
}
|
});
|
||||||
);
|
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
@@ -21,7 +25,9 @@ export async function pageShopExpressTemplateDetail(params: ShopExpressTemplateD
|
|||||||
/**
|
/**
|
||||||
* 查询运费模板列表
|
* 查询运费模板列表
|
||||||
*/
|
*/
|
||||||
export async function listShopExpressTemplateDetail(params?: ShopExpressTemplateDetailParam) {
|
export async function listShopExpressTemplateDetail(
|
||||||
|
params?: ShopExpressTemplateDetailParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<ShopExpressTemplateDetail[]>>(
|
const res = await request.get<ApiResult<ShopExpressTemplateDetail[]>>(
|
||||||
'/shop/shop-express-template-detail',
|
'/shop/shop-express-template-detail',
|
||||||
{
|
{
|
||||||
@@ -37,7 +43,9 @@ export async function listShopExpressTemplateDetail(params?: ShopExpressTemplate
|
|||||||
/**
|
/**
|
||||||
* 添加运费模板
|
* 添加运费模板
|
||||||
*/
|
*/
|
||||||
export async function addShopExpressTemplateDetail(data: ShopExpressTemplateDetail) {
|
export async function addShopExpressTemplateDetail(
|
||||||
|
data: ShopExpressTemplateDetail
|
||||||
|
) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
'/shop/shop-express-template-detail',
|
'/shop/shop-express-template-detail',
|
||||||
data
|
data
|
||||||
@@ -51,7 +59,9 @@ export async function addShopExpressTemplateDetail(data: ShopExpressTemplateDeta
|
|||||||
/**
|
/**
|
||||||
* 修改运费模板
|
* 修改运费模板
|
||||||
*/
|
*/
|
||||||
export async function updateShopExpressTemplateDetail(data: ShopExpressTemplateDetail) {
|
export async function updateShopExpressTemplateDetail(
|
||||||
|
data: ShopExpressTemplateDetail
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
'/shop/shop-express-template-detail',
|
'/shop/shop-express-template-detail',
|
||||||
data
|
data
|
||||||
@@ -78,7 +88,9 @@ export async function removeShopExpressTemplateDetail(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除运费模板
|
* 批量删除运费模板
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopExpressTemplateDetail(data: (number | undefined)[]) {
|
export async function removeBatchShopExpressTemplateDetail(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
'/shop/shop-express-template-detail/batch',
|
'/shop/shop-express-template-detail/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export async function removeShopGoodsCategory(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除商品分类
|
* 批量删除商品分类
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopGoodsCategory(data: (number | undefined)[]) {
|
export async function removeBatchShopGoodsCategory(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-goods-category/batch',
|
MODULES_API_URL + '/shop/shop-goods-category/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import { MODULES_API_URL } from '@/config/setting';
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
import { ShopGoodsRoleCommission, ShopGoodsRoleCommissionParam } from '@/api/shop/shopGoodsRoleCommission/model';
|
import {
|
||||||
|
ShopGoodsRoleCommission,
|
||||||
|
ShopGoodsRoleCommissionParam
|
||||||
|
} from '@/api/shop/shopGoodsRoleCommission/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询商品绑定角色的分润金额
|
* 分页查询商品绑定角色的分润金额
|
||||||
*/
|
*/
|
||||||
export async function pageShopGoodsRoleCommission(params: ShopGoodsRoleCommissionParam) {
|
export async function pageShopGoodsRoleCommission(
|
||||||
|
params: ShopGoodsRoleCommissionParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<ShopGoodsRoleCommission>>>(
|
const res = await request.get<ApiResult<PageResult<ShopGoodsRoleCommission>>>(
|
||||||
MODULES_API_URL + '/shop/shop-goods-role-commission/page',
|
MODULES_API_URL + '/shop/shop-goods-role-commission/page',
|
||||||
{
|
{
|
||||||
@@ -22,7 +27,9 @@ export async function pageShopGoodsRoleCommission(params: ShopGoodsRoleCommissio
|
|||||||
/**
|
/**
|
||||||
* 查询商品绑定角色的分润金额列表
|
* 查询商品绑定角色的分润金额列表
|
||||||
*/
|
*/
|
||||||
export async function listShopGoodsRoleCommission(params?: ShopGoodsRoleCommissionParam) {
|
export async function listShopGoodsRoleCommission(
|
||||||
|
params?: ShopGoodsRoleCommissionParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<ShopGoodsRoleCommission[]>>(
|
const res = await request.get<ApiResult<ShopGoodsRoleCommission[]>>(
|
||||||
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
||||||
{
|
{
|
||||||
@@ -38,7 +45,9 @@ export async function listShopGoodsRoleCommission(params?: ShopGoodsRoleCommissi
|
|||||||
/**
|
/**
|
||||||
* 添加商品绑定角色的分润金额
|
* 添加商品绑定角色的分润金额
|
||||||
*/
|
*/
|
||||||
export async function addShopGoodsRoleCommission(data: ShopGoodsRoleCommission) {
|
export async function addShopGoodsRoleCommission(
|
||||||
|
data: ShopGoodsRoleCommission
|
||||||
|
) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
||||||
data
|
data
|
||||||
@@ -52,7 +61,9 @@ export async function addShopGoodsRoleCommission(data: ShopGoodsRoleCommission)
|
|||||||
/**
|
/**
|
||||||
* 修改商品绑定角色的分润金额
|
* 修改商品绑定角色的分润金额
|
||||||
*/
|
*/
|
||||||
export async function updateShopGoodsRoleCommission(data: ShopGoodsRoleCommission) {
|
export async function updateShopGoodsRoleCommission(
|
||||||
|
data: ShopGoodsRoleCommission
|
||||||
|
) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
MODULES_API_URL + '/shop/shop-goods-role-commission',
|
||||||
data
|
data
|
||||||
@@ -79,7 +90,9 @@ export async function removeShopGoodsRoleCommission(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除商品绑定角色的分润金额
|
* 批量删除商品绑定角色的分润金额
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopGoodsRoleCommission(data: (number | undefined)[]) {
|
export async function removeBatchShopGoodsRoleCommission(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-goods-role-commission/batch',
|
MODULES_API_URL + '/shop/shop-goods-role-commission/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import { MODULES_API_URL } from '@/config/setting';
|
|||||||
/**
|
/**
|
||||||
* 分页查询商户账号
|
* 分页查询商户账号
|
||||||
*/
|
*/
|
||||||
export async function pageShopMerchantAccount(params: ShopMerchantAccountParam) {
|
export async function pageShopMerchantAccount(
|
||||||
|
params: ShopMerchantAccountParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<PageResult<ShopMerchantAccount>>>(
|
const res = await request.get<ApiResult<PageResult<ShopMerchantAccount>>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-account/page',
|
MODULES_API_URL + '/shop/shop-merchant-account/page',
|
||||||
{
|
{
|
||||||
@@ -22,7 +24,9 @@ export async function pageShopMerchantAccount(params: ShopMerchantAccountParam)
|
|||||||
/**
|
/**
|
||||||
* 查询商户账号列表
|
* 查询商户账号列表
|
||||||
*/
|
*/
|
||||||
export async function listShopMerchantAccount(params?: ShopMerchantAccountParam) {
|
export async function listShopMerchantAccount(
|
||||||
|
params?: ShopMerchantAccountParam
|
||||||
|
) {
|
||||||
const res = await request.get<ApiResult<ShopMerchantAccount[]>>(
|
const res = await request.get<ApiResult<ShopMerchantAccount[]>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-account',
|
MODULES_API_URL + '/shop/shop-merchant-account',
|
||||||
{
|
{
|
||||||
@@ -79,7 +83,9 @@ export async function removeShopMerchantAccount(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除商户账号
|
* 批量删除商户账号
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopMerchantAccount(data: (number | undefined)[]) {
|
export async function removeBatchShopMerchantAccount(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-account/batch',
|
MODULES_API_URL + '/shop/shop-merchant-account/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { PageParam } from '@/api';
|
import type { PageParam } from '@/api';
|
||||||
import {OrderGoods} from "@/api/system/orderGoods/model";
|
import { OrderGoods } from '@/api/system/orderGoods/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单
|
* 订单
|
||||||
@@ -136,9 +136,9 @@ export interface ShopOrder {
|
|||||||
// 系统版本号 0当前版本 value=其他版本
|
// 系统版本号 0当前版本 value=其他版本
|
||||||
version?: number;
|
version?: number;
|
||||||
// 买家备注
|
// 买家备注
|
||||||
buyerRemarks: undefined,
|
buyerRemarks: undefined;
|
||||||
// 商家备注
|
// 商家备注
|
||||||
merchantRemarks: undefined,
|
merchantRemarks: undefined;
|
||||||
// 用户id
|
// 用户id
|
||||||
userId?: number;
|
userId?: number;
|
||||||
// 备注
|
// 备注
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export async function removeChatConversation(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除聊天消息表
|
* 批量删除聊天消息表
|
||||||
*/
|
*/
|
||||||
export async function removeBatchChatConversation(data: (number | undefined)[]) {
|
export async function removeBatchChatConversation(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/chat-conversation/batch',
|
MODULES_API_URL + '/shop/chat-conversation/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { PageParam } from '@/api';
|
import type { PageParam } from '@/api';
|
||||||
import type {Menu} from "@/api/system/menu/model";
|
import type { Menu } from '@/api/system/menu/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企业信息
|
* 企业信息
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ export async function getByCompanyId(id: number) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加应用详情
|
* 添加应用详情
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ export async function removeCompanyParameter(id?: number) {
|
|||||||
/**
|
/**
|
||||||
* 批量删除应用参数
|
* 批量删除应用参数
|
||||||
*/
|
*/
|
||||||
export async function removeBatchCompanyParameter(data: (number | undefined)[]) {
|
export async function removeBatchCompanyParameter(
|
||||||
|
data: (number | undefined)[]
|
||||||
|
) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
SERVER_API_URL + '/system/company-parameter/batch',
|
SERVER_API_URL + '/system/company-parameter/batch',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ export async function deleteParentMenu(id?: number) {
|
|||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.data.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安装应用
|
* 安装应用
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -287,12 +287,9 @@ export async function listAdminsByPhoneAll(params?: UserParam){
|
|||||||
* 导出用户列表
|
* 导出用户列表
|
||||||
*/
|
*/
|
||||||
export async function exportUsers(params?: UserParam) {
|
export async function exportUsers(params?: UserParam) {
|
||||||
const res = await request.get<Blob>(
|
const res = await request.get<Blob>(SERVER_API_URL + '/system/user/export', {
|
||||||
SERVER_API_URL + '/system/user/export',
|
|
||||||
{
|
|
||||||
params,
|
params,
|
||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
}
|
});
|
||||||
);
|
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
// 字典数据
|
// 字典数据
|
||||||
const data = getDictionaryOptions(props.dictCode);
|
const data = getDictionaryOptions(props.dictCode);
|
||||||
const content = ref<any>()
|
const content = ref<any>();
|
||||||
|
|
||||||
/* 更新选中数据 */
|
/* 更新选中数据 */
|
||||||
const updateValue = () => {
|
const updateValue = () => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import {listDictData} from "@/api/system/dict-data";
|
import { listDictData } from '@/api/system/dict-data';
|
||||||
|
|
||||||
const data = ref<any[]>([]);
|
const data = ref<any[]>([]);
|
||||||
|
|
||||||
@@ -43,8 +43,8 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
// 字典数据
|
// 字典数据
|
||||||
listDictData({dictCode: props.dictCode}).then(res => {
|
listDictData({ dictCode: props.dictCode }).then((res) => {
|
||||||
data.value = res.map(d => {
|
data.value = res.map((d) => {
|
||||||
return {
|
return {
|
||||||
dictDataId: d.dictDataId,
|
dictDataId: d.dictDataId,
|
||||||
dictDataCode: d.dictDataCode,
|
dictDataCode: d.dictDataCode,
|
||||||
@@ -61,7 +61,10 @@
|
|||||||
const updateValue = (value: string) => {
|
const updateValue = (value: string) => {
|
||||||
emit('update:value', value);
|
emit('update:value', value);
|
||||||
emit('index', Number(props.index));
|
emit('index', Number(props.index));
|
||||||
emit('done', data.value.find(d => d.value === value))
|
emit(
|
||||||
|
'done',
|
||||||
|
data.value.find((d) => d.value === value)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 失去焦点 */
|
/* 失去焦点 */
|
||||||
|
|||||||
@@ -10,16 +10,14 @@
|
|||||||
<div class="flex p-3 flex-col justify-center items-center">
|
<div class="flex p-3 flex-col justify-center items-center">
|
||||||
<ele-qr-code-svg :value="`${data}`" :size="260" />
|
<ele-qr-code-svg :value="`${data}`" :size="260" />
|
||||||
<span class="text-gray-400 py-3" @click="copyText(data)">{{ data }}</span>
|
<span class="text-gray-400 py-3" @click="copyText(data)">{{ data }}</span>
|
||||||
<span class="text-gray-500 text-lg">
|
<span class="text-gray-500 text-lg"> 使用手机扫一扫 </span>
|
||||||
使用手机扫一扫
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {CmsArticle} from "@/api/cms/cmsArticle/model";
|
import { CmsArticle } from '@/api/cms/cmsArticle/model';
|
||||||
import {copyText} from "@/utils/common";
|
import { copyText } from '@/utils/common';
|
||||||
|
|
||||||
withDefaults(
|
withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<!-- 演示控制面板 -->
|
<!-- 演示控制面板 -->
|
||||||
<div class="demo-controls">
|
<div class="demo-controls">
|
||||||
<h4>演示控制</h4>
|
<h4>演示控制</h4>
|
||||||
<a-space direction="vertical" style="width: 100%;">
|
<a-space direction="vertical" style="width: 100%">
|
||||||
<a-button @click="simulateScanned" type="primary" ghost>
|
<a-button @click="simulateScanned" type="primary" ghost>
|
||||||
模拟扫码
|
模拟扫码
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -21,9 +21,7 @@
|
|||||||
<a-button @click="simulateExpired" type="default">
|
<a-button @click="simulateExpired" type="default">
|
||||||
模拟过期
|
模拟过期
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="simulateError" danger>
|
<a-button @click="simulateError" danger> 模拟错误 </a-button>
|
||||||
模拟错误
|
|
||||||
</a-button>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -48,7 +46,7 @@
|
|||||||
</a-card>
|
</a-card>
|
||||||
|
|
||||||
<!-- 日志显示 -->
|
<!-- 日志显示 -->
|
||||||
<a-card title="操作日志" :bordered="false" style="margin-top: 16px;">
|
<a-card title="操作日志" :bordered="false" style="margin-top: 16px">
|
||||||
<div class="demo-logs">
|
<div class="demo-logs">
|
||||||
<div
|
<div
|
||||||
v-for="(log, index) in logs"
|
v-for="(log, index) in logs"
|
||||||
@@ -73,10 +71,13 @@ import QrLogin from './index.vue';
|
|||||||
const currentQrKey = ref<string>('');
|
const currentQrKey = ref<string>('');
|
||||||
const currentStatus = ref<string>('loading');
|
const currentStatus = ref<string>('loading');
|
||||||
const remainingTime = ref<number>(300);
|
const remainingTime = ref<number>(300);
|
||||||
const logs = ref<Array<{time: string, message: string, type: string}>>([]);
|
const logs = ref<Array<{ time: string; message: string; type: string }>>([]);
|
||||||
|
|
||||||
// 添加日志
|
// 添加日志
|
||||||
const addLog = (message: string, type: 'info' | 'success' | 'error' | 'warning' = 'info') => {
|
const addLog = (
|
||||||
|
message: string,
|
||||||
|
type: 'info' | 'success' | 'error' | 'warning' = 'info'
|
||||||
|
) => {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const time = now.toLocaleTimeString();
|
const time = now.toLocaleTimeString();
|
||||||
logs.value.unshift({ time, message, type });
|
logs.value.unshift({ time, message, type });
|
||||||
|
|||||||
@@ -7,22 +7,29 @@
|
|||||||
<p class="loading-text">正在生成二维码...</p>
|
<p class="loading-text">正在生成二维码...</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="qrCodeStatus === 'active'" class="qr-active cursor-pointer">
|
<div
|
||||||
<ele-qr-code-svg :value="qrCodeData" :size="200" @click="refreshQrCode" />
|
v-else-if="qrCodeStatus === 'active'"
|
||||||
|
class="qr-active cursor-pointer"
|
||||||
|
>
|
||||||
|
<ele-qr-code-svg
|
||||||
|
:value="qrCodeData"
|
||||||
|
:size="200"
|
||||||
|
@click="refreshQrCode"
|
||||||
|
/>
|
||||||
<p class="qr-tip">请使用手机APP或小程序扫码登录</p>
|
<p class="qr-tip">请使用手机APP或小程序扫码登录</p>
|
||||||
<p class="qr-expire-tip">二维码有效期:{{ formatTime(expireTime) }}</p>
|
<p class="qr-expire-tip">二维码有效期:{{ formatTime(expireTime) }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="qrCodeStatus === 'scanned'" class="qr-scanned">
|
<div v-else-if="qrCodeStatus === 'scanned'" class="qr-scanned">
|
||||||
<div class="scanned-icon">
|
<div class="scanned-icon">
|
||||||
<CheckCircleOutlined style="font-size: 48px; color: #52c41a;" />
|
<CheckCircleOutlined style="font-size: 48px; color: #52c41a" />
|
||||||
</div>
|
</div>
|
||||||
<p class="scanned-text">扫码成功,请在手机上确认登录</p>
|
<p class="scanned-text">扫码成功,请在手机上确认登录</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="qrCodeStatus === 'expired'" class="qr-expired">
|
<div v-else-if="qrCodeStatus === 'expired'" class="qr-expired">
|
||||||
<div class="expired-icon">
|
<div class="expired-icon">
|
||||||
<ClockCircleOutlined style="font-size: 48px; color: #ff4d4f;" />
|
<ClockCircleOutlined style="font-size: 48px; color: #ff4d4f" />
|
||||||
</div>
|
</div>
|
||||||
<p class="expired-text">二维码已过期</p>
|
<p class="expired-text">二维码已过期</p>
|
||||||
<a-button type="primary" @click="refreshQrCode">刷新二维码</a-button>
|
<a-button type="primary" @click="refreshQrCode">刷新二维码</a-button>
|
||||||
@@ -30,7 +37,7 @@
|
|||||||
|
|
||||||
<div v-else-if="qrCodeStatus === 'error'" class="qr-error">
|
<div v-else-if="qrCodeStatus === 'error'" class="qr-error">
|
||||||
<div class="error-icon">
|
<div class="error-icon">
|
||||||
<ExclamationCircleOutlined style="font-size: 48px; color: #ff4d4f;" />
|
<ExclamationCircleOutlined style="font-size: 48px; color: #ff4d4f" />
|
||||||
</div>
|
</div>
|
||||||
<p class="error-text">{{ errorMessage || '生成二维码失败' }}</p>
|
<p class="error-text">{{ errorMessage || '生成二维码失败' }}</p>
|
||||||
<a-button type="primary" @click="refreshQrCode">重新生成</a-button>
|
<a-button type="primary" @click="refreshQrCode">重新生成</a-button>
|
||||||
@@ -55,7 +62,12 @@ import {
|
|||||||
ExclamationCircleOutlined,
|
ExclamationCircleOutlined,
|
||||||
ReloadOutlined
|
ReloadOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import {generateQrCode, checkQrCodeStatus, type QrCodeResponse, QrCodeStatusResponse} from '@/api/passport/qrLogin';
|
import {
|
||||||
|
generateQrCode,
|
||||||
|
checkQrCodeStatus,
|
||||||
|
type QrCodeResponse,
|
||||||
|
QrCodeStatusResponse
|
||||||
|
} from '@/api/passport/qrLogin';
|
||||||
|
|
||||||
// 定义组件事件
|
// 定义组件事件
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@@ -66,7 +78,9 @@ const emit = defineEmits<{
|
|||||||
// 响应式数据
|
// 响应式数据
|
||||||
const qrCodeData = ref<string>('');
|
const qrCodeData = ref<string>('');
|
||||||
const qrCodeToken = ref<string>('');
|
const qrCodeToken = ref<string>('');
|
||||||
const qrCodeStatus = ref<'loading' | 'active' | 'scanned' | 'expired' | 'error'>('loading');
|
const qrCodeStatus = ref<
|
||||||
|
'loading' | 'active' | 'scanned' | 'expired' | 'error'
|
||||||
|
>('loading');
|
||||||
const expireTime = ref<number>(0);
|
const expireTime = ref<number>(0);
|
||||||
const errorMessage = ref<string>('');
|
const errorMessage = ref<string>('');
|
||||||
const refreshing = ref<boolean>(false);
|
const refreshing = ref<boolean>(false);
|
||||||
@@ -105,7 +119,6 @@ const generateQrCodeData = async () => {
|
|||||||
startStatusCheck();
|
startStatusCheck();
|
||||||
// 开始倒计时
|
// 开始倒计时
|
||||||
startExpireCountdown();
|
startExpireCountdown();
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
qrCodeStatus.value = 'error';
|
qrCodeStatus.value = 'error';
|
||||||
errorMessage.value = error.message || '生成二维码失败';
|
errorMessage.value = error.message || '生成二维码失败';
|
||||||
@@ -132,7 +145,7 @@ const startStatusCheck = () => {
|
|||||||
case 'confirmed':
|
case 'confirmed':
|
||||||
// 登录成功
|
// 登录成功
|
||||||
if (status.tenantId) {
|
if (status.tenantId) {
|
||||||
localStorage.setItem('TenantId', `${status.tenantId}`)
|
localStorage.setItem('TenantId', `${status.tenantId}`);
|
||||||
}
|
}
|
||||||
qrCodeStatus.value = 'active';
|
qrCodeStatus.value = 'active';
|
||||||
stopAllTimers();
|
stopAllTimers();
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<CmsDesign | null>(null);
|
const current = ref<CmsDesign | null>(null);
|
||||||
const content = ref<any>(props.value)
|
const content = ref<any>(props.value);
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: CmsDesign) => {
|
const openEdit = (row?: CmsDesign) => {
|
||||||
|
|||||||
@@ -28,7 +28,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'name'">
|
<template v-if="column.key === 'name'">
|
||||||
<div class="cursor-pointer" @click="onRadio(record)">{{ record.name }}</div>
|
<div class="cursor-pointer" @click="onRadio(record)">{{
|
||||||
|
record.name
|
||||||
|
}}</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
<template v-if="pageId == record.pageId">
|
<template v-if="pageId == record.pageId">
|
||||||
@@ -118,7 +120,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onRadio = (record: CmsDesign) => {
|
const onRadio = (record: CmsDesign) => {
|
||||||
pageId.value = Number(record.pageId)
|
pageId.value = Number(record.pageId);
|
||||||
updateVisible(false);
|
updateVisible(false);
|
||||||
emit('done', record);
|
emit('done', record);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const content = ref<any>(props.value)
|
const content = ref<any>(props.value);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'done', Dict): void;
|
(e: 'done', Dict): void;
|
||||||
|
|||||||
@@ -47,8 +47,8 @@
|
|||||||
import { User, UserParam } from '@/api/system/user/model';
|
import { User, UserParam } from '@/api/system/user/model';
|
||||||
import { EleProTable } from 'ele-admin-pro';
|
import { EleProTable } from 'ele-admin-pro';
|
||||||
import useSearch from '@/utils/use-search';
|
import useSearch from '@/utils/use-search';
|
||||||
import {pageHjmFence} from "@/api/hjm/hjmFence";
|
import { pageHjmFence } from '@/api/hjm/hjmFence';
|
||||||
import {HjmFenceParam} from "@/api/hjm/hjmFence/model";
|
import { HjmFenceParam } from '@/api/hjm/hjmFence/model';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
import SelectData from './components/select-data.vue';
|
import SelectData from './components/select-data.vue';
|
||||||
import {HjmFence} from "@/api/hjm/hjmFence/model";
|
import { HjmFence } from '@/api/hjm/hjmFence/model';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -50,7 +50,7 @@ const emit = defineEmits<{
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<HjmFence | null>(null);
|
const current = ref<HjmFence | null>(null);
|
||||||
const content = ref<HjmFence>(props.value)
|
const content = ref<HjmFence>(props.value);
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: HjmFence) => {
|
const openEdit = (row?: HjmFence) => {
|
||||||
@@ -64,7 +64,6 @@ const onChange = (row?: HjmFence) => {
|
|||||||
// 查询租户列表
|
// 查询租户列表
|
||||||
// const appList = ref<App[] | undefined>([]);
|
// const appList = ref<App[] | undefined>([]);
|
||||||
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.value,
|
() => props.value,
|
||||||
(visible) => {
|
(visible) => {
|
||||||
|
|||||||
@@ -64,19 +64,12 @@
|
|||||||
@search="reload"
|
@search="reload"
|
||||||
@pressEnter="reload"
|
@pressEnter="reload"
|
||||||
/>
|
/>
|
||||||
<a-button
|
<a-button type="text" @click="openUrl('/cms/photo/dict')"
|
||||||
type="text"
|
|
||||||
@click="openUrl('/cms/photo/dict')"
|
|
||||||
>管理分组</a-button
|
>管理分组</a-button
|
||||||
>
|
>
|
||||||
<a-alert
|
<a-alert message="双击行也可以选择" banner closable />
|
||||||
message="双击行也可以选择"
|
|
||||||
banner
|
|
||||||
closable
|
|
||||||
/>
|
|
||||||
</a-space>
|
</a-space>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
@@ -140,7 +133,12 @@
|
|||||||
ColumnItem,
|
ColumnItem,
|
||||||
DatasourceFunction
|
DatasourceFunction
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import {pageFiles, removeFile, uploadOss, uploadOssByGroupId} from '@/api/system/file';
|
import {
|
||||||
|
pageFiles,
|
||||||
|
removeFile,
|
||||||
|
uploadOss,
|
||||||
|
uploadOssByGroupId
|
||||||
|
} from '@/api/system/file';
|
||||||
import { EleProTable, messageLoading } from 'ele-admin-pro';
|
import { EleProTable, messageLoading } from 'ele-admin-pro';
|
||||||
import { FileRecord, FileRecordParam } from '@/api/system/file/model';
|
import { FileRecord, FileRecordParam } from '@/api/system/file/model';
|
||||||
import { EditOutlined, UploadOutlined } from '@ant-design/icons-vue';
|
import { EditOutlined, UploadOutlined } from '@ant-design/icons-vue';
|
||||||
@@ -341,7 +339,6 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* 自定义行属性 */
|
/* 自定义行属性 */
|
||||||
const customRow = (record: FileRecord) => {
|
const customRow = (record: FileRecord) => {
|
||||||
return {
|
return {
|
||||||
@@ -356,7 +353,7 @@
|
|||||||
if (!isMobileDevice()) {
|
if (!isMobileDevice()) {
|
||||||
record.path = record.url || record.downloadUrl;
|
record.path = record.url || record.downloadUrl;
|
||||||
}
|
}
|
||||||
console.log(record,'rec......')
|
console.log(record, 'rec......');
|
||||||
emit('done', record);
|
emit('done', record);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,11 +44,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PlusOutlined, CloseOutlined, YoutubeOutlined } from '@ant-design/icons-vue';
|
import {
|
||||||
|
PlusOutlined,
|
||||||
|
CloseOutlined,
|
||||||
|
YoutubeOutlined
|
||||||
|
} from '@ant-design/icons-vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import SelectData from './components/select-data.vue';
|
import SelectData from './components/select-data.vue';
|
||||||
import { FileRecord } from '@/api/system/file/model';
|
import { FileRecord } from '@/api/system/file/model';
|
||||||
import { isImage } from "@/utils/common";
|
import { isImage } from '@/utils/common';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -55,7 +55,10 @@
|
|||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import { pageShopMerchant } from '@/api/shop/shopMerchant';
|
import { pageShopMerchant } from '@/api/shop/shopMerchant';
|
||||||
import { EleProTable } from 'ele-admin-pro';
|
import { EleProTable } from 'ele-admin-pro';
|
||||||
import { ShopMerchant, ShopMerchantParam } from '@/api/shop/shopMerchant/model';
|
import {
|
||||||
|
ShopMerchant,
|
||||||
|
ShopMerchantParam
|
||||||
|
} from '@/api/shop/shopMerchant/model';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
@@ -99,7 +102,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '商户类型',
|
title: '商户类型',
|
||||||
dataIndex: 'shopType',
|
dataIndex: 'shopType'
|
||||||
// key: 'shopType'
|
// key: 'shopType'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
// 是否显示编辑弹窗
|
// 是否显示编辑弹窗
|
||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
const content = ref<string>(props.value)
|
const content = ref<string>(props.value);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<ShopMerchant | null>(null);
|
const current = ref<ShopMerchant | null>(null);
|
||||||
|
|
||||||
|
|||||||
@@ -61,8 +61,8 @@
|
|||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import { EleProTable } from 'ele-admin-pro';
|
import { EleProTable } from 'ele-admin-pro';
|
||||||
import {pageCmsModel} from "@/api/cms/cmsModel";
|
import { pageCmsModel } from '@/api/cms/cmsModel';
|
||||||
import {CmsModel, CmsModelParam} from "@/api/cms/cmsModel/model";
|
import { CmsModel, CmsModelParam } from '@/api/cms/cmsModel/model';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
|||||||
|
|
||||||
// 是否显示编辑弹窗
|
// 是否显示编辑弹窗
|
||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
const content = ref<any>(props.value)
|
const content = ref<any>(props.value);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<Company | null>(null);
|
const current = ref<Company | null>(null);
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<Environment | null>(null);
|
const current = ref<Environment | null>(null);
|
||||||
const content = ref<any>(props.value)
|
const content = ref<any>(props.value);
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: Environment) => {
|
const openEdit = (row?: Environment) => {
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<CmsMpPages | null>(null);
|
const current = ref<CmsMpPages | null>(null);
|
||||||
const page = ref<any>()
|
const page = ref<any>();
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: CmsMpPages) => {
|
const openEdit = (row?: CmsMpPages) => {
|
||||||
|
|||||||
@@ -62,7 +62,10 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { listCmsNavigation, pageCmsNavigation } from '@/api/cms/cmsNavigation';
|
import {
|
||||||
|
listCmsNavigation,
|
||||||
|
pageCmsNavigation
|
||||||
|
} from '@/api/cms/cmsNavigation';
|
||||||
import { EleProTable } from 'ele-admin-pro';
|
import { EleProTable } from 'ele-admin-pro';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { toTreeData, eachTreeData } from 'ele-admin-pro/es';
|
import { toTreeData, eachTreeData } from 'ele-admin-pro/es';
|
||||||
@@ -71,7 +74,10 @@
|
|||||||
ColumnItem,
|
ColumnItem,
|
||||||
EleProTableDone
|
EleProTableDone
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import type { CmsNavigation, CmsNavigationParam } from '@/api/cms/cmsNavigation/model';
|
import type {
|
||||||
|
CmsNavigation,
|
||||||
|
CmsNavigationParam
|
||||||
|
} from '@/api/cms/cmsNavigation/model';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const props = withDefaults(
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<Organization | null>(null);
|
const current = ref<Organization | null>(null);
|
||||||
const content = ref<any>(props.value)
|
const content = ref<any>(props.value);
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: Organization) => {
|
const openEdit = (row?: Organization) => {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const props = withDefaults(
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<Grade | null>(null);
|
const current = ref<Grade | null>(null);
|
||||||
const content = ref<any>(props.value)
|
const content = ref<any>(props.value);
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: Grade) => {
|
const openEdit = (row?: Grade) => {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const props = withDefaults(
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<Spec | null>(null);
|
const current = ref<Spec | null>(null);
|
||||||
const content = ref<any>(props.value)
|
const content = ref<any>(props.value);
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: Spec) => {
|
const openEdit = (row?: Spec) => {
|
||||||
|
|||||||
@@ -54,11 +54,11 @@
|
|||||||
|
|
||||||
const onChange = (value: any) => {
|
const onChange = (value: any) => {
|
||||||
console.log(value);
|
console.log(value);
|
||||||
data.value.map(d => {
|
data.value.map((d) => {
|
||||||
if (d.value == value) {
|
if (d.value == value) {
|
||||||
emit('done',d, Number(props.index))
|
emit('done', d, Number(props.index));
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
@@ -66,11 +66,11 @@
|
|||||||
(specId) => {
|
(specId) => {
|
||||||
if (specId) {
|
if (specId) {
|
||||||
listSpecValue({ specId }).then((list) => {
|
listSpecValue({ specId }).then((list) => {
|
||||||
data.value = list.map(v => {
|
data.value = list.map((v) => {
|
||||||
v.label = v.specValue
|
v.label = v.specValue;
|
||||||
v.value = v.specValue
|
v.value = v.specValue;
|
||||||
return v;
|
return v;
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
data.value = [];
|
data.value = [];
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<User | null>(null);
|
const current = ref<User | null>(null);
|
||||||
const content = ref<any>()
|
const content = ref<any>();
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: User) => {
|
const openEdit = (row?: User) => {
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
DatasourceFunction
|
DatasourceFunction
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import { EleProTable } from 'ele-admin-pro';
|
import { EleProTable } from 'ele-admin-pro';
|
||||||
import {User, UserParam} from "@/api/system/user/model";
|
import { User, UserParam } from '@/api/system/user/model';
|
||||||
import {pageUsers} from "@/api/system/user";
|
import { pageUsers } from '@/api/system/user';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
title: '域名',
|
title: '域名',
|
||||||
dataIndex: 'domain',
|
dataIndex: 'domain',
|
||||||
key: 'domain'
|
key: 'domain'
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// title: '状态',
|
// title: '状态',
|
||||||
// dataIndex: 'status',
|
// dataIndex: 'status',
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<a-button @click="openEdit">
|
<a-button @click="openEdit">
|
||||||
<template #icon><BulbOutlined v-if="value > 20" class="ele-text-heading" /><BulbOutlined v-else class="ele-text-danger" /></template>
|
<template #icon
|
||||||
|
><BulbOutlined
|
||||||
|
v-if="value > 20"
|
||||||
|
class="ele-text-heading" /><BulbOutlined
|
||||||
|
v-else
|
||||||
|
class="ele-text-danger"
|
||||||
|
/></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
<!-- 选择弹窗 -->
|
<!-- 选择弹窗 -->
|
||||||
<SelectData
|
<SelectData
|
||||||
@@ -18,7 +24,7 @@
|
|||||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import SelectData from './components/select-data.vue';
|
import SelectData from './components/select-data.vue';
|
||||||
import {User} from "@/api/system/user/model";
|
import { User } from '@/api/system/user/model';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const props = withDefaults(
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<User | null>(null);
|
const current = ref<User | null>(null);
|
||||||
const user = ref<User>(props.value)
|
const user = ref<User>(props.value);
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: User) => {
|
const openEdit = (row?: User) => {
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ import {ExclamationCircleOutlined} from '@ant-design/icons-vue';
|
|||||||
import { EleProTable } from 'ele-admin-pro';
|
import { EleProTable } from 'ele-admin-pro';
|
||||||
import { Company, CompanyParam } from '@/api/system/company/model';
|
import { Company, CompanyParam } from '@/api/system/company/model';
|
||||||
import { CmsWebsiteField } from '@/api/cms/cmsWebsiteField/model';
|
import { CmsWebsiteField } from '@/api/cms/cmsWebsiteField/model';
|
||||||
import {pageWebsiteField} from "@/api/system/website/field";
|
import { pageWebsiteField } from '@/api/system/website/field';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
import { BulbOutlined } from '@ant-design/icons-vue';
|
import { BulbOutlined } from '@ant-design/icons-vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import SelectData from './components/select-data.vue';
|
import SelectData from './components/select-data.vue';
|
||||||
import {CmsWebsiteField} from "@/api/cms/cmsWebsiteField/model";
|
import { CmsWebsiteField } from '@/api/cms/cmsWebsiteField/model';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -50,7 +50,7 @@ const emit = defineEmits<{
|
|||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<CmsWebsiteField | null>(null);
|
const current = ref<CmsWebsiteField | null>(null);
|
||||||
const content = ref<any>(props.value)
|
const content = ref<any>(props.value);
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
/* 打开编辑弹窗 */
|
||||||
const openEdit = (row?: CmsWebsiteField) => {
|
const openEdit = (row?: CmsWebsiteField) => {
|
||||||
|
|||||||
@@ -276,11 +276,18 @@ export function setupTextIndent(editor: TinyMCEEditor) {
|
|||||||
|
|
||||||
// 获取当前段落元素
|
// 获取当前段落元素
|
||||||
let paragraph = selectedNode;
|
let paragraph = selectedNode;
|
||||||
while (paragraph && paragraph.nodeName !== 'P' && paragraph.nodeName !== 'DIV') {
|
while (
|
||||||
|
paragraph &&
|
||||||
|
paragraph.nodeName !== 'P' &&
|
||||||
|
paragraph.nodeName !== 'DIV'
|
||||||
|
) {
|
||||||
paragraph = paragraph.parentNode as Element;
|
paragraph = paragraph.parentNode as Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paragraph && (paragraph.nodeName === 'P' || paragraph.nodeName === 'DIV')) {
|
if (
|
||||||
|
paragraph &&
|
||||||
|
(paragraph.nodeName === 'P' || paragraph.nodeName === 'DIV')
|
||||||
|
) {
|
||||||
const currentIndent = (paragraph as HTMLElement).style.textIndent;
|
const currentIndent = (paragraph as HTMLElement).style.textIndent;
|
||||||
|
|
||||||
if (currentIndent === '2em' || currentIndent === '32px') {
|
if (currentIndent === '2em' || currentIndent === '32px') {
|
||||||
@@ -305,7 +312,11 @@ export function setupTextIndent(editor: TinyMCEEditor) {
|
|||||||
const content = selection.getContent();
|
const content = selection.getContent();
|
||||||
if (content) {
|
if (content) {
|
||||||
// 如果有选择内容,将选择的内容包装在带缩进的段落中
|
// 如果有选择内容,将选择的内容包装在带缩进的段落中
|
||||||
editor.execCommand('mceInsertContent', false, `<p style="text-indent: 2em;">${content}</p>`);
|
editor.execCommand(
|
||||||
|
'mceInsertContent',
|
||||||
|
false,
|
||||||
|
`<p style="text-indent: 2em;">${content}</p>`
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
// 如果没有选择内容,在当前位置插入带缩进的段落
|
// 如果没有选择内容,在当前位置插入带缩进的段落
|
||||||
editor.execCommand('FormatBlock', false, 'p');
|
editor.execCommand('FormatBlock', false, 'p');
|
||||||
|
|||||||
@@ -151,23 +151,28 @@ export class PerformanceManager {
|
|||||||
|
|
||||||
// 收集性能数据
|
// 收集性能数据
|
||||||
private collectPerformanceData() {
|
private collectPerformanceData() {
|
||||||
const navigation = performance.getEntriesByType('navigation')[0] as PerformanceNavigationTiming;
|
const navigation = performance.getEntriesByType(
|
||||||
|
'navigation'
|
||||||
|
)[0] as PerformanceNavigationTiming;
|
||||||
const memory = (performance as any).memory;
|
const memory = (performance as any).memory;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// 页面加载性能
|
// 页面加载性能
|
||||||
pageLoad: {
|
pageLoad: {
|
||||||
domContentLoaded: navigation?.domContentLoadedEventEnd - navigation?.fetchStart,
|
domContentLoaded:
|
||||||
|
navigation?.domContentLoadedEventEnd - navigation?.fetchStart,
|
||||||
loadComplete: navigation?.loadEventEnd - navigation?.fetchStart,
|
loadComplete: navigation?.loadEventEnd - navigation?.fetchStart,
|
||||||
firstByte: navigation?.responseStart - navigation?.fetchStart
|
firstByte: navigation?.responseStart - navigation?.fetchStart
|
||||||
},
|
},
|
||||||
|
|
||||||
// 内存使用
|
// 内存使用
|
||||||
memory: memory ? {
|
memory: memory
|
||||||
|
? {
|
||||||
used: Math.round(memory.usedJSHeapSize / 1024 / 1024),
|
used: Math.round(memory.usedJSHeapSize / 1024 / 1024),
|
||||||
total: Math.round(memory.totalJSHeapSize / 1024 / 1024),
|
total: Math.round(memory.totalJSHeapSize / 1024 / 1024),
|
||||||
limit: Math.round(memory.jsHeapSizeLimit / 1024 / 1024)
|
limit: Math.round(memory.jsHeapSizeLimit / 1024 / 1024)
|
||||||
} : null,
|
}
|
||||||
|
: null,
|
||||||
|
|
||||||
// 资源加载
|
// 资源加载
|
||||||
resources: this.getResourceMetrics(),
|
resources: this.getResourceMetrics(),
|
||||||
@@ -189,7 +194,7 @@ export class PerformanceManager {
|
|||||||
|
|
||||||
let totalDuration = 0;
|
let totalDuration = 0;
|
||||||
|
|
||||||
resources.forEach(resource => {
|
resources.forEach((resource) => {
|
||||||
const duration = resource.duration;
|
const duration = resource.duration;
|
||||||
totalDuration += duration;
|
totalDuration += duration;
|
||||||
|
|
||||||
@@ -273,13 +278,15 @@ export class PerformanceAdvisor {
|
|||||||
|
|
||||||
// 检查资源加载
|
// 检查资源加载
|
||||||
const resources = performance.getEntriesByType('resource');
|
const resources = performance.getEntriesByType('resource');
|
||||||
const slowResources = resources.filter(r => r.duration > 2000);
|
const slowResources = resources.filter((r) => r.duration > 2000);
|
||||||
if (slowResources.length > 0) {
|
if (slowResources.length > 0) {
|
||||||
advice.push(`发现 ${slowResources.length} 个加载缓慢的资源,建议优化`);
|
advice.push(`发现 ${slowResources.length} 个加载缓慢的资源,建议优化`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查页面加载时间
|
// 检查页面加载时间
|
||||||
const navigation = performance.getEntriesByType('navigation')[0] as PerformanceNavigationTiming;
|
const navigation = performance.getEntriesByType(
|
||||||
|
'navigation'
|
||||||
|
)[0] as PerformanceNavigationTiming;
|
||||||
if (navigation) {
|
if (navigation) {
|
||||||
const loadTime = navigation.loadEventEnd - navigation.fetchStart;
|
const loadTime = navigation.loadEventEnd - navigation.fetchStart;
|
||||||
if (loadTime > 3000) {
|
if (loadTime > 3000) {
|
||||||
@@ -310,7 +317,11 @@ export const performanceManager = new PerformanceManager();
|
|||||||
|
|
||||||
// 性能装饰器
|
// 性能装饰器
|
||||||
export function performanceTrack(name: string) {
|
export function performanceTrack(name: string) {
|
||||||
return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
return function (
|
||||||
|
target: any,
|
||||||
|
propertyKey: string,
|
||||||
|
descriptor: PropertyDescriptor
|
||||||
|
) {
|
||||||
const originalMethod = descriptor.value;
|
const originalMethod = descriptor.value;
|
||||||
|
|
||||||
descriptor.value = function (...args: any[]) {
|
descriptor.value = function (...args: any[]) {
|
||||||
|
|||||||
@@ -7,11 +7,14 @@ export const APP_SECRET = import.meta.env.VITE_APP_SECRET || '';
|
|||||||
// 开发商官方网站
|
// 开发商官方网站
|
||||||
export const domain = import.meta.env.VITE_DOMAIN || 'https://your-domain.com';
|
export const domain = import.meta.env.VITE_DOMAIN || 'https://your-domain.com';
|
||||||
// 主节点
|
// 主节点
|
||||||
export const SERVER_API_URL = import.meta.env.VITE_SERVER_API_URL || 'https://your-api.com/api';
|
export const SERVER_API_URL =
|
||||||
|
import.meta.env.VITE_SERVER_API_URL || 'https://your-api.com/api';
|
||||||
// 模块节点
|
// 模块节点
|
||||||
export const MODULES_API_URL = localStorage.getItem('ApiUrl') || import.meta.env.VITE_API_URL;
|
export const MODULES_API_URL =
|
||||||
|
localStorage.getItem('ApiUrl') || import.meta.env.VITE_API_URL;
|
||||||
// 文件服务器地址
|
// 文件服务器地址
|
||||||
export const FILE_SERVER = import.meta.env.VITE_FILE_SERVER || 'https://your-file-server.com';
|
export const FILE_SERVER =
|
||||||
|
import.meta.env.VITE_FILE_SERVER || 'https://your-file-server.com';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 以下配置一般不需要修改
|
* 以下配置一般不需要修改
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ export default {
|
|||||||
loading: 'loading',
|
loading: 'loading',
|
||||||
oldPassword: 'Old',
|
oldPassword: 'Old',
|
||||||
newPassword: 'New',
|
newPassword: 'New',
|
||||||
confirm: 'Confirm',
|
confirm: 'Confirm'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,5 +10,5 @@ export default {
|
|||||||
loading: '登录中',
|
loading: '登录中',
|
||||||
oldPassword: '旧密码',
|
oldPassword: '旧密码',
|
||||||
newPassword: '新密码',
|
newPassword: '新密码',
|
||||||
confirm: '确认密码',
|
confirm: '确认密码'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const visible = ref<boolean>(false);
|
|||||||
// 通知数据
|
// 通知数据
|
||||||
const notice = ref<ChatMessage[]>([]);
|
const notice = ref<ChatMessage[]>([]);
|
||||||
|
|
||||||
console.log(userStore.info?.userId,'.....userId')
|
console.log(userStore.info?.userId, '.....userId');
|
||||||
// chatStore.connectSocketIO(userStore.info?.userId || 0);
|
// chatStore.connectSocketIO(userStore.info?.userId || 0);
|
||||||
|
|
||||||
// 未读数量
|
// 未读数量
|
||||||
|
|||||||
@@ -42,9 +42,11 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
用户ID:<span class="ele-text-secondary" @click="copyText(loginUser.userId)">{{
|
用户ID:<span
|
||||||
loginUser.userId
|
class="ele-text-secondary"
|
||||||
}}</span>
|
@click="copyText(loginUser.userId)"
|
||||||
|
>{{ loginUser.userId }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
昵称:<span class="ele-text-secondary">{{
|
昵称:<span class="ele-text-secondary">{{
|
||||||
@@ -57,9 +59,11 @@
|
|||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
租户:<span class="ele-text-secondary" @click="copyText(loginUser.tenantId)">{{
|
租户:<span
|
||||||
loginUser.tenantId
|
class="ele-text-secondary"
|
||||||
}}</span>
|
@click="copyText(loginUser.tenantId)"
|
||||||
|
>{{ loginUser.tenantId }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-gray-400">
|
<div class="text-gray-400">
|
||||||
角色:
|
角色:
|
||||||
@@ -81,26 +85,39 @@
|
|||||||
<a-menu-divider />
|
<a-menu-divider />
|
||||||
<a-menu-item key="profile">
|
<a-menu-item key="profile">
|
||||||
<div class="ele-cell">
|
<div class="ele-cell">
|
||||||
<div class="ele-cell-content"> {{ t('layout.header.profile') }}</div>
|
<div class="ele-cell-content">
|
||||||
|
{{ t('layout.header.profile') }}</div
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-divider />
|
<a-menu-divider />
|
||||||
<a-menu-item key="password">
|
<a-menu-item key="password">
|
||||||
<div class="ele-cell">
|
<div class="ele-cell">
|
||||||
<div class="ele-cell-content"> {{ t('layout.header.password') }}</div>
|
<div class="ele-cell-content">
|
||||||
|
{{ t('layout.header.password') }}</div
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<template v-if="loginUser.username == 'admin' || loginUser.username == 'superAdmin'">
|
<template
|
||||||
|
v-if="
|
||||||
|
loginUser.username == 'admin' ||
|
||||||
|
loginUser.username == 'superAdmin'
|
||||||
|
"
|
||||||
|
>
|
||||||
<a-menu-divider />
|
<a-menu-divider />
|
||||||
<a-menu-item key="accessKey">
|
<a-menu-item key="accessKey">
|
||||||
<div class="ele-cell">
|
<div class="ele-cell">
|
||||||
<div class="ele-cell-content"> {{ t('layout.header.accessKey') }}</div>
|
<div class="ele-cell-content">
|
||||||
|
{{ t('layout.header.accessKey') }}</div
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-divider />
|
<a-menu-divider />
|
||||||
<a-menu-item key="system">
|
<a-menu-item key="system">
|
||||||
<div class="ele-cell">
|
<div class="ele-cell">
|
||||||
<div class="ele-cell-content"> {{ t('layout.header.system') }}</div>
|
<div class="ele-cell-content">
|
||||||
|
{{ t('layout.header.system') }}</div
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -150,9 +167,9 @@ import {useUserStore} from '@/store/modules/user';
|
|||||||
import { logout } from '@/utils/page-tab-util';
|
import { logout } from '@/utils/page-tab-util';
|
||||||
import { listRoles } from '@/api/system/role';
|
import { listRoles } from '@/api/system/role';
|
||||||
import { useSiteStore } from '@/store/modules/site';
|
import { useSiteStore } from '@/store/modules/site';
|
||||||
import Qrcode from "@/components/QrCode/index.vue";
|
import Qrcode from '@/components/QrCode/index.vue';
|
||||||
import {AppInfo} from "@/api/cms/cmsWebsite/model";
|
import { AppInfo } from '@/api/cms/cmsWebsite/model';
|
||||||
import {getCmsWebsiteFieldByCode} from "@/api/cms/cmsWebsiteField";
|
import { getCmsWebsiteFieldByCode } from '@/api/cms/cmsWebsiteField';
|
||||||
|
|
||||||
// 是否开启响应式布局
|
// 是否开启响应式布局
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
@@ -218,7 +235,7 @@ const onUserDropClick = ({key}) => {
|
|||||||
|
|
||||||
const hideShare = () => {
|
const hideShare = () => {
|
||||||
showQrcode.value = false;
|
showQrcode.value = false;
|
||||||
}
|
};
|
||||||
|
|
||||||
/* 打开主题设置抽屉 */
|
/* 打开主题设置抽屉 */
|
||||||
// const openSetting = () => {
|
// const openSetting = () => {
|
||||||
@@ -247,11 +264,11 @@ const reload = () => {
|
|||||||
}
|
}
|
||||||
// 检查是否启动自定义接口
|
// 检查是否启动自定义接口
|
||||||
if (import.meta.env.PROD) {
|
if (import.meta.env.PROD) {
|
||||||
getCmsWebsiteFieldByCode('ApiUrl').then(res => {
|
getCmsWebsiteFieldByCode('ApiUrl').then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
localStorage.setItem('ApiUrl', `${res.value}`);
|
localStorage.setItem('ApiUrl', `${res.value}`);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<!-- 全局页脚 -->
|
<!-- 全局页脚 -->
|
||||||
<template>
|
<template>
|
||||||
<div v-if="config.setting?.showAdminCopyright" class="ele-text-center" style="padding: 16px 0">
|
<div
|
||||||
|
v-if="config.setting?.showAdminCopyright"
|
||||||
|
class="ele-text-center"
|
||||||
|
style="padding: 16px 0"
|
||||||
|
>
|
||||||
<div class="ele-text-secondary" style="margin-top: 8px">
|
<div class="ele-text-secondary" style="margin-top: 8px">
|
||||||
{{ t('layout.footer.copyright') }}
|
{{ t('layout.footer.copyright') }}
|
||||||
</div>
|
</div>
|
||||||
@@ -9,8 +13,8 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import {useWebsiteSettingStore} from "@/store/modules/setting";
|
import { useWebsiteSettingStore } from '@/store/modules/setting';
|
||||||
import {getSettingByKey} from "@/api/system/setting";
|
import { getSettingByKey } from '@/api/system/setting';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const config = useWebsiteSettingStore();
|
const config = useWebsiteSettingStore();
|
||||||
@@ -18,9 +22,9 @@ const config = useWebsiteSettingStore();
|
|||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
if (!config.setting) {
|
if (!config.setting) {
|
||||||
const info = await getSettingByKey('privacy');
|
const info = await getSettingByKey('privacy');
|
||||||
config.setSetting(info)
|
config.setSetting(info);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
reload();
|
reload();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -725,7 +725,8 @@ initColorValue();
|
|||||||
background: none;
|
background: none;
|
||||||
|
|
||||||
&.is-empty {
|
&.is-empty {
|
||||||
background: conic-gradient(from 90deg at 50% 50%,
|
background: conic-gradient(
|
||||||
|
from 90deg at 50% 50%,
|
||||||
rgb(255, 0, 0) -19.41deg,
|
rgb(255, 0, 0) -19.41deg,
|
||||||
rgb(255, 0, 0) 18.76deg,
|
rgb(255, 0, 0) 18.76deg,
|
||||||
rgb(255, 138, 0) 59.32deg,
|
rgb(255, 138, 0) 59.32deg,
|
||||||
@@ -736,7 +737,8 @@ initColorValue();
|
|||||||
rgb(173, 0, 255) 260.13deg,
|
rgb(173, 0, 255) 260.13deg,
|
||||||
rgb(255, 0, 199) 300.69deg,
|
rgb(255, 0, 199) 300.69deg,
|
||||||
rgb(255, 0, 0) 340.59deg,
|
rgb(255, 0, 0) 340.59deg,
|
||||||
rgb(255, 0, 0) 378.76deg);
|
rgb(255, 0, 0) 378.76deg
|
||||||
|
);
|
||||||
|
|
||||||
& + .ele-color-picker-trigger-arrow {
|
& + .ele-color-picker-trigger-arrow {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
// 是否刷新页面
|
// 是否刷新页面
|
||||||
if (localStorage.getItem('Reload')) {
|
if (localStorage.getItem('Reload')) {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
localStorage.removeItem('Reload')
|
localStorage.removeItem('Reload');
|
||||||
}
|
}
|
||||||
|
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class PortCache {
|
|||||||
let expired = 0;
|
let expired = 0;
|
||||||
let active = 0;
|
let active = 0;
|
||||||
|
|
||||||
cache.forEach(config => {
|
cache.forEach((config) => {
|
||||||
if (now - config.lastUsed > this.CACHE_EXPIRY) {
|
if (now - config.lastUsed > this.CACHE_EXPIRY) {
|
||||||
expired++;
|
expired++;
|
||||||
} else {
|
} else {
|
||||||
@@ -88,7 +88,10 @@ class PortUtils {
|
|||||||
/**
|
/**
|
||||||
* 检查端口是否可用
|
* 检查端口是否可用
|
||||||
*/
|
*/
|
||||||
static async isPortAvailable(port: number, host: string = 'localhost'): Promise<boolean> {
|
static async isPortAvailable(
|
||||||
|
port: number,
|
||||||
|
host = 'localhost'
|
||||||
|
): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
// 在浏览器环境中,我们无法直接检测端口占用
|
// 在浏览器环境中,我们无法直接检测端口占用
|
||||||
// 这里使用一个模拟的检测方法
|
// 这里使用一个模拟的检测方法
|
||||||
@@ -112,7 +115,7 @@ class PortUtils {
|
|||||||
static async findAvailablePort(
|
static async findAvailablePort(
|
||||||
startPort: number,
|
startPort: number,
|
||||||
endPort: number,
|
endPort: number,
|
||||||
host: string = 'localhost'
|
host = 'localhost'
|
||||||
): Promise<number | null> {
|
): Promise<number | null> {
|
||||||
for (let port = startPort; port <= endPort; port++) {
|
for (let port = startPort; port <= endPort; port++) {
|
||||||
if (await this.isPortAvailable(port, host)) {
|
if (await this.isPortAvailable(port, host)) {
|
||||||
@@ -139,7 +142,8 @@ class PortUtils {
|
|||||||
* 计算租户端口偏移
|
* 计算租户端口偏移
|
||||||
*/
|
*/
|
||||||
static calculateTenantOffset(tenantId: string | number): number {
|
static calculateTenantOffset(tenantId: string | number): number {
|
||||||
const id = typeof tenantId === 'string' ? parseInt(tenantId) || 0 : tenantId;
|
const id =
|
||||||
|
typeof tenantId === 'string' ? parseInt(tenantId) || 0 : tenantId;
|
||||||
return (id % 1000) * 10; // 每个租户分配10个端口的空间
|
return (id % 1000) * 10; // 每个租户分配10个端口的空间
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,9 +152,9 @@ class PortUtils {
|
|||||||
*/
|
*/
|
||||||
static calculateEnvironmentOffset(environment: string): number {
|
static calculateEnvironmentOffset(environment: string): number {
|
||||||
const offsets = {
|
const offsets = {
|
||||||
'development': 0,
|
development: 0,
|
||||||
'test': 1000,
|
test: 1000,
|
||||||
'production': 2000
|
production: 2000
|
||||||
};
|
};
|
||||||
return offsets[environment as keyof typeof offsets] || 0;
|
return offsets[environment as keyof typeof offsets] || 0;
|
||||||
}
|
}
|
||||||
@@ -191,13 +195,17 @@ export class PortManager {
|
|||||||
projectName?: string;
|
projectName?: string;
|
||||||
preferredPort?: number;
|
preferredPort?: number;
|
||||||
}): Promise<PortConfig> {
|
}): Promise<PortConfig> {
|
||||||
const tenantId = options?.tenantId || await getTenantId();
|
const tenantId = options?.tenantId || (await getTenantId());
|
||||||
const projectName = options?.projectName || 'mp-vue';
|
const projectName = options?.projectName || 'mp-vue';
|
||||||
const portKey = PortUtils.generatePortKey(tenantId, this.environment, projectName);
|
const portKey = PortUtils.generatePortKey(
|
||||||
|
tenantId,
|
||||||
|
this.environment,
|
||||||
|
projectName
|
||||||
|
);
|
||||||
|
|
||||||
// 1. 检查缓存中的端口
|
// 1. 检查缓存中的端口
|
||||||
const cachedPort = this.cache.get(portKey);
|
const cachedPort = this.cache.get(portKey);
|
||||||
if (cachedPort && await PortUtils.isPortAvailable(cachedPort.port)) {
|
if (cachedPort && (await PortUtils.isPortAvailable(cachedPort.port))) {
|
||||||
cachedPort.lastUsed = Date.now();
|
cachedPort.lastUsed = Date.now();
|
||||||
this.updateCache(portKey, cachedPort);
|
this.updateCache(portKey, cachedPort);
|
||||||
console.log('📋 使用缓存端口:', cachedPort.port);
|
console.log('📋 使用缓存端口:', cachedPort.port);
|
||||||
@@ -207,7 +215,11 @@ export class PortManager {
|
|||||||
// 2. 尝试首选端口
|
// 2. 尝试首选端口
|
||||||
if (options?.preferredPort) {
|
if (options?.preferredPort) {
|
||||||
if (await PortUtils.isPortAvailable(options.preferredPort)) {
|
if (await PortUtils.isPortAvailable(options.preferredPort)) {
|
||||||
const config = this.createPortConfig(options.preferredPort, tenantId, projectName);
|
const config = this.createPortConfig(
|
||||||
|
options.preferredPort,
|
||||||
|
tenantId,
|
||||||
|
projectName
|
||||||
|
);
|
||||||
this.updateCache(portKey, config);
|
this.updateCache(portKey, config);
|
||||||
console.log('✨ 使用首选端口:', options.preferredPort);
|
console.log('✨ 使用首选端口:', options.preferredPort);
|
||||||
return config;
|
return config;
|
||||||
@@ -216,7 +228,11 @@ export class PortManager {
|
|||||||
|
|
||||||
// 3. 智能分配端口
|
// 3. 智能分配端口
|
||||||
const recommendedPort = await this.allocateSmartPort(tenantId, projectName);
|
const recommendedPort = await this.allocateSmartPort(tenantId, projectName);
|
||||||
const config = this.createPortConfig(recommendedPort, tenantId, projectName);
|
const config = this.createPortConfig(
|
||||||
|
recommendedPort,
|
||||||
|
tenantId,
|
||||||
|
projectName
|
||||||
|
);
|
||||||
this.updateCache(portKey, config);
|
this.updateCache(portKey, config);
|
||||||
|
|
||||||
console.log('🎯 智能分配端口:', recommendedPort);
|
console.log('🎯 智能分配端口:', recommendedPort);
|
||||||
@@ -269,7 +285,9 @@ export class PortManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 最后的备选方案
|
// 最后的备选方案
|
||||||
throw new Error(`无法在端口范围 ${this.strategy.portRange[0]}-${this.strategy.portRange[1]} 内找到可用端口`);
|
throw new Error(
|
||||||
|
`无法在端口范围 ${this.strategy.portRange[0]}-${this.strategy.portRange[1]} 内找到可用端口`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -237,7 +237,9 @@ export class PortStrategyManager {
|
|||||||
getCurrentStrategy(): EnvironmentPortStrategy {
|
getCurrentStrategy(): EnvironmentPortStrategy {
|
||||||
const strategy = this.strategies.get(this.currentEnvironment);
|
const strategy = this.strategies.get(this.currentEnvironment);
|
||||||
if (!strategy) {
|
if (!strategy) {
|
||||||
console.warn(`未找到环境 ${this.currentEnvironment} 的策略,使用开发环境策略`);
|
console.warn(
|
||||||
|
`未找到环境 ${this.currentEnvironment} 的策略,使用开发环境策略`
|
||||||
|
);
|
||||||
return this.strategies.get('development')!;
|
return this.strategies.get('development')!;
|
||||||
}
|
}
|
||||||
return strategy;
|
return strategy;
|
||||||
@@ -253,7 +255,10 @@ export class PortStrategyManager {
|
|||||||
/**
|
/**
|
||||||
* 设置环境策略
|
* 设置环境策略
|
||||||
*/
|
*/
|
||||||
setStrategy(environment: Environment, strategy: EnvironmentPortStrategy): void {
|
setStrategy(
|
||||||
|
environment: Environment,
|
||||||
|
strategy: EnvironmentPortStrategy
|
||||||
|
): void {
|
||||||
this.strategies.set(environment, strategy);
|
this.strategies.set(environment, strategy);
|
||||||
console.log(`✅ 已更新 ${environment} 环境的端口策略`);
|
console.log(`✅ 已更新 ${environment} 环境的端口策略`);
|
||||||
}
|
}
|
||||||
@@ -275,7 +280,7 @@ export class PortStrategyManager {
|
|||||||
|
|
||||||
// 获取备选策略(按优先级排序)
|
// 获取备选策略(按优先级排序)
|
||||||
const allStrategies = Array.from(this.strategies.values())
|
const allStrategies = Array.from(this.strategies.values())
|
||||||
.filter(s => s.environment !== this.currentEnvironment)
|
.filter((s) => s.environment !== this.currentEnvironment)
|
||||||
.sort((a, b) => a.priority - b.priority);
|
.sort((a, b) => a.priority - b.priority);
|
||||||
|
|
||||||
fallback.push(...allStrategies);
|
fallback.push(...allStrategies);
|
||||||
@@ -320,7 +325,10 @@ export class PortStrategyManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 检查基础端口
|
// 检查基础端口
|
||||||
if (strategy.basePort < strategy.portRange[0] || strategy.basePort > strategy.portRange[1]) {
|
if (
|
||||||
|
strategy.basePort < strategy.portRange[0] ||
|
||||||
|
strategy.basePort > strategy.portRange[1]
|
||||||
|
) {
|
||||||
errors.push('基础端口不在允许的端口范围内');
|
errors.push('基础端口不在允许的端口范围内');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,11 +338,17 @@ export class PortStrategyManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 检查环境特定规则
|
// 检查环境特定规则
|
||||||
if (strategy.environment === 'production' && !strategy.restrictions.requireHttps) {
|
if (
|
||||||
|
strategy.environment === 'production' &&
|
||||||
|
!strategy.restrictions.requireHttps
|
||||||
|
) {
|
||||||
warnings.push('生产环境建议启用 HTTPS');
|
warnings.push('生产环境建议启用 HTTPS');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strategy.environment === 'development' && strategy.restrictions.requireHttps) {
|
if (
|
||||||
|
strategy.environment === 'development' &&
|
||||||
|
strategy.restrictions.requireHttps
|
||||||
|
) {
|
||||||
warnings.push('开发环境启用 HTTPS 可能增加配置复杂度');
|
warnings.push('开发环境启用 HTTPS 可能增加配置复杂度');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,12 +372,14 @@ export class PortStrategyManager {
|
|||||||
isValid: boolean;
|
isValid: boolean;
|
||||||
}>;
|
}>;
|
||||||
} {
|
} {
|
||||||
const strategies = Array.from(this.strategies.entries()).map(([env, strategy]) => ({
|
const strategies = Array.from(this.strategies.entries()).map(
|
||||||
|
([env, strategy]) => ({
|
||||||
environment: env,
|
environment: env,
|
||||||
priority: strategy.priority,
|
priority: strategy.priority,
|
||||||
portRange: strategy.portRange,
|
portRange: strategy.portRange,
|
||||||
isValid: this.validateStrategy(strategy).isValid
|
isValid: this.validateStrategy(strategy).isValid
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
current: this.currentEnvironment,
|
current: this.currentEnvironment,
|
||||||
|
|||||||
@@ -75,7 +75,10 @@ class TenantPortCache {
|
|||||||
localStorage.removeItem(this.CACHE_KEY);
|
localStorage.removeItem(this.CACHE_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
static generateKey(tenantId: string | number, environment: Environment): string {
|
static generateKey(
|
||||||
|
tenantId: string | number,
|
||||||
|
environment: Environment
|
||||||
|
): string {
|
||||||
return `${tenantId}-${environment}`;
|
return `${tenantId}-${environment}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -107,7 +110,7 @@ export class TenantPortManager {
|
|||||||
}): Promise<PortAllocationResult> {
|
}): Promise<PortAllocationResult> {
|
||||||
try {
|
try {
|
||||||
// 1. 获取租户信息
|
// 1. 获取租户信息
|
||||||
const tenantId = options?.tenantId || await getTenantId();
|
const tenantId = options?.tenantId || (await getTenantId());
|
||||||
const tenantInfo = await getTenantInfo();
|
const tenantInfo = await getTenantInfo();
|
||||||
|
|
||||||
if (!tenantId) {
|
if (!tenantId) {
|
||||||
@@ -119,7 +122,10 @@ export class TenantPortManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. 检查现有绑定
|
// 2. 检查现有绑定
|
||||||
const bindingKey = TenantPortCache.generateKey(tenantId, this.currentEnvironment);
|
const bindingKey = TenantPortCache.generateKey(
|
||||||
|
tenantId,
|
||||||
|
this.currentEnvironment
|
||||||
|
);
|
||||||
const existingBinding = this.bindings.get(bindingKey);
|
const existingBinding = this.bindings.get(bindingKey);
|
||||||
|
|
||||||
if (existingBinding && !options?.forceNew) {
|
if (existingBinding && !options?.forceNew) {
|
||||||
@@ -148,7 +154,11 @@ export class TenantPortManager {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 4. 创建租户端口绑定
|
// 4. 创建租户端口绑定
|
||||||
const binding = this.createTenantBinding(tenantId, tenantInfo, portConfig);
|
const binding = this.createTenantBinding(
|
||||||
|
tenantId,
|
||||||
|
tenantInfo,
|
||||||
|
portConfig
|
||||||
|
);
|
||||||
this.updateBinding(bindingKey, binding);
|
this.updateBinding(bindingKey, binding);
|
||||||
|
|
||||||
console.log('🎯 为租户分配新端口:', {
|
console.log('🎯 为租户分配新端口:', {
|
||||||
@@ -163,7 +173,6 @@ export class TenantPortManager {
|
|||||||
binding,
|
binding,
|
||||||
recommendations: this.generateRecommendations(binding)
|
recommendations: this.generateRecommendations(binding)
|
||||||
};
|
};
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('❌ 租户端口分配失败:', error);
|
console.error('❌ 租户端口分配失败:', error);
|
||||||
return {
|
return {
|
||||||
@@ -177,7 +186,9 @@ export class TenantPortManager {
|
|||||||
/**
|
/**
|
||||||
* 验证端口绑定是否有效
|
* 验证端口绑定是否有效
|
||||||
*/
|
*/
|
||||||
private async validatePortBinding(binding: TenantPortBinding): Promise<boolean> {
|
private async validatePortBinding(
|
||||||
|
binding: TenantPortBinding
|
||||||
|
): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
// 检查端口是否仍然可用
|
// 检查端口是否仍然可用
|
||||||
const response = await fetch(`http://localhost:${binding.assignedPort}`, {
|
const response = await fetch(`http://localhost:${binding.assignedPort}`, {
|
||||||
@@ -214,7 +225,9 @@ export class TenantPortManager {
|
|||||||
metadata: {
|
metadata: {
|
||||||
projectName: portConfig.projectName || 'mp-vue',
|
projectName: portConfig.projectName || 'mp-vue',
|
||||||
version: '1.0.0',
|
version: '1.0.0',
|
||||||
description: `${tenantInfo?.name || '租户'} - ${this.currentEnvironment}环境`
|
description: `${tenantInfo?.name || '租户'} - ${
|
||||||
|
this.currentEnvironment
|
||||||
|
}环境`
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -238,7 +251,9 @@ export class TenantPortManager {
|
|||||||
switch (binding.environment) {
|
switch (binding.environment) {
|
||||||
case 'development':
|
case 'development':
|
||||||
recommendations.push('开发环境:建议配置热重载和调试工具');
|
recommendations.push('开发环境:建议配置热重载和调试工具');
|
||||||
recommendations.push(`访问地址:http://localhost:${binding.assignedPort}`);
|
recommendations.push(
|
||||||
|
`访问地址:http://localhost:${binding.assignedPort}`
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'test':
|
case 'test':
|
||||||
recommendations.push('测试环境:建议配置自动化测试和监控');
|
recommendations.push('测试环境:建议配置自动化测试和监控');
|
||||||
@@ -252,7 +267,10 @@ export class TenantPortManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 端口范围建议
|
// 端口范围建议
|
||||||
if (binding.assignedPort < strategy.portRange[0] || binding.assignedPort > strategy.portRange[1]) {
|
if (
|
||||||
|
binding.assignedPort < strategy.portRange[0] ||
|
||||||
|
binding.assignedPort > strategy.portRange[1]
|
||||||
|
) {
|
||||||
recommendations.push('⚠️ 分配的端口超出推荐范围,可能存在冲突风险');
|
recommendations.push('⚠️ 分配的端口超出推荐范围,可能存在冲突风险');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,14 +285,17 @@ export class TenantPortManager {
|
|||||||
history: TenantPortBinding[];
|
history: TenantPortBinding[];
|
||||||
recommendations: string[];
|
recommendations: string[];
|
||||||
}> {
|
}> {
|
||||||
const targetTenantId = tenantId || await getTenantId();
|
const targetTenantId = tenantId || (await getTenantId());
|
||||||
const history: TenantPortBinding[] = [];
|
const history: TenantPortBinding[] = [];
|
||||||
let current: TenantPortBinding | undefined;
|
let current: TenantPortBinding | undefined;
|
||||||
|
|
||||||
// 查找当前和历史绑定
|
// 查找当前和历史绑定
|
||||||
this.bindings.forEach(binding => {
|
this.bindings.forEach((binding) => {
|
||||||
if (binding.tenantId === targetTenantId) {
|
if (binding.tenantId === targetTenantId) {
|
||||||
if (binding.environment === this.currentEnvironment && binding.isActive) {
|
if (
|
||||||
|
binding.environment === this.currentEnvironment &&
|
||||||
|
binding.isActive
|
||||||
|
) {
|
||||||
current = binding;
|
current = binding;
|
||||||
}
|
}
|
||||||
history.push(binding);
|
history.push(binding);
|
||||||
@@ -296,14 +317,19 @@ export class TenantPortManager {
|
|||||||
*/
|
*/
|
||||||
async releaseTenantPort(tenantId?: string | number): Promise<boolean> {
|
async releaseTenantPort(tenantId?: string | number): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
const targetTenantId = tenantId || await getTenantId();
|
const targetTenantId = tenantId || (await getTenantId());
|
||||||
const bindingKey = TenantPortCache.generateKey(targetTenantId, this.currentEnvironment);
|
const bindingKey = TenantPortCache.generateKey(
|
||||||
|
targetTenantId,
|
||||||
|
this.currentEnvironment
|
||||||
|
);
|
||||||
|
|
||||||
const binding = this.bindings.get(bindingKey);
|
const binding = this.bindings.get(bindingKey);
|
||||||
if (binding) {
|
if (binding) {
|
||||||
binding.isActive = false;
|
binding.isActive = false;
|
||||||
this.updateBinding(bindingKey, binding);
|
this.updateBinding(bindingKey, binding);
|
||||||
console.log(`🔓 已释放租户 ${targetTenantId} 的端口 ${binding.assignedPort}`);
|
console.log(
|
||||||
|
`🔓 已释放租户 ${targetTenantId} 的端口 ${binding.assignedPort}`
|
||||||
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,13 +355,16 @@ export class TenantPortManager {
|
|||||||
activeBindings: 0,
|
activeBindings: 0,
|
||||||
environmentStats: {} as Record<Environment, number>,
|
environmentStats: {} as Record<Environment, number>,
|
||||||
portRangeUsage: { min: Infinity, max: 0, average: 0 },
|
portRangeUsage: { min: Infinity, max: 0, average: 0 },
|
||||||
topTenants: [] as Array<{ tenantId: string | number; bindingsCount: number }>
|
topTenants: [] as Array<{
|
||||||
|
tenantId: string | number;
|
||||||
|
bindingsCount: number;
|
||||||
|
}>
|
||||||
};
|
};
|
||||||
|
|
||||||
const tenantCounts = new Map<string | number, number>();
|
const tenantCounts = new Map<string | number, number>();
|
||||||
let portSum = 0;
|
let portSum = 0;
|
||||||
|
|
||||||
this.bindings.forEach(binding => {
|
this.bindings.forEach((binding) => {
|
||||||
// 活跃绑定统计
|
// 活跃绑定统计
|
||||||
if (binding.isActive) {
|
if (binding.isActive) {
|
||||||
stats.activeBindings++;
|
stats.activeBindings++;
|
||||||
@@ -346,8 +375,14 @@ export class TenantPortManager {
|
|||||||
(stats.environmentStats[binding.environment] || 0) + 1;
|
(stats.environmentStats[binding.environment] || 0) + 1;
|
||||||
|
|
||||||
// 端口范围统计
|
// 端口范围统计
|
||||||
stats.portRangeUsage.min = Math.min(stats.portRangeUsage.min, binding.assignedPort);
|
stats.portRangeUsage.min = Math.min(
|
||||||
stats.portRangeUsage.max = Math.max(stats.portRangeUsage.max, binding.assignedPort);
|
stats.portRangeUsage.min,
|
||||||
|
binding.assignedPort
|
||||||
|
);
|
||||||
|
stats.portRangeUsage.max = Math.max(
|
||||||
|
stats.portRangeUsage.max,
|
||||||
|
binding.assignedPort
|
||||||
|
);
|
||||||
portSum += binding.assignedPort;
|
portSum += binding.assignedPort;
|
||||||
|
|
||||||
// 租户统计
|
// 租户统计
|
||||||
@@ -356,9 +391,8 @@ export class TenantPortManager {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 计算平均端口
|
// 计算平均端口
|
||||||
stats.portRangeUsage.average = stats.totalBindings > 0
|
stats.portRangeUsage.average =
|
||||||
? Math.round(portSum / stats.totalBindings)
|
stats.totalBindings > 0 ? Math.round(portSum / stats.totalBindings) : 0;
|
||||||
: 0;
|
|
||||||
|
|
||||||
// 修复无限大的情况
|
// 修复无限大的情况
|
||||||
if (stats.portRangeUsage.min === Infinity) {
|
if (stats.portRangeUsage.min === Infinity) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user