From 42b897bd3919883e91fc5ec30f473ad5d531a458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Thu, 25 Dec 2025 16:41:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A5=BD=E5=8F=8B=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E6=8E=A5=E5=92=8C=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/model/mine/friend_apply_data.dart | 48 +++++++++++++-------------- lib/pages/mine/my_friend_page.dart | 17 ++++++---- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/lib/model/mine/friend_apply_data.dart b/lib/model/mine/friend_apply_data.dart index 535dfb9..d9b14b9 100644 --- a/lib/model/mine/friend_apply_data.dart +++ b/lib/model/mine/friend_apply_data.dart @@ -36,12 +36,12 @@ class FriendApplyData { class Records { String? id; - String? toUserId; - String? toMiId; - int? toUId; - String? toNickName; - String? toProfilePhoto; - int? toGenderCode; + String? fromUserId; + String? fromMiId; + int? fromUId; + String? fromNickName; + String? fromProfilePhoto; + int? fromGenderCode; Null? applyMsg; int? status; String? birthYear; @@ -54,12 +54,12 @@ class Records { Records( {this.id, - this.toUserId, - this.toMiId, - this.toUId, - this.toNickName, - this.toProfilePhoto, - this.toGenderCode, + this.fromUserId, + this.fromMiId, + this.fromUId, + this.fromNickName, + this.fromProfilePhoto, + this.fromGenderCode, this.applyMsg, this.status, this.birthYear, @@ -72,12 +72,12 @@ class Records { Records.fromJson(Map json) { id = json['id']; - toUserId = json['toUserId']; - toMiId = json['toMiId']; - toUId = json['toUId']; - toNickName = json['toNickName']; - toProfilePhoto = json['toProfilePhoto']; - toGenderCode = json['toGenderCode']; + fromUserId = json['fromUserId']; + fromMiId = json['fromMiId']; + fromUId = json['fromUId']; + fromNickName = json['fromNickName']; + fromProfilePhoto = json['fromProfilePhoto']; + fromGenderCode = json['fromGenderCode']; applyMsg = json['applyMsg']; status = json['status']; birthYear = json['birthYear']; @@ -92,12 +92,12 @@ class Records { Map toJson() { final Map data = new Map(); data['id'] = this.id; - data['toUserId'] = this.toUserId; - data['toMiId'] = this.toMiId; - data['toUId'] = this.toUId; - data['toNickName'] = this.toNickName; - data['toProfilePhoto'] = this.toProfilePhoto; - data['toGenderCode'] = this.toGenderCode; + data['fromUserId'] = this.fromUserId; + data['fromMiId'] = this.fromMiId; + data['fromUId'] = this.fromUId; + data['fromNickName'] = this.fromNickName; + data['fromProfilePhoto'] = this.fromProfilePhoto; + data['fromGenderCode'] = this.fromGenderCode; data['applyMsg'] = this.applyMsg; data['status'] = this.status; data['birthYear'] = this.birthYear; diff --git a/lib/pages/mine/my_friend_page.dart b/lib/pages/mine/my_friend_page.dart index 4c3c087..a1a2f8b 100644 --- a/lib/pages/mine/my_friend_page.dart +++ b/lib/pages/mine/my_friend_page.dart @@ -4,6 +4,7 @@ import 'package:dating_touchme_app/controller/mine/my_friend_controller.dart'; import 'package:dating_touchme_app/extension/ex_widget.dart'; import 'package:dating_touchme_app/generated/assets.dart'; import 'package:dating_touchme_app/model/mine/friend_data.dart'; +import 'package:dating_touchme_app/pages/home/user_information_page.dart'; import 'package:easy_refresh/easy_refresh.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -283,7 +284,9 @@ class _UserItemState extends State { ) ], ), - ); + ).onTap((){ + Get.to(() => UserInformationPage(miId: widget.item.miId ?? "", userId: widget.item.userId ?? "")); + }); } } @@ -311,7 +314,7 @@ class _AddUserItemState extends State { ClipRRect( borderRadius: BorderRadius.all(Radius.circular(45.w)), child: CachedNetworkImage( - imageUrl: "${widget.item.toProfilePhoto ?? ""}?x-oss-process=image/format,webp/resize,w_170", + imageUrl: "${widget.item.fromProfilePhoto ?? ""}?x-oss-process=image/format,webp/resize,w_170", width: 45.w, height: 45.w, fit: BoxFit.cover, @@ -324,7 +327,7 @@ class _AddUserItemState extends State { Row( children: [ Text( - "${widget.item.toNickName}", + "${widget.item.fromNickName}", style: TextStyle( fontSize: 14.w, fontWeight: FontWeight.w500 @@ -336,11 +339,11 @@ class _AddUserItemState extends State { height: 12.w, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(12.w)), - color: widget.item.toGenderCode == 0 ? const Color.fromRGBO(237, 245, 255, 1) : const Color.fromRGBO(255, 237, 255, 1) + color: widget.item.fromGenderCode == 0 ? const Color.fromRGBO(237, 245, 255, 1) : const Color.fromRGBO(255, 237, 255, 1) ), child: Center( child: Image.asset( - widget.item.toGenderCode == 0 ? Assets.imagesMale : Assets.imagesFemale, + widget.item.fromGenderCode == 0 ? Assets.imagesMale : Assets.imagesFemale, width: 7.w, ), ), @@ -449,6 +452,8 @@ class _AddUserItemState extends State { }) ], ), - ); + ).onTap((){ + Get.to(() => UserInformationPage(miId: widget.item.fromMiId ?? "", userId: widget.item.fromUserId ?? "")); + }); } }