no message

This commit is contained in:
kuaifan 2021-06-12 21:43:53 +08:00
parent c99ceeaa16
commit 153fe1b2fb
2 changed files with 16 additions and 12 deletions

View File

@ -81,7 +81,10 @@ export default {
mounted() { mounted() {
this.dialogLoad++; this.dialogLoad++;
this.$store.dispatch("dialogList", () => { this.$store.dispatch("dialogList").then(() => {
this.dialogLoad--;
this.openDialogStorage();
}).catch(() => {
this.dialogLoad--; this.dialogLoad--;
this.openDialogStorage(); this.openDialogStorage();
}); });

View File

@ -276,7 +276,7 @@ export default {
dispatch("call", { dispatch("call", {
url: 'project/lists', url: 'project/lists',
}).then(result => { }).then(result => {
dispatch('saveProject', result.data); dispatch('saveProject', result.data.data);
}).catch(result => { }).catch(result => {
$A.modalError(result.msg); $A.modalError(result.msg);
}); });
@ -592,16 +592,17 @@ export default {
* 获取会话列表 * 获取会话列表
* @param state * @param state
* @param dispatch * @param dispatch
* @param afterCallback
*/ */
dialogList({state, dispatch}, afterCallback) { dialogList({state, dispatch}) {
dispatch("call", { return new Promise(function (resolve, reject) {
url: 'dialog/lists', dispatch("call", {
}).then(result => { url: 'dialog/lists',
state.dialogList = result.data.data; }).then(result => {
typeof afterCallback === "function" && afterCallback(); state.dialogList = result.data.data;
}).catch(result => { resolve(result);
typeof afterCallback === "function" && afterCallback(); }).catch(result => {
reject(result);
});
}); });
}, },
@ -725,7 +726,7 @@ export default {
} }
// 更新会话数据 // 更新会话数据
dispatch('dialogUpdate', dialog); dispatch('dialogUpdate', dialog);
}).catch(result => { }).catch(() => {
state.dialogMsgLoad--; state.dialogMsgLoad--;
state.cacheDialogList[dialog_id + "::load"] = false; state.cacheDialogList[dialog_id + "::load"] = false;
}); });