Browse Source

Merge remote-tracking branch 'origin/master'

master
jiahao 5 years ago
parent
commit
d0451788a0
10 changed files with 114 additions and 54 deletions
  1. +4
    -3
      i18n/en-US.json
  2. +4
    -3
      i18n/ja-JP.json
  3. +4
    -3
      i18n/ko-KR.json
  4. +4
    -3
      i18n/vi-VN.json
  5. +4
    -3
      i18n/zh-CN.json
  6. +4
    -3
      i18n/zh-HK.json
  7. +41
    -24
      lib/generated/i18n.dart
  8. +24
    -5
      lib/home/friend_page.dart
  9. +24
    -5
      lib/utils/HttpUtil.dart
  10. +1
    -2
      lib/utils/friend_list_mgr.dart

+ 4
- 3
i18n/en-US.json View File

@@ -1130,7 +1130,7 @@
"my_left_money": "my balance", "my_left_money": "my balance",
"money_tips": "H coins can be obtained by recharging or exchange, and cannot be withdrawn", "money_tips": "H coins can be obtained by recharging or exchange, and cannot be withdrawn",
"get_money_detail": "income details", "get_money_detail": "income details",
"hibok_money": "Hibox revenue",
"hibok_money": "Hibok revenue",
"charge_h": "exchange h coins ", "charge_h": "exchange h coins ",
"charge_tips": "withdrawal rules", "charge_tips": "withdrawal rules",
"splash_tips1": "variable positioning", "splash_tips1": "variable positioning",
@@ -1144,7 +1144,7 @@
"Representation_succes": " your application is successful, and the system has refunded", "Representation_succes": " your application is successful, and the system has refunded",
"system_give": " presented by system ", "system_give": " presented by system ",
"exchange_fail": "your withdrawal application failed and has been returned", "exchange_fail": "your withdrawal application failed and has been returned",
"hibok_exchange": "exchange /s1H coins through Hibox income ",
"hibok_exchange": "exchange /s1H coins through Hibok income ",
"bind_code_success": "binding invitation code succeeded", "bind_code_success": "binding invitation code succeeded",
"translate_money": " you have spent /s1H coins on manual translation", "translate_money": " you have spent /s1H coins on manual translation",
"system_back": " system return cancelled", "system_back": " system return cancelled",
@@ -1224,5 +1224,6 @@
"robot_retranslate":"机器重译", "robot_retranslate":"机器重译",
"see_original":"查看原文", "see_original":"查看原文",
"forward":"Forward", "forward":"Forward",
"copy_download_url":"复制下载地址"
"copy_download_url":"复制下载地址",
"total_friends_nus":"共/s1位朋友"
} }

+ 4
- 3
i18n/ja-JP.json View File

@@ -1130,7 +1130,7 @@
"my_left_money": "残高", "my_left_money": "残高",
"money_tips": "H幣はチャージや両替で得られます、引き出しができません", "money_tips": "H幣はチャージや両替で得られます、引き出しができません",
"get_money_detail": "所得明細", "get_money_detail": "所得明細",
"hibok_money": "Hibox收入",
"hibok_money": "Hibok收入",
"charge_h": "H幤に両替", "charge_h": "H幤に両替",
"charge_tips": "引き出し規則", "charge_tips": "引き出し規則",
"splash_tips1": "百変の位置", "splash_tips1": "百変の位置",
@@ -1144,7 +1144,7 @@
"Representation_succes": "申し立ては成功し、システムは返金しました", "Representation_succes": "申し立ては成功し、システムは返金しました",
"system_give": "システム支払い", "system_give": "システム支払い",
"exchange_fail": "引き出し申請は失敗しました,返送されました", "exchange_fail": "引き出し申請は失敗しました,返送されました",
"hibok_exchange": "Hibox収入で/s 1 H幤に両替します",
"hibok_exchange": "Hibok収入で/s 1 H幤に両替します",
"bind_code_success": "招待コード関連成功", "bind_code_success": "招待コード関連成功",
"translate_money": "人工翻訳のために/s1H幤を消費しました", "translate_money": "人工翻訳のために/s1H幤を消費しました",
"system_back": "システムキャンセルリターン", "system_back": "システムキャンセルリターン",
@@ -1224,5 +1224,6 @@
"robot_retranslate":"机器重译", "robot_retranslate":"机器重译",
"see_original":"查看原文", "see_original":"查看原文",
"forward":"转发", "forward":"转发",
"copy_download_url":"复制下载地址"
"copy_download_url":"复制下载地址",
"total_friends_nus":"共/s1位朋友"
} }

