Browse Source

fix:提交跳转地址无效

old
wangqing 4 years ago
parent
commit
edc63770eb
  1. 4
      src/utils/index.js
  2. 15
      src/views/form/write.vue

4
src/utils/index.js

@ -265,8 +265,8 @@ export function openUrl(url) {
var a = document.createElement('a') var a = document.createElement('a')
a.setAttribute('href', url) a.setAttribute('href', url)
a.setAttribute('target', '_blank') a.setAttribute('target', '_blank')
a.setAttribute('id', 'd2admin-link-temp') a.setAttribute('id', 'tduck-link-temp')
document.body.appendChild(a) document.body.appendChild(a)
a.click() a.click()
document.body.removeChild(document.getElementById('d2admin-link-temp')) document.body.removeChild(document.getElementById('tduck-link-temp'))
} }

15
src/views/form/write.vue

@ -90,7 +90,6 @@ export default {
this.wxSignature = res.data this.wxSignature = res.data
this.setWxConfig() this.setWxConfig()
}) })
console.log(ua)
}, },
mounted() { mounted() {
this.viewProjectHandle() this.viewProjectHandle()
@ -99,7 +98,7 @@ export default {
ProjectForm ProjectForm
}, methods: { }, methods: {
viewProjectHandle() { viewProjectHandle() {
// //
this.$api.post(`/user/project/result/view/${this.projectConfig.projectKey}`, {params: {projectKey: this.projectConfig.projectKey}}).then(res => { 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 && res.data.wxWrite) {
// //
if (res.data.recordWxUser && !this.wxAuthorizationCode) { if (res.data.recordWxUser && !this.wxAuthorizationCode) {
console.log(this.wxAuthorizationUrl)
location.href = this.wxAuthorizationUrl location.href = this.wxAuthorizationUrl
} else { } else {
//
this.onlyWxOpenHandle() this.onlyWxOpenHandle()
} }
} }
@ -230,7 +229,17 @@ export default {
'originalData': data.formModel, 'originalData': data.formModel,
'processData': data.labelFormModel 'processData': data.labelFormModel
}).then(res => { }).then(res => {
//
let submitJumpUrl = this.userProjectSetting.submitJumpUrl
if (submitJumpUrl) {
//httpshttp
if (!submitJumpUrl.startsWith('http') || !submitJumpUrl.startsWith('http')) {
submitJumpUrl = 'http://' + submitJumpUrl
}
window.location.href = submitJumpUrl
}
this.writeStatus = 2 this.writeStatus = 2
}) })
} }
} }

Loading…
Cancel
Save