From edc63770ebc65e648cabc0daea40e430e9b651a8 Mon Sep 17 00:00:00 2001 From: wangqing Date: Thu, 18 Mar 2021 13:33:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=8F=90=E4=BA=A4=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=9C=B0=E5=9D=80=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/index.js | 4 ++-- src/views/form/write.vue | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index d41acef..b17f071 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -265,8 +265,8 @@ export function openUrl(url) { var a = document.createElement('a') a.setAttribute('href', url) a.setAttribute('target', '_blank') - a.setAttribute('id', 'd2admin-link-temp') + a.setAttribute('id', 'tduck-link-temp') document.body.appendChild(a) a.click() - document.body.removeChild(document.getElementById('d2admin-link-temp')) + document.body.removeChild(document.getElementById('tduck-link-temp')) } diff --git a/src/views/form/write.vue b/src/views/form/write.vue index 850749c..7f825f9 100644 --- a/src/views/form/write.vue +++ b/src/views/form/write.vue @@ -90,7 +90,6 @@ export default { this.wxSignature = res.data this.setWxConfig() }) - console.log(ua) }, mounted() { this.viewProjectHandle() @@ -99,7 +98,7 @@ export default { ProjectForm }, methods: { viewProjectHandle() { - //是否能进入填写 + // 查看次数记录 this.$api.post(`/user/project/result/view/${this.projectConfig.projectKey}`, {params: {projectKey: this.projectConfig.projectKey}}).then(res => { }) @@ -201,9 +200,9 @@ export default { if (res.data && res.data.wxWrite) { //记录微信用户信息 if (res.data.recordWxUser && !this.wxAuthorizationCode) { - console.log(this.wxAuthorizationUrl) location.href = this.wxAuthorizationUrl } else { + //仅在微信打开 this.onlyWxOpenHandle() } } @@ -230,7 +229,17 @@ export default { 'originalData': data.formModel, 'processData': data.labelFormModel }).then(res => { + //填写完后跳转 + let submitJumpUrl = this.userProjectSetting.submitJumpUrl + if (submitJumpUrl) { + //如果不是以https或者http开头 则添加 + if (!submitJumpUrl.startsWith('http') || !submitJumpUrl.startsWith('http')) { + submitJumpUrl = 'http://' + submitJumpUrl + } + window.location.href = submitJumpUrl + } this.writeStatus = 2 + }) } }