zdc 5 lat temu
rodzic
commit
ca34988f8f
22 zmienionych plików z 289 dodań i 107 usunięć
  1. BIN
      assets/img_splash_4.png
  2. BIN
      assets/img_splash_5.png
  3. +6
    -3
      i18n/en-US.json
  4. +5
    -2
      i18n/ja-JP.json
  5. +5
    -2
      i18n/ko-KR.json
  6. +6
    -3
      i18n/vi-VN.json
  7. +15
    -13
      i18n/zh-CN.json
  8. +5
    -2
      i18n/zh-HK.json
  9. +1
    -1
      lib/chat/company_server_view.dart
  10. +12
    -8
      lib/chat/download_item.dart
  11. +1
    -1
      lib/chat/group_chat_view.dart
  12. +86
    -30
      lib/chat/input_bar.dart
  13. +50
    -16
      lib/generated/i18n.dart
  14. +1
    -1
      lib/home/AddProgram.dart
  15. +1
    -1
      lib/home/InformUser.dart
  16. +35
    -6
      lib/home/ProfilePage.dart
  17. +6
    -0
      lib/home/money_picture_view.dart
  18. +3
    -10
      lib/home/realtimehelper/real_time_helper_page.dart
  19. +22
    -6
      lib/home/realtimehelper/translation_butler_page.dart
  20. +21
    -0
      lib/home/realtimehelper/travel_butler_page.dart
  21. +1
    -2
      lib/utils/HttpUtil.dart
  22. +7
    -0
      lib/utils/PicSwiper.dart

BIN
assets/img_splash_4.png Wyświetl plik

Przed Po
Szerokość: 720  |  Wysokość: 868  |  Rozmiar: 333 KiB

BIN
assets/img_splash_5.png Wyświetl plik

Przed Po
Szerokość: 720  |  Wysokość: 868  |  Rozmiar: 197 KiB

+ 6
- 3
i18n/en-US.json Wyświetl plik

@@ -1152,7 +1152,7 @@
"you_get": " you got rewards from others",
"enter_num_qian": " number of exchanges (unit K) ",
"enter_num_qian1": " number of withdrawals (unit K) ",
"daily_translate_voucher": "Translation voucher",
"daily_translate_voucher": " Voucher",
"msg_notice": "Notice message",
"select_notice_people": "Select notice people",
"search_phone": "Search phone number",
@@ -1164,7 +1164,7 @@
"search_plach": "Search location",
"finding_place": "Find location",
"real_time_helper": "Real-time helper",
"translation_butler": "Translation assistant",
"translation_butler": "Real-time translation service",
"travel_butler": "Travel assistant",
"translation_butler_tips": "Your real-time personal translator, it can help you solve the language barrier anytime and anywhere",
"choose_language": "Please select the language to be translated",
@@ -1248,5 +1248,8 @@
"travel_introduction": "Are you traveling further and further away from your destination? Choose your starting point and ending point, the travel manager will accurately measure the distance for you",
"splash_tips_content4": "Unobstructed travel chat",
"splash_tips_content5": "Worry-free your trip",
"shock_notice": "Vibration notification"
"shock_notice": "Vibration notification",
"max_upload_size": "最多上传/s1张",
"travel_tips2":"Your personal butler, to solve the problem of taxis going to the wrong destination caused by the language"
}

+ 5
- 2
i18n/ja-JP.json Wyświetl plik

@@ -1164,7 +1164,7 @@
"search_plach": "位置検索",
"finding_place": "位置を検索",
"real_time_helper": "リアルタイムヘルプ",
"translation_butler": "翻訳バトラー",
"translation_butler": "リアルタイム翻訳サービス",
"travel_butler": "トラベルバトラー",
"translation_butler_tips": "あなたのリアルタイムの個人通訳は、いつでもどこでも言語の不通を解決してくれます",
"choose_language": "翻訳する言語を選んでください",
@@ -1247,5 +1247,8 @@
"travel_introduction": "是否在离目的地越行越远?选择你的起点和终点,出行管家为你精准测距",
"splash_tips_content4": "出行聊天畅通无阻",
"splash_tips_content5": "无忧你的旅行" ,
"shock_notice": "震动通知"
"shock_notice": "震动通知",
"max_upload_size": "最多上传/s1张",
"travel_tips2":"您的贴身出行管家,解决语言不通打车走错路的问题"
}

+ 5
- 2
i18n/ko-KR.json Wyświetl plik

