|
|
@@ -1,6 +1,5 @@ |
|
|
|
import 'dart:convert';
|
|
|
|
import 'dart:io';
|
|
|
|
import 'package:chat/home/InfoList.dart';
|
|
|
|
import 'package:chat/home/fans_page.dart';
|
|
|
|
import 'package:chat/home/goddess_hot.dart';
|
|
|
|
import 'package:chat/home/rich_title.dart';
|
|
|
@@ -260,50 +259,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
|
myMsg = userInfo.ownMsg;
|
|
|
|
}
|
|
|
|
|
|
|
|
// getFirstDy() async {
|
|
|
|
// var data = {
|
|
|
|
// "userId": UserData().basicInfo.userId,
|
|
|
|
// "visitUserId": widget.userId,
|
|
|
|
// "type": 2,
|
|
|
|
// };
|
|
|
|
// data['sign'] = TokenMgr().getSign(data);
|
|
|
|
// data['page'] = 1;
|
|
|
|
// data['rows'] = 1;
|
|
|
|
// Response res = await HttpUtil().post('station/gain/program', data: data);
|
|
|
|
// var resData = res.data;
|
|
|
|
// if (resData['code'] == 0 && resData['data'] != null) {
|
|
|
|
// var imgUrl = resData['data'][0]['ImgUrl'];
|
|
|
|
// if (imgUrl != '') {
|
|
|
|
// firstDyImg = imgUrl.split('|')[0];
|
|
|
|
// if (mounted) {
|
|
|
|
// setState(() {});
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// getFirstProgram() async {
|
|
|
|
// var data = {
|
|
|
|
// "userId": UserData().basicInfo.userId,
|
|
|
|
// "visitUserId": widget.userId,
|
|
|
|
// //"type": 1,
|
|
|
|
// };
|
|
|
|
// data['sign'] = TokenMgr().getSign(data);
|
|
|
|
// data['page'] = 1;
|
|
|
|
// data['rows'] = 1;
|
|
|
|
// Response res = await HttpUtil().post('station/gain/program', data: data);
|
|
|
|
// var resData = res.data;
|
|
|
|
// if (resData['code'] == 0 &&
|
|
|
|
// resData['data'] != null &&
|
|
|
|
// resData['data'][0]['Status'] == 0) {
|
|
|
|
// if (mounted) {
|
|
|
|
// setState(() {
|
|
|
|
// programId = resData['data'][0]['Id'];
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
@@ -314,21 +269,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
|
messageOn();
|
|
|
|
initLocalData();
|
|
|
|
getUserInfo();
|
|
|
|
initAnimation();
|
|
|
|
}
|
|
|
|
|
|
|
|
initAnimation() {
|
|
|
|
// animationController = AnimationController(
|
|
|
|
// duration: Duration(milliseconds: 600),
|
|
|
|
// vsync: this,
|
|
|
|
// );
|
|
|
|
// movement =
|
|
|
|
// Tween(begin: EdgeInsets.only(right: 0), end: EdgeInsets.only(right: 10))
|
|
|
|
// .animate(animationController)
|
|
|
|
// ..addListener(() {
|
|
|
|
// setState(() {});
|
|
|
|
// });
|
|
|
|
// animationController.repeat();
|
|
|
|
}
|
|
|
|
|
|
|
|
void initMyController() {}
|
|
|
@@ -2152,20 +2092,11 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
|
context,
|
|
|
|
I18n.of(context).confrim_recovery,
|
|
|
|
I18n.of(context).determine, () async {
|
|
|
|
Map data = {
|
|
|
|
"userId": UserData().basicInfo.userId,
|
|
|
|
};
|
|
|
|
data['sign'] = TokenMgr().getSign(data);
|
|
|
|
|
|
|
|
Response res = await HttpUtil().post('user/recover/photos',
|
|
|
|
data: data, isShowLoading: true);
|
|
|
|
Map resData = res.data;
|
|
|
|
if (resData['code'] == 0) {
|
|
|
|
showToast(resData['msg']);
|
|
|
|
HttpUtil().resetPhoto(() {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
userInfo.burnNum = 0;
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
),
|
|
|
@@ -2176,51 +2107,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
|
: Container();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Widget _buildApplyCode() {
|
|
|
|
// //帮朋友申请邀请码
|
|
|
|
// return isMan
|
|
|
|
// ? Container(
|
|
|
|
// margin: EdgeInsets.only(top: Separate_Size),
|
|
|
|
// padding: EdgeInsets.symmetric(horizontal: 10),
|
|
|
|
// child: FullWidthButton(
|
|
|
|
// title: I18n.of(context).apply_code,
|
|
|
|
// showDivider: false,
|
|
|
|
// showRightIcon: false,
|
|
|
|
// onPressed: () {
|
|
|
|
// CustomUI.buildOneConfirm(context, I18n.of(context).issue_choose,
|
|
|
|
// I18n.of(context).determine, () async {
|
|
|
|
// Map data = {
|
|
|
|
// "userId": UserData().basicInfo.userId,
|
|
|
|
// };
|
|
|
|
// data['sign'] = TokenMgr().getSign(data);
|
|
|
|
|
|
|
|
// Response res =
|
|
|
|
// await HttpUtil().post('user/helper/apply', data: data);
|
|
|
|
// Map resData = res.data;
|
|
|
|
|
|
|
|
// if (resData['code'] == 0) {
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// CustomUI.buildOneConfirm(
|
|
|
|
// context,
|
|
|
|
// I18n.of(context).receive_incode,
|
|
|
|
// I18n.of(context).ok, () {
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// });
|
|
|
|
// } else {
|
|
|
|
// showToast(resData['msg']);
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: Colors.white,
|
|
|
|
// border: Border(
|
|
|
|
// top: Constants.GreyBorderSide,
|
|
|
|
// bottom: Constants.GreyBorderSide)),
|
|
|
|
// )
|
|
|
|
// : Container();
|
|
|
|
// }
|
|
|
|
|
|
|
|
Widget _buildShare() {
|
|
|
|
//分享
|
|
|
|
return Container(
|
|
|
@@ -2277,8 +2163,6 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
|
Size screenSize = MediaQuery.of(context).size;
|
|
|
|
cardWidth = screenSize.width;
|
|
|
|
Widget appBar = AppBar(
|
|
|
|
// backgroundColor: AppColors.NewAppbarBgColor,
|
|
|
|
//automaticallyImplyLeading: !isMyself,
|
|
|
|
leading: isMyself ? Container() : CustomUI.buildCustomLeading(context),
|
|
|
|
titleSpacing: isMyself ? -40 : NavigationToolbar.kMiddleSpacing,
|
|
|
|
title: isMyself
|
|
|
@@ -2572,66 +2456,55 @@ class _ProfilePageState extends State<ProfilePage> |
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
var bottomWidget = Container(
|
|
|
|
height: 55,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(top: BorderSide(color: Color(0xffeaeaea))),
|
|
|
|
color: Constants.LightGreyBackgroundColor,
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
children: widget.addMode == 1
|
|
|
|
? <Widget>[_inviteFdBtn()]
|
|
|
|
: (widget.addMode == 2
|
|
|
|
? [_dealInvite()]
|
|
|
|
: <Widget>[
|
|
|
|
_buildIcon(0xe633, I18n.of(context).evaluate, true,
|
|
|
|
() async {
|
|
|
|
Map data = {
|
|
|
|
"userid": userInfo.userId,
|
|
|
|
'evaluateuserid': UserData().basicInfo.userId,
|
|
|
|
};
|
|
|
|
data['sign'] = TokenMgr().getSign(data);
|
|
|
|
|
|
|
|
Response res = await HttpUtil().post('evaluate/user/info',
|
|
|
|
data: data, isShowLoading: true);
|
|
|
|
|
|
|
|
Map resData = res.data;
|
|
|
|
print(resData);
|
|
|
|
if (resData['code'] == 0) {
|
|
|
|
Navigator.of(context).push(TutorialOverlay(
|
|
|
|
child: ApplyContent(
|
|
|
|
userId: userInfo.userId,
|
|
|
|
isMan: isMan,
|
|
|
|
userInfo: resData['data'])));
|
|
|
|
} else {
|
|
|
|
showToast(resData['msg']);
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
_buildIcon(0xe637, I18n.of(context).private_chat,
|
|
|
|
isCanWatch, isCanWatch ? buyChatAccount : null,
|
|
|
|
iconSize: 24.0),
|
|
|
|
_buildIcon(
|
|
|
|
0xe62f, I18n.of(context).chat, isCanWatch, onAudio)
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
Widget content = Container(
|
|
|
|
color: Colors.white,
|
|
|
|
child: SafeArea(
|
|
|
|
child: Scaffold(
|
|
|
|
bottomNavigationBar: !isMyself
|
|
|
|
? Container(
|
|
|
|
height: 55,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border:
|
|
|
|
Border(top: BorderSide(color: Color(0xffeaeaea))),
|
|
|
|
color: Constants.LightGreyBackgroundColor,
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
children: widget.addMode == 1
|
|
|
|
? <Widget>[_inviteFdBtn()]
|
|
|
|
: (widget.addMode == 2
|
|
|
|
? [_dealInvite()]
|
|
|
|
: <Widget>[
|
|
|
|
_buildIcon(
|
|
|
|
0xe633, I18n.of(context).evaluate, true,
|
|
|
|
() async {
|
|
|
|
Map data = {
|
|
|
|
"userid": userInfo.userId,
|
|
|
|
'evaluateuserid':
|
|
|
|
UserData().basicInfo.userId,
|
|
|
|
};
|
|
|
|
data['sign'] = TokenMgr().getSign(data);
|
|
|
|
|
|
|
|
Response res = await HttpUtil().post(
|
|
|
|
'evaluate/user/info',
|
|
|
|
data: data,
|
|
|
|
isShowLoading: true);
|
|
|
|
|
|
|
|
Map resData = res.data;
|
|
|
|
print(resData);
|
|
|
|
if (resData['code'] == 0) {
|
|
|
|
Navigator.of(context).push(
|
|
|
|
TutorialOverlay(
|
|
|
|
child: ApplyContent(
|
|
|
|
userId: userInfo.userId,
|
|
|
|
isMan: isMan,
|
|
|
|
userInfo:
|
|
|
|
resData['data'])));
|
|
|
|
} else {
|
|
|
|
showToast(resData['msg']);
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
_buildIcon(
|
|
|
|
0xe637,
|
|
|
|
I18n.of(context).private_chat,
|
|
|
|
isCanWatch,
|
|
|
|
isCanWatch ? buyChatAccount : null,
|
|
|
|
iconSize: 24.0),
|
|
|
|
_buildIcon(0xe62f, I18n.of(context).chat,
|
|
|
|
isCanWatch, onAudio)
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
: null,
|
|
|
|
bottomNavigationBar: !isMyself ? bottomWidget : null,
|
|
|
|
appBar: appBar,
|
|
|
|
key: registKey,
|
|
|
|
body: SafeArea(
|
|
|
|