修复urldi之
This commit is contained in:
parent
f4dc23c0c3
commit
daed63fa6f
@ -1,6 +1,3 @@
|
||||
# 开发环境接口地址
|
||||
# VITE_API_URL=https://vue.ruoyi.vip/prod-api
|
||||
VITE_API_URL=http://localhost:9090
|
||||
|
||||
|
||||
FAST_POSTER_TOKEN_NAME=http://localhost:8080/fastposter
|
||||
|
||||
@ -1,2 +1,4 @@
|
||||
# 生产环境接口地址
|
||||
VITE_API_URL=https://vue.ruoyi.vip/prod-api
|
||||
|
||||
FAST_POSTER_TOKEN_NAME=http://localhost:8080/fastposter
|
||||
|
||||
@ -73,7 +73,6 @@
|
||||
import { Delete, DocumentCopy, Edit } from '@element-plus/icons-vue';
|
||||
import { EleMessage } from 'ele-admin-plus';
|
||||
import { getFastToken } from '@/utils/token-util.js';
|
||||
import { API_BASE_URL } from '@/config/setting';
|
||||
|
||||
defineOptions({ name: 'ListCardProject' });
|
||||
interface Item {
|
||||
@ -98,12 +97,12 @@
|
||||
const token = getFastToken();
|
||||
const screenWidth = screen.availWidth;
|
||||
const screenHeight = screen.availHeight;
|
||||
const fastUrl = 'http://localhost:8080/fastposter';
|
||||
/** 打开新建 */
|
||||
const openEdit = () => {
|
||||
|
||||
console.log('打开新建:', fastUrl);
|
||||
// 构建编辑器URL
|
||||
const editorUrl = `${API_BASE_URL}?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`);
|
||||
|
||||
@ -112,16 +111,13 @@
|
||||
/** 编辑模板 */
|
||||
const editTemplate = (item: Item) => {
|
||||
// 构建编辑器URL,使用模板的ID
|
||||
const editorUrl = `${API_BASE_URL}?token=${token}&posterId=${item.id}`;
|
||||
const editorUrl = `${fastUrl}?token=${token}&posterId=${item.id}`;
|
||||
window.open(editorUrl, '_blank', `fullscreen=yes,width=${screenWidth},height=${screenHeight},top=0,left=0,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,status=no`);
|
||||
|
||||
console.log('编辑模板:', item.name, editorUrl);
|
||||
};
|
||||
|
||||
/** 删除模板 */
|
||||
const removeTemplate = (item: Item) => {
|
||||
console.log('删除模板:', item.name);
|
||||
// TODO: 实现删除逻辑
|
||||
delPosterTemplate(item.id).then((res) => {
|
||||
EleMessage.success({ message: '删除成功', plain: true });
|
||||
query();
|
||||
@ -130,12 +126,10 @@
|
||||
|
||||
/** 复制模板 */
|
||||
const copyTemplate = (item: Item) => {
|
||||
console.log('复制模板:', item.name);
|
||||
copyPosterTemplate(item.id).then((res) => {
|
||||
EleMessage.success({ message: '复制成功', plain: true });
|
||||
query();
|
||||
})
|
||||
// TODO: 实现复制逻辑
|
||||
};
|
||||
|
||||
query();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user