@@ -1164,7 +1164,7 @@
"search_plach": "위치 검색",
"finding_place": "위치 찾기",
"real_time_helper": "실시 도움",
"translation_butler": "번역 집사",
"translation_butler": "실시간 번역 서비스",
"travel_butler": "출행 집사",
"translation_butler_tips": " 당신의 실시간 밀착 통역으로 언제 어디서나 말이 통하지 않는 것을 해결해 드립니다.",
"choose_language": "번역할 언어를 선택하세요.",
@@ -1248,5 +1248,8 @@
"travel_introduction": "是否在离目的地越行越远?选择你的起点和终点,出行管家为你精准测距",
"splash_tips_content4": "出行聊天畅通无阻",
"splash_tips_content5": "无忧你的旅行" ,
"shock_notice": "震动通知"
"shock_notice": "震动通知",
"max_upload_size": "最多上传/s1张",
"travel_tips2":"您的贴身出行管家,解决语言不通打车走错路的问题"
}

+ 6
- 3
i18n/vi-VN.json Wyświetl plik

@@ -723,7 +723,7 @@
"she_liar": "Em ấy là một kẻ lừa đảo",
"he_liar": "Anh ấy là một kẻ lừa đảo",
"provide_screenshots": "Xin cung cấp ảnh chụp màn hình liên quan để chúng tôi theo dõi xác thực",
"describe_details": "Vui lòng mô tả chi tiết (trong vòng 100 từ)",
"describe_details": "Vui lòng mô tả chi tiết(trong vòng 100 ký tự)",
"report_reason": "Vui lòng chọn lý do báo cáo",
"report_success2": "Báo cáo thành công",
"successfully_modified": "Đã sửa đổi thành công",
@@ -1164,7 +1164,7 @@
"search_plach": "Rà soát địa điểm",
"finding_place": " Tìm địa điểm",
"real_time_helper": "Hỗ trợ nhanh",
"translation_butler": "Trợ lý phiên dịch",
"translation_butler": "Dịch vụ dịch thuật thời gian thực",
"travel_butler": " Trợ lý chỉ đường",
"translation_butler_tips": "Trợ lý dịch thuật giúp bạn giải quyết trở ngại ngôn ngữ",
"choose_language": " Vui lòng chọn một ngôn ngữ để dịch ",
@@ -1247,5 +1247,8 @@
"travel_introduction": "是否在离目的地越行越远?选择你的起点和终点,出行管家为你精准测距",
"splash_tips_content4": "出行聊天畅通无阻",
"splash_tips_content5": "无忧你的旅行" ,
"shock_notice": "震动通知"
"shock_notice": "震动通知",
"max_upload_size": "最多上传/s1张",
"travel_tips2":"您的贴身出行管家,解决语言不通打车走错路的问题"
}

+ 15
- 13
i18n/zh-CN.json Wyświetl plik

@@ -1082,7 +1082,7 @@
"undefine_name": "未命名",
"group_qr_code": "群二维码名片",
"group_qr_code_tips": "该二维码7天内(/s1月/s2日前)有效,重新进入将更新",
"Goddess_heat": "女神热度",
"Goddess_heat": "女神热度",
"Goddess_heat_tips": "累计收获的礼物",
"new_friends": "新朋友",
"before_three_day": "三天前",
@@ -1162,9 +1162,9 @@
"confrim_recovery": "确定恢复已被焚毁的照片吗?\n(已经看过的用户可以再看一次)",
"send_to": "发送到",
"search_plach": "搜索位置",
"finding_place": "查找位置",
"finding_place": "查找位置",
"real_time_helper": "实时帮",
"translation_butler": "翻译管家",
"translation_butler": "实时翻译服务",
"travel_butler": "出行管家",
"translation_butler_tips": "您的实时贴身翻译,随时随地帮您解决语言不通",
"choose_language": "请选择要翻译的语言",
@@ -1218,15 +1218,15 @@
"translation_more_desc": "更多描述",
"file": "文件",
"max_file": "文件大于/s1M",
"feedback_assistant":"反馈小助手",
"feedback_tips":"有什么问题都可以反馈给我哦",
"man_retranslate":"人工重译",
"robot_retranslate":"机器重译",
"see_original":"查看原文",
"forward":"转发",
"copy_download_url":"复制下载地址",
"total_friends_nus":"共/s1位朋友",
"hava_error_photo":"有图片违规",
"feedback_assistant": "反馈小助手",
"feedback_tips": "有什么问题都可以反馈给我哦",
"man_retranslate": "人工重译",
"robot_retranslate": "机器重译",
"see_original": "查看原文",
"forward": "转发",
"copy_download_url": "复制下载地址",
"total_friends_nus": "共/s1位朋友",
"hava_error_photo": "有图片违规",
"translation_butler_evaluation_tips2": "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知",
"translation_butler_push_order_time": "时间:今天/s1 时长:",
"translation_butler_push_order_time2": "下单时间:今天/s1 等待时长:",
@@ -1248,5 +1248,7 @@
"travel_introduction": "是否在离目的地越行越远?选择你的起点和终点,出行管家为你精准测距",
"splash_tips_content4": "出行聊天畅通无阻",
"splash_tips_content5": "无忧你的旅行",
"shock_notice":"震动通知"
"shock_notice":"震动通知",
"max_upload_size": "最多上传/s1张",
"travel_tips2":"您的贴身出行管家,解决语言不通打车走错路的问题"
}

