修复重大故障: JwtAuthenticationFilter文件,远程读取用户接口导致的服务器请求数量跑满
This commit is contained in:
@@ -74,6 +74,10 @@ export interface CmsArticle {
|
||||
toUsers?: string;
|
||||
// 文章内容
|
||||
content?: string;
|
||||
// 是否翻译
|
||||
translation?: boolean;
|
||||
// 编辑器
|
||||
editor?: number;
|
||||
// 是否推荐
|
||||
recommend?: number;
|
||||
// 用户ID
|
||||
|
||||
@@ -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';
|
||||
import {COMMON_API_URL, SERVER_API_URL} from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询网站域名记录表
|
||||
@@ -138,7 +138,7 @@ export async function resolvable(id: number) {
|
||||
export async function getTenantIdByDomain(params: CmsDomainParam) {
|
||||
const config = useRuntimeConfig();
|
||||
const res = await request.get<ApiResult<PageResult<CmsDomain>>>(
|
||||
config.public.apiServer + '/cms/cms-domain/page',
|
||||
COMMON_API_URL + '/cms/cms-domain/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ export interface CmsWebsite {
|
||||
// 应用价格
|
||||
price?: string,
|
||||
// 交付方式
|
||||
deliveryMethod: number,
|
||||
deliveryMethod?: number,
|
||||
// 计费方式
|
||||
chargingMethod: number,
|
||||
chargingMethod?: number,
|
||||
// 服务到期时间
|
||||
expirationTime?: string;
|
||||
// 模版ID
|
||||
@@ -59,6 +59,8 @@ export interface CmsWebsite {
|
||||
industryChild?: string;
|
||||
// 企业ID
|
||||
companyId?: number;
|
||||
// 开发者
|
||||
developer?: string;
|
||||
// 所在国家
|
||||
country?: string;
|
||||
// 所在省份
|
||||
@@ -91,6 +93,12 @@ export interface CmsWebsite {
|
||||
official?: boolean;
|
||||
// 是否显示在插件市场
|
||||
market?: boolean;
|
||||
// 是否插件
|
||||
plugin?: boolean;
|
||||
// 是否允许被搜索(案例展示)
|
||||
search?: boolean;
|
||||
// 主题色
|
||||
color?: string;
|
||||
// 运行状态
|
||||
running?: number;
|
||||
// 状态 0未开通 1运行中 2维护中 3已关闭 4已欠费停机 5违规关停
|
||||
@@ -131,6 +139,8 @@ export interface CmsWebsiteParam extends PageParam {
|
||||
recommend?: number;
|
||||
official?: boolean;
|
||||
market?: boolean;
|
||||
plugin?: boolean;
|
||||
search?: boolean;
|
||||
websiteType?: string;
|
||||
userId?: number;
|
||||
keywords?: string;
|
||||
|
||||
105
api/cms/cmsWebsiteSetting/index.ts
Normal file
105
api/cms/cmsWebsiteSetting/index.ts
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsWebsiteSetting, CmsWebsiteSettingParam } from './model';
|
||||
|
||||
/**
|
||||
* 分页查询网站设置
|
||||
*/
|
||||
export async function pageCmsWebsiteSetting(params: CmsWebsiteSettingParam) {
|
||||
const res = await request.get<ApiResult<PageResult<CmsWebsiteSetting>>>(
|
||||
'/cms/cms-website-setting/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询网站设置列表
|
||||
*/
|
||||
export async function listCmsWebsiteSetting(params?: CmsWebsiteSettingParam) {
|
||||
const res = await request.get<ApiResult<CmsWebsiteSetting[]>>(
|
||||
'/cms/cms-website-setting',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加网站设置
|
||||
*/
|
||||
export async function addCmsWebsiteSetting(data: CmsWebsiteSetting) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
'/cms/cms-website-setting',
|
||||
data
|
||||
);
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改网站设置
|
||||
*/
|
||||
export async function updateCmsWebsiteSetting(data: CmsWebsiteSetting) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
'/cms/cms-website-setting',
|
||||
data
|
||||
);
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除网站设置
|
||||
*/
|
||||
export async function removeCmsWebsiteSetting(id?: number) {
|
||||
const res = await request.del<ApiResult<unknown>>(
|
||||
'/cms/cms-website-setting/' + id
|
||||
);
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除网站设置
|
||||
*/
|
||||
export async function removeBatchCmsWebsiteSetting(data: (number | undefined)[]) {
|
||||
const res = await request.del<ApiResult<unknown>>(
|
||||
'/cms/cms-website-setting/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询网站设置
|
||||
*/
|
||||
export async function getCmsWebsiteSetting(id: number) {
|
||||
const res = await request.get<ApiResult<CmsWebsiteSetting>>(
|
||||
'/cms/cms-website-setting/' + id
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
51
api/cms/cmsWebsiteSetting/model/index.ts
Normal file
51
api/cms/cmsWebsiteSetting/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 网站设置
|
||||
*/
|
||||
export interface CmsWebsiteSetting {
|
||||
// 自增ID
|
||||
id?: number;
|
||||
// 关联网站ID
|
||||
websiteId?: number;
|
||||
// 是否官方插件
|
||||
official?: string;
|
||||
// 是否展示在插件市场
|
||||
market?: string;
|
||||
// 是否允许被搜索
|
||||
search?: string;
|
||||
// 是否共享
|
||||
share?: string;
|
||||
// 是否插件 0应用1 插件
|
||||
plugin?: string;
|
||||
// 编辑器类型 1 md-editor-v3, 2 tinymce-editor
|
||||
editor?: number;
|
||||
// 显示站内搜索
|
||||
searchBtn?: string;
|
||||
// 显示登录注册功能
|
||||
loginBtn?: string;
|
||||
// 显示悬浮客服工具
|
||||
floatTool?: boolean;
|
||||
// 显示版权链接
|
||||
copyrightLink?: string;
|
||||
// 导航栏最多显示数量
|
||||
maxMenuNum?: string;
|
||||
// 排序号
|
||||
sortNumber?: number;
|
||||
// 是否删除, 0否, 1是
|
||||
deleted?: number;
|
||||
// 租户id
|
||||
tenantId?: number;
|
||||
// 创建时间
|
||||
createTime?: string;
|
||||
// 修改时间
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网站设置搜索条件
|
||||
*/
|
||||
export interface CmsWebsiteSettingParam extends PageParam {
|
||||
id?: number;
|
||||
keywords?: string;
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import type { ApiResult } from '@/api';
|
||||
import type { User } from '@/api/system/user/model';
|
||||
import type { UpdatePasswordParam } from './model';
|
||||
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
||||
import {COMMON_API_URL} from "~/config";
|
||||
import {COMMON_API_URL, SERVER_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 获取网站信息
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
CaptchaResult,
|
||||
SmsCaptchaResult
|
||||
} from './model';
|
||||
import { SERVER_API_URL } from '~/config';
|
||||
import {SERVER_API_URL} from '~/config';
|
||||
import type {UserParam} from "~/api/system/user/model";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopMerchant, ShopMerchantParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
import {COMMON_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 分页查询商户
|
||||
*/
|
||||
export async function pageShopMerchant(params: ShopMerchantParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopMerchant>>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant/page',
|
||||
'/shop/shop-merchant/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
if (res.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,15 +24,15 @@ export async function pageShopMerchant(params: ShopMerchantParam) {
|
||||
*/
|
||||
export async function listShopMerchant(params?: ShopMerchantParam) {
|
||||
const res = await request.get<ApiResult<ShopMerchant[]>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant',
|
||||
'/shop/shop-merchant',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,13 +40,13 @@ export async function listShopMerchant(params?: ShopMerchantParam) {
|
||||
*/
|
||||
export async function addShopMerchant(data: ShopMerchant) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant',
|
||||
'/shop/shop-merchant',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,42 +54,42 @@ export async function addShopMerchant(data: ShopMerchant) {
|
||||
*/
|
||||
export async function updateShopMerchant(data: ShopMerchant) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant',
|
||||
'/shop/shop-merchant',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商户
|
||||
*/
|
||||
export async function removeShopMerchant(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant/' + id
|
||||
const res = await request.del<ApiResult<unknown>>(
|
||||
'/shop/shop-merchant/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商户
|
||||
*/
|
||||
export async function removeBatchShopMerchant(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant/batch',
|
||||
const res = await request.del<ApiResult<unknown>>(
|
||||
'/shop/shop-merchant/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,10 +97,37 @@ export async function removeBatchShopMerchant(data: (number | undefined)[]) {
|
||||
*/
|
||||
export async function getShopMerchant(id: number) {
|
||||
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant/' + id
|
||||
'/shop/shop-merchant/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据userId查询商户
|
||||
*/
|
||||
export async function getShopMerchantByUserId(id: number) {
|
||||
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||
'/shop/shop-merchant/' + id
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据phone查询商户
|
||||
*/
|
||||
export async function getShopMerchantByPhone() {
|
||||
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||
COMMON_API_URL + '/shop/shop-merchant/getByPhone'
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopMerchantApply, ShopMerchantApplyParam } from './model';
|
||||
import { MODULES_API_URL } from '@/config';
|
||||
import {COMMON_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 分页查询商户入驻申请
|
||||
*/
|
||||
export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
|
||||
const res = await request.get<ApiResult<PageResult<ShopMerchantApply>>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-apply/page',
|
||||
'/shop/shop-merchant-apply/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.data;
|
||||
if (res.code === 0) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,15 +24,15 @@ export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
|
||||
*/
|
||||
export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
|
||||
const res = await request.get<ApiResult<ShopMerchantApply[]>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-apply',
|
||||
'/shop/shop-merchant-apply',
|
||||
{
|
||||
params
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,13 +40,13 @@ export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
|
||||
*/
|
||||
export async function addShopMerchantApply(data: ShopMerchantApply) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-apply',
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,42 +54,42 @@ export async function addShopMerchantApply(data: ShopMerchantApply) {
|
||||
*/
|
||||
export async function updateShopMerchantApply(data: ShopMerchantApply) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-apply',
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply',
|
||||
data
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商户入驻申请
|
||||
*/
|
||||
export async function removeShopMerchantApply(id?: number) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-apply/' + id
|
||||
const res = await request.del<ApiResult<unknown>>(
|
||||
'/shop/shop-merchant-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商户入驻申请
|
||||
*/
|
||||
export async function removeBatchShopMerchantApply(data: (number | undefined)[]) {
|
||||
const res = await request.delete<ApiResult<unknown>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-apply/batch',
|
||||
const res = await request.del<ApiResult<unknown>>(
|
||||
'/shop/shop-merchant-apply/batch',
|
||||
{
|
||||
data
|
||||
}
|
||||
);
|
||||
if (res.data.code === 0) {
|
||||
return res.data.message;
|
||||
if (res.code === 0) {
|
||||
return res.message;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,10 +97,36 @@ export async function removeBatchShopMerchantApply(data: (number | undefined)[])
|
||||
*/
|
||||
export async function getShopMerchantApply(id: number) {
|
||||
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||
MODULES_API_URL + '/shop/shop-merchant-apply/' + id
|
||||
'/shop/shop-merchant-apply/' + id
|
||||
);
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
return res.data.data;
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.data.message));
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据userId查询商户
|
||||
*/
|
||||
export async function getShopMerchantApplyByUserId() {
|
||||
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply/getByUserId'
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据phone查询商户入驻申请
|
||||
*/
|
||||
export async function getShopMerchantApplyByPhone() {
|
||||
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply/getByPhone'
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
}
|
||||
return Promise.reject(new Error(res.message));
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '~/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { DictData, DictDataParam } from './model';
|
||||
import { SERVER_API_URL } from '@/config';
|
||||
import {SERVER_API_URL} from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询字典数据
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PageParam } from '@/api';
|
||||
import type { PageParam } from '@/api';
|
||||
|
||||
/**
|
||||
* 字典数据
|
||||
|
||||
Reference in New Issue
Block a user