+ 4
- 3
i18n/ko-KR.json View File

@@ -1130,7 +1130,7 @@
"my_left_money": "내 잔고", "my_left_money": "내 잔고",
"money_tips": "H화폐는 충전이나 환전으로 얻을 수 있고 현금인출이 불가능합니다.", "money_tips": "H화폐는 충전이나 환전으로 얻을 수 있고 현금인출이 불가능합니다.",
"get_money_detail": "소득명세", "get_money_detail": "소득명세",
"hibok_money": "Hibox소득",
"hibok_money": "Hibok소득",
"charge_h": "H화폐 교환", "charge_h": "H화폐 교환",
"charge_tips": "인출 규칙", "charge_tips": "인출 규칙",
"splash_tips1": "많은 편화 위치 改편리한 위치 변환", "splash_tips1": "많은 편화 위치 改편리한 위치 변환",
@@ -1144,7 +1144,7 @@
"Representation_succes": "당신의 진술이 성공하여 시스템이 환불되었습니다.", "Representation_succes": "당신의 진술이 성공하여 시스템이 환불되었습니다.",
"system_give": "시스템 증정", "system_give": "시스템 증정",
"exchange_fail": "당신의 인출 신청이 실패하여, 반송되었습니다.", "exchange_fail": "당신의 인출 신청이 실패하여, 반송되었습니다.",
"hibok_exchange": "Hibox를 통해 환전/s1H화폐",
"hibok_exchange": "Hibok를 통해 환전/s1H화폐",
"bind_code_success": "성공적으로 초대 코드를 묶음", "bind_code_success": "성공적으로 초대 코드를 묶음",
"translate_money": "당신은/s1H화폐를 소모해서 인공번역을 합니다.", "translate_money": "당신은/s1H화폐를 소모해서 인공번역을 합니다.",
"system_back": "시스템 취소 반송", "system_back": "시스템 취소 반송",
@@ -1224,5 +1224,6 @@
"robot_retranslate":"机器重译", "robot_retranslate":"机器重译",
"see_original":"查看原文", "see_original":"查看原文",
"forward":"转发", "forward":"转发",
"copy_download_url":"复制下载地址"
"copy_download_url":"复制下载地址",
"total_friends_nus":"共/s1位朋友"
} }

+ 4
- 3
i18n/vi-VN.json View File

@@ -1130,7 +1130,7 @@
"my_left_money": "Số dư của tôi", "my_left_money": "Số dư của tôi",
"money_tips": "H-coin có thể nạp trực tiếp hoặc hối đổi, nhưng không thể rút tiền mặt.", "money_tips": "H-coin có thể nạp trực tiếp hoặc hối đổi, nhưng không thể rút tiền mặt.",
"get_money_detail": "Thu nhập cụ thể", "get_money_detail": "Thu nhập cụ thể",
"hibok_money": "Thu nhập Hibox",
"hibok_money": "Thu nhập Hibok",
"charge_h": "Hối đổi H-coin", "charge_h": "Hối đổi H-coin",
"charge_tips": "Quy tắc rút tiền", "charge_tips": "Quy tắc rút tiền",
"splash_tips1": "Định vị đa dạng", "splash_tips1": "Định vị đa dạng",
@@ -1144,7 +1144,7 @@
"Representation_succes": "Yêu cầu của bạn đã thành công, và hệ thống đã hoàn tiền", "Representation_succes": "Yêu cầu của bạn đã thành công, và hệ thống đã hoàn tiền",
"system_give": "Hệ thống tặng", "system_give": "Hệ thống tặng",
"exchange_fail": "Yêu cầu rút tiền của bạn thất bại và đã được trả lại", "exchange_fail": "Yêu cầu rút tiền của bạn thất bại và đã được trả lại",
"hibok_exchange": "Thông qua thu nhập Hibox hối đổi được /s1H coin",
"hibok_exchange": "Thông qua thu nhập Hibok hối đổi được /s1H coin",
"bind_code_success": "Liên kết mã mời thành công", "bind_code_success": "Liên kết mã mời thành công",
"translate_money": "Bạn đã dành /s1H coin để sự dụng người dịch", "translate_money": "Bạn đã dành /s1H coin để sự dụng người dịch",
"system_back": "Hệ thống hủy bỏ trả lại", "system_back": "Hệ thống hủy bỏ trả lại",
@@ -1224,5 +1224,6 @@
"robot_retranslate": "机器重译", "robot_retranslate": "机器重译",
"see_original": "查看原文", "see_original": "查看原文",
"forward": "转发", "forward": "转发",
"copy_download_url": "复制下载地址"
"copy_download_url": "复制下载地址",
"total_friends_nus":"共/s1位朋友"
} }