+ 5
- 2
i18n/zh-HK.json Wyświetl plik

@@ -1164,7 +1164,7 @@
"search_plach": "搜索位置",
"finding_place": "查找位置",
"real_time_helper": "實時幫",
"translation_butler": "翻譯管家",
"translation_butler": "實時翻譯服務",
"travel_butler": "出行管家",
"translation_butler_tips": "您的實時貼身翻譯,隨時隨地幫您解決語言不通",
"choose_language": "請選擇您的語言和要翻譯的語言",
@@ -1247,5 +1247,8 @@
"travel_introduction": "是否在离目的地越行越远?选择你的起点和终点,出行管家为你精准测距",
"splash_tips_content4": "出行聊天畅通无阻",
"splash_tips_content5": "无忧你的旅行",
"shock_notice": "震動通知"
"shock_notice": "震動通知",
"max_upload_size": "最多上传/s1张",
"travel_tips2":"您的贴身出行管家,解决语言不通打车走错路的问题"
}

+ 1
- 1
lib/chat/company_server_view.dart Wyświetl plik

@@ -169,7 +169,7 @@ class _CompanyServerPageState extends State<CompanyServerPage> {
for (var i = 0; i < resultList.length; i++) {
Asset photoEntity = resultList[i];
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}', byteData.buffer.asInt8List(0));
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}.png', byteData.buffer.asInt8List(0));
_sendPhotoFile(file);
}
}


+ 12
- 8
lib/chat/download_item.dart Wyświetl plik

@@ -13,13 +13,14 @@ class DownloadItem extends StatefulWidget {
final bool isAutoDown;
final Function onComplete;
final Function onFinishTap;
DownloadItem(
{this.msg,
this.child,
this.isShowProgress = true,
this.isAutoDown = true,
this.onComplete,
this.onFinishTap});
DownloadItem({
this.msg,
this.child,
this.isShowProgress = true,
this.isAutoDown = true,
this.onComplete,
this.onFinishTap,
});
@override
_DownloadItemState createState() => _DownloadItemState();
}
@@ -134,7 +135,10 @@ class _DownloadItemState extends State<DownloadItem> {
onTap: isNeedDown ? downloadRes : widget.onFinishTap,
child: Stack(
alignment: Alignment.center,
children: <Widget>[widget.child, _downloadWidget()],
children: <Widget>[
widget.child,
_downloadWidget(),
],
));
}
}

+ 1
- 1
lib/chat/group_chat_view.dart Wyświetl plik

