package
Joe 1 year ago
parent 34f08fadcf
commit d400364246

@ -1,5 +1,5 @@
export default {
define: {
'process.env.API_SERVER': "http://localhost:8899", // 接口服务器地址
'process.env.API_SERVER': "http://47.92.229.12:8888", // 接口服务器地址
}
};

@ -21,27 +21,27 @@ export default defineConfig({
loading: '@/components/PageLoading/index',
},
define: {
'process.env.API_SERVER': 'http://localhost:8899',
'process.env.API_SERVER': 'http://47.92.229.12:8888',
},
targets: {
ie: 11,
},
// umi routes: https://umijs.org/docs/routing
routes: [
// {
// path: '/user',
// component: '../layouts/UserLayout',
// routes: [
// {
// name: 'login',
// path: '/user/login',
// component: './user/login',
// },
// ],
// },
{
path: '/user',
component: '../layouts/UserLayout',
routes: [
{
name: 'login',
path: '/user/login',
component: './user/login',
},
],
},
{
name: 'page',
path: '/',
path: '/front',
component: './Front',
},
{
@ -49,69 +49,69 @@ export default defineConfig({
path: '/home/detail/:id?',
component: './Front/detail',
},
// {
// path: '/',
// component: '../layouts/SecurityLayout',
// routes: [
// {
// path: '/',
// component: '../layouts/BasicLayout',
// authority: ['admin', 'user'],
// routes: [
// {
// path: '/',
// redirect: '/article/article-page',
// },
// {
// hideInMenu: true,
// name: 'list.caseUpdate',
// path: 'article/article-page/update/:id?',
// component: './Case/CasePage/update',
// },
// {
// name: 'list.case',
// icon: 'fileSearch',
// path: 'article',
// routes: [
// {
// name: 'casePage',
// path: 'article-page',
// component: './Case/CasePage',
// },
// {
// name: 'level',
// path: 'level',
// component: './Case/level',
// },
// {
// name: 'category',
// path: 'category',
// component: './Case/Category',
// },
// ],
// },
// {
// name: 'list.maintain',
// icon: 'idcard',
// path: 'maintain',
// routes: [
// {
// name: 'user',
// path: 'user',
// component: './MainTain/User',
// },
// ],
// },
// {
// component: './404',
// },
// ],
// },
// {
// component: './404',
// },
// ],
// },
{
path: '/',
component: '../layouts/SecurityLayout',
routes: [
{
path: '/',
component: '../layouts/BasicLayout',
authority: ['admin', 'user'],
routes: [
{
path: '/',
redirect: '/article/article-page',
},
{
hideInMenu: true,
name: 'list.caseUpdate',
path: 'article/article-page/update/:id?',
component: './Case/CasePage/update',
},
{
name: 'list.case',
icon: 'fileSearch',
path: 'article',
routes: [
{
name: 'casePage',
path: 'article-page',
component: './Case/CasePage',
},
{
name: 'level',
path: 'level',
component: './Case/level',
},
{
name: 'category',
path: 'category',
component: './Case/Category',
},
],
},
{
name: 'list.maintain',
icon: 'idcard',
path: 'maintain',
routes: [
{
name: 'user',
path: 'user',
component: './MainTain/User',
},
],
},
{
component: './404',
},
],
},
{
component: './404',
},
],
},
{
component: './404',
},

@ -168,7 +168,7 @@ const Front: React.FC<{}> = () => {
for (let i = 0; i < arr.length; i++) {
const element = arr[i];
console.log(element.url)
arr[i].url = element.url.replace("http://dj-law.oss-cn-shanghai.aliyuncs.com", "http://localhost:8899/upload")
arr[i].url = element.url.replace("http://dj-law.oss-cn-shanghai.aliyuncs.com", "http://47.92.229.12:8888/upload")
}
setFileList(arr)
setIsModalOpen(true);

@ -61,7 +61,7 @@ request.interceptors.response.use(async (response, options) => {
return response
}
const res = await response.clone().json();
if(res.retcode === 401 || (response.status === 500 && response.url === 'http://localhost:8899/user')) {
if(res.retcode === 401 || (response.status === 500 && response.url === 'http://47.92.229.12:8888/user')) {
const { redirect } = getPageQuery();
if (window.location.pathname !== '/user/login' && !redirect) {
localStorage.clear()

Loading…
Cancel
Save