|
|
|
@ -82,11 +82,12 @@ class _FansPage extends State<FansPage> {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//关注/取关会员 |
|
|
|
|
_vipFollow(followId) async { |
|
|
|
|
_vipFollow(followId,isFollow) async { |
|
|
|
|
BaseData baseData = await apiService.follow(followId); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
widget.refresh(); |
|
|
|
|
SmartDialog.showToast("关注成功", alignment: Alignment.center); |
|
|
|
|
_queryFollowList(); |
|
|
|
|
SmartDialog.showToast(isFollow?"取关成功":"关注成功", alignment: Alignment.center); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
@ -170,68 +171,35 @@ class _FansPage extends State<FansPage> {
|
|
|
|
|
borderRadius: BorderRadius.circular(11.w), |
|
|
|
|
color: Color(0xFF32A060), |
|
|
|
|
), |
|
|
|
|
child: |
|
|
|
|
// GestureDetector( |
|
|
|
|
// onTap: () { |
|
|
|
|
// setState(() { |
|
|
|
|
// if (widget.commentType == 0) { |
|
|
|
|
// comment?.selfFollow = |
|
|
|
|
// !(comment?.selfFollow ?? false); |
|
|
|
|
// _vipFollow(list.mid); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// }, |
|
|
|
|
// child: (widget.commentType == 0) |
|
|
|
|
// ? RoundButton( |
|
|
|
|
// padding: EdgeInsets.symmetric( |
|
|
|
|
// horizontal: 8, |
|
|
|
|
// vertical: 3, |
|
|
|
|
// ), |
|
|
|
|
// backgroup: (comment?.selfFollow ?? false) |
|
|
|
|
// ? Color(0xFFE6E6E6) |
|
|
|
|
// : Color(0xFF32A060), |
|
|
|
|
// textColor: (comment?.selfFollow ?? false) |
|
|
|
|
// ? Color(0xFF808080) |
|
|
|
|
// : Colors.white, |
|
|
|
|
// text: (comment?.selfFollow ?? false) ? "已关注" : "关注", |
|
|
|
|
// radius: 20, |
|
|
|
|
// icons: Icon( |
|
|
|
|
// (comment?.selfFollow ?? false) |
|
|
|
|
// ? Icons.check |
|
|
|
|
// : Icons.add, |
|
|
|
|
// color: (comment?.selfFollow ?? false) |
|
|
|
|
// ? Color(0xFF808080) |
|
|
|
|
// : Colors.white, |
|
|
|
|
// size: 14, |
|
|
|
|
// ), |
|
|
|
|
// ) |
|
|
|
|
// : Icon( |
|
|
|
|
// Icons.close, |
|
|
|
|
// color: Colors.black, |
|
|
|
|
// size: 16, |
|
|
|
|
// ), |
|
|
|
|
// ), |
|
|
|
|
Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
|
crossAxisAlignment:CrossAxisAlignment.center, |
|
|
|
|
children: [ |
|
|
|
|
Icon( |
|
|
|
|
Icons.add, |
|
|
|
|
color: Colors.white, |
|
|
|
|
size: 14, |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width:4, |
|
|
|
|
child: GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
_vipFollow(list.mid,list?.isFollow ?? false); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: RoundButton( |
|
|
|
|
padding: EdgeInsets.symmetric( |
|
|
|
|
horizontal: 8, |
|
|
|
|
vertical: 3, |
|
|
|
|
), |
|
|
|
|
Text( |
|
|
|
|
"关注", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Colors.white, |
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
backgroup: (list?.isFollow ?? false) |
|
|
|
|
? Color(0xFFE6E6E6) |
|
|
|
|
: Color(0xFF32A060), |
|
|
|
|
textColor: (list?.isFollow ?? false) |
|
|
|
|
? Color(0xFF808080) |
|
|
|
|
: Colors.white, |
|
|
|
|
text: (list?.isFollow ?? false) ? "已关注" : "关注", |
|
|
|
|
radius: 20, |
|
|
|
|
icons: Icon( |
|
|
|
|
(list?.isFollow ?? false) |
|
|
|
|
? Icons.check |
|
|
|
|
: Icons.add, |
|
|
|
|
color: (list?.isFollow ?? false) |
|
|
|
|
? Color(0xFF808080) |
|
|
|
|
: Colors.white, |
|
|
|
|
size: 14, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|