From 82dbc510df56b517e755a0d336eaea97e3648653 Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 2 Dec 2021 17:57:45 +0800 Subject: [PATCH] BUG 25155 --- src/apps/AppAskForm/AppForm.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/apps/AppAskForm/AppForm.vue b/src/apps/AppAskForm/AppForm.vue index d7058bb9..ffc6eee5 100644 --- a/src/apps/AppAskForm/AppForm.vue +++ b/src/apps/AppAskForm/AppForm.vue @@ -19,7 +19,8 @@ export default { components: {AiResult, FormDetail}, data() { return { - access: false + access: false, + err: "" } }, computed: { @@ -28,7 +29,7 @@ export default { return !!this.$route.query?.id && this.access }, errMsg() { - return this.access ? "表单不存在" : "无法获取用户信息" + return this.err || (this.access ? "表单不存在" : "无法获取用户信息") }, isPreview() { return !!this.$route.query?.preview @@ -37,11 +38,19 @@ export default { methods: { ...mapActions(['getCode', 'getToken']), checkAccess() { - let {corpId, code, suiteId} = this.$route.query + let {corpId, code, suiteId, id} = this.$route.query if (this.isPreview) { this.access = true } else if (!!this.token) { - this.access = true + this.$http.post("/app/appquestionnairetemplate/commitCheck", null, { + params: {id} + }).then(res => { + if (res?.code == 0) { + this.access = true + } + }).catch(err => { + this.err = err + }) } else if (code) { this.getToken({code, corpId, suiteId, isAppForm: true}).then(() => { let {query, path, hash} = this.$route