修复重大故障: JwtAuthenticationFilter文件,远程读取用户接口导致的服务器请求数量跑满
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
API_BASE=http://127.0.0.1:9001/api
|
||||
#API_BASE=https://cms-api.websoft.top/api
|
||||
|
||||
#VITE_SERVER_URL=http://127.0.0.1:30000/api
|
||||
VITE_SERVER_URL=http://127.0.0.1:8000/api
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '~/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsDomain, CmsDomainParam } from './model';
|
||||
import {COMMON_API_URL, SERVER_API_URL} from '@/config';
|
||||
import {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>>>(
|
||||
COMMON_API_URL + '/cms/cms-domain/page',
|
||||
SERVER_API_URL + '/cms/cms-domain/page',
|
||||
{
|
||||
params
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import request from '~/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { CmsWebsite, CmsWebsiteParam } from './model';
|
||||
import {COMMON_API_URL} from "~/config";
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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, SERVER_API_URL} from "~/config";
|
||||
import {SERVER_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 获取网站信息
|
||||
@@ -26,7 +26,7 @@ export async function getSiteInfo(params: CmsWebsiteParam) {
|
||||
*/
|
||||
export async function getUserInfo(): Promise<User> {
|
||||
const config = useRuntimeConfig();
|
||||
const res = await request.get<ApiResult<User>>(COMMON_API_URL + '/auth/user',{
|
||||
const res = await request.get<ApiResult<User>>(SERVER_API_URL + '/auth/user',{
|
||||
headers: {
|
||||
TenantId: `${localStorage.getItem('ServerTenantId')}`
|
||||
}
|
||||
@@ -39,7 +39,7 @@ export async function getUserInfo(): Promise<User> {
|
||||
|
||||
export async function updateUser(data: User){
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
COMMON_API_URL + '/auth/user',
|
||||
SERVER_API_URL + '/auth/user',
|
||||
data
|
||||
);
|
||||
if (res.code === 0) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopMerchant, ShopMerchantParam } from './model';
|
||||
import {COMMON_API_URL} from "~/config";
|
||||
import {SERVER_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 分页查询商户
|
||||
@@ -124,7 +124,7 @@ export async function getShopMerchantByUserId(id: number) {
|
||||
*/
|
||||
export async function getShopMerchantByPhone() {
|
||||
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||
COMMON_API_URL + '/shop/shop-merchant/getByPhone'
|
||||
SERVER_API_URL + '/shop/shop-merchant/getByPhone'
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request';
|
||||
import type { ApiResult, PageResult } from '@/api';
|
||||
import type { ShopMerchantApply, ShopMerchantApplyParam } from './model';
|
||||
import {COMMON_API_URL} from "~/config";
|
||||
import {SERVER_API_URL} from "~/config";
|
||||
|
||||
/**
|
||||
* 分页查询商户入驻申请
|
||||
@@ -40,7 +40,7 @@ export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
|
||||
*/
|
||||
export async function addShopMerchantApply(data: ShopMerchantApply) {
|
||||
const res = await request.post<ApiResult<unknown>>(
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply',
|
||||
SERVER_API_URL + '/shop/shop-merchant-apply',
|
||||
data
|
||||
);
|
||||
if (res.code === 0) {
|
||||
@@ -54,7 +54,7 @@ export async function addShopMerchantApply(data: ShopMerchantApply) {
|
||||
*/
|
||||
export async function updateShopMerchantApply(data: ShopMerchantApply) {
|
||||
const res = await request.put<ApiResult<unknown>>(
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply',
|
||||
SERVER_API_URL + '/shop/shop-merchant-apply',
|
||||
data
|
||||
);
|
||||
if (res.code === 0) {
|
||||
@@ -110,7 +110,7 @@ export async function getShopMerchantApply(id: number) {
|
||||
*/
|
||||
export async function getShopMerchantApplyByUserId() {
|
||||
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply/getByUserId'
|
||||
SERVER_API_URL + '/shop/shop-merchant-apply/getByUserId'
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
@@ -123,7 +123,7 @@ export async function getShopMerchantApplyByUserId() {
|
||||
*/
|
||||
export async function getShopMerchantApplyByPhone() {
|
||||
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||
COMMON_API_URL + '/shop/shop-merchant-apply/getByPhone'
|
||||
SERVER_API_URL + '/shop/shop-merchant-apply/getByPhone'
|
||||
);
|
||||
if (res.code === 0 && res.data) {
|
||||
return res.data;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '~/utils/request';
|
||||
import type {ApiResult, PageResult} from '@/api';
|
||||
import type {User, UserParam} from './model';
|
||||
import {COMMON_API_URL, SERVER_API_URL} from '@/config';
|
||||
import {SERVER_API_URL} from '@/config';
|
||||
|
||||
/**
|
||||
* 分页查询用户
|
||||
|
||||
@@ -8,7 +8,7 @@ export const domain = 'https://websoft.top';
|
||||
export const SERVER_API_URL = import.meta.env.VITE_SERVER_URL || 'https://server.gxwebsoft.com/api';
|
||||
// 模块节点
|
||||
export const MODULES_API_URL = import.meta.env.VITE_API_URL || 'https://cms-api.websoft.top/api';
|
||||
export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://server.gxwebosoft.com/api';
|
||||
export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://server.gxwebsoft.com/api';
|
||||
// 文件服务器地址
|
||||
export const FILE_SERVER = 'https://file.wsdns.cn';
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<el-form-item label="插件图标" class="px-4" label-width="100" label-position="left">
|
||||
<el-upload
|
||||
v-model:file-list="avatar"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: '5'
|
||||
@@ -81,7 +81,7 @@
|
||||
<el-tab-pane label="插件截屏" name="files">
|
||||
<el-upload
|
||||
v-model:file-list="files"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: '5'
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<el-form-item :label="`附件上传`" prop="files" class=" p-2">
|
||||
<el-upload
|
||||
v-model:file-list="files"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: 5,
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<el-form-item label="身份证">
|
||||
<el-upload
|
||||
v-model:file-list="sfzFile"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: 5,
|
||||
@@ -144,7 +144,7 @@
|
||||
<el-form-item label="营业执照" required>
|
||||
<el-upload
|
||||
v-model:file-list="yyzzFile"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: 5,
|
||||
@@ -169,7 +169,7 @@
|
||||
<el-form-item label="门头照片">
|
||||
<el-upload
|
||||
v-model:file-list="image"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: 5,
|
||||
@@ -194,7 +194,7 @@
|
||||
<el-form-item label="其他证件">
|
||||
<el-upload
|
||||
v-model:file-list="files"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: 5,
|
||||
@@ -228,7 +228,7 @@
|
||||
<el-form-item label="身份证">
|
||||
<el-upload
|
||||
v-model:file-list="sfzFile"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: 5,
|
||||
|
||||
Reference in New Issue
Block a user