diff --git a/android/app/build.gradle b/android/app/build.gradle index 73e1601..d004d6d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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', diff --git a/lib/home/InfoList.dart b/lib/home/InfoList.dart index 7bb2823..d2b9d3d 100644 --- a/lib/home/InfoList.dart +++ b/lib/home/InfoList.dart @@ -3,7 +3,6 @@ import 'package:chat/data/WebData.dart'; import 'package:chat/generated/i18n.dart'; import 'package:chat/home/ProfilePage.dart'; import 'package:chat/home/rich_title.dart'; -import 'package:chat/models/ref_name_provider.dart'; import 'package:chat/utils/CustomUI.dart'; import 'package:chat/utils/HttpUtil.dart'; import 'package:chat/utils/MessageMgr.dart'; @@ -16,9 +15,7 @@ import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import 'package:oktoast/oktoast.dart'; -import 'package:provider/provider.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:url_launcher/url_launcher.dart'; import '../data/constants.dart' show AppColors, Constants; diff --git a/lib/home/MoneyPageOld.dart b/lib/home/MoneyPageOld.dart index e42fe91..9fd1334 100644 --- a/lib/home/MoneyPageOld.dart +++ b/lib/home/MoneyPageOld.dart @@ -8,7 +8,6 @@ import 'package:chat/data/constants.dart'; import 'package:chat/data/conversation.dart'; import 'package:chat/generated/i18n.dart'; import 'package:chat/home/BindBank.dart'; -import 'package:chat/home/InfoList.dart'; import 'package:chat/home/ProfilePage.dart'; import 'package:chat/home/rich_title.dart'; import 'package:chat/models/money_change.dart'; diff --git a/lib/home/ProfilePage.dart b/lib/home/ProfilePage.dart index a4a805e..f6bde5b 100644 --- a/lib/home/ProfilePage.dart +++ b/lib/home/ProfilePage.dart @@ -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 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 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 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 : 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 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 ), ], ); + 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 + ? [_inviteFdBtn()] + : (widget.addMode == 2 + ? [_dealInvite()] + : [ + _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 - ? [_inviteFdBtn()] - : (widget.addMode == 2 - ? [_dealInvite()] - : [ - _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( diff --git a/lib/home/money_detail.dart b/lib/home/money_detail.dart index ff9d630..225bbe6 100644 --- a/lib/home/money_detail.dart +++ b/lib/home/money_detail.dart @@ -6,7 +6,6 @@ import 'package:chat/data/WebData.dart'; import 'package:chat/data/constants.dart'; import 'package:chat/data/conversation.dart'; import 'package:chat/generated/i18n.dart'; -import 'package:chat/home/InfoList.dart'; import 'package:chat/home/ProfilePage.dart'; import 'package:chat/home/rich_title.dart'; import 'package:chat/utils/CustomUI.dart'; diff --git a/lib/utils/HttpUtil.dart b/lib/utils/HttpUtil.dart index 41070f2..932f1e9 100644 --- a/lib/utils/HttpUtil.dart +++ b/lib/utils/HttpUtil.dart @@ -1366,7 +1366,7 @@ class HttpUtil { msgModel.state = MsgState.Sending; - print('commitInfoToCompany 参数 $data'); + print('commitInfoToCompany 参数 $data'); Response res = await HttpUtil().post('feedback/user/insert', data: data); if (res == null) { @@ -1387,4 +1387,20 @@ class HttpUtil { showToast(resData['msg']); return false; } + + //焚阅照片恢复 + resetPhoto(callback) 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']); + callback(); + } + } } diff --git a/lib/utils/TempUserCard.dart b/lib/utils/TempUserCard.dart index 1e78dd3..46be546 100644 --- a/lib/utils/TempUserCard.dart +++ b/lib/utils/TempUserCard.dart @@ -12,7 +12,6 @@ import 'package:oktoast/oktoast.dart'; import '../utils/HttpUtil.dart'; import 'package:dio/dio.dart'; import "../data/UserData.dart"; -import '../utils/TokenMgr.dart'; import 'TempUserChips.dart'; class TempUserCard extends StatelessWidget { diff --git a/lib/utils/UserCard.dart b/lib/utils/UserCard.dart index 90eab15..76770ee 100644 --- a/lib/utils/UserCard.dart +++ b/lib/utils/UserCard.dart @@ -12,7 +12,6 @@ import 'package:oktoast/oktoast.dart'; import '../utils/HttpUtil.dart'; import 'package:dio/dio.dart'; import "../data/UserData.dart"; -import '../utils/TokenMgr.dart'; class UserCard extends StatelessWidget { final String userName; diff --git a/lib/utils/blacklist_mgr.dart b/lib/utils/blacklist_mgr.dart index cef6f1c..f92e9a2 100644 --- a/lib/utils/blacklist_mgr.dart +++ b/lib/utils/blacklist_mgr.dart @@ -1,6 +1,3 @@ -import 'package:chat/generated/i18n.dart'; -import 'package:chat/utils/LoadingDialog.dart'; -import 'package:oktoast/oktoast.dart'; class BlacklistMgr { //我拉黑的用户id