diff --git a/.env.development b/.env.development index a815dc4..df51d24 100644 --- a/.env.development +++ b/.env.development @@ -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 diff --git a/api/cms/cmsDomain/index.ts b/api/cms/cmsDomain/index.ts index 44a2d70..41987fa 100644 --- a/api/cms/cmsDomain/index.ts +++ b/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 {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>>( - COMMON_API_URL + '/cms/cms-domain/page', + SERVER_API_URL + '/cms/cms-domain/page', { params } diff --git a/api/cms/cmsWebsite/index.ts b/api/cms/cmsWebsite/index.ts index 146604d..4d74efa 100644 --- a/api/cms/cmsWebsite/index.ts +++ b/api/cms/cmsWebsite/index.ts @@ -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"; /** diff --git a/api/layout/index.ts b/api/layout/index.ts index aedf67e..7ed4627 100644 --- a/api/layout/index.ts +++ b/api/layout/index.ts @@ -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 { const config = useRuntimeConfig(); - const res = await request.get>(COMMON_API_URL + '/auth/user',{ + const res = await request.get>(SERVER_API_URL + '/auth/user',{ headers: { TenantId: `${localStorage.getItem('ServerTenantId')}` } @@ -39,7 +39,7 @@ export async function getUserInfo(): Promise { export async function updateUser(data: User){ const res = await request.put>( - COMMON_API_URL + '/auth/user', + SERVER_API_URL + '/auth/user', data ); if (res.code === 0) { diff --git a/api/shop/shopMerchant/index.ts b/api/shop/shopMerchant/index.ts index 07b2559..a389771 100644 --- a/api/shop/shopMerchant/index.ts +++ b/api/shop/shopMerchant/index.ts @@ -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>( - COMMON_API_URL + '/shop/shop-merchant/getByPhone' + SERVER_API_URL + '/shop/shop-merchant/getByPhone' ); if (res.code === 0 && res.data) { return res.data; diff --git a/api/shop/shopMerchantApply/index.ts b/api/shop/shopMerchantApply/index.ts index 3121a2b..4448083 100644 --- a/api/shop/shopMerchantApply/index.ts +++ b/api/shop/shopMerchantApply/index.ts @@ -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>( - 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>( - 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>( - 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>( - 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; diff --git a/api/system/user/index.ts b/api/system/user/index.ts index 34e668b..215137f 100644 --- a/api/system/user/index.ts +++ b/api/system/user/index.ts @@ -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'; /** * 分页查询用户 diff --git a/config/index.ts b/config/index.ts index 7f62581..5be141e 100644 --- a/config/index.ts +++ b/config/index.ts @@ -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'; diff --git a/pages/developer/[id].vue b/pages/developer/[id].vue index 59e276d..9899e51 100644 --- a/pages/developer/[id].vue +++ b/pages/developer/[id].vue @@ -58,7 +58,7 @@