+ 4
- 3
i18n/zh-CN.json View File

@@ -1130,7 +1130,7 @@
"my_left_money": "我的余额", "my_left_money": "我的余额",
"money_tips": "H币可通过充值或兑换方式获得,无法进行提现", "money_tips": "H币可通过充值或兑换方式获得,无法进行提现",
"get_money_detail": "收入明细", "get_money_detail": "收入明细",
"hibok_money": "Hibox收入",
"hibok_money": "Hibok收入",
"charge_h": "兑换H币", "charge_h": "兑换H币",
"charge_tips": "提款规则", "charge_tips": "提款规则",
"splash_tips1": "百变定位", "splash_tips1": "百变定位",
@@ -1144,7 +1144,7 @@
"Representation_succes": "您的申述成功,系统已退款", "Representation_succes": "您的申述成功,系统已退款",
"system_give": "系统赠送", "system_give": "系统赠送",
"exchange_fail": "您的提款申请失败,已退回", "exchange_fail": "您的提款申请失败,已退回",
"hibok_exchange": "通过Hibox收入兑换/s1H币",
"hibok_exchange": "通过Hibok收入兑换/s1H币",
"bind_code_success": "成功绑定代理优惠码", "bind_code_success": "成功绑定代理优惠码",
"translate_money": "您消耗了/s1H币进行人工翻译", "translate_money": "您消耗了/s1H币进行人工翻译",
"system_back": "系统取消退回", "system_back": "系统取消退回",
@@ -1224,5 +1224,6 @@
"robot_retranslate":"机器重译", "robot_retranslate":"机器重译",
"see_original":"查看原文", "see_original":"查看原文",
"forward":"转发", "forward":"转发",
"copy_download_url":"复制下载地址"
"copy_download_url":"复制下载地址",
"total_friends_nus":"共/s1位朋友"
} }

+ 4
- 3
i18n/zh-HK.json View File

@@ -1130,7 +1130,7 @@
"my_left_money": "我的餘額", "my_left_money": "我的餘額",
"money_tips": "H幣可通過充值或兌換方式獲得,無法進行提現", "money_tips": "H幣可通過充值或兌換方式獲得,無法進行提現",
"get_money_detail": "收入明細", "get_money_detail": "收入明細",
"hibok_money": "Hibox收入",
"hibok_money": "Hibok收入",
"charge_h": "兌換H幣", "charge_h": "兌換H幣",
"charge_tips": "提款規則", "charge_tips": "提款規則",
"splash_tips1": "百變定位", "splash_tips1": "百變定位",
@@ -1144,7 +1144,7 @@
"Representation_succes": "您的申述成功,系統已退款", "Representation_succes": "您的申述成功,系統已退款",
"system_give": "系統贈送", "system_give": "系統贈送",
"exchange_fail": "您的提款申請失敗,已退回", "exchange_fail": "您的提款申請失敗,已退回",
"hibok_exchange": "通過Hibox收入兌換/s1H幣",
"hibok_exchange": "通過Hibok收入兌換/s1H幣",
"bind_code_success": "成功綁定代理優惠碼", "bind_code_success": "成功綁定代理優惠碼",
"translate_money": "您消耗了/s1H幣進行人工翻譯", "translate_money": "您消耗了/s1H幣進行人工翻譯",
"system_back": "系統取消退回", "system_back": "系統取消退回",
@@ -1224,5 +1224,6 @@
"robot_retranslate":"機器重譯", "robot_retranslate":"機器重譯",
"see_original":"查看原文", "see_original":"查看原文",
"forward":"转发", "forward":"转发",
"copy_download_url":"複製下載地址"
"copy_download_url":"複製下載地址",
"total_friends_nus":"共/s1位朋友"
} }

