修复好友获赞状态

This commit is contained in:
zhaocy 2022-11-21 15:39:35 +08:00
parent c7e04d36b3
commit c994874a18
2 changed files with 6 additions and 5 deletions

View File

@ -43,14 +43,15 @@ func (this *FriendRandListView) CreateView(t *model.TestCase) fyne.CanvasObject
}) })
//好友申请 //好友申请
friendApplyBtn := widget.NewButton("申请", func() { friendApplyBtn := widget.NewButton("申请", func() {
selItems := this.itemList.SelItemIds selItemId := this.itemList.SelItemId
if len(selItems) == 0 || (len(selItems) > 0 && selItems[0] == "") { logrus.Debug(selItemId)
if selItemId == ""{
common.ShowTip("请选择项目") common.ShowTip("请选择项目")
return return
} }
logrus.Debug(this.itemList.SelItemIds[0])
if err := service.GetPttService().SendToClient(t.MainType, "apply", &pb.FriendApplyReq{ if err := service.GetPttService().SendToClient(t.MainType, "apply", &pb.FriendApplyReq{
FriendId: this.itemList.SelItemIds[0], FriendId: selItemId,
}); err != nil { }); err != nil {
logrus.Error(err) logrus.Error(err)
} }

View File

@ -50,7 +50,7 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.FriendListReq) (cod
} }
//判断是否已接收获赞 //判断是否已接收获赞
if _, ok := utils.Findx(self.ZanIds, userId); ok { if _, ok := utils.Findx(self.GetZandIds, userId); ok {
base.IsGetZaned = true base.IsGetZaned = true
} }