diff --git a/src/api/bszx/bszxBranch/model/index.ts b/src/api/bszx/bszxBranch/model/index.ts index 16866dd..0cb1981 100644 --- a/src/api/bszx/bszxBranch/model/index.ts +++ b/src/api/bszx/bszxBranch/model/index.ts @@ -6,7 +6,7 @@ import type { PageParam } from '@/api'; export interface BszxBranch { // ID id?: number; - // 分部名称 + // 分部名称 name?: string; // 排序(数字越小越靠前) sortNumber?: number; diff --git a/src/api/bszx/bszxOrder/index.ts b/src/api/bszx/bszxOrder/index.ts index 4c7faff..a353335 100644 --- a/src/api/bszx/bszxOrder/index.ts +++ b/src/api/bszx/bszxOrder/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import { MODULES_API_URL } from '@/config/setting'; -import {ShopOrder, ShopOrderParam} from "@/api/shop/shopOrder/model"; +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)); } - /** * 统计订单总金额(只统计有效订单) */ diff --git a/src/api/bszx/bszxPay/index.ts b/src/api/bszx/bszxPay/index.ts index df20870..7fc03bb 100644 --- a/src/api/bszx/bszxPay/index.ts +++ b/src/api/bszx/bszxPay/index.ts @@ -2,7 +2,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { BszxPay, BszxPayParam } from './model'; import { MODULES_API_URL } from '@/config/setting'; -import {ShopOrder} from "@/api/shop/shopOrder/model"; +import { ShopOrder } from '@/api/shop/shopOrder/model'; /** * 分页查询百色中学-捐款记录 diff --git a/src/api/bszx/bszxPayRanking/index.ts b/src/api/bszx/bszxPayRanking/index.ts index 7a6dc99..7417b37 100644 --- a/src/api/bszx/bszxPayRanking/index.ts +++ b/src/api/bszx/bszxPayRanking/index.ts @@ -2,7 +2,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { BszxPayRanking, BszxPayRankingParam } from './model'; import { MODULES_API_URL } from '@/config/setting'; -import {BszxClass, BszxClassParam} from "@/api/bszx/bszxClass/model"; +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)); } - - /** * 添加百色中学-捐款排行 */ diff --git a/src/api/clinic/clinicAppointment/index.ts b/src/api/clinic/clinicAppointment/index.ts index e3520a0..19704d0 100644 --- a/src/api/clinic/clinicAppointment/index.ts +++ b/src/api/clinic/clinicAppointment/index.ts @@ -78,7 +78,9 @@ export async function removeClinicAppointment(id?: number) { /** * 批量删除挂号 */ -export async function removeBatchClinicAppointment(data: (number | undefined)[]) { +export async function removeBatchClinicAppointment( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-appointment/batch', { diff --git a/src/api/clinic/clinicDoctorApply/index.ts b/src/api/clinic/clinicDoctorApply/index.ts index eb2f45b..0ab5123 100644 --- a/src/api/clinic/clinicDoctorApply/index.ts +++ b/src/api/clinic/clinicDoctorApply/index.ts @@ -78,7 +78,9 @@ export async function removeClinicDoctorApply(id?: number) { /** * 批量删除医生入驻申请 */ -export async function removeBatchClinicDoctorApply(data: (number | undefined)[]) { +export async function removeBatchClinicDoctorApply( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-doctor-apply/batch', { diff --git a/src/api/clinic/clinicDoctorMedicalRecord/index.ts b/src/api/clinic/clinicDoctorMedicalRecord/index.ts index b857e8f..7dd3e62 100644 --- a/src/api/clinic/clinicDoctorMedicalRecord/index.ts +++ b/src/api/clinic/clinicDoctorMedicalRecord/index.ts @@ -1,17 +1,21 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; -import type { ClinicDoctorMedicalRecord, ClinicDoctorMedicalRecordParam } from './model'; +import type { + ClinicDoctorMedicalRecord, + ClinicDoctorMedicalRecordParam +} from './model'; /** * 分页查询医疗记录 */ -export async function pageClinicDoctorMedicalRecord(params: ClinicDoctorMedicalRecordParam) { - const res = await request.get>>( - '/clinic/clinic-doctor-medical-record/page', - { - params - } - ); +export async function pageClinicDoctorMedicalRecord( + params: ClinicDoctorMedicalRecordParam +) { + const res = await request.get< + ApiResult> + >('/clinic/clinic-doctor-medical-record/page', { + params + }); if (res.data.code === 0) { return res.data.data; } @@ -21,7 +25,9 @@ export async function pageClinicDoctorMedicalRecord(params: ClinicDoctorMedicalR /** * 查询医疗记录列表 */ -export async function listClinicDoctorMedicalRecord(params?: ClinicDoctorMedicalRecordParam) { +export async function listClinicDoctorMedicalRecord( + params?: ClinicDoctorMedicalRecordParam +) { const res = await request.get>( '/clinic/clinic-doctor-medical-record', { @@ -37,7 +43,9 @@ export async function listClinicDoctorMedicalRecord(params?: ClinicDoctorMedical /** * 添加医疗记录 */ -export async function addClinicDoctorMedicalRecord(data: ClinicDoctorMedicalRecord) { +export async function addClinicDoctorMedicalRecord( + data: ClinicDoctorMedicalRecord +) { const res = await request.post>( '/clinic/clinic-doctor-medical-record', data @@ -51,7 +59,9 @@ export async function addClinicDoctorMedicalRecord(data: ClinicDoctorMedicalReco /** * 修改医疗记录 */ -export async function updateClinicDoctorMedicalRecord(data: ClinicDoctorMedicalRecord) { +export async function updateClinicDoctorMedicalRecord( + data: ClinicDoctorMedicalRecord +) { const res = await request.put>( '/clinic/clinic-doctor-medical-record', data @@ -78,7 +88,9 @@ export async function removeClinicDoctorMedicalRecord(id?: number) { /** * 批量删除医疗记录 */ -export async function removeBatchClinicDoctorMedicalRecord(data: (number | undefined)[]) { +export async function removeBatchClinicDoctorMedicalRecord( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-doctor-medical-record/batch', { diff --git a/src/api/clinic/clinicDoctorUser/index.ts b/src/api/clinic/clinicDoctorUser/index.ts index 275286f..d941478 100644 --- a/src/api/clinic/clinicDoctorUser/index.ts +++ b/src/api/clinic/clinicDoctorUser/index.ts @@ -78,7 +78,9 @@ export async function removeClinicDoctorUser(id?: number) { /** * 批量删除分销商用户记录表 */ -export async function removeBatchClinicDoctorUser(data: (number | undefined)[]) { +export async function removeBatchClinicDoctorUser( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-doctor-user/batch', { diff --git a/src/api/clinic/clinicMedicalHistory/index.ts b/src/api/clinic/clinicMedicalHistory/index.ts index 84fbd8b..6ac52e7 100644 --- a/src/api/clinic/clinicMedicalHistory/index.ts +++ b/src/api/clinic/clinicMedicalHistory/index.ts @@ -5,7 +5,9 @@ import type { ClinicMedicalHistory, ClinicMedicalHistoryParam } from './model'; /** * 分页查询病例 */ -export async function pageClinicMedicalHistory(params: ClinicMedicalHistoryParam) { +export async function pageClinicMedicalHistory( + params: ClinicMedicalHistoryParam +) { const res = await request.get>>( '/clinic/clinic-medical-history/page', { @@ -21,7 +23,9 @@ export async function pageClinicMedicalHistory(params: ClinicMedicalHistoryParam /** * 查询病例列表 */ -export async function listClinicMedicalHistory(params?: ClinicMedicalHistoryParam) { +export async function listClinicMedicalHistory( + params?: ClinicMedicalHistoryParam +) { const res = await request.get>( '/clinic/clinic-medical-history', { @@ -78,7 +82,9 @@ export async function removeClinicMedicalHistory(id?: number) { /** * 批量删除病例 */ -export async function removeBatchClinicMedicalHistory(data: (number | undefined)[]) { +export async function removeBatchClinicMedicalHistory( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-medical-history/batch', { diff --git a/src/api/clinic/clinicMedicineInout/index.ts b/src/api/clinic/clinicMedicineInout/index.ts index 222930b..0434a8e 100644 --- a/src/api/clinic/clinicMedicineInout/index.ts +++ b/src/api/clinic/clinicMedicineInout/index.ts @@ -5,7 +5,9 @@ import type { ClinicMedicineInout, ClinicMedicineInoutParam } from './model'; /** * 分页查询出入库 */ -export async function pageClinicMedicineInout(params: ClinicMedicineInoutParam) { +export async function pageClinicMedicineInout( + params: ClinicMedicineInoutParam +) { const res = await request.get>>( '/clinic/clinic-medicine-inout/page', { @@ -21,7 +23,9 @@ export async function pageClinicMedicineInout(params: ClinicMedicineInoutParam) /** * 查询出入库列表 */ -export async function listClinicMedicineInout(params?: ClinicMedicineInoutParam) { +export async function listClinicMedicineInout( + params?: ClinicMedicineInoutParam +) { const res = await request.get>( '/clinic/clinic-medicine-inout', { @@ -78,7 +82,9 @@ export async function removeClinicMedicineInout(id?: number) { /** * 批量删除出入库 */ -export async function removeBatchClinicMedicineInout(data: (number | undefined)[]) { +export async function removeBatchClinicMedicineInout( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-medicine-inout/batch', { diff --git a/src/api/clinic/clinicMedicineStock/index.ts b/src/api/clinic/clinicMedicineStock/index.ts index ff60b0f..02d22c4 100644 --- a/src/api/clinic/clinicMedicineStock/index.ts +++ b/src/api/clinic/clinicMedicineStock/index.ts @@ -5,7 +5,9 @@ import type { ClinicMedicineStock, ClinicMedicineStockParam } from './model'; /** * 分页查询药品库存 */ -export async function pageClinicMedicineStock(params: ClinicMedicineStockParam) { +export async function pageClinicMedicineStock( + params: ClinicMedicineStockParam +) { const res = await request.get>>( '/clinic/clinic-medicine-stock/page', { @@ -21,7 +23,9 @@ export async function pageClinicMedicineStock(params: ClinicMedicineStockParam) /** * 查询药品库存列表 */ -export async function listClinicMedicineStock(params?: ClinicMedicineStockParam) { +export async function listClinicMedicineStock( + params?: ClinicMedicineStockParam +) { const res = await request.get>( '/clinic/clinic-medicine-stock', { @@ -78,7 +82,9 @@ export async function removeClinicMedicineStock(id?: number) { /** * 批量删除药品库存 */ -export async function removeBatchClinicMedicineStock(data: (number | undefined)[]) { +export async function removeBatchClinicMedicineStock( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-medicine-stock/batch', { diff --git a/src/api/clinic/clinicOrder/model/index.ts b/src/api/clinic/clinicOrder/model/index.ts index ddeb3cb..92fb214 100644 --- a/src/api/clinic/clinicOrder/model/index.ts +++ b/src/api/clinic/clinicOrder/model/index.ts @@ -42,9 +42,9 @@ export interface ClinicOrder { addressId?: number; // 收货地址 address?: string; - // + // addressLat?: string; - // + // addressLng?: string; // 买家留言 buyerRemarks?: string; diff --git a/src/api/clinic/clinicPatientUser/index.ts b/src/api/clinic/clinicPatientUser/index.ts index 1b40e28..40aedb8 100644 --- a/src/api/clinic/clinicPatientUser/index.ts +++ b/src/api/clinic/clinicPatientUser/index.ts @@ -78,7 +78,9 @@ export async function removeClinicPatientUser(id?: number) { /** * 批量删除患者 */ -export async function removeBatchClinicPatientUser(data: (number | undefined)[]) { +export async function removeBatchClinicPatientUser( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-patient-user/batch', { diff --git a/src/api/clinic/clinicPrescription/index.ts b/src/api/clinic/clinicPrescription/index.ts index b5afe13..342fde9 100644 --- a/src/api/clinic/clinicPrescription/index.ts +++ b/src/api/clinic/clinicPrescription/index.ts @@ -84,7 +84,9 @@ export async function removeClinicPrescription(id?: number) { * 批量删除处方主表 */ -export async function removeBatchClinicPrescription(data: (number | undefined)[]) { +export async function removeBatchClinicPrescription( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-prescription/batch', { diff --git a/src/api/clinic/clinicPrescriptionItem/index.ts b/src/api/clinic/clinicPrescriptionItem/index.ts index 5be1bf9..8a4683f 100644 --- a/src/api/clinic/clinicPrescriptionItem/index.ts +++ b/src/api/clinic/clinicPrescriptionItem/index.ts @@ -1,12 +1,17 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; -import type { ClinicPrescriptionItem, ClinicPrescriptionItemParam } from './model'; +import type { + ClinicPrescriptionItem, + ClinicPrescriptionItemParam +} from './model'; /** * 分页查询处方明细表 */ -export async function pageClinicPrescriptionItem(params: ClinicPrescriptionItemParam) { +export async function pageClinicPrescriptionItem( + params: ClinicPrescriptionItemParam +) { const res = await request.get>>( '/clinic/clinic-prescription-item/page', { @@ -23,7 +28,9 @@ export async function pageClinicPrescriptionItem(params: ClinicPrescriptionItemP * 查询处方明细表 列表 */ -export async function listClinicPrescriptionItem(params?: ClinicPrescriptionItemParam) { +export async function listClinicPrescriptionItem( + params?: ClinicPrescriptionItemParam +) { const res = await request.get>( '/clinic/clinic-prescription-item', { @@ -55,7 +62,9 @@ export async function addClinicPrescriptionItem(data: ClinicPrescriptionItem) { * 修改处方明细表 */ -export async function updateClinicPrescriptionItem(data: ClinicPrescriptionItem) { +export async function updateClinicPrescriptionItem( + data: ClinicPrescriptionItem +) { const res = await request.put>( '/clinic/clinic-prescription-item', data @@ -84,7 +93,9 @@ export async function removeClinicPrescriptionItem(id?: number) { * 批量删除处方明细表 */ -export async function removeBatchClinicPrescriptionItem(data: (number | undefined)[]) { +export async function removeBatchClinicPrescriptionItem( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-prescription-item/batch', { diff --git a/src/api/clinic/clinicVisitRecord/index.ts b/src/api/clinic/clinicVisitRecord/index.ts index 0d231df..7d77fdb 100644 --- a/src/api/clinic/clinicVisitRecord/index.ts +++ b/src/api/clinic/clinicVisitRecord/index.ts @@ -78,7 +78,9 @@ export async function removeClinicVisitRecord(id?: number) { /** * 批量删除病例 */ -export async function removeBatchClinicVisitRecord(data: (number | undefined)[]) { +export async function removeBatchClinicVisitRecord( + data: (number | undefined)[] +) { const res = await request.delete>( '/clinic/clinic-visit-record/batch', { diff --git a/src/api/cms/cmsArticle/index.ts b/src/api/cms/cmsArticle/index.ts index 2ce4d7d..a102ff7 100644 --- a/src/api/cms/cmsArticle/index.ts +++ b/src/api/cms/cmsArticle/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; -import type {ApiResult, PageResult} from '@/api'; -import type {CmsArticle, CmsArticleParam} from './model'; +import type { ApiResult, PageResult } from '@/api'; +import type { CmsArticle, CmsArticleParam } from './model'; /** * 分页查询文章 @@ -22,12 +22,9 @@ export async function pageCmsArticle(params: CmsArticleParam) { * 查询文章列表 */ export async function listCmsArticle(params?: CmsArticleParam) { - const res = await request.get>( - '/cms/cms-article', - { - params - } - ); + const res = await request.get>('/cms/cms-article', { + params + }); if (res.data.code === 0 && res.data.data) { return res.data.data; } @@ -38,10 +35,7 @@ export async function listCmsArticle(params?: CmsArticleParam) { * 添加文章 */ export async function addCmsArticle(data: CmsArticle) { - const res = await request.post>( - '/cms/cms-article', - data - ); + const res = await request.post>('/cms/cms-article', data); if (res.data.code === 0) { return res.data.message; } @@ -52,10 +46,7 @@ export async function addCmsArticle(data: CmsArticle) { * 修改文章 */ export async function updateCmsArticle(data: CmsArticle) { - const res = await request.put>( - '/cms/cms-article', - data - ); + const res = await request.put>('/cms/cms-article', data); if (res.data.code === 0) { return res.data.message; } @@ -141,7 +132,6 @@ export async function getCount(params: CmsArticleParam) { return Promise.reject(new Error(res.data.message)); } - /** * 文章批量导入 */ diff --git a/src/api/cms/cmsArticleComment/index.ts b/src/api/cms/cmsArticleComment/index.ts index 085579f..059a18c 100644 --- a/src/api/cms/cmsArticleComment/index.ts +++ b/src/api/cms/cmsArticleComment/index.ts @@ -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>( MODULES_API_URL + '/cms/cms-article-comment/batch', { diff --git a/src/api/cms/cmsArticleContent/index.ts b/src/api/cms/cmsArticleContent/index.ts index c25d8f4..c90b128 100644 --- a/src/api/cms/cmsArticleContent/index.ts +++ b/src/api/cms/cmsArticleContent/index.ts @@ -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>( MODULES_API_URL + '/cms/cms-article-content/batch', { diff --git a/src/api/cms/cmsArticleContent/model/index.ts b/src/api/cms/cmsArticleContent/model/index.ts index 432c376..d90c4c8 100644 --- a/src/api/cms/cmsArticleContent/model/index.ts +++ b/src/api/cms/cmsArticleContent/model/index.ts @@ -4,7 +4,7 @@ import type { PageParam } from '@/api'; * 文章记录表 */ export interface CmsArticleContent { - // + // id?: number; // 文章ID articleId?: number; diff --git a/src/api/cms/cmsDomain/index.ts b/src/api/cms/cmsDomain/index.ts index 8ae32ad..b0f3f95 100644 --- a/src/api/cms/cmsDomain/index.ts +++ b/src/api/cms/cmsDomain/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { CmsDomain, CmsDomainParam } from './model'; -import { SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询网站域名记录表 @@ -135,16 +135,17 @@ export async function resolvable(id: number) { return Promise.reject(new Error(res.data.message)); } - /** * 根据授权主域名 */ export async function getAuthorizedDomain() { - if(!localStorage.getItem('WebsiteId')){ + if (!localStorage.getItem('WebsiteId')) { return false; } const res = await request.get>( - 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) { return res.data.data; diff --git a/src/api/cms/cmsDomain/model/index.ts b/src/api/cms/cmsDomain/model/index.ts index 3be7c9d..2ab812d 100644 --- a/src/api/cms/cmsDomain/model/index.ts +++ b/src/api/cms/cmsDomain/model/index.ts @@ -6,7 +6,7 @@ import type { PageParam } from '@/api'; export interface CmsDomain { // ID id?: number; - // 类型 0赠送域名 1绑定域名 + // 类型 0赠送域名 1绑定域名 type?: number; // 域名 domain?: string; diff --git a/src/api/cms/cmsNavigation/index.ts b/src/api/cms/cmsNavigation/index.ts index 1e02b48..fc25e83 100644 --- a/src/api/cms/cmsNavigation/index.ts +++ b/src/api/cms/cmsNavigation/index.ts @@ -120,7 +120,6 @@ export async function getCmsNavigation(id: number) { return Promise.reject(new Error(res.data.message)); } - /** * 根据code查询导航 */ diff --git a/src/api/cms/cmsWebsite/index.ts b/src/api/cms/cmsWebsite/index.ts index 3e47dc4..3324066 100644 --- a/src/api/cms/cmsWebsite/index.ts +++ b/src/api/cms/cmsWebsite/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { CmsWebsite, CmsWebsiteParam } from './model'; -import {MODULES_API_URL} from '@/config/setting'; +import { MODULES_API_URL } from '@/config/setting'; /** * 分页查询网站信息记录表 diff --git a/src/api/cms/cmsWebsite/model/index.ts b/src/api/cms/cmsWebsite/model/index.ts index c9a01d2..0fb7bc7 100644 --- a/src/api/cms/cmsWebsite/model/index.ts +++ b/src/api/cms/cmsWebsite/model/index.ts @@ -1,6 +1,6 @@ import type { PageParam } from '@/api'; -import {CmsWebsiteSetting} from "@/api/cms/cmsWebsiteSetting/model"; -import {CmsNavigation} from "@/api/cms/cmsNavigation/model"; +import { CmsWebsiteSetting } from '@/api/cms/cmsWebsiteSetting/model'; +import { CmsNavigation } from '@/api/cms/cmsNavigation/model'; /** * 网站信息记录表 @@ -43,7 +43,7 @@ export interface CmsWebsite { // 应用类型 0应用 1插件 plugin?: boolean; // 默认编辑器 - editor?: number, + editor?: number; // 服务到期时间 expirationTime?: string; // 模版ID diff --git a/src/api/cms/cmsWebsiteField/index.ts b/src/api/cms/cmsWebsiteField/index.ts index 8329889..2770029 100644 --- a/src/api/cms/cmsWebsiteField/index.ts +++ b/src/api/cms/cmsWebsiteField/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; -import type {CmsWebsiteField, CmsWebsiteFieldParam, Config} from './model'; -import {MODULES_API_URL, TEMPLATE_ID} from '@/config/setting'; +import type { CmsWebsiteField, CmsWebsiteFieldParam, Config } from './model'; +import { MODULES_API_URL, TEMPLATE_ID } from '@/config/setting'; /** * 分页查询应用参数 diff --git a/src/api/cms/cmsWebsiteField/model/index.ts b/src/api/cms/cmsWebsiteField/model/index.ts index 17bda1d..5ef0f0a 100644 --- a/src/api/cms/cmsWebsiteField/model/index.ts +++ b/src/api/cms/cmsWebsiteField/model/index.ts @@ -62,4 +62,4 @@ export interface Config { ApiUrl?: string; // 添加主题配置项 theme?: string; -} \ No newline at end of file +} diff --git a/src/api/cms/cmsWebsiteSetting/index.ts b/src/api/cms/cmsWebsiteSetting/index.ts index e1392a3..a4db839 100644 --- a/src/api/cms/cmsWebsiteSetting/index.ts +++ b/src/api/cms/cmsWebsiteSetting/index.ts @@ -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>( MODULES_API_URL + '/cms/cms-website-setting/batch', { diff --git a/src/api/credit/creditBreachOfTrust/index.ts b/src/api/credit/creditBreachOfTrust/index.ts index f48a391..fcc01ce 100644 --- a/src/api/credit/creditBreachOfTrust/index.ts +++ b/src/api/credit/creditBreachOfTrust/index.ts @@ -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>>( '/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>( '/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>( '/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(); formData.append('file', file); if (companyId != null) { diff --git a/src/api/credit/creditCaseFiling/index.ts b/src/api/credit/creditCaseFiling/index.ts index c4ce2d8..994cf5d 100644 --- a/src/api/credit/creditCaseFiling/index.ts +++ b/src/api/credit/creditCaseFiling/index.ts @@ -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>( '/credit/credit-case-filing/batch', { diff --git a/src/api/credit/creditCompetitor/index.ts b/src/api/credit/creditCompetitor/index.ts index d027aa6..9eafaad 100644 --- a/src/api/credit/creditCompetitor/index.ts +++ b/src/api/credit/creditCompetitor/index.ts @@ -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>( '/credit/credit-competitor/batch', { diff --git a/src/api/credit/creditCourtAnnouncement/index.ts b/src/api/credit/creditCourtAnnouncement/index.ts index b86e1cd..7640915 100644 --- a/src/api/credit/creditCourtAnnouncement/index.ts +++ b/src/api/credit/creditCourtAnnouncement/index.ts @@ -1,11 +1,16 @@ import request from '@/utils/request'; 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>>( '/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>( '/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>( '/credit/credit-court-announcement', 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>( '/credit/credit-court-announcement', 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>( '/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(); formData.append('file', file); if (companyId != null) { diff --git a/src/api/credit/creditCourtSession/index.ts b/src/api/credit/creditCourtSession/index.ts index 2cf1356..47bc1b4 100644 --- a/src/api/credit/creditCourtSession/index.ts +++ b/src/api/credit/creditCourtSession/index.ts @@ -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>( '/credit/credit-court-session/batch', { diff --git a/src/api/credit/creditDeliveryNotice/index.ts b/src/api/credit/creditDeliveryNotice/index.ts index b8180b3..cd327a5 100644 --- a/src/api/credit/creditDeliveryNotice/index.ts +++ b/src/api/credit/creditDeliveryNotice/index.ts @@ -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>>( '/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>( '/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>( '/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(); formData.append('file', file); if (companyId != null) { diff --git a/src/api/credit/creditFinalVersion/index.ts b/src/api/credit/creditFinalVersion/index.ts index 084a5fc..81146b1 100644 --- a/src/api/credit/creditFinalVersion/index.ts +++ b/src/api/credit/creditFinalVersion/index.ts @@ -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>( '/credit/credit-final-version/batch', { diff --git a/src/api/credit/creditJudgmentDebtor/index.ts b/src/api/credit/creditJudgmentDebtor/index.ts index 0c04420..1c940fd 100644 --- a/src/api/credit/creditJudgmentDebtor/index.ts +++ b/src/api/credit/creditJudgmentDebtor/index.ts @@ -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>>( '/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>( '/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>( '/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(); formData.append('file', file); if (companyId != null) { diff --git a/src/api/credit/creditJudicialDocument/index.ts b/src/api/credit/creditJudicialDocument/index.ts index d6e0fe4..c8863ec 100644 --- a/src/api/credit/creditJudicialDocument/index.ts +++ b/src/api/credit/creditJudicialDocument/index.ts @@ -1,11 +1,16 @@ import request from '@/utils/request'; 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>>( '/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>( '/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>( '/credit/credit-judicial-document', 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>( '/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(); formData.append('file', file); if (companyId != null) { diff --git a/src/api/credit/creditRiskRelation/index.ts b/src/api/credit/creditRiskRelation/index.ts index 9f15121..88284e4 100644 --- a/src/api/credit/creditRiskRelation/index.ts +++ b/src/api/credit/creditRiskRelation/index.ts @@ -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>( '/credit/credit-risk-relation/batch', { diff --git a/src/api/dormitory/dormitoryBuilding/index.ts b/src/api/dormitory/dormitoryBuilding/index.ts index bc51fad..e1fffc8 100644 --- a/src/api/dormitory/dormitoryBuilding/index.ts +++ b/src/api/dormitory/dormitoryBuilding/index.ts @@ -79,7 +79,9 @@ export async function removeDormitoryBuilding(id?: number) { /** * 批量删除宿舍楼栋 */ -export async function removeBatchDormitoryBuilding(data: (number | undefined)[]) { +export async function removeBatchDormitoryBuilding( + data: (number | undefined)[] +) { const res = await request.delete>( MODULES_API_URL + '/dormitory/dormitory-building/batch', { diff --git a/src/api/hjm/hjmCar/model/index.ts b/src/api/hjm/hjmCar/model/index.ts index 4cd7534..1d1e5e8 100644 --- a/src/api/hjm/hjmCar/model/index.ts +++ b/src/api/hjm/hjmCar/model/index.ts @@ -1,5 +1,5 @@ import type { PageParam } from '@/api'; -import {HjmFence} from "@/api/hjm/hjmFence/model"; +import { HjmFence } from '@/api/hjm/hjmFence/model'; /** * 车辆管理 @@ -50,13 +50,13 @@ export interface HjmCar { // 位置 location?: string; // 经度 - longitude?: string, + longitude?: string; // 纬度 - latitude?: string, + latitude?: string; // 区域 district?: string; // 地址 - address?: string, + address?: string; // 组织ID organizationId?: number; // 父级组织ID diff --git a/src/api/hjm/hjmQuestions/model/index.ts b/src/api/hjm/hjmQuestions/model/index.ts index 349d81b..71c52a6 100644 --- a/src/api/hjm/hjmQuestions/model/index.ts +++ b/src/api/hjm/hjmQuestions/model/index.ts @@ -1,5 +1,5 @@ import type { PageParam } from '@/api'; -import {HjmChoices} from "@/api/hjm/hjmChoices/model"; +import { HjmChoices } from '@/api/hjm/hjmChoices/model'; /** * 题目 @@ -36,10 +36,10 @@ export interface HjmQuestions { // 修改时间 updateTime?: string; // 选项 - choicesA?: string, - choicesB?: string, - choicesC?: string, - choicesD?: string, + choicesA?: string; + choicesB?: string; + choicesC?: string; + choicesD?: string; choices?: number; choicesList?: HjmChoices[]; } diff --git a/src/api/layout/index.ts b/src/api/layout/index.ts index 4893c09..c6e22b7 100644 --- a/src/api/layout/index.ts +++ b/src/api/layout/index.ts @@ -2,10 +2,10 @@ import request from '@/utils/request'; import type { ApiResult } from '@/api'; import type { User } from '@/api/system/user/model'; 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 { 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 { * 获取网站信息 https://cms-api.websoft.top/api */ export async function getSiteInfo() { - const res = await request.get>( - '/shop/getShopInfo', - { - params: {} - } - ); + const res = await request.get>('/shop/getShopInfo', { + params: {} + }); if (res.data.code === 0 && res.data.data) { return res.data.data; } @@ -66,9 +63,7 @@ export async function updateLoginUser(data: User) { * @return */ export async function getServerTime() { - const res = await request.get>( - '/cms/website/getServerTime' - ); + const res = await request.get>('/cms/website/getServerTime'); if (res.data.code === 0 && res.data.data) { return res.data.data; } @@ -80,9 +75,7 @@ export async function getServerTime() { * @return */ export async function getNext7day() { - const res = await request.get>( - '/cms/website/getNext7day' - ); + const res = await request.get>('/cms/website/getNext7day'); console.log('res.data.code: ', res.data.code); if (res.data.code === 0 && res.data.data) { return res.data.data; @@ -118,9 +111,10 @@ export async function updatePassword( /** * 创建完整网站并初始化 */ -export async function createCmsWebSite(data: CmsWebsite){ +export async function createCmsWebSite(data: CmsWebsite) { const res = await request.post>( - SERVER_API_URL + '/superAdminRegister',data + SERVER_API_URL + '/superAdminRegister', + data ); if (res.data.code === 0) { return res.data.message; diff --git a/src/api/miniprogram/index.ts b/src/api/miniprogram/index.ts index 8cfbbc9..27aee2d 100644 --- a/src/api/miniprogram/index.ts +++ b/src/api/miniprogram/index.ts @@ -1,4 +1,4 @@ -import {MODULES_API_URL} from '@/config/setting'; +import { MODULES_API_URL } from '@/config/setting'; /** * 小程序码参数 diff --git a/src/api/passport/qrLogin/index.ts b/src/api/passport/qrLogin/index.ts index 0f662d8..b33f559 100644 --- a/src/api/passport/qrLogin/index.ts +++ b/src/api/passport/qrLogin/index.ts @@ -6,9 +6,9 @@ import { SERVER_API_URL } from '@/config/setting'; * 二维码生成响应数据 */ export interface QrCodeResponse { - token: string; // 二维码唯一标识token - qrCode: string; // 二维码内容 - expiresIn: number; // 过期时间(秒) + token: string; // 二维码唯一标识token + qrCode: string; // 二维码内容 + expiresIn: number; // 过期时间(秒) } /** @@ -16,19 +16,19 @@ export interface QrCodeResponse { */ export interface QrCodeStatusResponse { status: 'pending' | 'scanned' | 'confirmed' | 'expired'; - accessToken?: string; // 登录成功时返回的JWT token - userInfo?: any; // 用户信息 - expiresIn?: number; // 剩余过期时间(秒) - tenantId?: string; // 租户ID + accessToken?: string; // 登录成功时返回的JWT token + userInfo?: any; // 用户信息 + expiresIn?: number; // 剩余过期时间(秒) + tenantId?: string; // 租户ID } /** * 确认登录请求参数 */ export interface QrLoginConfirmRequest { - token: string; // 二维码token - userId?: number; // 用户ID - platform?: string; // 登录平台 + token: string; // 二维码token + userId?: number; // 用户ID + platform?: string; // 登录平台 } /** @@ -50,7 +50,9 @@ export async function generateQrCode(): Promise { /** * 检查二维码状态 */ -export async function checkQrCodeStatus(token: string): Promise { +export async function checkQrCodeStatus( + token: string +): Promise { const res = await request.get>( SERVER_API_URL + `/qr-login/status/${token}` ); @@ -65,12 +67,14 @@ export async function checkQrCodeStatus(token: string): Promise { +export async function confirmQrLogin( + requestData: QrLoginConfirmRequest +): Promise { const res = await request.post>( SERVER_API_URL + '/qr-login/confirm', requestData ); - console.log(res,'>>>89898989') + console.log(res, '>>>89898989'); if (res.data.code === 0 && res.data.data) { return res.data.data; } @@ -96,7 +100,9 @@ export async function scanQrCode(token: string): Promise { /** * 微信小程序扫码登录确认 */ -export async function wechatMiniProgramConfirm(requestData: QrLoginConfirmRequest): Promise { +export async function wechatMiniProgramConfirm( + requestData: QrLoginConfirmRequest +): Promise { const res = await request.post>( SERVER_API_URL + '/qr-login/wechat-confirm', requestData @@ -106,5 +112,7 @@ export async function wechatMiniProgramConfirm(requestData: QrLoginConfirmReques return res.data.data; } - return Promise.reject(new Error(res.data.message || '微信小程序登录确认失败')); + return Promise.reject( + new Error(res.data.message || '微信小程序登录确认失败') + ); } diff --git a/src/api/sdy/sdyDealerOrder/index.ts b/src/api/sdy/sdyDealerOrder/index.ts index bd57cc4..8f72eba 100644 --- a/src/api/sdy/sdyDealerOrder/index.ts +++ b/src/api/sdy/sdyDealerOrder/index.ts @@ -1,11 +1,11 @@ import request from '@/utils/request'; -import type {ApiResult} from '@/api'; -import type {ShopDealerOrder, ShopDealerOrderParam} from './model'; -import {utils, writeFile} from 'xlsx'; -import {message} from 'ant-design-vue'; -import {getTenantId} from '@/utils/domain'; -import {listShopDealerOrder} from "@/api/shop/shopDealerOrder"; -import {MODULES_API_URL} from "@/config/setting"; +import type { ApiResult } from '@/api'; +import type { ShopDealerOrder, ShopDealerOrderParam } from './model'; +import { utils, writeFile } from 'xlsx'; +import { message } from 'ant-design-vue'; +import { getTenantId } from '@/utils/domain'; +import { listShopDealerOrder } from '@/api/shop/shopDealerOrder'; +import { MODULES_API_URL } from '@/config/setting'; /** * 导入分销商订单 @@ -89,19 +89,19 @@ export async function exportSdyDealerOrder(params?: ShopDealerOrderParam) { // 设置列宽 sheet['!cols'] = [ - {wch: 15}, // 订单ID - {wch: 12}, // 买家用户ID - {wch: 12}, // 订单总金额 - {wch: 15}, // 一级分销商ID - {wch: 12}, // 一级佣金 - {wch: 15}, // 二级分销商ID - {wch: 12}, // 二级佣金 - {wch: 15}, // 三级分销商ID - {wch: 12}, // 三级佣金 - {wch: 10}, // 订单状态 - {wch: 10}, // 结算状态 - {wch: 20}, // 结算时间 - {wch: 20} // 创建时间 + { wch: 15 }, // 订单ID + { wch: 12 }, // 买家用户ID + { wch: 12 }, // 订单总金额 + { wch: 15 }, // 一级分销商ID + { wch: 12 }, // 一级佣金 + { wch: 15 }, // 二级分销商ID + { wch: 12 }, // 二级佣金 + { wch: 15 }, // 三级分销商ID + { wch: 12 }, // 三级佣金 + { wch: 10 }, // 订单状态 + { wch: 10 }, // 结算状态 + { wch: 20 }, // 结算时间 + { wch: 20 } // 创建时间 ]; message.destroy(); @@ -113,7 +113,6 @@ export async function exportSdyDealerOrder(params?: ShopDealerOrderParam) { message.destroy(); message.success(`成功导出 ${list.length} 条记录`); }, 1000); - } catch (error: any) { message.destroy(); message.error(error.message || '导出失败,请重试'); diff --git a/src/api/shop/shopCommissionRole/index.ts b/src/api/shop/shopCommissionRole/index.ts index 60db05d..de0169b 100644 --- a/src/api/shop/shopCommissionRole/index.ts +++ b/src/api/shop/shopCommissionRole/index.ts @@ -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>( '/shop/shop-commission-role/batch', { diff --git a/src/api/shop/shopCommissionRole/model/index.ts b/src/api/shop/shopCommissionRole/model/index.ts index 4309104..9531d46 100644 --- a/src/api/shop/shopCommissionRole/model/index.ts +++ b/src/api/shop/shopCommissionRole/model/index.ts @@ -4,15 +4,15 @@ import type { PageParam } from '@/api'; * 分红角色 */ export interface ShopCommissionRole { - // + // id?: number; - // + // title?: string; - // + // provinceId?: number; - // + // cityId?: number; - // + // regionId?: number; // 状态, 0正常, 1异常 status?: number; @@ -22,7 +22,7 @@ export interface ShopCommissionRole { tenantId?: number; // 创建时间 createTime?: string; - // + // sortNumber?: number; } diff --git a/src/api/shop/shopCoupon/index.ts b/src/api/shop/shopCoupon/index.ts index 0327e4f..09b3810 100644 --- a/src/api/shop/shopCoupon/index.ts +++ b/src/api/shop/shopCoupon/index.ts @@ -22,12 +22,9 @@ export async function pageShopCoupon(params: ShopCouponParam) { * 查询优惠券列表 */ export async function listShopCoupon(params?: ShopCouponParam) { - const res = await request.get>( - '/shop/shop-coupon', - { - params - } - ); + const res = await request.get>('/shop/shop-coupon', { + params + }); if (res.data.code === 0 && res.data.data) { return res.data.data; } @@ -38,10 +35,7 @@ export async function listShopCoupon(params?: ShopCouponParam) { * 添加优惠券 */ export async function addShopCoupon(data: ShopCoupon) { - const res = await request.post>( - '/shop/shop-coupon', - data - ); + const res = await request.post>('/shop/shop-coupon', data); if (res.data.code === 0) { return res.data.message; } @@ -52,10 +46,7 @@ export async function addShopCoupon(data: ShopCoupon) { * 修改优惠券 */ export async function updateShopCoupon(data: ShopCoupon) { - const res = await request.put>( - '/shop/shop-coupon', - data - ); + const res = await request.put>('/shop/shop-coupon', data); if (res.data.code === 0) { return res.data.message; } diff --git a/src/api/shop/shopCoupon/model/index.ts b/src/api/shop/shopCoupon/model/index.ts index 218fc2e..77455ed 100644 --- a/src/api/shop/shopCoupon/model/index.ts +++ b/src/api/shop/shopCoupon/model/index.ts @@ -1,6 +1,6 @@ import type { PageParam } from '@/api/index'; -import {ShopCouponApplyCate} from "@/api/shop/shopCouponApplyCate/model"; -import {ShopCouponApplyItem} from "@/api/shop/shopCouponApplyItem/model"; +import { ShopCouponApplyCate } from '@/api/shop/shopCouponApplyCate/model'; +import { ShopCouponApplyItem } from '@/api/shop/shopCouponApplyItem/model'; /** * 优惠券 diff --git a/src/api/shop/shopCouponApplyCate/model/index.ts b/src/api/shop/shopCouponApplyCate/model/index.ts index 2adc829..ab31653 100644 --- a/src/api/shop/shopCouponApplyCate/model/index.ts +++ b/src/api/shop/shopCouponApplyCate/model/index.ts @@ -1,4 +1,3 @@ - /** * 优惠券 */ @@ -7,5 +6,4 @@ export interface ShopCouponApplyCate { couponId?: number; cateId?: number; cateLevel?: number; - } diff --git a/src/api/shop/shopCouponApplyItem/model/index.ts b/src/api/shop/shopCouponApplyItem/model/index.ts index a9ed201..d64f54e 100644 --- a/src/api/shop/shopCouponApplyItem/model/index.ts +++ b/src/api/shop/shopCouponApplyItem/model/index.ts @@ -1,4 +1,3 @@ - /** * 优惠券 */ @@ -7,5 +6,4 @@ export interface ShopCouponApplyItem { couponId?: number; type?: number; pk?: number; - } diff --git a/src/api/shop/shopDealerApply/index.ts b/src/api/shop/shopDealerApply/index.ts index 1cf1f57..a4c6800 100644 --- a/src/api/shop/shopDealerApply/index.ts +++ b/src/api/shop/shopDealerApply/index.ts @@ -8,7 +8,7 @@ import type { ShopDealerApply, ShopDealerApplyParam } from './model'; export async function pageShopDealerApply(params: ShopDealerApplyParam) { const res = await request.get>>( '/shop/shop-dealer-apply/page', - {params} + { params } ); if (res.data.code === 0) { return res.data.data; @@ -22,7 +22,7 @@ export async function pageShopDealerApply(params: ShopDealerApplyParam) { export async function listShopDealerApply(params?: ShopDealerApplyParam) { const res = await request.get>( '/shop/shop-dealer-apply', - {params} + { params } ); if (res.data.code === 0 && res.data.data) { return res.data.data; @@ -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>( `/shop/shop-dealer-apply/${id}/reject`, data diff --git a/src/api/shop/shopDealerCapital/index.ts b/src/api/shop/shopDealerCapital/index.ts index 1792423..8ad1f19 100644 --- a/src/api/shop/shopDealerCapital/index.ts +++ b/src/api/shop/shopDealerCapital/index.ts @@ -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>( '/shop/shop-dealer-capital/batch', { diff --git a/src/api/shop/shopDealerOrder/index.ts b/src/api/shop/shopDealerOrder/index.ts index dab3b28..83ca72c 100644 --- a/src/api/shop/shopDealerOrder/index.ts +++ b/src/api/shop/shopDealerOrder/index.ts @@ -201,7 +201,7 @@ export async function exportShopDealerOrder(params?: ShopDealerOrderParam) { { wch: 10 }, // 订单状态 { wch: 10 }, // 结算状态 { wch: 20 }, // 结算时间 - { wch: 20 } // 创建时间 + { wch: 20 } // 创建时间 ]; message.destroy(); @@ -213,7 +213,6 @@ export async function exportShopDealerOrder(params?: ShopDealerOrderParam) { message.destroy(); message.success(`成功导出 ${list.length} 条记录`); }, 1000); - } catch (error: any) { message.destroy(); message.error(error.message || '导出失败,请重试'); diff --git a/src/api/shop/shopDealerPoster/index.ts b/src/api/shop/shopDealerPoster/index.ts index d560dcc..9573de4 100644 --- a/src/api/shop/shopDealerPoster/index.ts +++ b/src/api/shop/shopDealerPoster/index.ts @@ -104,7 +104,10 @@ export async function removeBatchShopDealerPoster(ids: (number | undefined)[]) { * 生成海报 */ 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) { return res.data.data; } @@ -118,11 +121,15 @@ export async function uploadPosterBackground(file: File) { const formData = new FormData(); formData.append('file', file); - const res = await request.post('/shop/dealer/poster/upload/background', formData, { - headers: { - 'Content-Type': 'multipart/form-data' + const res = await request.post( + '/shop/dealer/poster/upload/background', + formData, + { + headers: { + 'Content-Type': 'multipart/form-data' + } } - }); + ); if (res.data.code === 0) { return res.data.data; diff --git a/src/api/shop/shopDealerRecord/index.ts b/src/api/shop/shopDealerRecord/index.ts index 3982d39..f00a067 100644 --- a/src/api/shop/shopDealerRecord/index.ts +++ b/src/api/shop/shopDealerRecord/index.ts @@ -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>( MODULES_API_URL + '/shop/shop-dealer-record/batch', { diff --git a/src/api/shop/shopDealerReferee/index.ts b/src/api/shop/shopDealerReferee/index.ts index 351ed7b..ac9e57b 100644 --- a/src/api/shop/shopDealerReferee/index.ts +++ b/src/api/shop/shopDealerReferee/index.ts @@ -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>( '/shop/shop-dealer-referee/batch', { diff --git a/src/api/shop/shopDealerReferee/model/index.ts b/src/api/shop/shopDealerReferee/model/index.ts index 7a9f615..39d6140 100644 --- a/src/api/shop/shopDealerReferee/model/index.ts +++ b/src/api/shop/shopDealerReferee/model/index.ts @@ -45,4 +45,4 @@ export interface ShopDealerRefereeParam extends PageParam { startTime?: string; endTime?: string; keywords?: string; -} \ No newline at end of file +} diff --git a/src/api/shop/shopDealerSetting/index.ts b/src/api/shop/shopDealerSetting/index.ts index da0075b..27a6898 100644 --- a/src/api/shop/shopDealerSetting/index.ts +++ b/src/api/shop/shopDealerSetting/index.ts @@ -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>( '/shop/shop-dealer-setting/batch', { diff --git a/src/api/shop/shopDealerUser/index.ts b/src/api/shop/shopDealerUser/index.ts index 384aeda..60be4c8 100644 --- a/src/api/shop/shopDealerUser/index.ts +++ b/src/api/shop/shopDealerUser/index.ts @@ -129,12 +129,9 @@ export async function importShopDealerUsers(file: File) { * 导出分销商用户 */ export async function exportShopDealerUsers(params?: ShopDealerUserParam) { - const res = await request.get( - '/shop/shop-dealer-user/export', - { - params, - responseType: 'blob' - } - ); + const res = await request.get('/shop/shop-dealer-user/export', { + params, + responseType: 'blob' + }); return res.data; } diff --git a/src/api/shop/shopDealerWithdraw/index.ts b/src/api/shop/shopDealerWithdraw/index.ts index 305e1ad..d850cef 100644 --- a/src/api/shop/shopDealerWithdraw/index.ts +++ b/src/api/shop/shopDealerWithdraw/index.ts @@ -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>( '/shop/shop-dealer-withdraw/batch', { diff --git a/src/api/shop/shopExpress/index.ts b/src/api/shop/shopExpress/index.ts index 6a154a7..2b243a0 100644 --- a/src/api/shop/shopExpress/index.ts +++ b/src/api/shop/shopExpress/index.ts @@ -52,10 +52,7 @@ export async function addShopExpress(data: ShopExpress) { * 修改物流公司 */ export async function updateShopExpress(data: ShopExpress) { - const res = await request.put>( - '/shop/shop-express', - data - ); + const res = await request.put>('/shop/shop-express', data); if (res.data.code === 0) { return res.data.message; } diff --git a/src/api/shop/shopExpressTemplate/index.ts b/src/api/shop/shopExpressTemplate/index.ts index 51e351f..df76aed 100644 --- a/src/api/shop/shopExpressTemplate/index.ts +++ b/src/api/shop/shopExpressTemplate/index.ts @@ -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>>( '/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>( '/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>( '/shop/shop-express-template/batch', { diff --git a/src/api/shop/shopExpressTemplateDetail/index.ts b/src/api/shop/shopExpressTemplateDetail/index.ts index 4f44544..390df17 100644 --- a/src/api/shop/shopExpressTemplateDetail/index.ts +++ b/src/api/shop/shopExpressTemplateDetail/index.ts @@ -1,17 +1,21 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; -import type { ShopExpressTemplateDetail, ShopExpressTemplateDetailParam } from './model'; +import type { + ShopExpressTemplateDetail, + ShopExpressTemplateDetailParam +} from './model'; /** * 分页查询运费模板 */ -export async function pageShopExpressTemplateDetail(params: ShopExpressTemplateDetailParam) { - const res = await request.get>>( - '/shop/shop-express-template-detail/page', - { - params - } - ); +export async function pageShopExpressTemplateDetail( + params: ShopExpressTemplateDetailParam +) { + const res = await request.get< + ApiResult> + >('/shop/shop-express-template-detail/page', { + params + }); if (res.data.code === 0) { 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>( '/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>( '/shop/shop-express-template-detail', 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>( '/shop/shop-express-template-detail', 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>( '/shop/shop-express-template-detail/batch', { diff --git a/src/api/shop/shopExpressTemplateDetail/model/index.ts b/src/api/shop/shopExpressTemplateDetail/model/index.ts index 5b74dcc..c808464 100644 --- a/src/api/shop/shopExpressTemplateDetail/model/index.ts +++ b/src/api/shop/shopExpressTemplateDetail/model/index.ts @@ -4,15 +4,15 @@ import type { PageParam } from '@/api'; * 运费模板 */ export interface ShopExpressTemplateDetail { - // + // id?: number; - // + // templateId?: number; // 0按件 type?: string; - // + // provinceId?: number; - // + // cityId?: number; // 首件数量/重量 firstNum?: string; @@ -32,7 +32,7 @@ export interface ShopExpressTemplateDetail { createTime?: string; // 修改时间 updateTime?: string; - // + // sortNumber?: number; } diff --git a/src/api/shop/shopGoodsCategory/index.ts b/src/api/shop/shopGoodsCategory/index.ts index dbdf598..465c98f 100644 --- a/src/api/shop/shopGoodsCategory/index.ts +++ b/src/api/shop/shopGoodsCategory/index.ts @@ -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>( MODULES_API_URL + '/shop/shop-goods-category/batch', { diff --git a/src/api/shop/shopGoodsRoleCommission/index.ts b/src/api/shop/shopGoodsRoleCommission/index.ts index ac3c88b..bd15e5c 100644 --- a/src/api/shop/shopGoodsRoleCommission/index.ts +++ b/src/api/shop/shopGoodsRoleCommission/index.ts @@ -1,12 +1,17 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; 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>>( 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>( 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>( MODULES_API_URL + '/shop/shop-goods-role-commission', 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>( MODULES_API_URL + '/shop/shop-goods-role-commission', 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>( MODULES_API_URL + '/shop/shop-goods-role-commission/batch', { diff --git a/src/api/shop/shopMerchant/model/index.ts b/src/api/shop/shopMerchant/model/index.ts index 4074c0d..8620014 100644 --- a/src/api/shop/shopMerchant/model/index.ts +++ b/src/api/shop/shopMerchant/model/index.ts @@ -30,9 +30,9 @@ export interface ShopMerchant { merchantCategoryTitle?: string; // 经纬度 lngAndLat?: string; - // + // lng?: string; - // + // lat?: string; // 所在省份 province?: string; @@ -62,9 +62,9 @@ export interface ShopMerchant { recommend?: number; // 是否营业 isOn?: number; - // + // startTime?: string; - // + // endTime?: string; // 是否需要审核 goodsReview?: number; diff --git a/src/api/shop/shopMerchantAccount/index.ts b/src/api/shop/shopMerchantAccount/index.ts index eff50c4..035ef31 100644 --- a/src/api/shop/shopMerchantAccount/index.ts +++ b/src/api/shop/shopMerchantAccount/index.ts @@ -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>>( 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>( 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>( MODULES_API_URL + '/shop/shop-merchant-account/batch', { diff --git a/src/api/shop/shopMerchantApply/model/index.ts b/src/api/shop/shopMerchantApply/model/index.ts index b4a6c80..4458996 100644 --- a/src/api/shop/shopMerchantApply/model/index.ts +++ b/src/api/shop/shopMerchantApply/model/index.ts @@ -71,4 +71,4 @@ export interface ShopMerchantApplyParam extends PageParam { shopType?: string; phone?: string; keywords?: string; -} \ No newline at end of file +} diff --git a/src/api/shop/shopOrder/model/index.ts b/src/api/shop/shopOrder/model/index.ts index 37d5395..7b9ac00 100644 --- a/src/api/shop/shopOrder/model/index.ts +++ b/src/api/shop/shopOrder/model/index.ts @@ -1,5 +1,5 @@ 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=其他版本 version?: number; // 买家备注 - buyerRemarks: undefined, + buyerRemarks: undefined; // 商家备注 - merchantRemarks: undefined, + merchantRemarks: undefined; // 用户id userId?: number; // 备注 diff --git a/src/api/shop/shopUser/model/index.ts b/src/api/shop/shopUser/model/index.ts index d0e1c09..e5568a5 100644 --- a/src/api/shop/shopUser/model/index.ts +++ b/src/api/shop/shopUser/model/index.ts @@ -136,7 +136,7 @@ export interface ShopUser { title?: string; // 安装的产品ID templateId?: number; - // 插件安装状态(仅对超超管判断) 0未安装 1已安装 + // 插件安装状态(仅对超超管判断) 0未安装 1已安装 installed?: number; // 特长 speciality?: string; diff --git a/src/api/shop/shopUserAddress/model/index.ts b/src/api/shop/shopUserAddress/model/index.ts index 4f45d0f..9f30638 100644 --- a/src/api/shop/shopUserAddress/model/index.ts +++ b/src/api/shop/shopUserAddress/model/index.ts @@ -22,9 +22,9 @@ export interface ShopUserAddress { address?: string; // 收货地址 fullAddress?: string; - // + // lat?: string; - // + // lng?: string; // 1先生 2女士 gender?: number; diff --git a/src/api/system/chatConversation/index.ts b/src/api/system/chatConversation/index.ts index 4c84dc4..afe2ed6 100644 --- a/src/api/system/chatConversation/index.ts +++ b/src/api/system/chatConversation/index.ts @@ -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>( MODULES_API_URL + '/shop/chat-conversation/batch', { diff --git a/src/api/system/company/model/index.ts b/src/api/system/company/model/index.ts index 0ae57e1..813d023 100644 --- a/src/api/system/company/model/index.ts +++ b/src/api/system/company/model/index.ts @@ -1,5 +1,5 @@ import type { PageParam } from '@/api'; -import type {Menu} from "@/api/system/menu/model"; +import type { Menu } from '@/api/system/menu/model'; /** * 企业信息 diff --git a/src/api/system/companyComment/index.ts b/src/api/system/companyComment/index.ts index 2a5a15a..a65556c 100644 --- a/src/api/system/companyComment/index.ts +++ b/src/api/system/companyComment/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; -import type {ApiResult, PageResult} from '@/api'; -import type {CompanyComment, CompanyCommentParam} from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import type { ApiResult, PageResult } from '@/api'; +import type { CompanyComment, CompanyCommentParam } from './model'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询应用评论 diff --git a/src/api/system/companyContent/index.ts b/src/api/system/companyContent/index.ts index 62f2f02..4fb28f6 100644 --- a/src/api/system/companyContent/index.ts +++ b/src/api/system/companyContent/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { CompanyContent, CompanyContentParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询应用详情 @@ -49,7 +49,6 @@ export async function getByCompanyId(id: number) { return Promise.reject(new Error(res.data.message)); } - /** * 添加应用详情 */ diff --git a/src/api/system/companyContent/model/index.ts b/src/api/system/companyContent/model/index.ts index 226f513..1f239bb 100644 --- a/src/api/system/companyContent/model/index.ts +++ b/src/api/system/companyContent/model/index.ts @@ -4,7 +4,7 @@ import type { PageParam } from '@/api'; * 应用详情 */ export interface CompanyContent { - // + // id?: number; // 企业ID companyId?: number; diff --git a/src/api/system/companyParameter/index.ts b/src/api/system/companyParameter/index.ts index 4c5ee60..ba0e483 100644 --- a/src/api/system/companyParameter/index.ts +++ b/src/api/system/companyParameter/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { CompanyParameter, CompanyParameterParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询应用参数 @@ -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>( SERVER_API_URL + '/system/company-parameter/batch', { diff --git a/src/api/system/companyUrl/index.ts b/src/api/system/companyUrl/index.ts index e3995da..f1834fb 100644 --- a/src/api/system/companyUrl/index.ts +++ b/src/api/system/companyUrl/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { CompanyUrl, CompanyUrlParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询应用域名 diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index a2ae069..8da68c1 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult } from '@/api'; import type { Menu, MenuParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 查询菜单列表 @@ -89,7 +89,6 @@ export async function deleteParentMenu(id?: number) { return Promise.reject(new Error(res.data.message)); } - /** * 安装应用 */ diff --git a/src/api/system/order/index.ts b/src/api/system/order/index.ts index 0b19d6b..80d601d 100644 --- a/src/api/system/order/index.ts +++ b/src/api/system/order/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { Order, OrderParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询订单 diff --git a/src/api/system/orderGoods/index.ts b/src/api/system/orderGoods/index.ts index ce37160..a612a79 100644 --- a/src/api/system/orderGoods/index.ts +++ b/src/api/system/orderGoods/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { OrderGoods, OrderGoodsParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询订单商品 diff --git a/src/api/system/parameter/index.ts b/src/api/system/parameter/index.ts index 9b8b72d..cd62e2c 100644 --- a/src/api/system/parameter/index.ts +++ b/src/api/system/parameter/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { Parameter, ParameterParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询应用参数 diff --git a/src/api/system/url/index.ts b/src/api/system/url/index.ts index 054c5d3..972d0c4 100644 --- a/src/api/system/url/index.ts +++ b/src/api/system/url/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { Url, UrlParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询应用域名 diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 3817ff1..9f49596 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -270,7 +270,7 @@ export async function countUserBalance(params?: UserParam) { * 选择管理员账号登录 * @param params */ -export async function listAdminsByPhoneAll(params?: UserParam){ +export async function listAdminsByPhoneAll(params?: UserParam) { const res = await request.get>( SERVER_API_URL + '/system/user/listAdminsByPhoneAll', { @@ -287,12 +287,9 @@ export async function listAdminsByPhoneAll(params?: UserParam){ * 导出用户列表 */ export async function exportUsers(params?: UserParam) { - const res = await request.get( - SERVER_API_URL + '/system/user/export', - { - params, - responseType: 'blob' - } - ); + const res = await request.get(SERVER_API_URL + '/system/user/export', { + params, + responseType: 'blob' + }); return res.data; } diff --git a/src/api/system/userOauth/index.ts b/src/api/system/userOauth/index.ts index 0818140..316302a 100644 --- a/src/api/system/userOauth/index.ts +++ b/src/api/system/userOauth/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; -import type {ApiResult, PageResult} from '@/api'; -import type {UserOauth, UserOauthParam} from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import type { ApiResult, PageResult } from '@/api'; +import type { UserOauth, UserOauthParam } from './model'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询第三方用户信息表 diff --git a/src/api/system/userVerify/index.ts b/src/api/system/userVerify/index.ts index 4f5e0d2..4d3e551 100644 --- a/src/api/system/userVerify/index.ts +++ b/src/api/system/userVerify/index.ts @@ -1,7 +1,7 @@ import request from '@/utils/request'; import type { ApiResult, PageResult } from '@/api'; import type { UserVerify, UserVerifyParam } from './model'; -import {SERVER_API_URL} from '@/config/setting'; +import { SERVER_API_URL } from '@/config/setting'; /** * 分页查询实名认证 diff --git a/src/api/system/website/field/index.ts b/src/api/system/website/field/index.ts index 9380fcc..e82c3af 100644 --- a/src/api/system/website/field/index.ts +++ b/src/api/system/website/field/index.ts @@ -5,7 +5,7 @@ import type { WebsiteField, WebsiteFieldParam } from '@/api/system/website/field/model'; -import {SERVER_API_URL, TEMPLATE_ID} from '@/config/setting'; +import { SERVER_API_URL, TEMPLATE_ID } from '@/config/setting'; /** * 分页查询项目参数 diff --git a/src/components/DictRadio/index.vue b/src/components/DictRadio/index.vue index 5332efa..822f945 100644 --- a/src/components/DictRadio/index.vue +++ b/src/components/DictRadio/index.vue @@ -45,7 +45,7 @@ // 字典数据 const data = getDictionaryOptions(props.dictCode); - const content = ref() + const content = ref(); /* 更新选中数据 */ const updateValue = () => { diff --git a/src/components/DictSelect/index.vue b/src/components/DictSelect/index.vue index bdcc5c8..c4fb8d6 100644 --- a/src/components/DictSelect/index.vue +++ b/src/components/DictSelect/index.vue @@ -15,8 +15,8 @@ diff --git a/src/components/QrLogin/index.vue b/src/components/QrLogin/index.vue index f0d8397..27e2645 100644 --- a/src/components/QrLogin/index.vue +++ b/src/components/QrLogin/index.vue @@ -7,22 +7,29 @@

正在生成二维码...

-
- +
+

请使用手机APP或小程序扫码登录

二维码有效期:{{ formatTime(expireTime) }}

- +

扫码成功,请在手机上确认登录

- +

二维码已过期

刷新二维码 @@ -30,7 +37,7 @@
- +

{{ errorMessage || '生成二维码失败' }}

重新生成 @@ -47,266 +54,272 @@ diff --git a/src/components/SelectArticle/index.vue b/src/components/SelectArticle/index.vue index f124514..f0bc7c8 100644 --- a/src/components/SelectArticle/index.vue +++ b/src/components/SelectArticle/index.vue @@ -27,7 +27,7 @@ import SelectData from './components/select-data.vue'; import { CmsDesign } from '@/api/cms/cmsDesign/model'; -const props = withDefaults( + const props = withDefaults( defineProps<{ value?: any; placeholder?: string; diff --git a/src/components/SelectArticleCategory/index.vue b/src/components/SelectArticleCategory/index.vue index 373dda7..58ffc46 100644 --- a/src/components/SelectArticleCategory/index.vue +++ b/src/components/SelectArticleCategory/index.vue @@ -27,7 +27,7 @@ import SelectData from './components/select-data.vue'; import { CmsDesign } from '@/api/cms/Cmsdesign/model'; -const props = withDefaults( + const props = withDefaults( defineProps<{ value?: any; placeholder?: string; @@ -46,7 +46,7 @@ const props = withDefaults( const showEdit = ref(false); // 当前编辑数据 const current = ref(null); - const content = ref(props.value) + const content = ref(props.value); /* 打开编辑弹窗 */ const openEdit = (row?: CmsDesign) => { diff --git a/src/components/SelectDesign/components/select-data.vue b/src/components/SelectDesign/components/select-data.vue index b4ef42c..e7155a7 100644 --- a/src/components/SelectDesign/components/select-data.vue +++ b/src/components/SelectDesign/components/select-data.vue @@ -28,7 +28,9 @@ diff --git a/src/components/Simulator/index.vue b/src/components/Simulator/index.vue index 165fc3e..ddd9bca 100644 --- a/src/components/Simulator/index.vue +++ b/src/components/Simulator/index.vue @@ -83,11 +83,11 @@ {{ item.title }}
- - - - - + + + + + diff --git a/src/layout/components/header-tools.vue b/src/layout/components/header-tools.vue index 3e58727..9cc1c07 100644 --- a/src/layout/components/header-tools.vue +++ b/src/layout/components/header-tools.vue @@ -3,7 +3,7 @@
- +
- - + +
@@ -22,13 +22,13 @@
{{ loginUser.nickname }} - +
diff --git a/src/layout/index.vue b/src/layout/index.vue index 171f268..e687198 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -128,9 +128,9 @@ const userStore = useUserStore(); // 是否刷新页面 - if(localStorage.getItem('Reload')){ + if (localStorage.getItem('Reload')) { window.location.reload(); - localStorage.removeItem('Reload') + localStorage.removeItem('Reload'); } const themeStore = useThemeStore(); @@ -311,7 +311,7 @@ } // 顶栏菜单标题中样式调整 - .ele-admin-header-nav{ + .ele-admin-header-nav { display: flex; justify-content: center; } @@ -365,7 +365,7 @@ } } - svg.md-editor-icon{ + svg.md-editor-icon { width: 27px !important; height: 27px !important; } diff --git a/src/lib/port-manager.ts b/src/lib/port-manager.ts index 43caf40..1b8490d 100644 --- a/src/lib/port-manager.ts +++ b/src/lib/port-manager.ts @@ -71,7 +71,7 @@ class PortCache { let expired = 0; let active = 0; - cache.forEach(config => { + cache.forEach((config) => { if (now - config.lastUsed > this.CACHE_EXPIRY) { expired++; } else { @@ -88,7 +88,10 @@ class PortUtils { /** * 检查端口是否可用 */ - static async isPortAvailable(port: number, host: string = 'localhost'): Promise { + static async isPortAvailable( + port: number, + host = 'localhost' + ): Promise { try { // 在浏览器环境中,我们无法直接检测端口占用 // 这里使用一个模拟的检测方法 @@ -112,7 +115,7 @@ class PortUtils { static async findAvailablePort( startPort: number, endPort: number, - host: string = 'localhost' + host = 'localhost' ): Promise { for (let port = startPort; port <= endPort; port++) { if (await this.isPortAvailable(port, host)) { @@ -139,7 +142,8 @@ class PortUtils { * 计算租户端口偏移 */ 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个端口的空间 } @@ -148,9 +152,9 @@ class PortUtils { */ static calculateEnvironmentOffset(environment: string): number { const offsets = { - 'development': 0, - 'test': 1000, - 'production': 2000 + development: 0, + test: 1000, + production: 2000 }; return offsets[environment as keyof typeof offsets] || 0; } @@ -191,13 +195,17 @@ export class PortManager { projectName?: string; preferredPort?: number; }): Promise { - const tenantId = options?.tenantId || await getTenantId(); + const tenantId = options?.tenantId || (await getTenantId()); const projectName = options?.projectName || 'mp-vue'; - const portKey = PortUtils.generatePortKey(tenantId, this.environment, projectName); + const portKey = PortUtils.generatePortKey( + tenantId, + this.environment, + projectName + ); // 1. 检查缓存中的端口 const cachedPort = this.cache.get(portKey); - if (cachedPort && await PortUtils.isPortAvailable(cachedPort.port)) { + if (cachedPort && (await PortUtils.isPortAvailable(cachedPort.port))) { cachedPort.lastUsed = Date.now(); this.updateCache(portKey, cachedPort); console.log('📋 使用缓存端口:', cachedPort.port); @@ -207,7 +215,11 @@ export class PortManager { // 2. 尝试首选端口 if (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); console.log('✨ 使用首选端口:', options.preferredPort); return config; @@ -216,7 +228,11 @@ export class PortManager { // 3. 智能分配端口 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); 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]} 内找到可用端口` + ); } /** diff --git a/src/lib/port-strategy.ts b/src/lib/port-strategy.ts index 4cc3da5..4ba2522 100644 --- a/src/lib/port-strategy.ts +++ b/src/lib/port-strategy.ts @@ -30,10 +30,10 @@ export interface EnvironmentPortStrategy extends PortStrategy { // 端口分配模式 export enum PortAllocationMode { - TENANT_BASED = 'tenant-based', // 基于租户分配 - SEQUENTIAL = 'sequential', // 顺序分配 - RANDOM = 'random', // 随机分配 - HASH_BASED = 'hash-based' // 基于哈希分配 + TENANT_BASED = 'tenant-based', // 基于租户分配 + SEQUENTIAL = 'sequential', // 顺序分配 + RANDOM = 'random', // 随机分配 + HASH_BASED = 'hash-based' // 基于哈希分配 } // 环境检测器 @@ -237,7 +237,9 @@ export class PortStrategyManager { getCurrentStrategy(): EnvironmentPortStrategy { const strategy = this.strategies.get(this.currentEnvironment); if (!strategy) { - console.warn(`未找到环境 ${this.currentEnvironment} 的策略,使用开发环境策略`); + console.warn( + `未找到环境 ${this.currentEnvironment} 的策略,使用开发环境策略` + ); return this.strategies.get('development')!; } 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); console.log(`✅ 已更新 ${environment} 环境的端口策略`); } @@ -275,7 +280,7 @@ export class PortStrategyManager { // 获取备选策略(按优先级排序) 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); 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('基础端口不在允许的端口范围内'); } @@ -330,11 +338,17 @@ export class PortStrategyManager { } // 检查环境特定规则 - if (strategy.environment === 'production' && !strategy.restrictions.requireHttps) { + if ( + strategy.environment === 'production' && + !strategy.restrictions.requireHttps + ) { warnings.push('生产环境建议启用 HTTPS'); } - if (strategy.environment === 'development' && strategy.restrictions.requireHttps) { + if ( + strategy.environment === 'development' && + strategy.restrictions.requireHttps + ) { warnings.push('开发环境启用 HTTPS 可能增加配置复杂度'); } @@ -358,12 +372,14 @@ export class PortStrategyManager { isValid: boolean; }>; } { - const strategies = Array.from(this.strategies.entries()).map(([env, strategy]) => ({ - environment: env, - priority: strategy.priority, - portRange: strategy.portRange, - isValid: this.validateStrategy(strategy).isValid - })); + const strategies = Array.from(this.strategies.entries()).map( + ([env, strategy]) => ({ + environment: env, + priority: strategy.priority, + portRange: strategy.portRange, + isValid: this.validateStrategy(strategy).isValid + }) + ); return { current: this.currentEnvironment, diff --git a/src/lib/tenant-port-manager.ts b/src/lib/tenant-port-manager.ts index dd3c93d..4503cc2 100644 --- a/src/lib/tenant-port-manager.ts +++ b/src/lib/tenant-port-manager.ts @@ -75,7 +75,10 @@ class TenantPortCache { localStorage.removeItem(this.CACHE_KEY); } - static generateKey(tenantId: string | number, environment: Environment): string { + static generateKey( + tenantId: string | number, + environment: Environment + ): string { return `${tenantId}-${environment}`; } } @@ -107,7 +110,7 @@ export class TenantPortManager { }): Promise { try { // 1. 获取租户信息 - const tenantId = options?.tenantId || await getTenantId(); + const tenantId = options?.tenantId || (await getTenantId()); const tenantInfo = await getTenantInfo(); if (!tenantId) { @@ -119,7 +122,10 @@ export class TenantPortManager { } // 2. 检查现有绑定 - const bindingKey = TenantPortCache.generateKey(tenantId, this.currentEnvironment); + const bindingKey = TenantPortCache.generateKey( + tenantId, + this.currentEnvironment + ); const existingBinding = this.bindings.get(bindingKey); if (existingBinding && !options?.forceNew) { @@ -148,7 +154,11 @@ export class TenantPortManager { }); // 4. 创建租户端口绑定 - const binding = this.createTenantBinding(tenantId, tenantInfo, portConfig); + const binding = this.createTenantBinding( + tenantId, + tenantInfo, + portConfig + ); this.updateBinding(bindingKey, binding); console.log('🎯 为租户分配新端口:', { @@ -163,7 +173,6 @@ export class TenantPortManager { binding, recommendations: this.generateRecommendations(binding) }; - } catch (error) { console.error('❌ 租户端口分配失败:', error); return { @@ -177,7 +186,9 @@ export class TenantPortManager { /** * 验证端口绑定是否有效 */ - private async validatePortBinding(binding: TenantPortBinding): Promise { + private async validatePortBinding( + binding: TenantPortBinding + ): Promise { try { // 检查端口是否仍然可用 const response = await fetch(`http://localhost:${binding.assignedPort}`, { @@ -214,7 +225,9 @@ export class TenantPortManager { metadata: { projectName: portConfig.projectName || 'mp-vue', version: '1.0.0', - description: `${tenantInfo?.name || '租户'} - ${this.currentEnvironment}环境` + description: `${tenantInfo?.name || '租户'} - ${ + this.currentEnvironment + }环境` } }; } @@ -238,7 +251,9 @@ export class TenantPortManager { switch (binding.environment) { case 'development': recommendations.push('开发环境:建议配置热重载和调试工具'); - recommendations.push(`访问地址:http://localhost:${binding.assignedPort}`); + recommendations.push( + `访问地址:http://localhost:${binding.assignedPort}` + ); break; case 'test': 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('⚠️ 分配的端口超出推荐范围,可能存在冲突风险'); } @@ -267,14 +285,17 @@ export class TenantPortManager { history: TenantPortBinding[]; recommendations: string[]; }> { - const targetTenantId = tenantId || await getTenantId(); + const targetTenantId = tenantId || (await getTenantId()); const history: TenantPortBinding[] = []; let current: TenantPortBinding | undefined; // 查找当前和历史绑定 - this.bindings.forEach(binding => { + this.bindings.forEach((binding) => { if (binding.tenantId === targetTenantId) { - if (binding.environment === this.currentEnvironment && binding.isActive) { + if ( + binding.environment === this.currentEnvironment && + binding.isActive + ) { current = binding; } history.push(binding); @@ -296,14 +317,19 @@ export class TenantPortManager { */ async releaseTenantPort(tenantId?: string | number): Promise { try { - const targetTenantId = tenantId || await getTenantId(); - const bindingKey = TenantPortCache.generateKey(targetTenantId, this.currentEnvironment); + const targetTenantId = tenantId || (await getTenantId()); + const bindingKey = TenantPortCache.generateKey( + targetTenantId, + this.currentEnvironment + ); const binding = this.bindings.get(bindingKey); if (binding) { binding.isActive = false; this.updateBinding(bindingKey, binding); - console.log(`🔓 已释放租户 ${targetTenantId} 的端口 ${binding.assignedPort}`); + console.log( + `🔓 已释放租户 ${targetTenantId} 的端口 ${binding.assignedPort}` + ); return true; } @@ -329,13 +355,16 @@ export class TenantPortManager { activeBindings: 0, environmentStats: {} as Record, 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(); let portSum = 0; - this.bindings.forEach(binding => { + this.bindings.forEach((binding) => { // 活跃绑定统计 if (binding.isActive) { stats.activeBindings++; @@ -346,8 +375,14 @@ export class TenantPortManager { (stats.environmentStats[binding.environment] || 0) + 1; // 端口范围统计 - stats.portRangeUsage.min = Math.min(stats.portRangeUsage.min, binding.assignedPort); - stats.portRangeUsage.max = Math.max(stats.portRangeUsage.max, binding.assignedPort); + stats.portRangeUsage.min = Math.min( + stats.portRangeUsage.min, + binding.assignedPort + ); + stats.portRangeUsage.max = Math.max( + stats.portRangeUsage.max, + binding.assignedPort + ); portSum += binding.assignedPort; // 租户统计 @@ -356,9 +391,8 @@ export class TenantPortManager { }); // 计算平均端口 - stats.portRangeUsage.average = stats.totalBindings > 0 - ? Math.round(portSum / stats.totalBindings) - : 0; + stats.portRangeUsage.average = + stats.totalBindings > 0 ? Math.round(portSum / stats.totalBindings) : 0; // 修复无限大的情况 if (stats.portRangeUsage.min === Infinity) { diff --git a/src/router/performance.ts b/src/router/performance.ts index 37d7d43..eacf631 100644 --- a/src/router/performance.ts +++ b/src/router/performance.ts @@ -17,35 +17,35 @@ const PRELOAD_ROUTES = [ export class RoutePerformanceOptimizer { private router: Router; private preloadTimer: number | null = null; - + constructor(router: Router) { this.router = router; this.setupOptimizations(); } - + private setupOptimizations() { // 路由性能监控 this.setupPerformanceMonitoring(); - + // 路由预加载 this.setupRoutePreloading(); - + // 路由缓存优化 this.setupRouteCaching(); } - + // 设置性能监控 private setupPerformanceMonitoring() { this.router.beforeEach((to, from) => { routePerformanceMonitor.startRouteTimer(); return true; }); - + this.router.afterEach((to, from) => { routePerformanceMonitor.endRouteTimer(to.path); }); } - + // 设置路由预加载 private setupRoutePreloading() { this.router.afterEach((to) => { @@ -53,32 +53,36 @@ export class RoutePerformanceOptimizer { if (this.preloadTimer) { clearTimeout(this.preloadTimer); } - + this.preloadTimer = window.setTimeout(() => { this.preloadRelatedRoutes(to); }, 2000); // 2秒后开始预加载 }); } - + // 预加载相关路由 private preloadRelatedRoutes(currentRoute: RouteLocationNormalized) { const routesToPreload = this.getRelatedRoutes(currentRoute.path); - - routesToPreload.forEach(routePath => { + + routesToPreload.forEach((routePath) => { const route = this.router.resolve(routePath); if (route.matched.length > 0) { - const component = route.matched[route.matched.length - 1].components?.default; + const component = + route.matched[route.matched.length - 1].components?.default; if (component && typeof component === 'function') { - componentPreloader.preload(routePath, component as () => Promise); + componentPreloader.preload( + routePath, + component as () => Promise + ); } } }); } - + // 获取相关路由 private getRelatedRoutes(currentPath: string): string[] { const related: string[] = []; - + // 根据当前路径推断可能访问的路由 if (currentPath === '/') { related.push(...PRELOAD_ROUTES); @@ -89,16 +93,16 @@ export class RoutePerformanceOptimizer { } else if (currentPath.startsWith('/bszx')) { related.push('/bszx/dashboard', '/bszx/ranking'); } - - return related.filter(path => path !== currentPath); + + return related.filter((path) => path !== currentPath); } - + // 设置路由缓存 private setupRouteCaching() { // 这里可以实现路由级别的缓存策略 // 例如缓存路由组件、路由数据等 } - + // 清理资源 destroy() { if (this.preloadTimer) { @@ -115,7 +119,7 @@ export function optimizedLazyRoute(loader: () => Promise) { if (preloaded) { return preloaded; } - + // 正常加载 return loader(); }; @@ -126,16 +130,16 @@ export class SmartRoutePrefetcher { private router: Router; private prefetchQueue: Set = new Set(); private isIdle = true; - + constructor(router: Router) { this.router = router; this.setupIdleDetection(); } - + // 设置空闲检测 private setupIdleDetection() { let idleTimer: number; - + const resetIdleTimer = () => { this.isIdle = false; clearTimeout(idleTimer); @@ -144,45 +148,51 @@ export class SmartRoutePrefetcher { this.processPrefetchQueue(); }, 2000); }; - + // 监听用户活动 - ['mousedown', 'mousemove', 'keypress', 'scroll', 'touchstart'].forEach(event => { - document.addEventListener(event, resetIdleTimer, true); - }); - + ['mousedown', 'mousemove', 'keypress', 'scroll', 'touchstart'].forEach( + (event) => { + document.addEventListener(event, resetIdleTimer, true); + } + ); + resetIdleTimer(); } - + // 添加到预取队列 addToPrefetchQueue(routePath: string) { this.prefetchQueue.add(routePath); - + if (this.isIdle) { this.processPrefetchQueue(); } } - + // 处理预取队列 private async processPrefetchQueue() { if (!this.isIdle || this.prefetchQueue.size === 0) { return; } - + const routePath = this.prefetchQueue.values().next().value; this.prefetchQueue.delete(routePath); - + try { const route = this.router.resolve(routePath); if (route.matched.length > 0) { - const component = route.matched[route.matched.length - 1].components?.default; + const component = + route.matched[route.matched.length - 1].components?.default; if (component && typeof component === 'function') { - await componentPreloader.preload(routePath, component as () => Promise); + await componentPreloader.preload( + routePath, + component as () => Promise + ); } } } catch (error) { console.warn(`Failed to prefetch route ${routePath}:`, error); } - + // 继续处理队列 if (this.isIdle && this.prefetchQueue.size > 0) { setTimeout(() => this.processPrefetchQueue(), 100); @@ -194,49 +204,49 @@ export class SmartRoutePrefetcher { export class RoutePerformanceAnalyzer { private router: Router; private performanceData: Map = new Map(); - + constructor(router: Router) { this.router = router; this.setupAnalysis(); } - + private setupAnalysis() { let startTime: number; - + this.router.beforeEach((to) => { startTime = performance.now(); return true; }); - + this.router.afterEach((to) => { const duration = performance.now() - startTime; this.recordPerformance(to.path, duration); }); } - + private recordPerformance(path: string, duration: number) { if (!this.performanceData.has(path)) { this.performanceData.set(path, []); } - + const data = this.performanceData.get(path)!; data.push(duration); - + // 只保留最近10次记录 if (data.length > 10) { data.shift(); } } - + // 获取性能报告 getPerformanceReport() { const report: Record = {}; - + this.performanceData.forEach((durations, path) => { const avg = durations.reduce((sum, d) => sum + d, 0) / durations.length; const min = Math.min(...durations); const max = Math.max(...durations); - + report[path] = { average: Math.round(avg), min: Math.round(min), @@ -244,21 +254,21 @@ export class RoutePerformanceAnalyzer { count: durations.length }; }); - + return report; } - + // 获取慢路由 - getSlowRoutes(threshold: number = 1000) { + getSlowRoutes(threshold = 1000) { const slowRoutes: Array<{ path: string; avgTime: number }> = []; - + this.performanceData.forEach((durations, path) => { const avg = durations.reduce((sum, d) => sum + d, 0) / durations.length; if (avg > threshold) { slowRoutes.push({ path, avgTime: Math.round(avg) }); } }); - + return slowRoutes.sort((a, b) => b.avgTime - a.avgTime); } } @@ -267,45 +277,45 @@ export class RoutePerformanceAnalyzer { export class RouteCacheManager { private cache = new Map(); private maxSize: number; - - constructor(maxSize: number = 20) { + + constructor(maxSize = 20) { this.maxSize = maxSize; } - + // 缓存路由数据 set(key: string, data: any) { if (this.cache.size >= this.maxSize) { const firstKey = this.cache.keys().next().value; this.cache.delete(firstKey); } - + this.cache.set(key, { data, timestamp: Date.now() }); } - + // 获取缓存数据 get(key: string, maxAge: number = 5 * 60 * 1000) { const cached = this.cache.get(key); - + if (!cached) { return null; } - + if (Date.now() - cached.timestamp > maxAge) { this.cache.delete(key); return null; } - + return cached.data; } - + // 清除缓存 clear() { this.cache.clear(); } - + // 删除特定缓存 delete(key: string) { return this.cache.delete(key); diff --git a/src/store/modules/bszx-statistics.ts b/src/store/modules/bszx-statistics.ts index 9cbc9c6..c65546b 100644 --- a/src/store/modules/bszx-statistics.ts +++ b/src/store/modules/bszx-statistics.ts @@ -43,7 +43,7 @@ export const useBszxStatisticsStore = defineStore({ isCacheValid: (state): boolean => { if (!state.lastUpdateTime) return false; const now = Date.now(); - return (now - state.lastUpdateTime) < state.cacheExpiry; + return now - state.lastUpdateTime < state.cacheExpiry; } }, @@ -77,7 +77,11 @@ export const useBszxStatisticsStore = defineStore({ totalPrice = result; } else if (typeof result === 'string') { totalPrice = safeNumber(result); - } else if (result && typeof result === 'object' && 'totalPrice' in result) { + } else if ( + result && + typeof result === 'object' && + 'totalPrice' in result + ) { totalPrice = safeNumber((result as any).totalPrice); } diff --git a/src/store/modules/chat.ts b/src/store/modules/chat.ts index 612fbbc..666320a 100644 --- a/src/store/modules/chat.ts +++ b/src/store/modules/chat.ts @@ -8,7 +8,7 @@ import { } from '@/api/system/chat'; import { emitter } from '@/utils/common'; -const SOCKET_URL: string = 'wss://server.websoft.top'; +const SOCKET_URL = 'wss://server.websoft.top'; interface ConnectionOptions { token: string; diff --git a/src/store/modules/setting.ts b/src/store/modules/setting.ts index 0b654a8..9592507 100644 --- a/src/store/modules/setting.ts +++ b/src/store/modules/setting.ts @@ -11,15 +11,15 @@ export const useWebsiteSettingStore = defineStore({ id: 'setting', state: (): ParamsState => ({ // 初始化时确保所有字段都已赋值 - setting: null, + setting: null }), getters: {}, actions: { setSetting(value: any) { this.setting = value; }, - getSetting(value: any){ + getSetting(value: any) { return value; } - }, + } }); diff --git a/src/store/modules/site.ts b/src/store/modules/site.ts index 48dd0da..a9bd794 100644 --- a/src/store/modules/site.ts +++ b/src/store/modules/site.ts @@ -3,7 +3,7 @@ */ import { defineStore } from 'pinia'; import { getSiteInfo } from '@/api/layout'; -import {AppInfo, CmsWebsite} from '@/api/cms/cmsWebsite/model'; +import { AppInfo, CmsWebsite } from '@/api/cms/cmsWebsite/model'; export interface SiteState { // 应用信息 @@ -73,14 +73,14 @@ export const useSiteStore = defineStore({ * @param state */ version: (state): string => { - if(state.siteInfo?.version == 10){ - return '基础版' + if (state.siteInfo?.version == 10) { + return '基础版'; } - if(state.siteInfo?.version == 20){ - return '专业版' + if (state.siteInfo?.version == 20) { + return '专业版'; } - if(state.siteInfo?.version == 30){ - return '企业版' + if (state.siteInfo?.version == 30) { + return '企业版'; } return ''; }, @@ -105,7 +105,7 @@ export const useSiteStore = defineStore({ isCacheValid: (state): boolean => { if (!state.lastUpdateTime) return false; const now = Date.now(); - return (now - state.lastUpdateTime) < state.cacheExpiry; + return now - state.lastUpdateTime < state.cacheExpiry; } }, @@ -132,7 +132,10 @@ export const useSiteStore = defineStore({ } if (data.domain) { localStorage.setItem('Domain', data.domain); - localStorage.setItem('SiteUrl', `${data.prefix || 'https://'}${data.domain}`); + localStorage.setItem( + 'SiteUrl', + `${data.prefix || 'https://'}${data.domain}` + ); } return data; diff --git a/src/store/modules/template.ts b/src/store/modules/template.ts index 24b8e43..fb9b771 100644 --- a/src/store/modules/template.ts +++ b/src/store/modules/template.ts @@ -2,7 +2,7 @@ * 网站配置 store */ import { defineStore } from 'pinia'; -import {configWebsiteField} from '@/api/cms/cmsWebsiteField'; +import { configWebsiteField } from '@/api/cms/cmsWebsiteField'; import type { Config } from '@/api/cms/cmsWebsiteField/model'; export interface ConfigState { diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 319a690..a78dbbe 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -6,11 +6,11 @@ import { formatMenus, toTreeData, formatTreeData } from 'ele-admin-pro/es'; import type { MenuItemType } from 'ele-admin-pro/es'; import type { User } from '@/api/system/user/model'; import { TOKEN_STORE_NAME, USER_MENUS } from '@/config/setting'; -import {getUserInfo} from '@/api/layout'; +import { getUserInfo } from '@/api/layout'; import { initialization } from '@/api/layout'; -import {clone} from "@/api/system/menu"; +import { clone } from '@/api/system/menu'; import { message } from 'ant-design-vue/es'; -import {logout} from "@/utils/page-tab-util"; +import { logout } from '@/utils/page-tab-util'; // import { isExternalLink } from 'ele-admin-pro'; const EXTRA_MENUS: any = []; @@ -49,7 +49,7 @@ export const useUserStore = defineStore({ if (!result.installed && result.username === 'superAdmin') { const hide = message.loading('正在分配资源请勿刷新页面...', 500); // @ts-ignore - clone({tenantId: Number(result.templateId)}).then(() => { + clone({ tenantId: Number(result.templateId) }).then(() => { if (result.authorities?.length == 0) { result.roles?.map((d) => { if (d.roleCode === 'superAdmin') { @@ -61,7 +61,7 @@ export const useUserStore = defineStore({ } }); } - }) + }); } // 用户信息 this.info = result; diff --git a/src/utils/cache-manager.ts b/src/utils/cache-manager.ts index 8c5c174..f9d203a 100644 --- a/src/utils/cache-manager.ts +++ b/src/utils/cache-manager.ts @@ -61,7 +61,7 @@ export class MemoryCache { */ get(key: string): T | null { const item = this.cache.get(key); - + if (!item) { return null; } @@ -106,7 +106,7 @@ export class MemoryCache { */ clearByTags(tags: string[]): void { for (const [key, item] of this.cache.entries()) { - if (item.tags && item.tags.some(tag => tags.includes(tag))) { + if (item.tags && item.tags.some((tag) => tags.includes(tag))) { this.delete(key); } } @@ -132,7 +132,7 @@ export class MemoryCache { getStats() { let totalSize = 0; let expiredCount = 0; - + for (const item of this.cache.values()) { totalSize += JSON.stringify(item.data).length; if (this.isExpired(item)) { @@ -153,14 +153,14 @@ export class MemoryCache { */ cleanup(): number { let cleanedCount = 0; - + for (const [key, item] of this.cache.entries()) { if (this.isExpired(item)) { this.delete(key); cleanedCount++; } } - + return cleanedCount; } @@ -175,14 +175,14 @@ export class MemoryCache { private evictLRU(): void { let lruKey = ''; let lruAccess = Infinity; - + for (const [key, access] of this.accessOrder.entries()) { if (access < lruAccess) { lruAccess = access; lruKey = key; } } - + if (lruKey) { this.delete(lruKey); } @@ -194,7 +194,7 @@ export class PersistentCache { private prefix: string; private config: Required; - constructor(prefix: string = 'app_cache', config: CacheConfig = {}) { + constructor(prefix = 'app_cache', config: CacheConfig = {}) { this.prefix = prefix; this.config = { maxSize: config.maxSize || 50, @@ -219,7 +219,7 @@ export class PersistentCache { const serialized = JSON.stringify(item); localStorage.setItem(this.getKey(key), serialized); - + // 更新索引 this.updateIndex(key); } catch (error) { @@ -235,7 +235,7 @@ export class PersistentCache { get(key: string): T | null { try { const serialized = localStorage.getItem(this.getKey(key)); - + if (!serialized) { return null; } @@ -275,7 +275,7 @@ export class PersistentCache { */ clear(): void { const keys = this.getAllKeys(); - keys.forEach(key => localStorage.removeItem(key)); + keys.forEach((key) => localStorage.removeItem(key)); localStorage.removeItem(this.getIndexKey()); } @@ -284,13 +284,13 @@ export class PersistentCache { */ clearByTags(tags: string[]): void { const keys = this.getAllKeys(); - - keys.forEach(fullKey => { + + keys.forEach((fullKey) => { try { const serialized = localStorage.getItem(fullKey); if (serialized) { const item: CacheItem = JSON.parse(serialized); - if (item.tags && item.tags.some(tag => tags.includes(tag))) { + if (item.tags && item.tags.some((tag) => tags.includes(tag))) { const key = fullKey.replace(this.prefix + '_', ''); this.delete(key); } @@ -308,8 +308,8 @@ export class PersistentCache { cleanup(): number { const keys = this.getAllKeys(); let cleanedCount = 0; - - keys.forEach(fullKey => { + + keys.forEach((fullKey) => { try { const serialized = localStorage.getItem(fullKey); if (serialized) { @@ -326,7 +326,7 @@ export class PersistentCache { cleanedCount++; } }); - + return cleanedCount; } @@ -342,7 +342,11 @@ export class PersistentCache { const keys: string[] = []; for (let i = 0; i < localStorage.length; i++) { const key = localStorage.key(i); - if (key && key.startsWith(this.prefix + '_') && key !== this.getIndexKey()) { + if ( + key && + key.startsWith(this.prefix + '_') && + key !== this.getIndexKey() + ) { keys.push(key); } } @@ -353,16 +357,16 @@ export class PersistentCache { try { const indexKey = this.getIndexKey(); const index = JSON.parse(localStorage.getItem(indexKey) || '[]'); - + if (!index.includes(key)) { index.push(key); - + // 限制索引大小 if (index.length > this.config.maxSize) { const removedKey = index.shift(); this.delete(removedKey); } - + localStorage.setItem(indexKey, JSON.stringify(index)); } } catch (error) { @@ -402,28 +406,32 @@ export function cached( expiry: number = 5 * 60 * 1000, keyGenerator?: (...args: any[]) => string ) { - return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { + return function ( + target: any, + propertyKey: string, + descriptor: PropertyDescriptor + ) { const originalMethod = descriptor.value; - + descriptor.value = async function (...args: any[]) { - const key = keyGenerator + const key = keyGenerator ? keyGenerator(...args) : `${target.constructor.name}_${propertyKey}_${JSON.stringify(args)}`; - + // 尝试从缓存获取 let result = memoryCache.get(key); - + if (result === null) { // 缓存未命中,执行原方法 result = await originalMethod.apply(this, args); - + // 存入缓存 memoryCache.set(key, result, expiry); } - + return result; }; - + return descriptor; }; } diff --git a/src/utils/common.ts b/src/utils/common.ts index 95e05f9..a1cd48f 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -8,10 +8,10 @@ import { useUserStore } from '@/store/modules/user'; import CryptoJS from 'crypto-js'; // import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; -import {getSiteDomain, getTenantId} from '@/utils/domain'; +import { getSiteDomain, getTenantId } from '@/utils/domain'; import { uuid } from 'ele-admin-pro'; import mitt from 'mitt'; -import {ChatMessage} from "@/api/system/chat/model"; +import { ChatMessage } from '@/api/system/chat/model'; type Events = { message: ChatMessage; }; @@ -69,19 +69,19 @@ export function openUrl(url: string, params?: any): void { */ export function openSpmUrl(path?: string, d?: any, id = 0): void { // const domain = getSiteDomain(); - let domain = localStorage.getItem('Domain'); + const domain = localStorage.getItem('Domain'); let spm = ''; - let tid = d?.tenantId || 0; - let mid = localStorage.getItem('MerchantId') || 0; - let pid = d?.parentId || 0; + const tid = d?.tenantId || 0; + const mid = localStorage.getItem('MerchantId') || 0; + const pid = d?.parentId || 0; let cid = d?.categoryId || 0; - let uid = localStorage.getItem('UserId') || 0; - let timestamp = ref(Date.now() / 1000); + const uid = localStorage.getItem('UserId') || 0; + const timestamp = ref(Date.now() / 1000); - if(d?.navigationId > 0){ + if (d?.navigationId > 0) { cid = d.navigationId; } - if(d?.itemId > 0){ + if (d?.itemId > 0) { id = d.itemId; } @@ -98,7 +98,7 @@ export function openSpmUrl(path?: string, d?: any, id = 0): void { // TODO 开发环境 if (import.meta.env.DEV) { - console.log('开发环境',getTenantId()); + console.log('开发环境', getTenantId()); window.open(`http://localhost:${getTenantId()}${path}${spm}`); return; } @@ -118,41 +118,41 @@ export function openSpmUrl(path?: string, d?: any, id = 0): void { export function getSpmUrl(d?: any): string { let domain = localStorage.getItem('Domain'); let path = d?.model; - let tid = d?.tenantId || 0; - let mid = d?.merchantId || 0; - let pid = d?.parentId || 0; + const tid = d?.tenantId || 0; + const mid = d?.merchantId || 0; + const pid = d?.parentId || 0; let cid = d?.navigationId; let id = d?.itemId; - let uid = localStorage.getItem('UserId') || 0; - let timestamp = ref(Date.now() / 1000); + const uid = localStorage.getItem('UserId') || 0; + const timestamp = ref(Date.now() / 1000); // TODO 配置cid - if(!cid){ + if (!cid) { cid = d?.categoryId; } - if(!id){ + if (!id) { id = d?.articleId || 0; } path = d?.model + '/' + d?.navigationId; // TODO 首页 - if(d?.model == 'index'){ + if (d?.model == 'index') { path = ''; } - if(!domain?.startsWith('https:')){ - domain = `https://${domain}` + if (!domain?.startsWith('https:')) { + domain = `https://${domain}`; } - // 开发环境 + // 开发环境 if (import.meta.env.DEV) { - domain = `http://localhost:${getTenantId()}` + domain = `http://localhost:${getTenantId()}`; } // TODO 顶级栏目则默认跳转到第一个子栏目 - if(d?.parentId == 0 && d?.children && d?.children.length > 0){ + if (d?.parentId == 0 && d?.children && d?.children.length > 0) { cid = d?.children?.[0]?.navigationId; } // 文章后缀 - if(d?.suffix){ + if (d?.suffix) { path = path + d?.suffix; } @@ -160,8 +160,6 @@ export function getSpmUrl(d?: any): string { return `${domain}/${path}?spm=${d?.model}.${tid}.${mid}.${pid}.${cid}.${id}.${uid}.${timestamp.value}`; } - - // export function getSpmUrl(path: string, d?: any, id = 0): string { // let domain = localStorage.getItem('Domain'); // let spm = ''; @@ -194,7 +192,6 @@ export function getSpmUrl(d?: any): string { // return `https://${domain}${path}${spm}` // } - /** * 弹出新窗口 * @param url @@ -228,12 +225,12 @@ export const getDomainPath = (path: string) => { }; export const getLang = () => { - if(localStorage.getItem('i18n-lang')){ - return `${localStorage.getItem('i18n-lang')}` + if (localStorage.getItem('i18n-lang')) { + return `${localStorage.getItem('i18n-lang')}`; } // const { locale } = useI18n(); // return `${locale.value}`; -} +}; // 预览云存储文件 export function getUrl(url: string) { const isExternal = isExternalLink(url); @@ -250,43 +247,45 @@ export function getUrl(url: string) { // 跳转页面(不弹窗) export function navTo(d?: any, path?: string, spm?: boolean): string { - let domain = localStorage.getItem('Domain'); + let domain = localStorage.getItem('Domain'); - if(!domain?.startsWith('https:')){ - domain = `https://${domain}` + if (!domain?.startsWith('https:')) { + domain = `https://${domain}`; + } + // 开发环境 + if (import.meta.env.DEV) { + domain = `http://localhost:${getTenantId()}`; + } + if (d?.model == 'index') { + return domain + '/'; + } + if (!path) { + path = d?.path; + } + // 国际化配置 + if (getLang()) { + if (getLang() == 'en') { + path = '/en' + path; } - // 开发环境 - if (import.meta.env.DEV) { - domain = `http://localhost:${getTenantId()}` - } - if(d?.model == 'index'){ - return domain + '/'; - } - if(!path){ - path = d?.path; - } - // 国际化配置 - if(getLang()){ - if(getLang() == 'en'){ - path = '/en' + path; - } - } - // 是否移动端 - if(d?.isMobile){ - path = '/m' + path; - } - path = domain + path; - // 是否附加spm参数 - if(spm){ - let uid = localStorage.getItem('UserId') || 0; - let timestamp = ref(Date.now() / 1000); - return `${path}?spm=${d?.tenantId||0}.${d?.merchantId||0}.${d?.parentId||0}.${d?.navigationId||d?.categoryId}.${uid}.${timestamp.value}` - } - return `${path}`; + } + // 是否移动端 + if (d?.isMobile) { + path = '/m' + path; + } + path = domain + path; + // 是否附加spm参数 + if (spm) { + const uid = localStorage.getItem('UserId') || 0; + const timestamp = ref(Date.now() / 1000); + return `${path}?spm=${d?.tenantId || 0}.${d?.merchantId || 0}.${ + d?.parentId || 0 + }.${d?.navigationId || d?.categoryId}.${uid}.${timestamp.value}`; + } + return `${path}`; } -export function detail(d: any){ - return navTo(d,`/${d.detail}/${d.articleId}.html`); +export function detail(d: any) { + return navTo(d, `/${d.detail}/${d.articleId}.html`); } export function push(path: string) { @@ -354,7 +353,12 @@ export const getEndTime = (endTime) => { * 判断是否是移动设备 */ export function isMobileDevice(): boolean { - return (typeof window.orientation !== "undefined") || /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); + return ( + typeof window.orientation !== 'undefined' || + /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( + navigator.userAgent + ) + ); } /** @@ -564,7 +568,6 @@ export const getTokenBySpm = () => { } }; - /** * 下划线转驼峰命名 */ @@ -587,7 +590,9 @@ export function toCamelCaseUpper(str: string): string { * 转为短下划线 */ export function toShortUnderline(str: string): string { - return str.replace(/[A-Z]/g, function (letter) { - return '_' + letter.toLowerCase(); - }).replace(/^_/, ''); + return str + .replace(/[A-Z]/g, function (letter) { + return '_' + letter.toLowerCase(); + }) + .replace(/^_/, ''); } diff --git a/src/utils/component-optimization.ts b/src/utils/component-optimization.ts index 24ca53d..73efda3 100644 --- a/src/utils/component-optimization.ts +++ b/src/utils/component-optimization.ts @@ -7,42 +7,42 @@ import type { Ref, ComputedRef, WatchStopHandle } from 'vue'; // 防抖函数 export function useDebounce any>( fn: T, - delay: number = 300 + delay = 300 ): [T, () => void] { let timeoutId: number | null = null; - + const debouncedFn = ((...args: any[]) => { if (timeoutId !== null) { clearTimeout(timeoutId); } - + timeoutId = window.setTimeout(() => { fn(...args); timeoutId = null; }, delay); }) as T; - + const cancel = () => { if (timeoutId !== null) { clearTimeout(timeoutId); timeoutId = null; } }; - + return [debouncedFn, cancel]; } // 节流函数 export function useThrottle any>( fn: T, - delay: number = 300 + delay = 300 ): [T, () => void] { let lastExecTime = 0; let timeoutId: number | null = null; - + const throttledFn = ((...args: any[]) => { const now = Date.now(); - + if (now - lastExecTime >= delay) { fn(...args); lastExecTime = now; @@ -50,7 +50,7 @@ export function useThrottle any>( if (timeoutId !== null) { clearTimeout(timeoutId); } - + timeoutId = window.setTimeout(() => { fn(...args); lastExecTime = Date.now(); @@ -58,14 +58,14 @@ export function useThrottle any>( }, delay - (now - lastExecTime)); } }) as T; - + const cancel = () => { if (timeoutId !== null) { clearTimeout(timeoutId); timeoutId = null; } }; - + return [throttledFn, cancel]; } @@ -74,24 +74,24 @@ export function useVirtualScroll( items: Ref, itemHeight: number, containerHeight: number, - buffer: number = 5 + buffer = 5 ) { const scrollTop = ref(0); const containerRef = ref(); - + const visibleRange = computed(() => { const start = Math.floor(scrollTop.value / itemHeight); const end = Math.min( start + Math.ceil(containerHeight / itemHeight) + buffer, items.value.length ); - + return { start: Math.max(0, start - buffer), end }; }); - + const visibleItems = computed(() => { const { start, end } = visibleRange.value; return items.value.slice(start, end).map((item, index) => ({ @@ -99,28 +99,28 @@ export function useVirtualScroll( index: start + index })); }); - + const totalHeight = computed(() => items.value.length * itemHeight); - + const offsetY = computed(() => visibleRange.value.start * itemHeight); - + const handleScroll = useThrottle((event: Event) => { const target = event.target as HTMLElement; scrollTop.value = target.scrollTop; }, 16)[0]; // 60fps - + onMounted(() => { if (containerRef.value) { containerRef.value.addEventListener('scroll', handleScroll); } }); - + onUnmounted(() => { if (containerRef.value) { containerRef.value.removeEventListener('scroll', handleScroll); } }); - + return { containerRef, visibleItems, @@ -135,12 +135,12 @@ export function useLazyImage() { const isLoaded = ref(false); const isError = ref(false); const isIntersecting = ref(false); - + let observer: IntersectionObserver | null = null; - + const load = (src: string) => { if (!imageRef.value || isLoaded.value) return; - + const img = new Image(); img.onload = () => { if (imageRef.value) { @@ -153,7 +153,7 @@ export function useLazyImage() { }; img.src = src; }; - + onMounted(() => { if (imageRef.value) { observer = new IntersectionObserver( @@ -164,17 +164,17 @@ export function useLazyImage() { }, { threshold: 0.1 } ); - + observer.observe(imageRef.value); } }); - + onUnmounted(() => { if (observer) { observer.disconnect(); } }); - + return { imageRef, isLoaded, @@ -193,22 +193,22 @@ export function useInfiniteScroll( } = {} ) { const { threshold = 100, initialLoad = true } = options; - + const items = ref([]); const loading = ref(false); const finished = ref(false); const error = ref(null); const containerRef = ref(); - + const load = async () => { if (loading.value || finished.value) return; - + loading.value = true; error.value = null; - + try { const newItems = await loadMore(); - + if (newItems.length === 0) { finished.value = true; } else { @@ -220,40 +220,40 @@ export function useInfiniteScroll( loading.value = false; } }; - + const checkScroll = useThrottle(() => { if (!containerRef.value || loading.value || finished.value) return; - + const { scrollTop, scrollHeight, clientHeight } = containerRef.value; - + if (scrollTop + clientHeight >= scrollHeight - threshold) { load(); } }, 100)[0]; - + onMounted(() => { if (initialLoad) { load(); } - + if (containerRef.value) { containerRef.value.addEventListener('scroll', checkScroll); } }); - + onUnmounted(() => { if (containerRef.value) { containerRef.value.removeEventListener('scroll', checkScroll); } }); - + const reset = () => { items.value = []; loading.value = false; finished.value = false; error.value = null; }; - + return { items, loading, @@ -269,20 +269,20 @@ export function useInfiniteScroll( export function useBreakpoints() { const width = ref(window.innerWidth); const height = ref(window.innerHeight); - + const updateSize = useThrottle(() => { width.value = window.innerWidth; height.value = window.innerHeight; }, 100)[0]; - + onMounted(() => { window.addEventListener('resize', updateSize); }); - + onUnmounted(() => { window.removeEventListener('resize', updateSize); }); - + const breakpoints = computed(() => ({ xs: width.value < 576, sm: width.value >= 576 && width.value < 768, @@ -291,7 +291,7 @@ export function useBreakpoints() { xl: width.value >= 1200 && width.value < 1600, xxl: width.value >= 1600 })); - + return { width, height, @@ -300,12 +300,12 @@ export function useBreakpoints() { } // 组件可见性检测 -export function useVisibility(threshold: number = 0.1) { +export function useVisibility(threshold = 0.1) { const elementRef = ref(); const isVisible = ref(false); - + let observer: IntersectionObserver | null = null; - + onMounted(() => { if (elementRef.value) { observer = new IntersectionObserver( @@ -316,17 +316,17 @@ export function useVisibility(threshold: number = 0.1) { }, { threshold } ); - + observer.observe(elementRef.value); } }); - + onUnmounted(() => { if (observer) { observer.disconnect(); } }); - + return { elementRef, isVisible @@ -336,49 +336,49 @@ export function useVisibility(threshold: number = 0.1) { // 长列表优化 export function useLongList( data: Ref, - itemHeight: number = 50, - visibleCount: number = 10 + itemHeight = 50, + visibleCount = 10 ) { const scrollTop = ref(0); const containerRef = ref(); - + const startIndex = computed(() => { return Math.floor(scrollTop.value / itemHeight); }); - + const endIndex = computed(() => { return Math.min(startIndex.value + visibleCount, data.value.length); }); - + const visibleData = computed(() => { return data.value.slice(startIndex.value, endIndex.value); }); - + const paddingTop = computed(() => { return startIndex.value * itemHeight; }); - + const paddingBottom = computed(() => { return (data.value.length - endIndex.value) * itemHeight; }); - + const handleScroll = useThrottle((event: Event) => { const target = event.target as HTMLElement; scrollTop.value = target.scrollTop; }, 16)[0]; - + onMounted(() => { if (containerRef.value) { containerRef.value.addEventListener('scroll', handleScroll); } }); - + onUnmounted(() => { if (containerRef.value) { containerRef.value.removeEventListener('scroll', handleScroll); } }); - + return { containerRef, visibleData, @@ -391,36 +391,44 @@ export function useLongList( export function useMemoryLeakDetection(componentName: string) { const watchers: WatchStopHandle[] = []; const timers: number[] = []; - const listeners: Array<{ element: EventTarget; event: string; handler: EventListener }> = []; - + const listeners: Array<{ + element: EventTarget; + event: string; + handler: EventListener; + }> = []; + const addWatcher = (stopHandle: WatchStopHandle) => { watchers.push(stopHandle); }; - + const addTimer = (timerId: number) => { timers.push(timerId); }; - - const addListener = (element: EventTarget, event: string, handler: EventListener) => { + + const addListener = ( + element: EventTarget, + event: string, + handler: EventListener + ) => { element.addEventListener(event, handler); listeners.push({ element, event, handler }); }; - + onUnmounted(() => { // 清理 watchers - watchers.forEach(stop => stop()); - + watchers.forEach((stop) => stop()); + // 清理 timers - timers.forEach(id => clearTimeout(id)); - + timers.forEach((id) => clearTimeout(id)); + // 清理 listeners listeners.forEach(({ element, event, handler }) => { element.removeEventListener(event, handler); }); - + console.log(`${componentName} 组件已清理完成`); }); - + return { addWatcher, addTimer, diff --git a/src/utils/domain.ts b/src/utils/domain.ts index 63f78b0..bd9d3b9 100644 --- a/src/utils/domain.ts +++ b/src/utils/domain.ts @@ -1,5 +1,5 @@ import { isNumber } from 'ele-admin-pro'; -import {listCmsWebsite} from "@/api/cms/cmsWebsite"; +import { listCmsWebsite } from '@/api/cms/cmsWebsite'; // 解析域名结构 export function getHost(): any { @@ -35,14 +35,14 @@ export function getDomainPart1(): any { return undefined; } const ip = Number(split[0]); - if(ip < 1000){ + if (ip < 1000) { return undefined; } if (isNumber(split[0])) { return split[0]; } const tenantId = localStorage.getItem('TenantId'); - if(tenantId){ + if (tenantId) { return Number(tenantId); } return undefined; diff --git a/src/utils/enhanced-request.ts b/src/utils/enhanced-request.ts index 77f6be2..7e91307 100644 --- a/src/utils/enhanced-request.ts +++ b/src/utils/enhanced-request.ts @@ -66,7 +66,11 @@ class RequestQueue { class RetryManager { static async retry( fn: () => Promise, - config: { times: number; delay: number; condition?: (error: any) => boolean } + config: { + times: number; + delay: number; + condition?: (error: any) => boolean; + } ): Promise { let lastError: any; @@ -77,7 +81,10 @@ class RetryManager { lastError = error; // 检查是否应该重试 - if (i < config.times && (!config.condition || config.condition(error as AxiosError))) { + if ( + i < config.times && + (!config.condition || config.condition(error as AxiosError)) + ) { await this.delay(config.delay * Math.pow(2, i)); // 指数退避 console.warn(`请求重试 ${i + 1}/${config.times}:`, error); } else { @@ -90,7 +97,7 @@ class RetryManager { } private static delay(ms: number): Promise { - return new Promise(resolve => setTimeout(resolve, ms)); + return new Promise((resolve) => setTimeout(resolve, ms)); } } @@ -180,12 +187,7 @@ export class EnhancedRequest { // 缓存响应数据 if (cache?.enabled && response.data) { - memoryCache.set( - cacheKey, - response.data, - cache.expiry, - cache.tags - ); + memoryCache.set(cacheKey, response.data, cache.expiry, cache.tags); } return response.data; @@ -227,7 +229,11 @@ export class EnhancedRequest { } // POST 请求 - post(url: string, data?: any, config?: EnhancedRequestConfig): Promise { + post( + url: string, + data?: any, + config?: EnhancedRequestConfig + ): Promise { return this.request({ ...config, method: 'POST', @@ -237,7 +243,11 @@ export class EnhancedRequest { } // PUT 请求 - put(url: string, data?: any, config?: EnhancedRequestConfig): Promise { + put( + url: string, + data?: any, + config?: EnhancedRequestConfig + ): Promise { return this.request({ ...config, method: 'PUT', @@ -257,14 +267,14 @@ export class EnhancedRequest { // 批量请求 async batch(requests: EnhancedRequestConfig[]): Promise { - const promises = requests.map(config => this.request(config)); + const promises = requests.map((config) => this.request(config)); return Promise.all(promises); } // 并发控制请求 async concurrent( requests: EnhancedRequestConfig[], - limit: number = 5 + limit = 5 ): Promise { const results: T[] = []; @@ -280,7 +290,9 @@ export class EnhancedRequest { // 生成缓存键 private generateCacheKey(config: AxiosRequestConfig): string { const { method, url, params, data } = config; - return `api_${method}_${url}_${JSON.stringify(params)}_${JSON.stringify(data)}`; + return `api_${method}_${url}_${JSON.stringify(params)}_${JSON.stringify( + data + )}`; } // 判断是否应该重试 @@ -314,7 +326,14 @@ export class EnhancedRequest { export const enhancedRequest = new EnhancedRequest(); // 便捷方法 -export const { get, post, put, delete: del, batch, concurrent } = enhancedRequest; +export const { + get, + post, + put, + delete: del, + batch, + concurrent +} = enhancedRequest; // 带缓存的 GET 请求 export function cachedGet( @@ -339,8 +358,8 @@ export function cachedGet( // 带重试的请求 export function retryRequest( config: EnhancedRequestConfig, - retryTimes: number = 3, - retryDelay: number = 1000 + retryTimes = 3, + retryDelay = 1000 ): Promise { return enhancedRequest.request({ ...config, diff --git a/src/utils/lazy-load.ts b/src/utils/lazy-load.ts index 17aae32..de3a0a7 100644 --- a/src/utils/lazy-load.ts +++ b/src/utils/lazy-load.ts @@ -8,19 +8,21 @@ import { h } from 'vue'; // 加载状态组件 const LoadingComponent = { setup() { - return () => h('div', { - style: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - minHeight: '200px', - fontSize: '16px', - color: '#999' - } - }, [ - h(LoadingOutlined, { style: { marginRight: '8px' } }), - '加载中...' - ]); + return () => + h( + 'div', + { + style: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + minHeight: '200px', + fontSize: '16px', + color: '#999' + } + }, + [h(LoadingOutlined, { style: { marginRight: '8px' } }), '加载中...'] + ); } }; @@ -28,34 +30,51 @@ const LoadingComponent = { const ErrorComponent = { props: ['error'], setup(props: { error: Error }) { - return () => h('div', { - style: { - display: 'flex', - flexDirection: 'column', - justifyContent: 'center', - alignItems: 'center', - minHeight: '200px', - padding: '20px', - color: '#ff4d4f', - backgroundColor: '#fff2f0', - border: '1px solid #ffccc7', - borderRadius: '6px' - } - }, [ - h('div', { style: { fontSize: '16px', marginBottom: '8px' } }, '组件加载失败'), - h('div', { style: { fontSize: '12px', color: '#999' } }, props.error.message), - h('button', { - style: { - marginTop: '12px', - padding: '4px 12px', - border: '1px solid #d9d9d9', - borderRadius: '4px', - backgroundColor: '#fff', - cursor: 'pointer' + return () => + h( + 'div', + { + style: { + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + alignItems: 'center', + minHeight: '200px', + padding: '20px', + color: '#ff4d4f', + backgroundColor: '#fff2f0', + border: '1px solid #ffccc7', + borderRadius: '6px' + } }, - onClick: () => window.location.reload() - }, '重新加载') - ]); + [ + h( + 'div', + { style: { fontSize: '16px', marginBottom: '8px' } }, + '组件加载失败' + ), + h( + 'div', + { style: { fontSize: '12px', color: '#999' } }, + props.error.message + ), + h( + 'button', + { + style: { + marginTop: '12px', + padding: '4px 12px', + border: '1px solid #d9d9d9', + borderRadius: '4px', + backgroundColor: '#fff', + cursor: 'pointer' + }, + onClick: () => window.location.reload() + }, + '重新加载' + ) + ] + ); } }; @@ -89,7 +108,7 @@ export function createLazyComponent( options: LazyLoadOptions = {} ) { const config = { ...defaultOptions, ...options }; - + return defineAsyncComponent({ loader: createRetryLoader(loader, config.retries!, config.retryDelay!), loadingComponent: config.loading, @@ -109,20 +128,20 @@ function createRetryLoader( ) { return async () => { let lastError: Error; - + for (let i = 0; i <= retries; i++) { try { return await loader(); } catch (error) { lastError = error as Error; - + if (i < retries) { - await new Promise(resolve => setTimeout(resolve, retryDelay)); + await new Promise((resolve) => setTimeout(resolve, retryDelay)); console.warn(`组件加载失败,正在重试 (${i + 1}/${retries}):`, error); } } } - + throw lastError!; }; } @@ -130,24 +149,32 @@ function createRetryLoader( /** * 路由懒加载 */ -export function lazyRoute(loader: () => Promise, options?: LazyLoadOptions) { +export function lazyRoute( + loader: () => Promise, + options?: LazyLoadOptions +) { return createLazyComponent(loader, { ...options, loading: options?.loading || { setup() { - return () => h('div', { - style: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - minHeight: '60vh', - fontSize: '16px', - color: '#999' - } - }, [ - h(LoadingOutlined, { style: { marginRight: '8px' } }), - '页面加载中...' - ]); + return () => + h( + 'div', + { + style: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + minHeight: '60vh', + fontSize: '16px', + color: '#999' + } + }, + [ + h(LoadingOutlined, { style: { marginRight: '8px' } }), + '页面加载中...' + ] + ); } } }); @@ -156,24 +183,29 @@ export function lazyRoute(loader: () => Promise, options?: LazyLoadOptions) /** * 模态框懒加载 */ -export function lazyModal(loader: () => Promise, options?: LazyLoadOptions) { +export function lazyModal( + loader: () => Promise, + options?: LazyLoadOptions +) { return createLazyComponent(loader, { ...options, loading: options?.loading || { setup() { - return () => h('div', { - style: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - minHeight: '300px', - fontSize: '14px', - color: '#999' - } - }, [ - h(LoadingOutlined, { style: { marginRight: '8px' } }), - '加载中...' - ]); + return () => + h( + 'div', + { + style: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + minHeight: '300px', + fontSize: '14px', + color: '#999' + } + }, + [h(LoadingOutlined, { style: { marginRight: '8px' } }), '加载中...'] + ); } } }); @@ -182,27 +214,35 @@ export function lazyModal(loader: () => Promise, options?: LazyLoadOptions) /** * 图表懒加载 */ -export function lazyChart(loader: () => Promise, options?: LazyLoadOptions) { +export function lazyChart( + loader: () => Promise, + options?: LazyLoadOptions +) { return createLazyComponent(loader, { ...options, loading: options?.loading || { setup() { - return () => h('div', { - style: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center', - minHeight: '400px', - backgroundColor: '#fafafa', - border: '1px dashed #d9d9d9', - borderRadius: '6px', - fontSize: '14px', - color: '#999' - } - }, [ - h(LoadingOutlined, { style: { marginRight: '8px' } }), - '图表加载中...' - ]); + return () => + h( + 'div', + { + style: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + minHeight: '400px', + backgroundColor: '#fafafa', + border: '1px dashed #d9d9d9', + borderRadius: '6px', + fontSize: '14px', + color: '#999' + } + }, + [ + h(LoadingOutlined, { style: { marginRight: '8px' } }), + '图表加载中...' + ] + ); } } }); @@ -213,7 +253,7 @@ export function lazyChart(loader: () => Promise, options?: LazyLoadOptions) */ export class ComponentPreloader { private preloadedComponents = new Map>(); - + /** * 预加载组件 */ @@ -223,14 +263,14 @@ export class ComponentPreloader { } return this.preloadedComponents.get(key)!; } - + /** * 获取预加载的组件 */ get(key: string) { return this.preloadedComponents.get(key); } - + /** * 清除预加载的组件 */ @@ -241,7 +281,7 @@ export class ComponentPreloader { this.preloadedComponents.clear(); } } - + /** * 批量预加载 */ @@ -264,20 +304,20 @@ export function smartLazyComponent( ) { // 检测网络状况 const connection = (navigator as any).connection; - const isSlowNetwork = connection && ( - connection.effectiveType === 'slow-2g' || - connection.effectiveType === '2g' || - connection.saveData - ); - + const isSlowNetwork = + connection && + (connection.effectiveType === 'slow-2g' || + connection.effectiveType === '2g' || + connection.saveData); + // 根据网络状况调整配置 const smartOptions = { ...options, - timeout: isSlowNetwork ? 60000 : (options.timeout || 30000), - retries: isSlowNetwork ? 5 : (options.retries || 3), - retryDelay: isSlowNetwork ? 2000 : (options.retryDelay || 1000) + timeout: isSlowNetwork ? 60000 : options.timeout || 30000, + retries: isSlowNetwork ? 5 : options.retries || 3, + retryDelay: isSlowNetwork ? 2000 : options.retryDelay || 1000 }; - + return createLazyComponent(loader, smartOptions); } @@ -297,12 +337,12 @@ export function visibilityLazyComponent( loader().then(resolve).catch(reject); } }); - + // 创建一个占位元素来观察 const placeholder = document.createElement('div'); document.body.appendChild(placeholder); observer.observe(placeholder); - + // 清理函数 setTimeout(() => { observer.disconnect(); diff --git a/src/utils/performance.ts b/src/utils/performance.ts index 15d03a6..c9cd542 100644 --- a/src/utils/performance.ts +++ b/src/utils/performance.ts @@ -44,16 +44,21 @@ export class PerformanceMonitor { } private measurePageLoad() { - const navigation = performance.getEntriesByType('navigation')[0] as PerformanceNavigationTiming; + const navigation = performance.getEntriesByType( + 'navigation' + )[0] as PerformanceNavigationTiming; if (navigation) { - this.metrics.pageLoadTime = navigation.loadEventEnd - navigation.fetchStart; + this.metrics.pageLoadTime = + navigation.loadEventEnd - navigation.fetchStart; } } private observeWebVitals() { // FCP (First Contentful Paint) this.observePerformance('paint', (entries) => { - const fcpEntry = entries.find(entry => entry.name === 'first-contentful-paint'); + const fcpEntry = entries.find( + (entry) => entry.name === 'first-contentful-paint' + ); if (fcpEntry) { this.metrics.fcp = fcpEntry.startTime; } @@ -78,7 +83,7 @@ export class PerformanceMonitor { // CLS (Cumulative Layout Shift) this.observePerformance('layout-shift', (entries) => { let clsValue = 0; - entries.forEach(entry => { + entries.forEach((entry) => { if (!entry.hadRecentInput) { clsValue += entry.value; } @@ -87,7 +92,10 @@ export class PerformanceMonitor { }); } - private observePerformance(type: string, callback: (entries: PerformanceEntry[]) => void) { + private observePerformance( + type: string, + callback: (entries: PerformanceEntry[]) => void + ) { try { const observer = new PerformanceObserver((list) => { callback(list.getEntries()); @@ -122,14 +130,14 @@ export class PerformanceMonitor { // 清理观察器 disconnect() { - this.observers.forEach(observer => observer.disconnect()); + this.observers.forEach((observer) => observer.disconnect()); this.observers = []; } } // 路由性能监控 export class RoutePerformanceMonitor { - private routeStartTime: number = 0; + private routeStartTime = 0; private routeMetrics: Map = new Map(); startRouteTimer() { @@ -139,19 +147,19 @@ export class RoutePerformanceMonitor { endRouteTimer(routeName: string) { if (this.routeStartTime) { const duration = performance.now() - this.routeStartTime; - + if (!this.routeMetrics.has(routeName)) { this.routeMetrics.set(routeName, []); } - + const metrics = this.routeMetrics.get(routeName)!; metrics.push(duration); - + // 只保留最近10次记录 if (metrics.length > 10) { metrics.shift(); } - + this.routeStartTime = 0; } } @@ -184,10 +192,10 @@ export class ApiPerformanceMonitor { if (!this.apiMetrics.has(url)) { this.apiMetrics.set(url, []); } - + const metrics = this.apiMetrics.get(url)!; metrics.push(duration); - + // 只保留最近20次记录 if (metrics.length > 20) { metrics.shift(); @@ -205,16 +213,16 @@ export class ApiPerformanceMonitor { return { avg, min, max, count: metrics.length }; } - getSlowApis(threshold: number = 1000) { + getSlowApis(threshold = 1000) { const slowApis: Array<{ url: string; avgTime: number }> = []; - + this.apiMetrics.forEach((metrics, url) => { const avg = metrics.reduce((sum, time) => sum + time, 0) / metrics.length; if (avg > threshold) { slowApis.push({ url, avgTime: avg }); } }); - + return slowApis.sort((a, b) => b.avgTime - a.avgTime); } } @@ -256,7 +264,9 @@ export function checkPerformanceWarnings() { } if (metrics.memory && metrics.memory.used > metrics.memory.limit * 0.8) { - warnings.push(`内存使用过高: ${metrics.memory.used}MB / ${metrics.memory.limit}MB`); + warnings.push( + `内存使用过高: ${metrics.memory.used}MB / ${metrics.memory.limit}MB` + ); } return warnings; diff --git a/src/utils/port-config-manager.ts b/src/utils/port-config-manager.ts index d9997c9..7778500 100644 --- a/src/utils/port-config-manager.ts +++ b/src/utils/port-config-manager.ts @@ -55,9 +55,12 @@ export class PortConfigManager { */ private detectEnvironment(): Environment { // 在 Vite 配置阶段,import.meta.env 可能不可用,使用 process.env - const nodeEnv = (typeof process !== 'undefined' ? process.env.NODE_ENV : undefined) || - (typeof import.meta !== 'undefined' && import.meta.env ? import.meta.env.NODE_ENV : undefined) || - 'development'; + const nodeEnv = + (typeof process !== 'undefined' ? process.env.NODE_ENV : undefined) || + (typeof import.meta !== 'undefined' && import.meta.env + ? import.meta.env.NODE_ENV + : undefined) || + 'development'; switch (nodeEnv.toLowerCase()) { case 'production': @@ -98,7 +101,9 @@ export class PortConfigManager { // 租户配置 tenantPortOffset: parseInt(getEnv('VITE_TENANT_PORT_OFFSET') || '10'), - environmentPortOffset: parseInt(getEnv('VITE_ENVIRONMENT_PORT_OFFSET') || '1000'), + environmentPortOffset: parseInt( + getEnv('VITE_ENVIRONMENT_PORT_OFFSET') || '1000' + ), // 行为配置 autoDetect: getEnv('VITE_PORT_AUTO_DETECT') !== 'false', @@ -127,13 +132,18 @@ export class PortConfigManager { errors.push('端口范围无效:起始端口必须小于结束端口'); } - if (this.config.portRangeStart < 1024 && this.environment === 'production') { + if ( + this.config.portRangeStart < 1024 && + this.environment === 'production' + ) { warnings.push('生产环境使用系统端口(<1024)可能需要管理员权限'); } // 验证基础端口 - if (this.config.basePort < this.config.portRangeStart || - this.config.basePort > this.config.portRangeEnd) { + if ( + this.config.basePort < this.config.portRangeStart || + this.config.basePort > this.config.portRangeEnd + ) { errors.push('基础端口不在允许的端口范围内'); } @@ -277,7 +287,9 @@ export class PortConfigManager { /** * 更新配置 */ - updateConfig(updates: Partial): ConfigValidationResult { + updateConfig( + updates: Partial + ): ConfigValidationResult { this.config = { ...this.config, ...updates }; return this.validateConfiguration(); } diff --git a/src/utils/request.ts b/src/utils/request.ts index bca94d7..f361d91 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -11,7 +11,7 @@ import { getToken, setToken } from './token-util'; import { logout } from './page-tab-util'; import type { ApiResult } from '@/api'; import { getHostname, getTenantId } from '@/utils/domain'; -import { getMerchantId } from "@/utils/merchant"; +import { getMerchantId } from '@/utils/merchant'; // 获取API基础地址的函数 const getBaseUrl = (): string => { diff --git a/src/utils/shop.ts b/src/utils/shop.ts index 6fc7aa4..3d06db9 100644 --- a/src/utils/shop.ts +++ b/src/utils/shop.ts @@ -3,32 +3,32 @@ export function getPayType(index?: number): any { const payType = [ { value: 0, - label: '余额支付', + label: '余额支付' }, { value: 1, - label: '微信支付', + label: '微信支付' }, { value: 2, - label: '积分', + label: '积分' }, { value: 3, - label: '支付宝', + label: '支付宝' }, { value: 4, - label: '现金', + label: '现金' }, { value: 5, - label: 'POS机', + label: 'POS机' }, { value: 6, - label: '会员卡', - }, + label: '会员卡' + } // { // value: 7, // label: 'VIP年卡', @@ -83,7 +83,7 @@ export function getPayType(index?: number): any { // label: 'IC季卡', // }, ]; - if(index){ + if (index) { return payType[index].label || ''; } return payType; diff --git a/src/utils/type-guards.ts b/src/utils/type-guards.ts index 9e98806..f7e86e1 100644 --- a/src/utils/type-guards.ts +++ b/src/utils/type-guards.ts @@ -52,7 +52,9 @@ export function safeString(value: unknown, defaultValue = ''): string { /** * 检查 API 响应是否有效 */ -export function isValidApiResponse(response: unknown): response is { count: number; list?: T[] } { +export function isValidApiResponse( + response: unknown +): response is { count: number; list?: T[] } { return ( typeof response === 'object' && response !== null && @@ -70,10 +72,7 @@ export function isValidStatistics(data: unknown): data is { orderCount?: number; totalSales?: number; } { - return ( - typeof data === 'object' && - data !== null - ); + return typeof data === 'object' && data !== null; } /** @@ -84,13 +83,13 @@ export function safeMerge>( source: Partial ): T { const result = { ...target }; - + for (const [key, value] of Object.entries(source)) { if (value !== undefined) { result[key as keyof T] = value; } } - + return result; } diff --git a/src/views/bsyx/bsyxClass/components/bszxClassEdit.vue b/src/views/bsyx/bsyxClass/components/bszxClassEdit.vue index f82ef60..2925a05 100644 --- a/src/views/bsyx/bsyxClass/components/bszxClassEdit.vue +++ b/src/views/bsyx/bsyxClass/components/bszxClassEdit.vue @@ -27,7 +27,7 @@ style="width: 200px" :options="options" @change="handleChange" - > + /> { getBszxGradeList(); - } + }; const getBszxGradeList = () => { - listBszxGrade({branch: form.branch}).then((list) => { - options.value = list.map(d => { + listBszxGrade({ branch: form.branch }).then((list) => { + options.value = list.map((d) => { d.value = d.name; d.label = d.name; return d; }); - }) - } + }); + }; const { resetFields } = useForm(form, rules); /* 保存编辑 */ @@ -182,7 +182,7 @@ () => props.visible, (visible) => { if (visible) { - getBszxGradeList() + getBszxGradeList(); images.value = []; if (props.data) { assignObject(form, props.data); diff --git a/src/views/bsyx/bsyxClass/components/search.vue b/src/views/bsyx/bsyxClass/components/search.vue index 7f935dc..ae37b56 100644 --- a/src/views/bsyx/bsyxClass/components/search.vue +++ b/src/views/bsyx/bsyxClass/components/search.vue @@ -3,7 +3,7 @@ 添加 @@ -14,7 +14,7 @@ placeholder="选择年级" :options="gradeList" @change="onGrade" - > + /> diff --git a/src/views/bsyx/bsyxClass/index.vue b/src/views/bsyx/bsyxClass/index.vue index 7d558de..835db7a 100644 --- a/src/views/bsyx/bsyxClass/index.vue +++ b/src/views/bsyx/bsyxClass/index.vue @@ -1,18 +1,8 @@ @@ -109,325 +110,339 @@ - + diff --git a/src/views/shop/shopDealerPoster/index.vue b/src/views/shop/shopDealerPoster/index.vue index cc5ba8b..637eb3c 100644 --- a/src/views/shop/shopDealerPoster/index.vue +++ b/src/views/shop/shopDealerPoster/index.vue @@ -37,7 +37,10 @@ v-if="posterConfig.showAvatar" @mousedown="startDrag($event, 'avatar')" > - 头像 + 头像
拖拽
@@ -59,7 +62,10 @@ v-if="posterConfig.showQrcode" @mousedown="startDrag($event, 'qrcode')" > - 二维码 + 二维码
拖拽
@@ -89,7 +95,10 @@

背景图片:

- 背景预览 + 背景预览
- - 选择背景图片 - + 选择背景图片
- 图片尺寸:宽750像素 高1200
+ 图片尺寸:宽750像素 高1200
请务必按尺寸上传,否则生成的海报会变形
@@ -122,7 +129,10 @@
头像样式: - + 圆形 方形 @@ -166,7 +176,12 @@ @@ -190,7 +205,8 @@ // 海报配置 const posterConfig = reactive({ - backgroundImage: 'https://pro2.yiovo.com/assets/store/img/dealer/backdrop.png', + backgroundImage: + 'https://pro2.yiovo.com/assets/store/img/dealer/backdrop.png', showAvatar: true, avatarUrl: 'https://pro2.yiovo.com/assets/store/img/dealer/avatar.png', avatarWidth: 50, @@ -211,9 +227,12 @@ }); // 默认资源 - 使用在线图片作为占位符 - const defaultBackground = 'https://via.placeholder.com/750x1200/ff6b35/ffffff?text=分享赚钱'; - const defaultAvatar = 'https://via.placeholder.com/100x100/4CAF50/ffffff?text=头像'; - const defaultQrcode = 'https://via.placeholder.com/100x100/2196F3/ffffff?text=二维码'; + const defaultBackground = + 'https://via.placeholder.com/750x1200/ff6b35/ffffff?text=分享赚钱'; + const defaultAvatar = + 'https://via.placeholder.com/100x100/4CAF50/ffffff?text=头像'; + const defaultQrcode = + 'https://via.placeholder.com/100x100/2196F3/ffffff?text=二维码'; // 状态 const saving = ref(false); @@ -236,7 +255,8 @@ name: '经典模板', preview: 'https://via.placeholder.com/120x180/ff6b35/ffffff?text=经典', config: { - backgroundImage: 'https://via.placeholder.com/750x1200/ff6b35/ffffff?text=分享赚钱', + backgroundImage: + 'https://via.placeholder.com/750x1200/ff6b35/ffffff?text=分享赚钱', elements: { avatar: { x: 50, y: 50 }, nickname: { x: 120, y: 65 }, @@ -253,7 +273,8 @@ name: '简约模板', preview: 'https://via.placeholder.com/120x180/2196F3/ffffff?text=简约', config: { - backgroundImage: 'https://via.placeholder.com/750x1200/2196F3/ffffff?text=简约风格', + backgroundImage: + 'https://via.placeholder.com/750x1200/2196F3/ffffff?text=简约风格', elements: { avatar: { x: 325, y: 100 }, nickname: { x: 300, y: 200 }, @@ -270,7 +291,8 @@ name: '活力模板', preview: 'https://via.placeholder.com/120x180/4CAF50/ffffff?text=活力', config: { - backgroundImage: 'https://via.placeholder.com/750x1200/4CAF50/ffffff?text=活力四射', + backgroundImage: + 'https://via.placeholder.com/750x1200/4CAF50/ffffff?text=活力四射', elements: { avatar: { x: 100, y: 300 }, nickname: { x: 200, y: 320 }, @@ -377,8 +399,14 @@ // 计算新位置,考虑缩放比例 const scale = 0.4; // 预览区域的缩放比例 - const newX = Math.max(0, Math.min(750 - 100, elementStart.value.x + deltaX / scale)); - const newY = Math.max(0, Math.min(1200 - 100, elementStart.value.y + deltaY / scale)); + const newX = Math.max( + 0, + Math.min(750 - 100, elementStart.value.x + deltaX / scale) + ); + const newY = Math.max( + 0, + Math.min(1200 - 100, elementStart.value.y + deltaY / scale) + ); posterConfig.elements[dragElement.value] = { x: Math.round(newX), @@ -491,261 +519,261 @@ diff --git a/src/views/shop/shopDealerReferee/components/RefereeTree.vue b/src/views/shop/shopDealerReferee/components/RefereeTree.vue index 32b808b..45a0f6c 100644 --- a/src/views/shop/shopDealerReferee/components/RefereeTree.vue +++ b/src/views/shop/shopDealerReferee/components/RefereeTree.vue @@ -19,187 +19,186 @@ \ No newline at end of file + .chart { + height: 100%; + width: 100%; + } + diff --git a/src/views/shop/shopDealerReferee/components/search.vue b/src/views/shop/shopDealerReferee/components/search.vue index b848c3e..b237175 100644 --- a/src/views/shop/shopDealerReferee/components/search.vue +++ b/src/views/shop/shopDealerReferee/components/search.vue @@ -36,16 +36,14 @@ 搜索 - - 重置 - + 重置 导出 @@ -79,105 +77,109 @@ diff --git a/src/views/shop/shopDealerReferee/components/shopDealerRefereeEdit.vue b/src/views/shop/shopDealerReferee/components/shopDealerRefereeEdit.vue index f95b6bc..0fe37c5 100644 --- a/src/views/shop/shopDealerReferee/components/shopDealerRefereeEdit.vue +++ b/src/views/shop/shopDealerReferee/components/shopDealerRefereeEdit.vue @@ -41,7 +41,10 @@ import { ref, reactive, watch } from 'vue'; import { Form, message } from 'ant-design-vue'; import { assignObject } from 'ele-admin-pro'; - import { addShopDealerReferee, updateShopDealerReferee } from '@/api/shop/shopDealerReferee'; + import { + addShopDealerReferee, + updateShopDealerReferee + } from '@/api/shop/shopDealerReferee'; import { ShopDealerReferee } from '@/api/shop/shopDealerReferee/model'; import { useThemeStore } from '@/store/modules/theme'; import { storeToRefs } from 'pinia'; @@ -117,7 +120,9 @@ const formData = { ...form }; - const saveOrUpdate = isUpdate.value ? updateShopDealerReferee : addShopDealerReferee; + const saveOrUpdate = isUpdate.value + ? updateShopDealerReferee + : addShopDealerReferee; saveOrUpdate(formData) .then((msg) => { loading.value = false; diff --git a/src/views/shop/shopDealerReferee/index.vue b/src/views/shop/shopDealerReferee/index.vue index 6e8a2b4..4f72029 100644 --- a/src/views/shop/shopDealerReferee/index.vue +++ b/src/views/shop/shopDealerReferee/index.vue @@ -1,98 +1,103 @@ diff --git a/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue b/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue index f8f0076..8721290 100644 --- a/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue +++ b/src/views/shop/shopDealerWithdraw/components/shopDealerWithdrawEdit.vue @@ -19,7 +19,7 @@ > - 基本信息 + 基本信息 @@ -31,7 +31,7 @@ - 收款信息 + 收款信息 @@ -114,14 +114,17 @@ - 审核信息 + 审核信息 - +
待审核 @@ -152,7 +155,11 @@ - + - + diff --git a/src/views/shop/shopDealerWithdraw/index.vue b/src/views/shop/shopDealerWithdraw/index.vue index 9a5a349..2999e31 100644 --- a/src/views/shop/shopDealerWithdraw/index.vue +++ b/src/views/shop/shopDealerWithdraw/index.vue @@ -21,8 +21,12 @@ \ No newline at end of file + diff --git a/src/views/shop/shopOrder/components/expressSettingModal.vue b/src/views/shop/shopOrder/components/expressSettingModal.vue index 007c1ca..c4a488b 100644 --- a/src/views/shop/shopOrder/components/expressSettingModal.vue +++ b/src/views/shop/shopOrder/components/expressSettingModal.vue @@ -11,18 +11,14 @@ >
- - - - - - - - - - - - - + + + + + + + + + + + +
@@ -203,7 +203,7 @@ const id = params.id; if (id) { getCompanyAll(Number(id)).then((data) => { - console.log(data,'getCompany') + console.log(data, 'getCompany'); assignFields({ ...data }); diff --git a/src/views/system/plug/index.vue b/src/views/system/plug/index.vue index f202e07..02487a6 100644 --- a/src/views/system/plug/index.vue +++ b/src/views/system/plug/index.vue @@ -9,8 +9,8 @@ diff --git a/src/views/system/setting/components/wx-work.vue b/src/views/system/setting/components/wx-work.vue index b905607..9be2d8e 100644 --- a/src/views/system/setting/components/wx-work.vue +++ b/src/views/system/setting/components/wx-work.vue @@ -82,7 +82,11 @@ style="width: calc(100% - 50px)" /> - + diff --git a/src/views/system/setting/index.vue b/src/views/system/setting/index.vue index a5201bd..bd14541 100644 --- a/src/views/system/setting/index.vue +++ b/src/views/system/setting/index.vue @@ -6,34 +6,34 @@ > - + - + - + - + - + - + - + - + - + - + @@ -41,44 +41,44 @@ diff --git a/src/views/system/user/components/Extra.vue b/src/views/system/user/components/Extra.vue index 77aec38..6369772 100644 --- a/src/views/system/user/components/Extra.vue +++ b/src/views/system/user/components/Extra.vue @@ -1,55 +1,54 @@ diff --git a/src/views/system/user/components/role-select.vue b/src/views/system/user/components/role-select.vue index 60fc5ad..04534b9 100644 --- a/src/views/system/user/components/role-select.vue +++ b/src/views/system/user/components/role-select.vue @@ -19,53 +19,53 @@ diff --git a/src/views/system/user/components/user-edit.vue b/src/views/system/user/components/user-edit.vue index bf34412..60c2001 100644 --- a/src/views/system/user/components/user-edit.vue +++ b/src/views/system/user/components/user-edit.vue @@ -154,7 +154,7 @@ // import { getDictionaryOptions } from '@/utils/common'; import { Organization } from '@/api/system/organization/model'; import { Grade } from '@/api/user/grade/model'; - import {TEMPLATE_ID} from "@/config/setting"; + import { TEMPLATE_ID } from '@/config/setting'; // 是否开启响应式布局 const themeStore = useThemeStore(); diff --git a/src/views/system/user/components/user-info.vue b/src/views/system/user/components/user-info.vue index a737d2f..9f70344 100644 --- a/src/views/system/user/components/user-info.vue +++ b/src/views/system/user/components/user-info.vue @@ -49,7 +49,9 @@ v-bind="styleResponsive ? { md: 12, sm: 24, xs: 24 } : { span: 12 }" > - ¥{{ formatNumber(user.balance) }} + ¥{{ formatNumber(user.balance) }} {{ user.points }} diff --git a/src/views/system/user/components/userEdit.vue b/src/views/system/user/components/userEdit.vue index 3a59597..eecc1cf 100644 --- a/src/views/system/user/components/userEdit.vue +++ b/src/views/system/user/components/userEdit.vue @@ -97,11 +97,7 @@ /> - + @@ -20,7 +20,7 @@ 新建 @@ -31,7 +31,7 @@ :disabled="selection.length === 0" > 修改 @@ -40,9 +40,8 @@ danger @click="resetPsw(selection[0])" :disabled="selection.length === 0" - >重置密码 - + >重置密码 + 批量删除 @@ -97,9 +96,9 @@ @@ -61,7 +65,11 @@ } from 'ele-admin-pro/es/ele-pro-table/types'; import Search from './components/search.vue'; import UserOauthEdit from './components/userOauthEdit.vue'; - import { pageUserOauth, removeUserOauth, removeBatchUserOauth } from '@/api/system/userOauth'; + import { + pageUserOauth, + removeUserOauth, + removeBatchUserOauth + } from '@/api/system/userOauth'; import type { UserOauth, UserOauthParam } from '@/api/system/userOauth/model'; // 表格实例 @@ -104,25 +112,25 @@ title: '用户ID', dataIndex: 'userId', key: 'userId', - align: 'center', + align: 'center' }, { title: '渠道', dataIndex: 'oauthType', key: 'oauthType', - align: 'center', + align: 'center' }, { title: 'oauthId', dataIndex: 'oauthId', key: 'oauthId', - align: 'center', + align: 'center' }, { title: 'unionid', dataIndex: 'unionid', key: 'unionid', - align: 'center', + align: 'center' }, { title: '操作', diff --git a/src/views/system/userVerify/components/search.vue b/src/views/system/userVerify/components/search.vue index eb24f22..81a820e 100644 --- a/src/views/system/userVerify/components/search.vue +++ b/src/views/system/userVerify/components/search.vue @@ -1,12 +1,12 @@