From ec72d30ccad50609cd29f5524f8ac55d324287b9 Mon Sep 17 00:00:00 2001 From: liulong <18539103286> Date: Thu, 14 May 2026 16:42:27 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=BD=92=E6=A1=A3=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E7=8E=B0=E6=9C=89=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=87=86=E5=A4=87?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=88=86=E6=94=AF=E5=BC=80=E5=8F=91=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/pages/castlove/craft-select.vue | 3 ++ frontend/pages/castlove/create.vue | 45 ++++++++++++++++++++++-- frontend/utils/api.js | 4 +-- 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/frontend/pages/castlove/craft-select.vue b/frontend/pages/castlove/craft-select.vue index a89c658..dedad16 100644 --- a/frontend/pages/castlove/craft-select.vue +++ b/frontend/pages/castlove/craft-select.vue @@ -186,6 +186,9 @@ export default { url: `${route}?name=${encodeURIComponent(card.name)}` }) } + uni.navigateTo({ + url: `/pages/castlove/create?name=${encodeURIComponent(card.name)}` + }) } } } diff --git a/frontend/pages/castlove/create.vue b/frontend/pages/castlove/create.vue index ce7a32a..e04918d 100644 --- a/frontend/pages/castlove/create.vue +++ b/frontend/pages/castlove/create.vue @@ -751,12 +751,10 @@ const startCraftStudioPipeline = (studioKind) => { return; } } - if (!nftInfo.value.trim()) { uni.showToast({ title: '请输入藏品信息', icon: 'none' }); return; } - try { const formData = buildCraftFormData(); startCraftGenerationFlow({ formData, studioKind }); @@ -764,6 +762,49 @@ const startCraftStudioPipeline = (studioKind) => { console.error('[CreatePage] craft studio pipeline', e); uni.showToast({ title: '启动失败,请重试', icon: 'none' }); } + uni.navigateTo({ + url: '/pages/castlove/lenticular-studio', + }); +}; + +/** 单图工艺:进入镭射工坊(Laser-Card 配置页),保存后再上传并创建订单 */ +const handleSingleCraftLaserEntry = () => { + if (isLenticularCraft.value) { + uni.showToast({ title: '光栅卡请使用「生成」进入工作室', icon: 'none' }); + return; + } + if (!uploadedImage.value) { + uni.showToast({ title: '请上传藏品图片', icon: 'none' }); + return; + } + if (!uploadedImageBase64.value) { + uni.showToast({ title: '图片尚未处理完成', icon: 'none' }); + return; + } + if (!nftInfo.value.trim()) { + uni.showToast({ title: '请输入藏品信息', icon: 'none' }); + return; + } + try { + uni.setStorageSync( + CASTLOVE_LASER_ENTRY_KEY, + JSON.stringify({ + nftInfo: nftInfo.value, + materialTypes: [...materialTypes], + materialTypeIndex: materialTypeIndex.value, + pageName: pageName.value, + uploadedImage: uploadedImage.value, + uploadedImageBase64: uploadedImageBase64.value, + }) + ); + } catch (e) { + console.error('[CreatePage] laser entry payload', e); + uni.showToast({ title: '保存失败,请重试', icon: 'none' }); + return; + } + uni.navigateTo({ + url: '/pages/castlove/laser-card-studio', + }); }; const handleLenticularGenerate = () => { diff --git a/frontend/utils/api.js b/frontend/utils/api.js index da8ab9b..31c1b16 100644 --- a/frontend/utils/api.js +++ b/frontend/utils/api.js @@ -10,12 +10,12 @@ const baseURL = 'http://192.168.110.60:8080' // H5 开发用本机 // #ifdef APP-PLUS // 开发调试:手机和电脑同一WiFi时用这个(改成你电脑IP) // 上线后:改成实际服务器地址 -const baseURL = 'http://192.168.110.60:8080' +// const baseURL = 'http://192.168.110.60:8080' // #endif // 服务器地址(正式上线用) // #ifdef APP-PLUS -// const baseURL = 'http://101.132.250.62:8080' +const baseURL = 'http://101.132.250.62:8080' // #endif // 是否使用模拟数据(开发调试时设为 true,后端API准备好后改为 false)