diff --git a/frontend/src/components/canvas/components/editor/Preview.vue b/frontend/src/components/canvas/components/editor/Preview.vue index 9e1b6dd97d..59e9220595 100644 --- a/frontend/src/components/canvas/components/editor/Preview.vue +++ b/frontend/src/components/canvas/components/editor/Preview.vue @@ -156,7 +156,7 @@ import bus from '@/utils/bus' import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil' import { hasDataPermission } from '@/utils/permission' import { activeWatermark } from '@/components/canvas/tools/watermark' -import { userLoginInfo } from '@/api/systemInfo/userLogin' +import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin' import html2canvas from 'html2canvasde' import { queryAll } from '@/api/panel/pdfTemplate' import PDFPreExport from '@/views/panel/export/PDFPreExport' @@ -457,7 +457,8 @@ export default { if (this.userInfo) { activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, waterDomId, this.canvasId, this.panelInfo.watermarkOpen) } else { - userLoginInfo().then(res => { + const method = this.userId ? proxyUserLoginInfo : userLoginInfo + method(this.userId).then(res => { this.userInfo = res.data activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, waterDomId, this.canvasId, this.panelInfo.watermarkOpen) }) diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 27c14f0d62..bfb9fa9dcb 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -165,12 +165,12 @@ v-show=" show &&showIndex===1" :canvas-id="canvasId" /> - - + + - + - + {{ panelInfo.name }} @@ -205,7 +205,7 @@ class="this_mobile_canvas_main" :style="mobileCanvasStyle" > - + - + - + @@ -268,7 +268,7 @@ />
- +
@@ -287,7 +287,7 @@ >{{ $t('panel.position_adjust') }} - +
{ - const userInfo = res.data - activeWatermark(this.panelInfo.watermarkInfo.settingContent, userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen) + this.$nextTick(() => { + if (this.userInfo) { + activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen) + } else { + userLoginInfo().then(res => { + this.userInfo = res.data + activeWatermark(this.panelInfo.watermarkInfo.settingContent, this.userInfo, 'canvasInfo-main', this.canvasId, this.panelInfo.watermarkOpen) + }) + } }) } },