@@ -115,7 +115,7 @@ class _GroupChatPageState extends State<GroupChatPage> {
isGroup: true);
msgList = ChatDataMgr().getGroupRecord();
if (unreadNums >= 10) {
if (unreadNums >= 10 && unreadNums <= msgList.length) {
unreadTime = msgList[unreadNums - 1].time;
}
for (int i = 0; i < msgList.length; i++) {


+ 86
- 30
lib/chat/input_bar.dart Wyświetl plik

@@ -33,9 +33,9 @@ import 'emoji_gif_text.dart';
import 'emoji_text.dart';
class AlterPostion {
int start;
int length;
AlterPostion(this.start, this.length);
int startIndex;
int endIndex;
AlterPostion(this.startIndex, this.endIndex);
}
class InputBar extends StatefulWidget {
@@ -70,6 +70,7 @@ class InputBarState extends State<InputBar>
int lastTxtLen = 0;
List<AlterPostion> alterPosition = [];
String originalInputStr = '';
@override
void initState() {
@@ -78,7 +79,28 @@ class InputBarState extends State<InputBar>
pageController = new PageController();
getKeyboardHeight();
_bloc.start();
_textCtrl.addListener(() {
if (alterPosition.length > 0) {
int offset = -1;
int currentIndex = _textCtrl.selection.baseOffset;
for (int i = 0; i < alterPosition.length; i++) {
var postion = alterPosition[i];
if (currentIndex >= postion.startIndex &&
currentIndex <= postion.endIndex) {
int middle = (postion.startIndex + postion.endIndex) ~/ 2;
offset =
currentIndex >= middle ? postion.endIndex : postion.startIndex;
break;
}
}
if (offset != -1) {
_textCtrl.value = TextEditingValue(
text: _textCtrl.text,
selection:
TextSelection.fromPosition(TextPosition(offset: offset)));
}
}
});
//处理引用事件
MessageMgr().on('Reply Select Message', replySelectMsg);
@@ -133,17 +155,22 @@ class InputBarState extends State<InputBar>
print('选中的成员~~~~~~~~~~~~ ${memberInfo.refName}');
String textStr;
String alterStr = '@${memberInfo.refName} ';
if (_textCtrl.text.length > 0) {
textStr = '${_textCtrl.text} @${memberInfo.refName} ';
textStr += _textCtrl.text + alterStr;
} else {
textStr = '@${memberInfo.refName} ';
textStr = alterStr;
}
alterPosition.add(AlterPostion(
_textCtrl.text.length, _textCtrl.text.length + alterStr.length));
_textCtrl.value = TextEditingValue(
text: textStr,
selection:
TextSelection.fromPosition(TextPosition(offset: textStr.length)));
originalInputStr = _textCtrl.text;
setState(() {
showKeyBoard();
_isComposingMessage = _textCtrl.text.length > 0;
@@ -160,6 +187,31 @@ class InputBarState extends State<InputBar>
// SystemChannels.textInput.invokeMethod('TextInput.show');
}
quickDeleteAlterName(String str) {
var result = str;
int starIndex = 0;
if (str.length < originalInputStr.length) {
int currentIndex = _textCtrl.selection.baseOffset;
for (int i = 0; i < alterPosition.length; i++) {
var postion = alterPosition[i];
if (currentIndex >= postion.startIndex &&
currentIndex <= postion.endIndex) {
result = originalInputStr.replaceRange(
postion.startIndex, postion.endIndex, '');
starIndex = postion.startIndex;
alterPosition.removeAt(i);
break;
}
}
}
if (str != result) {
_textCtrl.value = TextEditingValue(
text: result,
selection:
TextSelection.fromPosition(TextPosition(offset: starIndex)));
}
}
_getRefShortText() {
if (refMsg == null) {
return null;
@@ -248,16 +300,20 @@ class InputBarState extends State<InputBar>
// textSelectionControls: ExtendedMaterialTextSelectionControls(),
keyboardAppearance: Brightness.light,
onChanged: (String messageText) {
quickDeleteAlterName(messageText);
if (_textCtrl.text.length > 0) {
var last = messageText.substring(_textCtrl.text.length - 1);
if (last == '@' && _textCtrl.text.length > lastTxtLen) {
editFocus.unfocus();
_openAlterSelectPage();
bool isGroup = Provider.of<bool>(context);
if (isGroup) {
editFocus.unfocus();
_openAlterSelectPage();
}
}
}
lastTxtLen = _textCtrl.text.length;
originalInputStr = _textCtrl.text;
setState(() {
_isComposingMessage = _textCtrl.text.length > 0;
});
@@ -645,28 +701,28 @@ class InputBarState extends State<InputBar>
}
void _openAlterSelectPage() async {
bool isGroup = Provider.of<bool>(context);
if (isGroup) {
GroupInfoModel groupInfoModel = Provider.of<GroupInfoModel>(context);
editFocus.unfocus();
Provider.of<KeyboardIndexProvider>(context, listen: false)
.changeReadOnlyKey(true);
GroupMemberModel member =
await AlterSelectPage.pickAlterUser(context, groupInfoModel);
GroupInfoModel groupInfoModel = Provider.of<GroupInfoModel>(context);
if (member != null) {
print('选中的成员~~~~~~~~~~~~ ${member.refName}');
_textCtrl.text = '${_textCtrl.text}${member.refName} ';
alterMemberList.add(member);
}
editFocus.requestFocus();
Provider.of<KeyboardIndexProvider>(context, listen: false)
.changeReadOnlyKey(false);
editFocus.unfocus();
Provider.of<KeyboardIndexProvider>(context, listen: false)
.changeReadOnlyKey(true);
GroupMemberModel member =
await AlterSelectPage.pickAlterUser(context, groupInfoModel);
if (member != null) {
print('选中的成员~~~~~~~~~~~~ ${member.refName}');
alterPosition.add(AlterPostion(_textCtrl.text.length - 1,
_textCtrl.text.length + member.refName.length + 1));
_textCtrl.text += '${member.refName} ';
originalInputStr = _textCtrl.text;
alterMemberList.add(member);
}
editFocus.requestFocus();
_textCtrl.text;
Provider.of<KeyboardIndexProvider>(context, listen: false)
.changeReadOnlyKey(false);
}
List<int> getAlterUsers(String messageText) {
@@ -715,7 +771,7 @@ class InputBarState extends State<InputBar>
Asset photoEntity = resultList[i];
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile(
'temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}',
'temp-photo-${DateTime.now().millisecondsSinceEpoch}.png',
byteData.buffer.asInt8List(0));
_sendPhotoFile(file);
}


+ 50
- 16
lib/generated/i18n.dart Wyświetl plik

@@ -2339,8 +2339,8 @@ class I18n implements WidgetsLocalizations {
String get enter_num_qian => " number of exchanges (unit K) ";
/// " number of withdrawals (unit K) "
String get enter_num_qian1 => " number of withdrawals (unit K) ";
/// "Translation voucher"
String get daily_translate_voucher => "Translation voucher";
/// " Voucher"
String get daily_translate_voucher => " Voucher";
/// "Notice message"
String get msg_notice => "Notice message";
/// "Select notice people"
@@ -2363,8 +2363,8 @@ class I18n implements WidgetsLocalizations {
String get finding_place => "Find location";
/// "Real-time helper"
String get real_time_helper => "Real-time helper";
/// "Translation assistant"
String get translation_butler => "Translation assistant";
/// "Real-time translation service"
String get translation_butler => "Real-time translation service";
/// "Travel assistant"
String get travel_butler => "Travel assistant";
/// "Your real-time personal translator, it can help you solve the language barrier anytime and anywhere"
@@ -2533,6 +2533,10 @@ class I18n implements WidgetsLocalizations {
String get splash_tips_content5 => "Worry-free your trip";
/// "Vibration notification"
String get shock_notice => "Vibration notification";
/// "最多上传/s1张"
String get max_upload_size => "最多上传/s1张";
/// "Your personal butler, to solve the problem of taxis going to the wrong destination caused by the language"
String get travel_tips2 => "Your personal butler, to solve the problem of taxis going to the wrong destination caused by the language";
}

class _I18n_en_US extends I18n {
@@ -4717,9 +4721,9 @@ class _I18n_vi_VN extends I18n {
/// "Xin cung cấp ảnh chụp màn hình liên quan để chúng tôi theo dõi xác thực"
@override
String get provide_screenshots => "Xin cung cấp ảnh chụp màn hình liên quan để chúng tôi theo dõi xác thực";
/// "Vui lòng mô tả chi tiết (trong vòng 100 từ)"
/// "Vui lòng mô tả chi tiết(trong vòng 100 ký tự)"
@override
String get describe_details => "Vui lòng mô tả chi tiết (trong vòng 100 từ)";
String get describe_details => "Vui lòng mô tả chi tiết(trong vòng 100 ký tự)";
/// "Vui lòng chọn lý do báo cáo"
@override
String get report_reason => "Vui lòng chọn lý do báo cáo";
@@ -6040,9 +6044,9 @@ class _I18n_vi_VN extends I18n {
/// "Hỗ trợ nhanh"
@override
String get real_time_helper => "Hỗ trợ nhanh";
/// "Trợ lý phiên dịch"
/// "Dịch vụ dịch thuật thời gian thực"
@override
String get translation_butler => "Trợ lý phiên dịch";
String get translation_butler => "Dịch vụ dịch thuật thời gian thực";
/// " Trợ lý chỉ đường"
@override
String get travel_butler => " Trợ lý chỉ đường";
@@ -6292,6 +6296,12 @@ class _I18n_vi_VN extends I18n {
/// "震动通知"
@override
String get shock_notice => "震动通知";
/// "最多上传/s1张"
@override
String get max_upload_size => "最多上传/s1张";
/// "您的贴身出行管家,解决语言不通打车走错路的问题"
@override
String get travel_tips2 => "您的贴身出行管家,解决语言不通打车走错路的问题";

@override
TextDirection get textDirection => TextDirection.ltr;
@@ -9795,9 +9805,9 @@ class _I18n_zh_HK extends I18n {
/// "實時幫"
@override
String get real_time_helper => "實時幫";
/// "翻譯管家"
/// "實時翻譯服務"
@override
String get translation_butler => "翻譯管家";
String get translation_butler => "實時翻譯服務";
/// "出行管家"
@override
String get travel_butler => "出行管家";
@@ -10047,6 +10057,12 @@ class _I18n_zh_HK extends I18n {
/// "震動通知"
@override
String get shock_notice => "震動通知";
/// "最多上传/s1张"
@override
String get max_upload_size => "最多上传/s1张";
/// "您的贴身出行管家,解决语言不通打车走错路的问题"
@override
String get travel_tips2 => "您的贴身出行管家,解决语言不通打车走错路的问题";

@override
TextDirection get textDirection => TextDirection.ltr;
@@ -13550,9 +13566,9 @@ class _I18n_zh_CN extends _I18n_zh_HK {
/// "实时帮"
@override
String get real_time_helper => "实时帮";
/// "翻译管家"
/// "实时翻译服务"
@override
String get translation_butler => "翻译管家";
String get translation_butler => "实时翻译服务";
/// "出行管家"
@override
String get travel_butler => "出行管家";
@@ -13805,6 +13821,12 @@ class _I18n_zh_CN extends _I18n_zh_HK {
/// "震动通知"
@override
String get shock_notice => "震动通知";
/// "最多上传/s1张"
@override
String get max_upload_size => "最多上传/s1张";
/// "您的贴身出行管家,解决语言不通打车走错路的问题"
@override
String get travel_tips2 => "您的贴身出行管家,解决语言不通打车走错路的问题";

@override
TextDirection get textDirection => TextDirection.ltr;
@@ -17308,9 +17330,9 @@ class _I18n_ko_KR extends I18n {
/// "실시 도움"
@override
String get real_time_helper => "실시 도움";
/// "번역 집사"
/// "실시간 번역 서비스"
@override
String get translation_butler => "번역 집사";
String get translation_butler => "실시간 번역 서비스";
/// "출행 집사"
@override
String get travel_butler => "출행 집사";
@@ -17563,6 +17585,12 @@ class _I18n_ko_KR extends I18n {
/// "震动通知"
@override
String get shock_notice => "震动通知";
/// "最多上传/s1张"
@override
String get max_upload_size => "最多上传/s1张";
/// "您的贴身出行管家,解决语言不通打车走错路的问题"
@override
String get travel_tips2 => "您的贴身出行管家,解决语言不通打车走错路的问题";

@override
TextDirection get textDirection => TextDirection.ltr;
@@ -21066,9 +21094,9 @@ class _I18n_ja_JP extends I18n {
/// "リアルタイムヘルプ"
@override
String get real_time_helper => "リアルタイムヘルプ";
/// "翻訳バトラー"
/// "リアルタイム翻訳サービス"
@override
String get translation_butler => "翻訳バトラー";
String get translation_butler => "リアルタイム翻訳サービス";
/// "トラベルバトラー"
@override
String get travel_butler => "トラベルバトラー";
@@ -21318,6 +21346,12 @@ class _I18n_ja_JP extends I18n {
/// "震动通知"
@override
String get shock_notice => "震动通知";
/// "最多上传/s1张"
@override
String get max_upload_size => "最多上传/s1张";
/// "您的贴身出行管家,解决语言不通打车走错路的问题"
@override
String get travel_tips2 => "您的贴身出行管家,解决语言不通打车走错路的问题";

@override
TextDirection get textDirection => TextDirection.ltr;


+ 1
- 1
lib/home/AddProgram.dart Wyświetl plik

@@ -732,7 +732,7 @@ class _AddProgramState extends State<AddProgram> {
Asset photoEntity = resultList[i];
print('名字:${photoEntity.name}');
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}', byteData.buffer.asInt8List(0));
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}.png', byteData.buffer.asInt8List(0));
fileList.add(file);
}


+ 1
- 1
lib/home/InformUser.dart Wyświetl plik

@@ -201,7 +201,7 @@ class _InformUserPageState extends State<InformUserPage> {
for (var i = 0; i < resultList.length; i++) {
Asset photoEntity = resultList[i];
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}', byteData.buffer.asInt8List(0));
File file = await FileCacheMgr().writeFile('temp-photo-${DateTime.now().millisecondsSinceEpoch}.png', byteData.buffer.asInt8List(0));
fileList.add(file);
}
Map data = {"type": 3, "userId": UserData().basicInfo.userId};


+ 35
- 6
lib/home/ProfilePage.dart Wyświetl plik

@@ -64,6 +64,8 @@ var cardWidth;
var greyColor = const Color(0xFFB2B2B2);
const MaxImgSize = 20;
class ProfilePage extends StatefulWidget {
@required
final userId;
@@ -431,10 +433,17 @@ class _ProfilePageState extends State<ProfilePage>
// }
// }
int leftLength = MaxImgSize - imgList.length;
if (leftLength <= 0) {
showToast(I18n.of(context)
.max_upload_size
.replaceFirst('/s1', MaxImgSize.toString()));
return;
}
List<Asset> resultList = List<Asset>();
resultList = await MultiImagePicker.pickImages(
maxImages: 9,
maxImages: leftLength > 9 ? 9 : leftLength,
enableCamera: false,
selectedAssets: [],
cupertinoOptions: CupertinoOptions(takePhotoIcon: "chat"),
@@ -454,7 +463,7 @@ class _ProfilePageState extends State<ProfilePage>
print('名字:${photoEntity.name}');
ByteData byteData = await photoEntity.getByteData();
File file = await FileCacheMgr().writeFile(
'temp-photo-${DateTime.now().millisecondsSinceEpoch}-${photoEntity.name}',
'temp-photo-${DateTime.now().millisecondsSinceEpoch}.png',
byteData.buffer.asInt8List(0));
fileList.add(file);
@@ -476,6 +485,8 @@ class _ProfilePageState extends State<ProfilePage>
showToast(I18n.of(context).hava_error_photo);
}
MessageMgr().emit('refresh_photo');
} else {
showToast(resData['msg']);
}
}
@@ -1192,6 +1203,7 @@ class _ProfilePageState extends State<ProfilePage>
isWatch: f['IsCheck'] == 1,
userId: userInfo.userId,
isBuy: f['PayStatus'] == 1,
isCheck: f['Status'] == 0,
))
.toList();
var list = imgList.map((data) {
@@ -1239,7 +1251,9 @@ class _ProfilePageState extends State<ProfilePage>
? I18n.of(context).his_photo
: I18n.of(context).her_photo)),
//+'(${I18n.of(context).visit_you.replaceFirst('/s1', userInfo.accessNum.toString())})',
description: isMyself ? I18n.of(context).upload : '',
description: isMyself
? '${I18n.of(context).upload}(${imgList.length}/$MaxImgSize)'
: '',
descriptionColor: Constants.BlueTextColor,
showDivider: true,
showRightIcon: false,
@@ -1369,10 +1383,16 @@ class _ProfilePageState extends State<ProfilePage>
showToast(I18n.of(context).no_photos);
return;
}
var moneyList = [];
for (int i = 0; i < imgList.length; i++) {
if (imgList[i]['Status'] == 1) {
moneyList.add(imgList[i]);
}
}
Navigator.of(context)
.push(new MaterialPageRoute(builder: (context) {
return MoneyPicture(
imageList: imgList,
imageList: moneyList,
);
}));
},
@@ -1851,6 +1871,15 @@ class _ProfilePageState extends State<ProfilePage>
}
}
clickChatAccout() {
if (widget.fromWhere != null && widget.fromWhere == 0) {
///如果是聊天界面跳转过来的,直接返回
Navigator.of(context).pop();
} else {
testChatPermission(() {});
}
}
buyPhoto() {
//女性用户付费,男性用户会员的话免费解锁,非会员付费解锁
becomeVip() {
@@ -1965,12 +1994,12 @@ class _ProfilePageState extends State<ProfilePage>
_bottomBorderBox(I18n.of(context).expect_lover, lovePeople, true, () {}),
(userInfo.wechat != null && userInfo.wechat != '')
? _bottomBorderBox(
I18n.of(context).wechat_number, wechat, true, buyChatAccount,
I18n.of(context).wechat_number, wechat, true, clickChatAccout,
showIcon: !isAuthority)
: Container(),
(userInfo.facebook != null && userInfo.facebook != '')
? _bottomBorderBox(
I18n.of(context).facebook, facebook, true, buyChatAccount,
I18n.of(context).facebook, facebook, true, clickChatAccout,
showIcon: !isAuthority)
: Container(),
userInfo.ownMsg != null && userInfo.ownMsg != ''


+ 6
- 0
lib/home/money_picture_view.dart Wyświetl plik

@@ -21,6 +21,7 @@ class MoneyPicture extends StatefulWidget {
class _MoneyPictureState extends State<MoneyPicture> {
int selectId = 0;
int originalMoneyId = 0;
Widget _buildImg(data) {
var width = (MediaQuery.of(context).size.width - 30) / 3;
@@ -77,6 +78,7 @@ class _MoneyPictureState extends State<MoneyPicture> {
if (element['Type'] == PhotoType.money.index ||
element['Type'] == PhotoType.destroyMoney.index) {
selectId = element['Id'];
originalMoneyId = selectId;
}
}
}
@@ -107,6 +109,10 @@ class _MoneyPictureState extends State<MoneyPicture> {
style: Constants.AppBarActionTextStyle),
),
onTap: () async {
if (originalMoneyId == selectId) {
Navigator.of(context).pop();
return;
}
Map rdata = {
"userId": UserData().basicInfo.userId,
"Id": selectId,


+ 3
- 10
lib/home/realtimehelper/real_time_helper_page.dart Wyświetl plik

@@ -165,7 +165,7 @@ class RealTimeHelperPageState extends State<RealTimeHelperPage> {
builder: (_) => TranslationButlerPage(),
),
);
},textColor: Color(0xff2685FA),tips: I18n.of(context).translation_butler_introduction),
},textColor: Color(0xff2685FA)),
helperCard(
I18n.of(context).travel_butler, R.assetsImagesImgTravelButler,
() {
@@ -174,7 +174,7 @@ class RealTimeHelperPageState extends State<RealTimeHelperPage> {
builder: (_) => TravelButlerPage(),
),
);
},textColor: Color(0xffff682d),tips: I18n.of(context).travel_introduction),
},textColor: Color(0xffff682d) ),
SizedBox(
height: 15,
),
@@ -186,7 +186,7 @@ class RealTimeHelperPageState extends State<RealTimeHelperPage> {
}

Widget helperCard(String title, String assets, Function callBack,
{Color textColor,String tips}) {
{Color textColor }) {
return Stack(children: <Widget>[
InkWell(
child: Container(
@@ -220,13 +220,6 @@ class RealTimeHelperPageState extends State<RealTimeHelperPage> {
onTap: callBack,
),

Positioned(child: InkWell(child: Container( width: 40,height: 40,child: Align(child: Icon(
IconData(0xe681, fontFamily: Constants.IconFontFamily),
color: Color(0xFFFF7E00),
size: 28.0,
),alignment: Alignment.center,),),onTap: (){
CustomUI.buildTip(context, title, Padding(padding: EdgeInsets.all(10),child: fixedText(tips,fontSize: 14),));
},),right: 21,top: 21,)

],);
}


+ 22
- 6
lib/home/realtimehelper/translation_butler_page.dart Wyświetl plik

@@ -363,14 +363,30 @@ class TranslationButlerPageState extends State<TranslationButlerPage> {
return ListView(
controller: _scrollController,
children: <Widget>[

Padding(
padding: EdgeInsets.only(left: 20, right: 10, top: 15),
child: Text(
I18n.of(context).translation_butler_tips,
textScaleFactor: 1.0,
style: TextStyle(color: Color(0xffABABAB), fontSize: 13),
),
),
child: Row(children: <Widget>[
Expanded(child: Text(
I18n.of(context).translation_butler_tips,
textScaleFactor: 1.0,
style: TextStyle(color: Color(0xffABABAB), fontSize: 13),
)),
InkWell(child: Container( width: 40,height: 40,child: Align(child: Icon(
IconData(0xe681, fontFamily: Constants.IconFontFamily),
color: Color(0xFFFF7E00),
size: 28.0,
),alignment: Alignment.center,),),onTap: (){
CustomUI.buildTip(context, I18n.of(context).translation_butler, Padding(padding: EdgeInsets.all(10),child: fixedText(I18n.of(context).translation_butler_introduction,fontSize: 14),));
},)
],),
) ,






Container(
margin: EdgeInsets.all(10),
child: Card(


+ 21
- 0
lib/home/realtimehelper/travel_butler_page.dart Wyświetl plik

@@ -67,6 +67,27 @@ class TravelButlerPageState extends State<TravelButlerPage> {
color: Color(0xffE8EAF0),
child: ListView(
children: <Widget>[


Padding(
padding: EdgeInsets.only(left: 20, right: 10, top: 15),
child: Row(children: <Widget>[
Expanded(child: Text(
I18n.of(context).travel_tips2,
textScaleFactor: 1.0,
style: TextStyle(color: Color(0xffABABAB), fontSize: 13),
)),
InkWell(child: Container( width: 40,height: 40,child: Align(child: Icon(
IconData(0xe681, fontFamily: Constants.IconFontFamily),
color: Color(0xFFFF7E00),
size: 28.0,
),alignment: Alignment.center,),),onTap: (){
CustomUI.buildTip(context, I18n.of(context).travel_butler, Padding(padding: EdgeInsets.all(10),child: fixedText(I18n.of(context).travel_introduction,fontSize: 14),));
},)
],),
) ,


Container(
margin: EdgeInsets.all(10),
child: Card(


+ 1
- 2
lib/utils/HttpUtil.dart Wyświetl plik

@@ -219,7 +219,7 @@ class HttpUtil {
var fileBytes;
if (contentType == 'image' && size > 10240) {
fileBytes =
await WidgetUtil.getCompressImg(path, quality: 80, percentage: 80);
await WidgetUtil.getCompressImg(path, quality: 20, percentage: 60);
} else {
fileBytes = imgfile.readAsBytesSync();
}
@@ -1111,7 +1111,6 @@ class HttpUtil {
Map data = {
"suserid": msgModel.from,
"chatmsgid": msgModel.time,
"slanguage": 1,
"tlanguage": UserData().language,
"chattype": msgModel.msgType,
"chatchanneltype": msgModel.channelType,


+ 7
- 0
lib/utils/PicSwiper.dart Wyświetl plik

@@ -18,6 +18,7 @@ import 'package:extended_image/extended_image.dart';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:oktoast/oktoast.dart';
import 'package:provider/provider.dart';
import 'ChargeMoney.dart';
@@ -224,6 +225,10 @@ class _PicSwiperState extends State<PicSwiper>
value: isAgree,
activeColor: Colors.blue,
onChanged: (bool val) {
if(widget.pics[currentIndex].isCheck){
showToast(I18n.of(context).reviewing);
return;
}
HttpUtil().setPhote(context, id, isAgree ? 0 : 1, () {
this.setState(() {
isAgree = !isAgree;
@@ -895,6 +900,7 @@ class PicSwiperItem {
int type;
bool isBuy; //是否购买
bool isWatch; //是否观看
bool isCheck;//是否审核中
PicSwiperItem(
this.picUrl, {
this.file,
@@ -904,5 +910,6 @@ class PicSwiperItem {
this.isBuy = false,
this.isWatch = false,
this.userId,
this.isCheck = false,
});
}

Ładowanie…
Anuluj
Zapisz