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() {
this.dialogLoad++;
this.$store.dispatch("dialogList", () => {
this.$store.dispatch("dialogList").then(() => {
this.dialogLoad--;
this.openDialogStorage();
}).catch(() => {
this.dialogLoad--;
this.openDialogStorage();
});

View File

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