From d5669352ed1be417d4841361731fe38585507b56 Mon Sep 17 00:00:00 2001 From: sudoooooo Date: Mon, 23 Sep 2024 11:47:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96schema=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/surveyTemplate/templateBase.json | 7 +- .../stores/composables/useInitializeSchema.ts | 64 +++---------------- 2 files changed, 15 insertions(+), 56 deletions(-) diff --git a/server/src/modules/survey/template/surveyTemplate/templateBase.json b/server/src/modules/survey/template/surveyTemplate/templateBase.json index 2af433e7..f09c8c41 100644 --- a/server/src/modules/survey/template/surveyTemplate/templateBase.json +++ b/server/src/modules/survey/template/surveyTemplate/templateBase.json @@ -2,10 +2,12 @@ "bannerConf": { "titleConfig": { "mainTitle": "

欢迎填写问卷

为了给您提供更好的服务,希望您能抽出几分钟时间,将您的感受和建议告诉我们,期待您的参与!

", - "subTitle": "" + "subTitle": "

为了给您提供更好的服务,希望您能抽出几分钟时间,将您的感受和建议告诉我们,期待您的参与!

" }, "bannerConfig": { "bgImage": "/imgs/skin/17e06b7604a007e1d3e1453b9ddadc3c.webp", + "bgImageAllowJump": false, + "bgImageJumpLink": "", "videoLink": "", "postImg": "" } @@ -22,7 +24,8 @@ "msg_9002": "请勿多次提交!", "msg_9003": "您来晚了,已经满额!", "msg_9004": "提交失败!" - } + }, + "link": "" }, "bottomConf": { "logoImage": "/imgs/Logo.webp", diff --git a/web/src/management/stores/composables/useInitializeSchema.ts b/web/src/management/stores/composables/useInitializeSchema.ts index abb914cf..5d09fb03 100644 --- a/web/src/management/stores/composables/useInitializeSchema.ts +++ b/web/src/management/stores/composables/useInitializeSchema.ts @@ -10,59 +10,15 @@ export default function useInitializeSchema( ) { const schema = reactive({ metaData: null, - bannerConf: { - titleConfig: { - mainTitle: '

欢迎填写问卷

', - subTitle: `

为了给您提供更好的服务,希望您能抽出几分钟时间,将您的感受和建议告诉我们,期待您的参与!

`, - applyTitle: '' - }, - bannerConfig: { - bgImage: '', - bgImageAllowJump: false, - bgImageJumpLink: '', - videoLink: '', - postImg: '' - } - }, - bottomConf: { - logoImage: '', - logoImageWidth: '28%' - }, - skinConf: { - backgroundConf: { - color: '#fff' - }, - themeConf: { - color: '#ffa600' - }, - contentConf: { - opacity: 100 - } - }, - baseConf: { - begTime: '', - endTime: '', - language: 'chinese', - tLimit: 0, - answerBegTime: '', - answerEndTime: '', - answerLimitTime: 0 - }, - submitConf: { - submitTitle: '', - msgContent: {}, - confirmAgain: { - is_again: true - }, - link: '' - }, + bannerConf: {}, + bottomConf: {}, + skinConf: {}, + baseConf: {}, + submitConf: {}, + pageConf: [], + logicConf: {}, questionDataList: [], - pageEditOne: 1, - pageConf: [], // 分页逻辑 - logicConf: { - showLogicConf: [], - jumpLogicConf: [] - } + pageEditOne: 1 }) const { showLogicEngine, initShowLogicEngine, jumpLogicEngine, initJumpLogicEngine } = useLogicEngine(schema) @@ -73,11 +29,11 @@ export default function useInitializeSchema( schema.bottomConf = merge({}, schema.bottomConf, codeData.bottomConf) schema.skinConf = merge({}, schema.skinConf, codeData.skinConf) schema.baseConf = merge({}, schema.baseConf, codeData.baseConf) + schema.logicConf = codeData.logicConf + schema.pageConf = codeData.pageConf schema.submitConf = merge({}, schema.submitConf, codeData.submitConf) schema.questionDataList = codeData.questionDataList || [] - schema.logicConf = codeData.logicConf schema.pageEditOne = 1 - schema.pageConf = codeData.pageConf } const sessionId = ref('')