BUG 25155
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user