调整两个平台相互跳转逻辑
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=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',
|
||||
// meta: { title: '首页', icon: 'IconProHomeOutlined' }
|
||||
// });
|
||||
// 增加个人中心
|
||||
temp.push({
|
||||
path: '/profile',
|
||||
component: 'profile',
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
icon: 'IconProUserOutlined',
|
||||
active: '/index',
|
||||
hide: true
|
||||
}
|
||||
});
|
||||
|
||||
temp.push({
|
||||
temp.unshift({
|
||||
path: '/template',
|
||||
redirect: '/template',
|
||||
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) => {
|
||||
const meta =
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
/** 接口地址 */
|
||||
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;
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
style="margin-top: 16px; overflow: hidden; cursor: pointer"
|
||||
>
|
||||
<el-image
|
||||
:src="`http://localhost:5001/${item.preview}`"
|
||||
:src="`${fastUrl}/${item.preview}`"
|
||||
class="template-image"
|
||||
fit="contain"
|
||||
alt="模板预览图"
|
||||
@ -73,6 +73,7 @@
|
||||
import { Delete, DocumentCopy, Edit } from '@element-plus/icons-vue';
|
||||
import { EleMessage } from 'ele-admin-plus';
|
||||
import { getFastToken } from '@/utils/token-util.js';
|
||||
import { VITE_API_STORE_URL } from '@/config/setting';
|
||||
|
||||
defineOptions({ name: 'ListCardProject' });
|
||||
interface Item {
|
||||
@ -97,14 +98,15 @@
|
||||
const token = getFastToken();
|
||||
const screenWidth = screen.availWidth;
|
||||
const screenHeight = screen.availHeight;
|
||||
const fastUrl = 'http://localhost:8080/fastposter';
|
||||
const fastUrl = VITE_API_STORE_URL;
|
||||
|
||||
/** 打开新建 */
|
||||
const openEdit = () => {
|
||||
console.log('打开新建:', fastUrl);
|
||||
// 构建编辑器URL
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user