diff --git a/src/sass/AppNotification/add.vue b/src/sass/AppNotification/add.vue index 10dc70cc..dea30e0a 100644 --- a/src/sass/AppNotification/add.vue +++ b/src/sass/AppNotification/add.vue @@ -109,12 +109,13 @@ export default { ...mapActions(['selectPrivilegedContact']), handleSelectUser() { console.log(this.form.ticket) + console.log(this.form.persons) if (this.clickedUserSelect) return this.$u.toast("正在打开人员选择器") this.clickedUserSelect = true this.selectPrivilegedContact({ fromDepartmentId: 0, selectedTickets: this.form.ticket ? [this.form.ticket] : [], - selectedOpenUserIds: this.form.persons?.map(e => e.id) + selectedOpenUserIds: this.form.persons ? this.form.persons.map(e => e.id) : [] }).then(res => { console.log('ticket-----') console.log(res.selectedTicket) @@ -124,7 +125,9 @@ export default { this.form.ticket = res.selectedTicket this.selectedUserCount = res.selectedUserCount this.clickedUserSelect = false - }).catch(() => { + }).catch(e => { + console.log('错误信息') + console.log(e) this.clickedUserSelect = false }) }, diff --git a/src/store/index.js b/src/store/index.js index 1d434d6e..c25465ae 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -330,7 +330,7 @@ const store = new Vuex.Store({ }) }, selectEnterpriseContact(state, params) { - return new Promise(resolve => { + return new Promise((resolve, reject) => { state.dispatch("injectJWeixin", "selectEnterpriseContact").then(() => { setTimeout(() => { let sdk = typeof wx?.invoke == 'function' ? wx : jWeixin @@ -345,6 +345,8 @@ const store = new Vuex.Store({ res.result = JSON.parse(res.result) } resolve(res.result) + } else { + reject(res) } }) }, 500)