BUG 25155

This commit is contained in:
aixianling
2021-12-02 17:57:45 +08:00
parent 451d3b1f5c
commit 82dbc510df

View File

@@ -19,7 +19,8 @@ export default {
components: {AiResult, FormDetail}, components: {AiResult, FormDetail},
data() { data() {
return { return {
access: false access: false,
err: ""
} }
}, },
computed: { computed: {
@@ -28,7 +29,7 @@ export default {
return !!this.$route.query?.id && this.access return !!this.$route.query?.id && this.access
}, },
errMsg() { errMsg() {
return this.access ? "表单不存在" : "无法获取用户信息" return this.err || (this.access ? "表单不存在" : "无法获取用户信息")
}, },
isPreview() { isPreview() {
return !!this.$route.query?.preview return !!this.$route.query?.preview
@@ -37,11 +38,19 @@ export default {
methods: { methods: {
...mapActions(['getCode', 'getToken']), ...mapActions(['getCode', 'getToken']),
checkAccess() { checkAccess() {
let {corpId, code, suiteId} = this.$route.query let {corpId, code, suiteId, id} = this.$route.query
if (this.isPreview) { if (this.isPreview) {
this.access = true this.access = true
} else if (!!this.token) { } 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) { } else if (code) {
this.getToken({code, corpId, suiteId, isAppForm: true}).then(() => { this.getToken({code, corpId, suiteId, isAppForm: true}).then(() => {
let {query, path, hash} = this.$route let {query, path, hash} = this.$route