fix(仪表板): 修复社区板仪表板因不支持水印设置导致的控制台报错问题

This commit is contained in:
wangjiahao
2024-02-23 16:53:49 +08:00
parent a5328976c1
commit 45cd9cb300
4 changed files with 38 additions and 18 deletions

View File

@@ -222,7 +222,7 @@ const initWatermark = (waterDomId = 'editor-canvas-main') => {
isMainCanvas(canvasId.value)
) {
const scale = dashboardActive.value ? 1 : curScale.value
if (userInfo.value) {
if (userInfo.value && userInfo.value.model !== 'lose') {
activeWatermark(
dvInfo.value.watermarkInfo.settingContent,
userInfo.value,
@@ -235,14 +235,16 @@ const initWatermark = (waterDomId = 'editor-canvas-main') => {
const method = personInfoApi
method().then(res => {
userInfo.value = res.data
activeWatermark(
dvInfo.value.watermarkInfo.settingContent,
userInfo.value,
waterDomId,
canvasId.value,
dvInfo.value.selfWatermarkStatus,
scale
)
if (userInfo.value && userInfo.value.model !== 'lose') {
activeWatermark(
dvInfo.value.watermarkInfo.settingContent,
userInfo.value,
waterDomId,
canvasId.value,
dvInfo.value.selfWatermarkStatus,
scale
)
}
})
}
}

View File

@@ -190,7 +190,7 @@ const initRefreshTimer = () => {
const initWatermark = (waterDomId = 'preview-canvas-main') => {
if (dvInfo.value.watermarkInfo && isMainCanvas(canvasId.value)) {
if (userInfo.value) {
if (userInfo.value && userInfo.value.model !== 'lose') {
activeWatermark(
dvInfo.value.watermarkInfo.settingContent,
userInfo.value,
@@ -203,14 +203,16 @@ const initWatermark = (waterDomId = 'preview-canvas-main') => {
const method = personInfoApi
method().then(res => {
userInfo.value = res.data
activeWatermark(
dvInfo.value.watermarkInfo.settingContent,
userInfo.value,
waterDomId,
canvasId.value,
dvInfo.value.selfWatermarkStatus,
scaleWidth.value / 100
)
if (userInfo.value && userInfo.value.model !== 'lose') {
activeWatermark(
dvInfo.value.watermarkInfo.settingContent,
userInfo.value,
waterDomId,
canvasId.value,
dvInfo.value.selfWatermarkStatus,
scaleWidth.value / 100
)
}
})
}
}