+ 41
- 24
lib/generated/i18n.dart View File

@@ -2295,8 +2295,8 @@ class I18n implements WidgetsLocalizations {
String get money_tips => "H coins can be obtained by recharging or exchange, and cannot be withdrawn"; String get money_tips => "H coins can be obtained by recharging or exchange, and cannot be withdrawn";
/// "income details" /// "income details"
String get get_money_detail => "income details"; String get get_money_detail => "income details";
/// "Hibox revenue"
String get hibok_money => "Hibox revenue";
/// "Hibok revenue"
String get hibok_money => "Hibok revenue";
/// "exchange h coins " /// "exchange h coins "
String get charge_h => "exchange h coins "; String get charge_h => "exchange h coins ";
/// "withdrawal rules" /// "withdrawal rules"
@@ -2323,8 +2323,8 @@ class I18n implements WidgetsLocalizations {
String get system_give => " presented by system "; String get system_give => " presented by system ";
/// "your withdrawal application failed and has been returned" /// "your withdrawal application failed and has been returned"
String get exchange_fail => "your withdrawal application failed and has been returned"; String get exchange_fail => "your withdrawal application failed and has been returned";
/// "exchange /s1H coins through Hibox income "
String get hibok_exchange => "exchange /s1H coins through Hibox income ";
/// "exchange /s1H coins through Hibok income "
String get hibok_exchange => "exchange /s1H coins through Hibok income ";
/// "binding invitation code succeeded" /// "binding invitation code succeeded"
String get bind_code_success => "binding invitation code succeeded"; String get bind_code_success => "binding invitation code succeeded";
/// " you have spent /s1H coins on manual translation" /// " you have spent /s1H coins on manual translation"
@@ -2485,6 +2485,8 @@ class I18n implements WidgetsLocalizations {
String get forward => "Forward"; String get forward => "Forward";
/// "复制下载地址" /// "复制下载地址"
String get copy_download_url => "复制下载地址"; String get copy_download_url => "复制下载地址";
/// "共/s1位朋友"
String get total_friends_nus => "共/s1位朋友";
} }


class _I18n_en_US extends I18n { class _I18n_en_US extends I18n {
@@ -5890,9 +5892,9 @@ class _I18n_vi_VN extends I18n {
/// "Thu nhập cụ thể" /// "Thu nhập cụ thể"
@override @override
String get get_money_detail => "Thu nhập cụ thể"; String get get_money_detail => "Thu nhập cụ thể";
/// "Thu nhập Hibox"
/// "Thu nhập Hibok"
@override @override
String get hibok_money => "Thu nhập Hibox";
String get hibok_money => "Thu nhập Hibok";
/// "Hối đổi H-coin" /// "Hối đổi H-coin"
@override @override
String get charge_h => "Hối đổi H-coin"; String get charge_h => "Hối đổi H-coin";
@@ -5932,9 +5934,9 @@ class _I18n_vi_VN extends I18n {
/// "Yêu cầu rút tiền của bạn thất bại và đã được trả lại" /// "Yêu cầu rút tiền của bạn thất bại và đã được trả lại"
@override @override
String get exchange_fail => "Yêu cầu rút tiền của bạn thất bại và đã được trả lại"; String get exchange_fail => "Yêu cầu rút tiền của bạn thất bại và đã được trả lại";
/// "Thông qua thu nhập Hibox hối đổi được /s1H coin"
/// "Thông qua thu nhập Hibok hối đổi được /s1H coin"
@override @override
String get hibok_exchange => "Thông qua thu nhập Hibox hối đổi được /s1H coin";
String get hibok_exchange => "Thông qua thu nhập Hibok hối đổi được /s1H coin";
/// "Liên kết mã mời thành công" /// "Liên kết mã mời thành công"
@override @override
String get bind_code_success => "Liên kết mã mời thành công"; String get bind_code_success => "Liên kết mã mời thành công";
@@ -6172,6 +6174,9 @@ class _I18n_vi_VN extends I18n {
/// "复制下载地址" /// "复制下载地址"
@override @override
String get copy_download_url => "复制下载地址"; String get copy_download_url => "复制下载地址";
/// "共/s1位朋友"
@override
String get total_friends_nus => "共/s1位朋友";


@override @override
TextDirection get textDirection => TextDirection.ltr; TextDirection get textDirection => TextDirection.ltr;
@@ -9573,9 +9578,9 @@ class _I18n_zh_HK extends I18n {
/// "收入明細" /// "收入明細"
@override @override
String get get_money_detail => "收入明細"; String get get_money_detail => "收入明細";
/// "Hibox收入"
/// "Hibok收入"
@override @override
String get hibok_money => "Hibox收入";
String get hibok_money => "Hibok收入";
/// "兌換H幣" /// "兌換H幣"
@override @override
String get charge_h => "兌換H幣"; String get charge_h => "兌換H幣";
@@ -9615,9 +9620,9 @@ class _I18n_zh_HK extends I18n {
/// "您的提款申請失敗,已退回" /// "您的提款申請失敗,已退回"
@override @override
String get exchange_fail => "您的提款申請失敗,已退回"; String get exchange_fail => "您的提款申請失敗,已退回";
/// "通過Hibox收入兌換/s1H幣"
/// "通過Hibok收入兌換/s1H幣"
@override @override
String get hibok_exchange => "通過Hibox收入兌換/s1H幣";
String get hibok_exchange => "通過Hibok收入兌換/s1H幣";
/// "成功綁定代理優惠碼" /// "成功綁定代理優惠碼"
@override @override
String get bind_code_success => "成功綁定代理優惠碼"; String get bind_code_success => "成功綁定代理優惠碼";
@@ -9858,6 +9863,9 @@ class _I18n_zh_HK extends I18n {
/// "複製下載地址" /// "複製下載地址"
@override @override
String get copy_download_url => "複製下載地址"; String get copy_download_url => "複製下載地址";
/// "共/s1位朋友"
@override
String get total_friends_nus => "共/s1位朋友";


@override @override
TextDirection get textDirection => TextDirection.ltr; TextDirection get textDirection => TextDirection.ltr;
@@ -13259,9 +13267,9 @@ class _I18n_zh_CN extends _I18n_zh_HK {
/// "收入明细" /// "收入明细"
@override @override
String get get_money_detail => "收入明细"; String get get_money_detail => "收入明细";
/// "Hibox收入"
/// "Hibok收入"
@override @override
String get hibok_money => "Hibox收入";
String get hibok_money => "Hibok收入";
/// "兑换H币" /// "兑换H币"
@override @override
String get charge_h => "兑换H币"; String get charge_h => "兑换H币";
@@ -13301,9 +13309,9 @@ class _I18n_zh_CN extends _I18n_zh_HK {
/// "您的提款申请失败,已退回" /// "您的提款申请失败,已退回"
@override @override
String get exchange_fail => "您的提款申请失败,已退回"; String get exchange_fail => "您的提款申请失败,已退回";
/// "通过Hibox收入兑换/s1H币"
/// "通过Hibok收入兑换/s1H币"
@override @override
String get hibok_exchange => "通过Hibox收入兑换/s1H币";
String get hibok_exchange => "通过Hibok收入兑换/s1H币";
/// "成功绑定代理优惠码" /// "成功绑定代理优惠码"
@override @override
String get bind_code_success => "成功绑定代理优惠码"; String get bind_code_success => "成功绑定代理优惠码";
@@ -13544,6 +13552,9 @@ class _I18n_zh_CN extends _I18n_zh_HK {
/// "复制下载地址" /// "复制下载地址"
@override @override
String get copy_download_url => "复制下载地址"; String get copy_download_url => "复制下载地址";
/// "共/s1位朋友"
@override
String get total_friends_nus => "共/s1位朋友";


@override @override
TextDirection get textDirection => TextDirection.ltr; TextDirection get textDirection => TextDirection.ltr;
@@ -16945,9 +16956,9 @@ class _I18n_ko_KR extends I18n {
/// "소득명세" /// "소득명세"
@override @override
String get get_money_detail => "소득명세"; String get get_money_detail => "소득명세";
/// "Hibox소득"
/// "Hibok소득"
@override @override
String get hibok_money => "Hibox소득";
String get hibok_money => "Hibok소득";
/// "H화폐 교환" /// "H화폐 교환"
@override @override
String get charge_h => "H화폐 교환"; String get charge_h => "H화폐 교환";
@@ -16987,9 +16998,9 @@ class _I18n_ko_KR extends I18n {
/// "당신의 인출 신청이 실패하여, 반송되었습니다." /// "당신의 인출 신청이 실패하여, 반송되었습니다."
@override @override
String get exchange_fail => "당신의 인출 신청이 실패하여, 반송되었습니다."; String get exchange_fail => "당신의 인출 신청이 실패하여, 반송되었습니다.";
/// "Hibox를 통해 환전/s1H화폐"
/// "Hibok를 통해 환전/s1H화폐"
@override @override
String get hibok_exchange => "Hibox를 통해 환전/s1H화폐";
String get hibok_exchange => "Hibok를 통해 환전/s1H화폐";
/// "성공적으로 초대 코드를 묶음" /// "성공적으로 초대 코드를 묶음"
@override @override
String get bind_code_success => "성공적으로 초대 코드를 묶음"; String get bind_code_success => "성공적으로 초대 코드를 묶음";
@@ -17230,6 +17241,9 @@ class _I18n_ko_KR extends I18n {
/// "复制下载地址" /// "复制下载地址"
@override @override
String get copy_download_url => "复制下载地址"; String get copy_download_url => "复制下载地址";
/// "共/s1位朋友"
@override
String get total_friends_nus => "共/s1位朋友";


@override @override
TextDirection get textDirection => TextDirection.ltr; TextDirection get textDirection => TextDirection.ltr;
@@ -20631,9 +20645,9 @@ class _I18n_ja_JP extends I18n {
/// "所得明細" /// "所得明細"
@override @override
String get get_money_detail => "所得明細"; String get get_money_detail => "所得明細";
/// "Hibox收入"
/// "Hibok收入"
@override @override
String get hibok_money => "Hibox收入";
String get hibok_money => "Hibok收入";
/// "H幤に両替" /// "H幤に両替"
@override @override
String get charge_h => "H幤に両替"; String get charge_h => "H幤に両替";
@@ -20673,9 +20687,9 @@ class _I18n_ja_JP extends I18n {
/// "引き出し申請は失敗しました,返送されました" /// "引き出し申請は失敗しました,返送されました"
@override @override
String get exchange_fail => "引き出し申請は失敗しました,返送されました"; String get exchange_fail => "引き出し申請は失敗しました,返送されました";
/// "Hibox収入で/s 1 H幤に両替します"
/// "Hibok収入で/s 1 H幤に両替します"
@override @override
String get hibok_exchange => "Hibox収入で/s 1 H幤に両替します";
String get hibok_exchange => "Hibok収入で/s 1 H幤に両替します";
/// "招待コード関連成功" /// "招待コード関連成功"
@override @override
String get bind_code_success => "招待コード関連成功"; String get bind_code_success => "招待コード関連成功";
@@ -20916,6 +20930,9 @@ class _I18n_ja_JP extends I18n {
/// "复制下载地址" /// "复制下载地址"
@override @override
String get copy_download_url => "复制下载地址"; String get copy_download_url => "复制下载地址";
/// "共/s1位朋友"
@override
String get total_friends_nus => "共/s1位朋友";


@override @override
TextDirection get textDirection => TextDirection.ltr; TextDirection get textDirection => TextDirection.ltr;


+ 24
- 5
lib/home/friend_page.dart View File

@@ -152,7 +152,7 @@ class _FriendPageState extends State<FriendPage> {
height: 5, height: 5,
), ),
Text(I18n.of(context).apply_fro_friends, Text(I18n.of(context).apply_fro_friends,
textScaleFactor: 1.0,
textScaleFactor: 1.0,
style: style:
TextStyle(fontSize: 10, color: const Color(0xFF6A6A6A))), TextStyle(fontSize: 10, color: const Color(0xFF6A6A6A))),
], ],
@@ -403,7 +403,7 @@ class _FriendPageState extends State<FriendPage> {
width: 20, width: 20,
child: Text( child: Text(
word, word,
textScaleFactor: 1.0,
textScaleFactor: 1.0,
style: TextStyle( style: TextStyle(
fontSize: 10, fontSize: 10,
color: color:
@@ -467,6 +467,7 @@ class _FriendPageState extends State<FriendPage> {
return _functionButtons[index]; return _functionButtons[index];
} }
} }
var result;
int _contactIndex = index - _functionButtons.length; int _contactIndex = index - _functionButtons.length;
bool _isGroupTitle = true; bool _isGroupTitle = true;
FriendModel _contact = friendList[_contactIndex]; FriendModel _contact = friendList[_contactIndex];
@@ -476,13 +477,31 @@ class _FriendPageState extends State<FriendPage> {
_isGroupTitle = false; _isGroupTitle = false;
} }
return FriendsInfo(
result = FriendsInfo(
userId: _contact.friendId, userId: _contact.friendId,
avatar: _contact.avatar, avatar: _contact.avatar,
title: Provider.of<RefNameProvider>(context) title: Provider.of<RefNameProvider>(context)
.getRefName(_contact.friendId, _contact.name), .getRefName(_contact.friendId, _contact.name),
isShowDivder: true, isShowDivder: true,
groupTitle: _isGroupTitle ? _contact.nameTag : null); groupTitle: _isGroupTitle ? _contact.nameTag : null);
if (index == (friendList.length + _functionButtons.length - 1)) {
return result = Column(
children: <Widget>[
result,
Container(
height: 50,
color: Colors.white,
child: Text(I18n.of(context)
.total_friends_nus
.replaceFirst('/s1', friendList.length.toString())),
alignment: Alignment.center,
width: Screen.width,
),
],
);
}
return result;
}, },
itemCount: friendList.length + _functionButtons.length, itemCount: friendList.length + _functionButtons.length,
), ),
@@ -511,8 +530,8 @@ class _FriendPageState extends State<FriendPage> {
Radius.circular(Constants.IndexLetterBoxRadius)), Radius.circular(Constants.IndexLetterBoxRadius)),
), ),
child: Center( child: Center(
child:
Text(_currentLetter, textScaleFactor: 1.0,style: AppStyles.IndexLetterBoxTextStyle),
child: Text(_currentLetter,
textScaleFactor: 1.0, style: AppStyles.IndexLetterBoxTextStyle),
), ),
), ),
)); ));


+ 24
- 5
lib/utils/HttpUtil.dart View File

@@ -35,6 +35,7 @@ import 'dart:io';
import '../data/UserData.dart'; import '../data/UserData.dart';
import '../utils/TokenMgr.dart'; import '../utils/TokenMgr.dart';
import 'package:http_parser/http_parser.dart'; import 'package:http_parser/http_parser.dart';
import 'package:chat/utils/friend_list_mgr.dart';
class HttpUtil { class HttpUtil {
static HttpUtil _instance; static HttpUtil _instance;
@@ -217,7 +218,8 @@ class HttpUtil {
var fileBytes; var fileBytes;
if (contentType == 'image' && size > 10240) { if (contentType == 'image' && size > 10240) {
fileBytes = await WidgetUtil.getCompressImg(path,quality: 80,percentage: 80);
fileBytes =
await WidgetUtil.getCompressImg(path, quality: 80, percentage: 80);
} else { } else {
fileBytes = imgfile.readAsBytesSync(); fileBytes = imgfile.readAsBytesSync();
} }
@@ -282,7 +284,7 @@ class HttpUtil {
print('用户信息resData $resData'); print('用户信息resData $resData');
if (resData['code'] == 0) { if (resData['code'] == 0) {
var info = UserInfo.fromJson(resData['data']); var info = UserInfo.fromJson(resData['data']);
info.isBlackened
info.isBlackened
? BlacklistMgr.addBlackListMe(info.userId) ? BlacklistMgr.addBlackListMe(info.userId)
: BlacklistMgr.removeBalckListMe(info.userId); : BlacklistMgr.removeBalckListMe(info.userId);
@@ -543,7 +545,7 @@ class HttpUtil {
saveAotuLoginKey(resData, isSaveUserId: false); saveAotuLoginKey(resData, isSaveUserId: false);
return; return;
} }
checkFriends();
LocalNotificationUtil.instance.startPush(); LocalNotificationUtil.instance.startPush();
//ChatDataMgr().initMsg(); //ChatDataMgr().initMsg();
Navigator.of(context) Navigator.of(context)
@@ -1200,7 +1202,7 @@ class HttpUtil {
//根据经纬度获取用户国家城市 //根据经纬度获取用户国家城市
getAddress(double lon, double lat) async { getAddress(double lon, double lat) async {
Map data = { Map data = {
"lon": lon.toString(),
"lon": lon.toString(),
"lat": lat.toString(), "lat": lat.toString(),
}; };
data['sign'] = TokenMgr().getSign(data); data['sign'] = TokenMgr().getSign(data);
@@ -1246,7 +1248,7 @@ class HttpUtil {
if (UserData().basicInfo.userId == null) return; if (UserData().basicInfo.userId == null) return;
Map data = { Map data = {
"userId": UserData().basicInfo.userId, "userId": UserData().basicInfo.userId,
"lon": lon.toString(),
"lon": lon.toString(),
"lat": lat.toString(), "lat": lat.toString(),
}; };
data['sign'] = TokenMgr().getSign(data); data['sign'] = TokenMgr().getSign(data);
@@ -1277,6 +1279,7 @@ class HttpUtil {
callback(resData['data']['UserId']); callback(resData['data']['UserId']);
} }
} }
//拉黑用户 //拉黑用户
blackUser(int userId, callback) async { blackUser(int userId, callback) async {
Map data = { Map data = {
@@ -1350,6 +1353,7 @@ class HttpUtil {
callback(); callback();
} }
} }
//向企业服务助手提交信息 //向企业服务助手提交信息
Future<bool> commitInfoToCompany(MsgModel msgModel) async { Future<bool> commitInfoToCompany(MsgModel msgModel) async {
Map data = { Map data = {
@@ -1398,4 +1402,19 @@ class HttpUtil {
callback(); callback();
} }
} }
//获取好友校验值
checkFriends() async {
Map data = {
"userId": UserData().basicInfo.userId,
};
data['sign'] = TokenMgr().getSign(data);
Response res = await HttpUtil()
.post('friendship/check/userFriends', data: data);
Map resData = res.data;
if (resData['code'] == 0) {
FriendListMgr().checkFromServer(resData['data']);
}
}
} }

+ 1
- 2
lib/utils/friend_list_mgr.dart View File

@@ -122,8 +122,7 @@ class FriendListMgr {
idList.add(model.friendId); idList.add(model.friendId);
} }
idList.sort(); idList.sort();
String md5 = TokenMgr().generateMd5(idList.join(','));
if (friendList.length == 0 || md5 != sign) {
if (friendList.length == 0 || TokenMgr().generateMd5(idList.join(',')) != sign) {
getFriendListFromServer(); getFriendListFromServer();
} }
} }


Loading…
Cancel
Save