fix(home): 添加currentDMid空值检查防止异常
This commit is contained in:
parent
b7134046e8
commit
b96a82ad96
|
|
@ -909,6 +909,8 @@ export default {
|
||||||
|
|
||||||
// 刷新当前对话的消息详情
|
// 刷新当前对话的消息详情
|
||||||
handleGetConversationDetail() {
|
handleGetConversationDetail() {
|
||||||
|
if (!this.currentDMid) return;
|
||||||
|
|
||||||
this.$u.api
|
this.$u.api
|
||||||
.GetConversationDetail({
|
.GetConversationDetail({
|
||||||
"Item1.Id": this.currentDMid,
|
"Item1.Id": this.currentDMid,
|
||||||
|
|
@ -932,6 +934,8 @@ export default {
|
||||||
|
|
||||||
// 刷新当前页数据;若当前页为空且页码>1,则自动回退上一页
|
// 刷新当前页数据;若当前页为空且页码>1,则自动回退上一页
|
||||||
refreshPageWithFallback() {
|
refreshPageWithFallback() {
|
||||||
|
if (!this.currentDMid) return;
|
||||||
|
|
||||||
const currentIndex = this.pageQuery.PageIndex || 1;
|
const currentIndex = this.pageQuery.PageIndex || 1;
|
||||||
const pageSize = this.pageQuery.PageSize;
|
const pageSize = this.pageQuery.PageSize;
|
||||||
|
|
||||||
|
|
@ -983,6 +987,8 @@ export default {
|
||||||
onScrollToUpper() {
|
onScrollToUpper() {
|
||||||
console.log("触发上拉刷新");
|
console.log("触发上拉刷新");
|
||||||
|
|
||||||
|
if (!this.currentDMid) return;
|
||||||
|
|
||||||
// 如果已经没有更多数据或正在切换对话或当前对话为空(新建对话),不再触发上拉刷新
|
// 如果已经没有更多数据或正在切换对话或当前对话为空(新建对话),不再触发上拉刷新
|
||||||
if (this.noMoreData || this.isSwitchingConversation) {
|
if (this.noMoreData || this.isSwitchingConversation) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue