mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 11:13:26 +00:00
no message
This commit is contained in:
parent
46b79a20e3
commit
9ae8b8dabb
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
3815ac139a58e98a
|
72b48c40182edbc9
|
||||||
|
|||||||
@ -703,8 +703,7 @@ export default {
|
|||||||
if (timeout > -1) {
|
if (timeout > -1) {
|
||||||
this.__updateDialogs = setTimeout(_ => {
|
this.__updateDialogs = setTimeout(_ => {
|
||||||
if (this.tabActive === 'dialog') {
|
if (this.tabActive === 'dialog') {
|
||||||
this.$store.dispatch("getDialogs", true).catch(() => {
|
this.$store.dispatch("getDialogs", true).catch(() => {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}, timeout)
|
}, timeout)
|
||||||
}
|
}
|
||||||
|
|||||||
13
resources/assets/js/store/actions.js
vendored
13
resources/assets/js/store/actions.js
vendored
@ -1976,10 +1976,10 @@ export default {
|
|||||||
* 获取会话列表
|
* 获取会话列表
|
||||||
* @param state
|
* @param state
|
||||||
* @param dispatch
|
* @param dispatch
|
||||||
* @param atAfter
|
* @param hideLoad
|
||||||
* @returns {Promise<unknown>}
|
* @returns {Promise<unknown>}
|
||||||
*/
|
*/
|
||||||
getDialogs({state, dispatch}, atAfter) {
|
getDialogs({state, dispatch}, hideLoad) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
if (state.userId === 0) {
|
if (state.userId === 0) {
|
||||||
state.cacheDialogs = [];
|
state.cacheDialogs = [];
|
||||||
@ -1987,7 +1987,9 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let data = {};
|
let data = {};
|
||||||
if (atAfter === true) {
|
if (hideLoad !== true) {
|
||||||
|
state.loadDialogs++;
|
||||||
|
}
|
||||||
if (state.cacheDialogs.length > 0) {
|
if (state.cacheDialogs.length > 0) {
|
||||||
const tmpList = state.cacheDialogs.sort((a, b) => {
|
const tmpList = state.cacheDialogs.sort((a, b) => {
|
||||||
if (a.top_at || b.top_at) {
|
if (a.top_at || b.top_at) {
|
||||||
@ -1997,9 +1999,6 @@ export default {
|
|||||||
})
|
})
|
||||||
data.at_after = tmpList[0].last_at;
|
data.at_after = tmpList[0].last_at;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
state.loadDialogs++;
|
|
||||||
}
|
|
||||||
dispatch("call", {
|
dispatch("call", {
|
||||||
url: 'dialog/lists',
|
url: 'dialog/lists',
|
||||||
data,
|
data,
|
||||||
@ -2010,7 +2009,7 @@ export default {
|
|||||||
console.warn(e);
|
console.warn(e);
|
||||||
reject(e)
|
reject(e)
|
||||||
}).finally(_ => {
|
}).finally(_ => {
|
||||||
if (atAfter !== true) {
|
if (hideLoad !== true) {
|
||||||
state.loadDialogs--;
|
state.loadDialogs--;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user