Compare commits

...

1 Commits

Author SHA1 Message Date
Joe d400364246 up 1 year ago

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

@ -168,7 +168,7 @@ const Front: React.FC<{}> = () => {
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
const element = arr[i]; const element = arr[i];
console.log(element.url) 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) setFileList(arr)
setIsModalOpen(true); setIsModalOpen(true);

@ -61,7 +61,7 @@ request.interceptors.response.use(async (response, options) => {
return response return response
} }
const res = await response.clone().json(); 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(); const { redirect } = getPageQuery();
if (window.location.pathname !== '/user/login' && !redirect) { if (window.location.pathname !== '/user/login' && !redirect) {
localStorage.clear() localStorage.clear()

Loading…
Cancel
Save