feat:【mall 商城】店铺预览时,增加 tenantId

This commit is contained in:
YunaiV
2025-08-19 09:16:46 +08:00
parent 1a92b97797
commit c93c70a3cb

View File

@ -34,6 +34,7 @@ import { useTagsViewStore } from '@/store/modules/tagsView'
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util' // 商城的 DIY 组件,在 DiyEditor 目录下
import { toNumber } from 'lodash-es'
import { isEmpty } from '@/utils/is'
import { getTenantId } from '@/utils/auth'
/** 装修模板表单 */
defineOptions({ name: 'DiyTemplateDecorate' })
@ -69,7 +70,7 @@ const getPageDetail = async (id: any) => {
formData.value = await DiyTemplateApi.getDiyTemplateProperty(id)
// 拼接手机预览链接
const domain = import.meta.env.VITE_MALL_H5_DOMAIN
previewUrl.value = `${domain}/#/pages/index/index?templateId=${formData.value.id}`
previewUrl.value = `${domain}?templateId=${formData.value.id}&tenantId=${getTenantId()}`
} finally {
formLoading.value = false
}