mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 10:56:47 +08:00
Merge branch 'stat' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/mobile into stat
This commit is contained in:
@@ -89,7 +89,6 @@
|
||||
},
|
||||
methods: {
|
||||
loadMessage() {
|
||||
console.log('1111')
|
||||
this.queryMessage(true);
|
||||
},
|
||||
queryMessage(flag) {
|
||||
@@ -105,23 +104,17 @@
|
||||
this.message.total = res.result.count;
|
||||
if(res.result.list.length!=0){
|
||||
res.result.list.forEach(item => {
|
||||
// ids.push()
|
||||
item.authorInfo={avatar:'',name:'',code:'',sex:null};
|
||||
ids.push(item.sendAid);
|
||||
item.checked = false;
|
||||
this.message.list.push(item);
|
||||
});
|
||||
// this.loadAuthorInfo(res.result.list,ids);
|
||||
//设置已读
|
||||
// let ids=[];
|
||||
// for(let i=0;i<res.result.list.length;i++){
|
||||
// if(!res.result.list[i].isRead){
|
||||
// ids.push(res.result.list[i].id)
|
||||
// }
|
||||
// }
|
||||
// apiMessage.updateIsRead(ids).then(res=>{
|
||||
// if(res.status==200){
|
||||
|
||||
// }
|
||||
// })
|
||||
this.loadAuthorInfo(res.result.list,ids)
|
||||
}
|
||||
if(this.message.list.length<this.message.total){
|
||||
this.loadStatus='more'
|
||||
}else{
|
||||
this.loadStatus='noMore'
|
||||
}
|
||||
} else {
|
||||
this.$refs.toast.show({ message: '获取数据失败', type: 'error' })
|
||||
@@ -153,6 +146,11 @@
|
||||
})
|
||||
this.loadAuthorInfo(res.result.list,ids);
|
||||
}
|
||||
if(this.data.length<this.total){
|
||||
this.loadStatus='more'
|
||||
}else{
|
||||
this.loadStatus='noMore'
|
||||
}
|
||||
}else{
|
||||
this.$refs.interactToast.show({message:'加载@我的评论失败',type:'error'});
|
||||
}
|
||||
@@ -164,17 +162,20 @@
|
||||
if (ids.length == 0) {
|
||||
return;
|
||||
}
|
||||
let $this = this;
|
||||
const noReapetIds = [...new Set(ids)];
|
||||
apiUser.getByIds(ids).then(res => {
|
||||
if (res.status == 200) {
|
||||
list.forEach((item, index) => {
|
||||
res.result.some(author => {
|
||||
if (author.aid == item.sysCreateAid) {
|
||||
if ($this.tab == 0 && author.aid == item.sendAid) {
|
||||
item.authorInfo = author;
|
||||
return true;
|
||||
} else if($this.tab == 1 && author.aid == item.sysCreateAid){
|
||||
item.authorInfo = author;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -478,6 +478,9 @@ export default {
|
||||
sendType:1,
|
||||
conType,
|
||||
content,
|
||||
source:1,
|
||||
pageUrl:location.href,
|
||||
sendAid:this.userInfo.aid,
|
||||
}
|
||||
apiMessage.save(message).then(res=>{
|
||||
if(res.status==200){
|
||||
|
||||
Reference in New Issue
Block a user