调整两个平台相互跳转逻辑
This commit is contained in:
parent
c54c891301
commit
4ca3b2960e
@ -1,3 +1,7 @@
|
|||||||
# 开发环境接口地址
|
# 开发环境接口地址
|
||||||
# VITE_API_URL=https://vue.ruoyi.vip/prod-api
|
# VITE_API_URL=https://vue.ruoyi.vip/prod-api
|
||||||
VITE_API_URL=http://localhost:9090
|
VITE_API_URL=http://localhost:9090
|
||||||
|
# VITE_API_URL=http://dev.bar.beerape.com/prod-api
|
||||||
|
|
||||||
|
VITE_API_STORE_URL=http://localhost:8080
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
# 生产环境接口地址
|
# 生产环境接口地址
|
||||||
VITE_API_URL=https://vue.ruoyi.vip/prod-api
|
VITE_API_URL=http://bar.beerape.com/prod-api
|
||||||
|
VITE_API_STORE_URL=http://store.beerape.com
|
||||||
|
|
||||||
|
# VITE_API_URL=http://dev.store.beerape.com/dev-api
|
||||||
|
|
||||||
FAST_POSTER_TOKEN_NAME=http://localhost:8080/fastposter
|
|
||||||
|
|||||||
@ -47,19 +47,7 @@ export async function getUserMenu() {
|
|||||||
// component: 'index',
|
// component: 'index',
|
||||||
// meta: { title: '首页', icon: 'IconProHomeOutlined' }
|
// meta: { title: '首页', icon: 'IconProHomeOutlined' }
|
||||||
// });
|
// });
|
||||||
// 增加个人中心
|
temp.unshift({
|
||||||
temp.push({
|
|
||||||
path: '/profile',
|
|
||||||
component: 'profile',
|
|
||||||
meta: {
|
|
||||||
title: '个人中心',
|
|
||||||
icon: 'IconProUserOutlined',
|
|
||||||
active: '/index',
|
|
||||||
hide: true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
temp.push({
|
|
||||||
path: '/template',
|
path: '/template',
|
||||||
redirect: '/template',
|
redirect: '/template',
|
||||||
meta: { title: '模版管理', icon: 'IconProConnectionOutlined' },
|
meta: { title: '模版管理', icon: 'IconProConnectionOutlined' },
|
||||||
@ -71,6 +59,17 @@ export async function getUserMenu() {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
// 增加个人中心
|
||||||
|
temp.push({
|
||||||
|
path: '/profile',
|
||||||
|
component: 'profile',
|
||||||
|
meta: {
|
||||||
|
title: '个人中心',
|
||||||
|
icon: 'IconProUserOutlined',
|
||||||
|
active: '/index',
|
||||||
|
hide: true
|
||||||
|
}
|
||||||
|
});
|
||||||
// 修改图标
|
// 修改图标
|
||||||
return mapTree(temp, (item) => {
|
return mapTree(temp, (item) => {
|
||||||
const meta =
|
const meta =
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
/** 接口地址 */
|
/** 接口地址 */
|
||||||
export const API_BASE_URL = import.meta.env.VITE_API_URL;
|
export const API_BASE_URL = import.meta.env.VITE_API_URL;
|
||||||
|
|
||||||
|
export const VITE_API_STORE_URL = import.meta.env.VITE_API_STORE_URL;
|
||||||
|
|
||||||
/** 项目名称 */
|
/** 项目名称 */
|
||||||
export const PROJECT_NAME = import.meta.env.VITE_APP_NAME;
|
export const PROJECT_NAME = import.meta.env.VITE_APP_NAME;
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
style="margin-top: 16px; overflow: hidden; cursor: pointer"
|
style="margin-top: 16px; overflow: hidden; cursor: pointer"
|
||||||
>
|
>
|
||||||
<el-image
|
<el-image
|
||||||
:src="`http://localhost:5001/${item.preview}`"
|
:src="`${fastUrl}/${item.preview}`"
|
||||||
class="template-image"
|
class="template-image"
|
||||||
fit="contain"
|
fit="contain"
|
||||||
alt="模板预览图"
|
alt="模板预览图"
|
||||||
@ -73,6 +73,7 @@
|
|||||||
import { Delete, DocumentCopy, Edit } from '@element-plus/icons-vue';
|
import { Delete, DocumentCopy, Edit } from '@element-plus/icons-vue';
|
||||||
import { EleMessage } from 'ele-admin-plus';
|
import { EleMessage } from 'ele-admin-plus';
|
||||||
import { getFastToken } from '@/utils/token-util.js';
|
import { getFastToken } from '@/utils/token-util.js';
|
||||||
|
import { VITE_API_STORE_URL } from '@/config/setting';
|
||||||
|
|
||||||
defineOptions({ name: 'ListCardProject' });
|
defineOptions({ name: 'ListCardProject' });
|
||||||
interface Item {
|
interface Item {
|
||||||
@ -97,14 +98,15 @@
|
|||||||
const token = getFastToken();
|
const token = getFastToken();
|
||||||
const screenWidth = screen.availWidth;
|
const screenWidth = screen.availWidth;
|
||||||
const screenHeight = screen.availHeight;
|
const screenHeight = screen.availHeight;
|
||||||
const fastUrl = 'http://localhost:8080/fastposter';
|
const fastUrl = VITE_API_STORE_URL;
|
||||||
|
|
||||||
/** 打开新建 */
|
/** 打开新建 */
|
||||||
const openEdit = () => {
|
const openEdit = () => {
|
||||||
console.log('打开新建:', fastUrl);
|
console.log('打开新建:', fastUrl);
|
||||||
// 构建编辑器URL
|
// 构建编辑器URL
|
||||||
const editorUrl = `${fastUrl}?token=${token}`;
|
const editorUrl = `${fastUrl}?token=${token}`;
|
||||||
// 在新窗口中打开编辑器(自动全屏)
|
// 在当前窗口中打开编辑器
|
||||||
window.open(editorUrl, '_blank', `fullscreen=yes,width=${screenWidth},height=${screenHeight},top=0,left=0,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,status=no`);
|
window.location.href = editorUrl;
|
||||||
|
|
||||||
};
|
};
|
||||||
// 获取token
|
// 获取token
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user