整合企微token变量
This commit is contained in:
@@ -23,7 +23,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
...mapState(['user']),
|
||||
showDetail() {
|
||||
return !!this.$route.query?.id && this.access
|
||||
},
|
||||
@@ -40,11 +40,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getCode', 'getToken']),
|
||||
checkAccess() {
|
||||
let {corpId, code, suiteId, id} = this.$route.query
|
||||
checkAccess(review) {
|
||||
let {code, suiteId, id} = this.$route.query
|
||||
if (this.isPreview) {
|
||||
this.access = true
|
||||
} else if (!!this.token) {
|
||||
} else if (!!this.user.token) {
|
||||
this.$http.post("/app/appquestionnairetemplate/commitCheck", null, {
|
||||
params: {id}
|
||||
}).then(res => {
|
||||
@@ -57,12 +57,10 @@ export default {
|
||||
this.err = err
|
||||
})
|
||||
} else if (code) {
|
||||
this.getToken({code, corpId, suiteId, isAppForm: true}).then(() => {
|
||||
let {query, path, hash} = this.$route
|
||||
delete query.code
|
||||
this.root.goto({query, path, hash})
|
||||
})
|
||||
} else this.getCode()
|
||||
this.getToken({code, suiteId}).then(() => this.checkAccess(true))
|
||||
} else if (!review) this.getCode()
|
||||
else this.err = "登录失败!"
|
||||
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
name: "formDetail",
|
||||
inject: {root: {}},
|
||||
computed: {
|
||||
...mapState(['openUser', 'token']),
|
||||
...mapState(['openUser']),
|
||||
isExam() {
|
||||
return this.form?.type == 1
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user