Kaynağa Gözat

修改bug ( 完成100%)

1.好友申请界面增加删除记录功能
2.领取红包会跳到聊天界面底部
3.动态、节目黑名单等删除后应该展示没有数据提示
4.打赏,签到等功能显隐控制
我的界面布局调整和收入界面提现展示问题
master
ZCM 5 yıl önce
ebeveyn
işleme
335b4375f8
11 değiştirilmiş dosya ile 244 ekleme ve 160 silme
  1. +3
    -3
      android/app/build.gradle
  2. +12
    -12
      lib/chat/util_keyboard.dart
  3. +4
    -2
      lib/home/Myprogram.dart
  4. +28
    -13
      lib/home/ProfilePage.dart
  5. +2
    -3
      lib/home/WhiteAndBlackList.dart
  6. +12
    -7
      lib/home/group_setting.dart
  7. +116
    -115
      lib/home/homeMain.dart
  8. +2
    -1
      lib/home/money_detail.dart
  9. +62
    -1
      lib/home/new_friends.dart
  10. +2
    -2
      lib/utils/HttpUtil.dart
  11. +1
    -1
      pubspec.yaml

+ 3
- 3
android/app/build.gradle Dosyayı Görüntüle

@@ -56,9 +56,9 @@ android {
// manifestPlaceholders = [
// AMAP_KEY : "1fd4e93e3b4b13747da41f484c955fe2", /// 高德地图key
// ]
ndk {
abiFilters 'armeabi-v7a'
}
// ndk {
// abiFilters 'armeabi-v7a'
// }
multiDexEnabled true
manifestPlaceholders = [
JPUSH_PKGNAME : 'com.cyhd.henhoandroid',


+ 12
- 12
lib/chat/util_keyboard.dart Dosyayı Görüntüle

@@ -87,11 +87,12 @@ class _UtilKeyboardState extends State<UtilKeyboard> {
}
AppNavigator.pushCoinBagPage(context);
})));
iconList.add(_buildOtherSelect(
R.assetsImagesChatItem6, I18n.of(context).giving_gift, () {
_showGiftSheet(context);
}));
if (UserData().giftSwitch > 0) {
iconList.add(_buildOtherSelect(
R.assetsImagesChatItem6, I18n.of(context).giving_gift, () {
_showGiftSheet(context);
}));
}
}
iconList.add(_buildOtherSelect(
@@ -313,11 +314,10 @@ class _UtilKeyboardState extends State<UtilKeyboard> {
showToast(I18n.of(context).max_file.replaceFirst('/s1', 33.toString()));
return;
}
///ios存在着文件夹才打得开
File newFile= await FileCacheMgr().writeFile(file.path.split('/').last, file.readAsBytesSync());
///ios存在着文件夹才打得开
File newFile = await FileCacheMgr()
.writeFile(file.path.split('/').last, file.readAsBytesSync());
int friendId = 0;
if (!widget.isGroup) {
@@ -394,12 +394,12 @@ class _UtilKeyboardState extends State<UtilKeyboard> {
if (thumbnail.length > ImgSizeLimit) {
print('图片较大 ${thumbnail.length}');
File file =await FileCacheMgr().writeFile(DateTime.now().millisecondsSinceEpoch.toString(),thumbnail);
File file = await FileCacheMgr().writeFile(
DateTime.now().millisecondsSinceEpoch.toString(), thumbnail);
File compressedFile = await FlutterNativeImage.compressImage(file.path,
quality: 30, percentage: 40);
thumbnail =compressedFile.readAsBytesSync().toList();
thumbnail = compressedFile.readAsBytesSync().toList();
// thumbnail = await FlutterImageCompress.compressWithList(thumbnail, quality: 10);


+ 4
- 2
lib/home/Myprogram.dart Dosyayı Görüntüle

@@ -85,6 +85,9 @@ class _MyProgramPageState extends State<MyProgramPage> {
break;
}
}
if (list.length == 0) {
_onRefresh();
}
}
Future getData(callback) async {
@@ -170,8 +173,7 @@ class _MyProgramPageState extends State<MyProgramPage> {
),
centerTitle: true,
leading: CustomUI.buildCustomLeading(context),
elevation: 1,
elevation: 1,
actions: <Widget>[
isMyself
? myPop.PopupMenuButton<String>(


+ 28
- 13
lib/home/ProfilePage.dart Dosyayı Görüntüle

@@ -143,6 +143,8 @@ class _ProfilePageState extends State<ProfilePage>
bool isShowAll = false;
double fansWidth = Screen.width - 105;
getUserInfo({mymsg = ''}) async {
if (mymsg != '' && mymsg != null) {
UserData().basicInfo.ownMsg = mymsg;
@@ -312,6 +314,14 @@ class _ProfilePageState extends State<ProfilePage>
}
}
addProgramCallback(data) {
if (mounted) {
setState(() {
userInfo.dynamicNum++;
});
}
}
void messageOn() {
MessageMgr().on('inform_sucess', msgInformSucess);
MessageMgr().on('refresh_money', msgBuyVip);
@@ -321,6 +331,7 @@ class _ProfilePageState extends State<ProfilePage>
MessageMgr().on('refresh_love_list', msgRefreshLoveList);
MessageMgr().on('refresh_fans_num', msgRefreshFansNum);
MessageMgr().on('change_my_headview', msgChangeMyHeadView);
MessageMgr().on('Add_program', addProgramCallback);
}
void messageOff() {
@@ -332,6 +343,7 @@ class _ProfilePageState extends State<ProfilePage>
MessageMgr().off('refresh_love_list', msgRefreshLoveList);
MessageMgr().off('refresh_fans_num', msgRefreshFansNum);
MessageMgr().off('change_my_headview', msgChangeMyHeadView);
MessageMgr().off('Add_program', addProgramCallback);
}
msgChangeMyHeadView(data) {
@@ -385,7 +397,7 @@ class _ProfilePageState extends State<ProfilePage>
Widget _buildSignIn() {
return Container(
margin: EdgeInsets.only(top: Separate_Size, bottom: Separate_Size),
margin: EdgeInsets.only(top: 19, bottom: 19),
padding: EdgeInsets.symmetric(horizontal: 10),
child: FullWidthButton(
iconCode: 0xe65c,
@@ -394,6 +406,10 @@ class _ProfilePageState extends State<ProfilePage>
title: I18n.of(context).sign_in,
showDivider: false,
onPressed: () {
if (UserData().sign <= 0) {
showToast(I18n.of(context).system_not_open);
return;
}
Navigator.of(context).push(MaterialPageRoute(
builder: (context) {
return DailyBonusPage();
@@ -446,7 +462,8 @@ class _ProfilePageState extends State<ProfilePage>
padding: EdgeInsets.only(top: 19),
child: Column(
children: <Widget>[
Row(
Container(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
_buildHeadImg(),
@@ -455,7 +472,7 @@ class _ProfilePageState extends State<ProfilePage>
_buildButtonList(),
])
],
),
)),
_buildUserChips(),
_buildAttestation(),
_buildMyMsg(),
@@ -473,7 +490,7 @@ class _ProfilePageState extends State<ProfilePage>
bool showAllContent = isExpansion(userInfo.ownMsg, width);
return Container(
padding:
EdgeInsets.only(left: 25.5, bottom: isMyself ? 20 : 5, right: 10),
EdgeInsets.only(left: 25.5, bottom: isMyself ? 20 : 20, right: 10),
child: userInfo.ownMsg == null || userInfo.ownMsg == ''
? (isMyself
? InkWell(
@@ -635,7 +652,7 @@ class _ProfilePageState extends State<ProfilePage>
];
} else if (userInfo.sex == UserData().basicInfo.sex) {
list = [
_buildBorderButton(I18n.of(context).private_chat, 140,
_buildBorderButton(I18n.of(context).private_chat, fansWidth - 80,
isCanWatch ? buyChatAccount : cannotWatchTips,
iconCode: IconData(0xe68c, fontFamily: 'iconfont')),
];
@@ -702,7 +719,7 @@ class _ProfilePageState extends State<ProfilePage>
return InkWell(
onTap: callback,
child: Container(
width: (Screen.width - 105) / 3,
width: fansWidth / 3,
child: Column(
children: <Widget>[
Stack(
@@ -828,11 +845,11 @@ class _ProfilePageState extends State<ProfilePage>
textScaleFactor: 1.0,
style: TextStyle(fontSize: 9, color: Colors.white),
))
: Text(''),
: Container(width: 0),
isVip && isMan
? Container(
child: isSvip ? Constants.svipIcon : Constants.vipIcon)
: Text(''),
: Container(width: 0),
(isAttestation && !isMan) || isVip && isMan
? _buildDivder()
: Container(),
@@ -1015,7 +1032,7 @@ class _ProfilePageState extends State<ProfilePage>
child.addAll([
_buildHeadView(),
Container(
margin: EdgeInsets.only(top: Separate_Size, bottom: Separate_Size),
margin: EdgeInsets.only(top: 19, bottom: 19),
padding: EdgeInsets.symmetric(horizontal: 10),
child: _buildPicture(),
decoration: BoxDecoration(
@@ -1485,7 +1502,6 @@ class _ProfilePageState extends State<ProfilePage>
return Container(
width: cardWidth,
margin: EdgeInsets.only(top: Separate_Size),
decoration: BoxDecoration(
color: Colors.white,
border: Border(
@@ -1511,7 +1527,6 @@ class _ProfilePageState extends State<ProfilePage>
Widget _buildMoneyBox() {
//认证、钱包、隐私连麦设置
return Container(
margin: EdgeInsets.only(top: Separate_Size),
decoration: BoxDecoration(
color: Colors.white,
border: Border(
@@ -1604,7 +1619,7 @@ class _ProfilePageState extends State<ProfilePage>
);
}
Widget _buildIcon(code, str, isCanHit, callback, {iconSize = 28.0}) {
Widget _buildIcon(code, str, isCanHit, callback, {iconSize = 30.0}) {
var color = isCanHit ? Constants.BlueTextColor : Constants.GreyTextColor;
return InkWell(
onTap: isCanHit
@@ -1628,7 +1643,7 @@ class _ProfilePageState extends State<ProfilePage>
child: Text(
str,
textScaleFactor: 1.0,
style: TextStyle(color: color, fontSize: 12),
style: TextStyle(color: color, fontSize: 14),
),
padding: EdgeInsets.only(left: 5))
],


+ 2
- 3
lib/home/WhiteAndBlackList.dart Dosyayı Görüntüle

@@ -43,12 +43,11 @@ class _WhiteAndBlackPageState extends State<WhiteAndBlackPage> {
var item = list[i];
if (item['FollowUserId'] == data['UserId'] && data['flag'] != 0) {
list.removeAt(i);
break;
}
}
if (list.length == 0) {
_refreshController.refreshCompleted();
_onRefresh();
}
setState(() {});
}
@@ -176,7 +175,7 @@ class _WhiteAndBlackPageState extends State<WhiteAndBlackPage> {
setState(() {
list.removeAt(i);
if (list.length == 0) {
_refreshController.refreshCompleted();
_onRefresh();
}
});
break;


+ 12
- 7
lib/home/group_setting.dart Dosyayı Görüntüle

@@ -265,7 +265,8 @@ class GroupSettingState extends State<GroupSetting> {
setState(() {
showGroupFriendNickname = val;
widget.groupInfoModel.updateShowNameSwitch(val);
MsgHandler.setGroupIsShowMenberNiceNameReq(widget.groupInfoModel.sessionId, val);
MsgHandler.setGroupIsShowMenberNiceNameReq(
widget.groupInfoModel.sessionId, val);
});
}),

@@ -540,8 +541,11 @@ class GroupSettingState extends State<GroupSetting> {
List<Widget> list = [];
for (int index = 0; index < shouldShow; index++) {
var member = members[index];
var refName = Provider.of<RefNameProvider>(context)
.getGroupRefName(widget.groupInfoModel.sessionId, member.memberId);
bool isMyself = member.memberId == UserData().basicInfo.userId;
var refName = isMyself
? UserData().basicInfo.nickName
: Provider.of<RefNameProvider>(context).getGroupRefName(
widget.groupInfoModel.sessionId, member.memberId);
list.add(GestureDetector(
child: Container(
child: Column(
@@ -558,9 +562,7 @@ class GroupSettingState extends State<GroupSetting> {
width: size - 30,
height: size - 30,
)),
SizedBox(
height: 5,
),
SizedBox(height: 5),
Container(
width: size - 30,
alignment: Alignment.center,
@@ -582,7 +584,10 @@ class GroupSettingState extends State<GroupSetting> {
onTap: () {
if (members[index].memberId != UserData().basicInfo.userId) {
AppNavigator.pushProfileInfoPage(context, members[index].memberId,
fromWhere: 2, addMode: !FriendListMgr().isMyFriend(members[index].memberId) ? 1 : 0);
fromWhere: 2,
addMode: !FriendListMgr().isMyFriend(members[index].memberId)
? 1
: 0);
}
},
));


+ 116
- 115
lib/home/homeMain.dart Dosyayı Görüntüle

@@ -31,6 +31,7 @@ import 'package:oktoast/oktoast.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:chat/utils/my_bottom_navigation_bar.dart' as myBottm;
import 'realtimehelper/real_time_helper_page.dart';
import 'friend_page.dart';
import 'group_chat_page.dart';
@@ -362,121 +363,121 @@ class _HomeMainState extends State<HomeMain> {
I18n.of(context).me
];
// _navigationViews = [
// NavigationIconView(
// title: _titles[2],
// icon: IconData(
// 0xe67c,
// fontFamily: 'iconfont',
// ),
// isShowdot: true,
// iconSize: 29),
// NavigationIconView(
// title: _titles[0],
// isShowdot: true,
// iconMargin: EdgeInsets.only(top: 2),
// type: 5,
// icon: IconData(
// 0xe66e,
// fontFamily: 'iconfont',
// ),
// iconSize: 26.5),
// NavigationIconView(
// title: _titles[1],
// icon: IconData(
// 0xe656,
// fontFamily: 'iconfont',
// ),
// isCenter: true,
// iconSize: 31),
// NavigationIconView(
// title: _titles[1],
// isShowdot: true,
// icon: IconData(
// 0xe60b,
// fontFamily: 'iconfont',
// ),
// type: 6,
// iconSize: 26.5),
// NavigationIconView(
// title: _titles[3],
// icon: IconData(
// 0xe67b,
// fontFamily: 'iconfont',
// ),
// iconSize: 26.5),
// ];
//
// _pages = [
// RealTimeHelperPage(),
// FriendPage(),
// FindPage(),
// ConversActionPage(),
//// GroupChatListPage(),
// ProfilePage(
// userId: UserData().basicInfo.userId,
// ),
// ];
_navigationViews = [
NavigationIconView(
title: _titles[1],
isShowdot: true,
icon: IconData(
0xe60b,
fontFamily: 'iconfont',
),
type: 1,
iconSize: 26.5),
NavigationIconView(
title: _titles[0],
isShowdot: true,
iconMargin: EdgeInsets.only(top: 2),
type: 5,
icon: IconData(
0xe663,
fontFamily: 'iconfont',
),
iconSize: 26.5),
NavigationIconView(
title: _titles[1],
icon: IconData(
0xe656,
fontFamily: 'iconfont',
),
isCenter: true,
iconSize: 31),
NavigationIconView(
title: _titles[3],
isShowdot: true,
icon: IconData(
0xe66e,
fontFamily: 'iconfont',
),
type: 4,
iconSize: 26.5),
NavigationIconView(
title: _titles[3],
icon: IconData(
0xe67b,
fontFamily: 'iconfont',
),
iconSize: 26.5),
];
_pages = [
ConversActionPage(),
// RealTimeHelperPage(),
FriendPage(),
FindPage(),
// ConversActionPage(),
GroupChatListPage(),
ProfilePage(
userId: UserData().basicInfo.userId,
),
];
_navigationViews = [
NavigationIconView(
title: _titles[2],
icon: IconData(
0xe67c,
fontFamily: 'iconfont',
),
isShowdot: true,
iconSize: 29),
NavigationIconView(
title: _titles[0],
isShowdot: true,
iconMargin: EdgeInsets.only(top: 2),
type: 5,
icon: IconData(
0xe66e,
fontFamily: 'iconfont',
),
iconSize: 26.5),
NavigationIconView(
title: _titles[1],
icon: IconData(
0xe656,
fontFamily: 'iconfont',
),
isCenter: true,
iconSize: 31),
NavigationIconView(
title: _titles[1],
isShowdot: true,
icon: IconData(
0xe60b,
fontFamily: 'iconfont',
),
type: 6,
iconSize: 26.5),
NavigationIconView(
title: _titles[3],
icon: IconData(
0xe67b,
fontFamily: 'iconfont',
),
iconSize: 26.5),
];
_pages = [
RealTimeHelperPage(),
FriendPage(),
FindPage(),
ConversActionPage(),
// GroupChatListPage(),
ProfilePage(
userId: UserData().basicInfo.userId,
),
];
// _navigationViews = [
// NavigationIconView(
// title: _titles[1],
// isShowdot: true,
// icon: IconData(
// 0xe60b,
// fontFamily: 'iconfont',
// ),
// type: 1,
// iconSize: 26.5),
// NavigationIconView(
// title: _titles[0],
// isShowdot: true,
// iconMargin: EdgeInsets.only(top: 2),
// type: 5,
// icon: IconData(
// 0xe663,
// fontFamily: 'iconfont',
// ),
// iconSize: 26.5),
// NavigationIconView(
// title: _titles[1],
// icon: IconData(
// 0xe656,
// fontFamily: 'iconfont',
// ),
// isCenter: true,
// iconSize: 31),
// NavigationIconView(
// title: _titles[3],
// isShowdot: true,
// icon: IconData(
// 0xe66e,
// fontFamily: 'iconfont',
// ),
// type: 4,
// iconSize: 26.5),
// NavigationIconView(
// title: _titles[3],
// icon: IconData(
// 0xe67b,
// fontFamily: 'iconfont',
// ),
// iconSize: 26.5),
// ];
// _pages = [
// ConversActionPage(),
// // RealTimeHelperPage(),
// FriendPage(),
// FindPage(),
// // ConversActionPage(),
// GroupChatListPage(),
// ProfilePage(
// userId: UserData().basicInfo.userId,
// ),
// ];
}
@override


+ 2
- 1
lib/home/money_detail.dart Dosyayı Görüntüle

@@ -331,7 +331,8 @@ class MoneyDetailPageState extends State<MoneyDetailPage>
//余额Status 0=交易成功,1=系统退回
//收入 0=冻结 ,1=成功 ,2= 退回
//冻结和成功,你都可以表示成功
showReturn: (widget.type == 1 && data['Status'] ==1) || (widget.type == 2 && data['Status'] ==2),
showReturn: (widget.type == 1 && data['Status'] == 1) ||
(widget.type == 2 && data['Status'] == 2 && data['DetailType'] != 1),
isInCome: widget.type == 2,
money: isAdd(data['DetailType']) ? data['Value'] : -data['Value'],
title: RichTitle.getRichTitleWidget(data, context,


+ 62
- 1
lib/home/new_friends.dart Dosyayı Görüntüle

@@ -8,10 +8,12 @@ import 'package:chat/utils/HttpUtil.dart';
import 'package:chat/utils/MessageMgr.dart';
import 'package:chat/utils/TokenMgr.dart';
import 'package:chat/utils/conversation_table.dart';
import 'package:chat/utils/screen.dart';
import 'package:dio/dio.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:oktoast/oktoast.dart';
import 'package:provider/provider.dart';
import 'package:chat/models/friends_info.dart';
import 'ProfilePage.dart';
@@ -120,6 +122,52 @@ class _ContactItem extends StatelessWidget {
),
);
_button = Dismissible(
key: Key(userId.toString()),
child: _button,
direction: DismissDirection.endToStart,
background: Container(
color: Colors.red,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
fixedText(I18n.of(context).delete, color: Colors.white),
Icon(
Icons.delete,
color: Colors.white,
),
SizedBox(width: 20),
],
),
),
confirmDismiss: (direction) async {
var _confirmContent = I18n.of(context).confirm_delete;
bool isDismiss =
await CustomUI.showIosDialog(context, _confirmContent, () async {
Map data = {
"userId": UserData().basicInfo.userId,
"aUserId": userId,
};
data['sign'] = TokenMgr().getSign(data);
Response res = await HttpUtil().post(
'friendship/delete/applicationRecord',
data: data,
isShowLoading: true);
Map resData = res.data;
//showToast(resData['msg']);
if (resData['code'] == 0) {
MessageMgr().emit('delete_friend_record', userId);
}
Navigator.of(context).pop(true);
}, () {
Navigator.of(context).pop(false);
});
return isDismiss;
});
//分组标签
Widget _itemBody;
if (this.groupTitle != null) {
@@ -201,6 +249,7 @@ class _NewFriendsPageState extends State<NewFriendsPage> {
getNewFriendList();
_scrollController = new ScrollController();
MessageMgr().on('do_friend_apply', messageApply);
MessageMgr().on('delete_friend_record', deleteFriendRecord);
_functionButtons = [
FriendsInfo(
@@ -257,6 +306,17 @@ class _NewFriendsPageState extends State<NewFriendsPage> {
}
}
deleteFriendRecord(userId) {
for (int i = 0; i < friendList.length; i++) {
if (friendList[i].friendId == userId) {
setState(() {
friendList.removeAt(i);
});
break;
}
}
}
getNewFriendList() async {
Map data = {
"userId": UserData().basicInfo.userId,
@@ -281,8 +341,9 @@ class _NewFriendsPageState extends State<NewFriendsPage> {
@override
void dispose() {
_scrollController.dispose();
super.dispose();
MessageMgr().off('do_friend_apply', messageApply);
MessageMgr().off('delete_friend_record', deleteFriendRecord);
super.dispose();
}
@override


+ 2
- 2
lib/utils/HttpUtil.dart Dosyayı Görüntüle

@@ -44,9 +44,9 @@ class HttpUtil {
//static const String BaseUrl = 'http://192.168.0.223:7001/';
//static const String BaseUrl = 'http://192.168.0.207:9080/';
// static const String BaseUrl = 'http://120.79.107.63:9080/';
static const String BaseUrl = 'http://120.79.107.63:9080/';
//static const String BaseUrl = 'http://192.168.0.177:9016/';
static const String BaseUrl = 'https://datasm.chengyouhd.com/';
//static const String BaseUrl = 'https://datasm.chengyouhd.com/';
static HttpUtil _getInstance() {
if (_instance == null) {


+ 1
- 1
pubspec.yaml Dosyayı Görüntüle

@@ -1,7 +1,7 @@
name: chat
description: A new Flutter project.
#修改版本号后get-clean
version: 1.1.2+17
version: 1.1.0+15

environment:
sdk: ">=2.1.0 <3.0.0"


Yükleniyor…
İptal
Kaydet