From cd89f75b0702c1d499fdbdad182299a7207a5923 Mon Sep 17 00:00:00 2001 From: owen Date: Thu, 7 Dec 2023 19:59:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E9=94=80=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E8=A3=85=E4=BF=AE=E7=BC=96=E8=BE=91=E5=99=A8=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/promotion/diy/template/decorate.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/views/mall/promotion/diy/template/decorate.vue b/src/views/mall/promotion/diy/template/decorate.vue index 9a071379..e15d2919 100644 --- a/src/views/mall/promotion/diy/template/decorate.vue +++ b/src/views/mall/promotion/diy/template/decorate.vue @@ -7,6 +7,7 @@ :show-page-config="selectedTemplateItem !== 0" :show-tab-bar="selectedTemplateItem === 0" :show-navigation-bar="selectedTemplateItem !== 0" + :preview-url="previewUrl" @save="submitForm" @reset="handleEditorReset" > @@ -50,6 +51,8 @@ const formData = ref() const formRef = ref() // 表单 Ref // 当前编辑的属性 const currentFormData = ref() +// 商城H5预览地址 +const previewUrl = ref('') // 获取详情 const getPageDetail = async (id: any) => { @@ -57,6 +60,10 @@ const getPageDetail = async (id: any) => { try { formData.value = await DiyTemplateApi.getDiyTemplateProperty(id) currentFormData.value = formData.value + + // 拼接手机预览链接 + const domain = import.meta.env.VITE_MALL_H5_DOMAIN + previewUrl.value = `${domain}/#/pages/index/index?templateId=${formData.value.id}` } finally { formLoading.value = false }