diff --git a/android/app/agconnect-services.json b/android/app/agconnect-services.json index abbd909..2e60b4b 100644 --- a/android/app/agconnect-services.json +++ b/android/app/agconnect-services.json @@ -5,11 +5,12 @@ }, "client":{ "cp_id":"890086000300385560", - "product_id":"9105385871708389411", - "client_id":"270664671340528640", - "client_secret":"00CC308FC014C334D58CF79471B490FD6274BC39FEAAD89B63E762871DB4EBCC", - "app_id":"101598177", - "package_name":"com.cyhd.henhoandroid" + "product_id":"9105385871708615262", + "client_id":"330243365088003136", + "client_secret":"7A8C08A4377B06C3FE950D55511A0F7CBA4164C9319E06E8401A33BBCBDCFA7C", + "app_id":"101961905", + "package_name":"com.cyhd.henhoandroid", + "api_key":"CV6qgj5CPtQonVHTR8gGJxvdRrkeBaZ+KqTsHcRmUyTtSgpYuBknlD5Z8mb3ob8TH7Kq2FJknGNbmserIjlUfmiuUZ2D" }, "service":{ "analytics":{ @@ -18,9 +19,9 @@ "channel_id":"" }, "ml":{ - "mlservice_url":"ml-api-dra.ai.hicloud.com,ml-api-dra.ai.dbankcloud.cn" + "mlservice_url":"ml-api-dra.ai.dbankcloud.com,ml-api-dra.ai.dbankcloud.cn" } }, "region":"SG", "configuration_version":"1.0" -} \ No newline at end of file +} diff --git a/android/app/build.gradle b/android/app/build.gradle index 34a5f99..77fbfd9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -70,7 +70,7 @@ android { XIAOMI_APPKEY:"MI-5221829498125",//小米平台注册的appkey XIAOMI_APPID:"MI-2882303761518294125",//小米平台注册的appid // - HUAWEI_APPID:"101598177",//华为平台注册的appid + HUAWEI_APPID:"101961905",//华为平台注册的appid OPPO_APPKEY : "OP-cd9ece5049514019842f54d537068018", // OPPO平台注册的appkey diff --git a/android/gradle.properties b/android/gradle.properties index 7dee586..73f050b 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -android.enableR8=true +android.enableR8=false diff --git a/assets/fonts/iconfont.ttf b/assets/fonts/iconfont.ttf index bf143a8..466fe85 100644 Binary files a/assets/fonts/iconfont.ttf and b/assets/fonts/iconfont.ttf differ diff --git a/assets/images/img_check_photo_bg.png b/assets/images/img_check_photo_bg.png new file mode 100644 index 0000000..10c4233 Binary files /dev/null and b/assets/images/img_check_photo_bg.png differ diff --git a/assets/images/img_realtime_bg1.png b/assets/images/img_realtime_bg1.png new file mode 100644 index 0000000..be2cb6f Binary files /dev/null and b/assets/images/img_realtime_bg1.png differ diff --git a/assets/images/img_realtime_bg2.png b/assets/images/img_realtime_bg2.png new file mode 100644 index 0000000..3fb04c1 Binary files /dev/null and b/assets/images/img_realtime_bg2.png differ diff --git a/i18n/en-US.json b/i18n/en-US.json index 03bdd9f..4776afe 100644 --- a/i18n/en-US.json +++ b/i18n/en-US.json @@ -1226,5 +1226,19 @@ "forward":"Forward", "copy_download_url":"复制下载地址", "total_friends_nus":"共/s1位朋友", - "hava_error_photo":"有图片违规" + "hava_error_photo":"有图片违规", + "translation_butler_evaluation_tips2": "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知", + "translation_butler_push_order_time": "时间:今天/s1 时长:", + "translation_butler_push_order_time2": "下单时间:今天/s1 等待时长:", + "translation_butler_title3": "大神专属", + "translation_butler_start_receive_order": "开启接单", + "translation_butler_stop_receive_order": "未开启接单", + "translation_butler_stop_tips": "翻译人员无法进入创建订单", + "translation_butler_scenes2": "场景:", + "translation_butler_last_item_start": "[翻译管家服务开始]", + "translation_butler_last_item_end": "[翻译管家服务结束]", + "travel_start": "起点", + "travel_end": "终点", + "translation_butler_order_time_out": "翻译订单超时已被取消" + } \ No newline at end of file diff --git a/i18n/ja-JP.json b/i18n/ja-JP.json index 52a1d63..d66be64 100644 --- a/i18n/ja-JP.json +++ b/i18n/ja-JP.json @@ -1226,5 +1226,18 @@ "forward":"转发", "copy_download_url":"复制下载地址", "total_friends_nus":"共/s1位朋友", - "hava_error_photo":"有图片违规" + "hava_error_photo":"有图片违规", + "translation_butler_push_order_time": "时间:今天/s1 时长:", + "translation_butler_push_order_time2": "下单时间:今天/s1 等待时长:", + "translation_butler_title3": "大神专属", + "translation_butler_start_receive_order": "开启接单", + "translation_butler_stop_receive_order": "未开启接单", + "translation_butler_stop_tips": "翻译人员无法进入创建订单", + "translation_butler_scenes2": "场景:", + "translation_butler_last_item_start": "[翻译管家服务开始]", + "translation_butler_last_item_end": "[翻译管家服务结束]", + "travel_start": "起点", + "travel_end": "终点", + "translation_butler_order_time_out": "翻译订单超时已被取消" + } \ No newline at end of file diff --git a/i18n/ko-KR.json b/i18n/ko-KR.json index b70f2d8..dcc2d8e 100644 --- a/i18n/ko-KR.json +++ b/i18n/ko-KR.json @@ -1226,5 +1226,19 @@ "forward":"转发", "copy_download_url":"复制下载地址", "total_friends_nus":"共/s1位朋友", - "hava_error_photo":"有图片违规" + "hava_error_photo":"有图片违规", + "translation_butler_evaluation_tips2": "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知", + "translation_butler_push_order_time": "时间:今天/s1 时长:", + "translation_butler_push_order_time2": "下单时间:今天/s1 等待时长:", + "translation_butler_title3": "大神专属", + "translation_butler_start_receive_order": "开启接单", + "translation_butler_stop_receive_order": "未开启接单", + "translation_butler_stop_tips": "翻译人员无法进入创建订单", + "translation_butler_scenes2": "场景:", + "translation_butler_last_item_start": "[翻译管家服务开始]", + "translation_butler_last_item_end": "[翻译管家服务结束]", + "travel_start": "起点", + "travel_end": "终点", + "translation_butler_order_time_out": "翻译订单超时已被取消" + } \ No newline at end of file diff --git a/i18n/vi-VN.json b/i18n/vi-VN.json index 15cf9bc..c2502f9 100644 --- a/i18n/vi-VN.json +++ b/i18n/vi-VN.json @@ -1226,5 +1226,18 @@ "forward": "转发", "copy_download_url": "复制下载地址", "total_friends_nus":"共/s1位朋友", - "hava_error_photo":"有图片违规" + "hava_error_photo":"有图片违规", + "translation_butler_push_order_time": "时间:今天/s1 时长:", + "translation_butler_push_order_time2": "下单时间:今天/s1 等待时长:", + "translation_butler_title3": "大神专属", + "translation_butler_start_receive_order": "开启接单", + "translation_butler_stop_receive_order": "未开启接单", + "translation_butler_stop_tips": "翻译人员无法进入创建订单", + "translation_butler_scenes2": "场景:", + "translation_butler_last_item_start": "[翻译管家服务开始]", + "translation_butler_last_item_end": "[翻译管家服务结束]", + "travel_start": "起点", + "travel_end": "终点", + "translation_butler_order_time_out": "翻译订单超时已被取消" + } \ No newline at end of file diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json index e10f93a..0308d09 100644 --- a/i18n/zh-CN.json +++ b/i18n/zh-CN.json @@ -1226,5 +1226,19 @@ "forward":"转发", "copy_download_url":"复制下载地址", "total_friends_nus":"共/s1位朋友", - "hava_error_photo":"有图片违规" + "hava_error_photo":"有图片违规", + "translation_butler_evaluation_tips2": "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知", + "translation_butler_push_order_time": "时间:今天/s1 时长:", + "translation_butler_push_order_time2": "下单时间:今天/s1 等待时长:", + "translation_butler_title3": "大神专属", + "translation_butler_start_receive_order": "开启接单", + "translation_butler_stop_receive_order": "未开启接单", + "translation_butler_stop_tips": "翻译人员无法进入创建订单", + "translation_butler_scenes2": "场景:", + "translation_butler_last_item_start": "[翻译管家服务开始]", + "translation_butler_last_item_end": "[翻译管家服务结束]", + "travel_start": "起点", + "travel_end": "终点", + "translation_butler_order_time_out": "翻译订单超时已被取消" + } \ No newline at end of file diff --git a/i18n/zh-HK.json b/i18n/zh-HK.json index 86d8c83..775fc22 100644 --- a/i18n/zh-HK.json +++ b/i18n/zh-HK.json @@ -1226,5 +1226,18 @@ "forward":"转发", "copy_download_url":"複製下載地址", "total_friends_nus":"共/s1位朋友", - "hava_error_photo":"有圖片違規" + "hava_error_photo":"有圖片違規", + "translation_butler_push_order_time": "时间:今天/s1 时长:", + "translation_butler_push_order_time2": "下单时间:今天/s1 等待时长:", + "translation_butler_title3": "大神专属", + "translation_butler_start_receive_order": "开启接单", + "translation_butler_stop_receive_order": "未开启接单", + "translation_butler_stop_tips": "翻译人员无法进入创建订单", + "translation_butler_scenes2": "场景:", + "translation_butler_last_item_start": "[翻译管家服务开始]", + "translation_butler_last_item_end": "[翻译管家服务结束]", + "travel_start": "起点", + "travel_end": "终点", + "translation_butler_order_time_out": "翻译订单超时已被取消" + } \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 37831be..ca53417 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -30,6 +30,8 @@ PODS: - connectivity (0.0.1): - Flutter - Reachability + - device_info (0.0.1): + - Flutter - easy_contact_picker (0.0.1): - Flutter - FBSDKCoreKit (5.13.1): @@ -167,6 +169,7 @@ DEPENDENCIES: - auto_orientation (from `.symlinks/plugins/auto_orientation/ios`) - city_pickers (from `.symlinks/plugins/city_pickers/ios`) - connectivity (from `.symlinks/plugins/connectivity/ios`) + - device_info (from `.symlinks/plugins/device_info/ios`) - easy_contact_picker (from `.symlinks/plugins/easy_contact_picker/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`) - Flutter (from `Flutter`) @@ -249,6 +252,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/city_pickers/ios" connectivity: :path: ".symlinks/plugins/connectivity/ios" + device_info: + :path: ".symlinks/plugins/device_info/ios" easy_contact_picker: :path: ".symlinks/plugins/easy_contact_picker/ios" file_picker: @@ -351,6 +356,7 @@ SPEC CHECKSUMS: Bugly: dbac48b55ad469a97cc4321045cd50df8f63d44f city_pickers: b0370f4c35c201723b5b7fcce10ec29b59d5bc35 connectivity: 6e94255659cc86dcbef1d452ad3e0491bb1b3e75 + device_info: cbf09d2ec12aa7110e0b09fabe54b5bd6c8efe74 easy_contact_picker: 9ab9dc70e8ddde6e76a19ffc482d7bf899868730 FBSDKCoreKit: 8fb98209109fb684937f05d534305edb18c20207 FBSDKLoginKit: c7c6ffd9ca9ea45aee32361840af040ad8f6706a diff --git a/lib/chat/ChatPage.dart b/lib/chat/ChatPage.dart index c0130e2..51f3012 100644 --- a/lib/chat/ChatPage.dart +++ b/lib/chat/ChatPage.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'dart:io'; +import 'package:chat/data/translate_hk_data_mgr.dart'; import 'package:chat/home/audio_chat_view.dart'; import 'package:chat/utils/screen.dart'; import 'package:chat/utils/upload_util.dart'; @@ -35,6 +36,7 @@ import 'package:dio/dio.dart'; import 'package:extended_text/extended_text.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:scroll_to_index/scroll_to_index.dart'; @@ -76,6 +78,10 @@ class _ChatPageState extends State { //统计聊天时长 int startTime; + bool isTranslateButler; + + bool isTranslateButlerFinish=false;///翻译管家是否已经结束 + int jumpTime; AutoScrollController controller; @@ -89,6 +95,7 @@ class _ChatPageState extends State { msgMgr.off('New Chat Message', receiveMsg); msgMgr.off('Keyboard Hide', dealWithKeyboardHide); msgMgr.off('Delete Select Message', _deleteItem); + msgMgr.off(MessageMgr.TRANSLATE_HK_END_CHAT, translateHKChatEnd); msgMgr.off('Jump to Msg', jumpToMsg); MsgHandler.curActiveSession = 0; @@ -126,10 +133,15 @@ class _ChatPageState extends State { getDefaultSetting(); getUserInfo(); +<<<<<<< HEAD controller = AutoScrollController( viewportBoundaryGetter: () => Rect.fromLTRB(0, 0, 0, MediaQuery.of(context).padding.bottom), axis: Axis.vertical); +======= + isTranslateButler = widget.isTranslateButler; + ///todo 这里再判断是否还在服务时间 +>>>>>>> 81c28f9c954a27b2453da76e51b7ec7c3f76017c startTime = DateTime.now().millisecondsSinceEpoch ~/ 1000; @@ -139,9 +151,17 @@ class _ChatPageState extends State { msgMgr.on('Keyboard Hide', dealWithKeyboardHide); msgMgr.on('Send CoinBag', _sendCoin); msgMgr.on('Delete Select Message', _deleteItem); + msgMgr.on(MessageMgr.TRANSLATE_HK_END_CHAT, translateHKChatEnd); msgMgr.on('Jump to Msg', jumpToMsg); } + translateHKChatEnd(args){ + setState(() { + isTranslateButlerFinish=true; + }); + + } + void _sendFile(File file) async { // File file = await FilePicker.getFile(); int fileSize = file.lengthSync(); @@ -357,80 +377,114 @@ class _ChatPageState extends State { ]; }))); - return Stack( - children: [ - MultiProvider( - providers: [ - ChangeNotifierProvider(create: (_) => _keyboardIndexProvider), - Provider.value(value: false), - Provider.value(value: widget.friendId), - ], - child: GestureDetector( - onTap: hideKeyBoard, - child: ExtendedTextSelectionPointerHandler( - ///选择文字,消除弹窗 - - builder: (states) { - return Listener( - child: Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: const Color(0xFFE2E9F1), - appBar: AppBar( - title: Text( - '${Provider.of(context).getRefName(friendInfo.userId, friendInfo.nickName)}', - textScaleFactor: 1.0, - style: TextStyle( - color: Constants.BlackTextColor, - fontSize: 16.47), - ), - leading: CustomUI.buildCustomLeading(context), - titleSpacing: -10, - centerTitle: false, - elevation: 1, - actions: actions), - body: SafeArea( - child: Column( - children: [ - NetStateWidget(), - widget.isTranslateButler - ? _buildTranslationButler() - : Container(), - Expanded(child: _buildMessageList()), - InputBar( - sendMsg: sendMsg, - isTranslateHK: widget.isTranslateButler, - ), - ], - ))), - behavior: HitTestBehavior.translucent, - onPointerDown: (value) { - for (var state in states) { - if (!state.containsPosition(value.position)) { - //clear other selection - state.clearSelection(); - } - } - }, - onPointerMove: (value) { - //clear other selection - for (var state in states) { - if (!state.containsPosition(value.position)) { + + + return WillPopScope( + child: Stack( + children: [ + MultiProvider( + providers: [ + ChangeNotifierProvider(create: (_) => _keyboardIndexProvider), + Provider.value(value: false), + Provider.value(value: widget.friendId), + ], + child: GestureDetector( + onTap: hideKeyBoard, + child: ExtendedTextSelectionPointerHandler( + ///选择文字,消除弹窗 + + builder: (states) { + return Listener( + child: Scaffold( + resizeToAvoidBottomInset: false, + backgroundColor: const Color(0xFFE2E9F1), + appBar: AppBar( + title: Text( + '${Provider.of(context).getRefName(friendInfo.userId, friendInfo.nickName)}', + textScaleFactor: 1.0, + style: TextStyle( + color: Constants.BlackTextColor, + fontSize: 16.47), + ), + leading: CustomUI.buildCustomLeading(context,onTap:(){ + goBackCheck(); + + }), + titleSpacing: -10, + centerTitle: false, + elevation: 1, + actions: actions), + body: SafeArea( + child: Column( + children: [ + NetStateWidget(), + (isTranslateButler&!isTranslateButlerFinish) + ? _buildTranslationButler() + : Container(), + Expanded(child: _buildMessageList()), + InputBar(sendMsg: sendMsg,isTranslateHK: isTranslateButler,), + ], + ))), + behavior: HitTestBehavior.translucent, + onPointerDown: (value) { + for (var state in states) { + if (!state.containsPosition(value.position)) { + //clear other selection + state.clearSelection(); + } + } + }, + onPointerMove: (value) { //clear other selection - state.clearSelection(); - } - } + for (var state in states) { + if (!state.containsPosition(value.position)) { + //clear other selection + state.clearSelection(); + } + } + }, + ); }, - ); - }, - ))), -// widget.isTranslateButler ? getAudioChatView() : Container(), -// widget.isTranslateButler ? zoomAudioButton() : Container() - ], - ); + ))), + isTranslateButler ? getAudioChatView() : Container(), + isTranslateButler ? zoomAudioButton() : Container() + ], + ), + onWillPop: () { + goBackCheck(); + return Future.value(true); + }); + } + + + goBackCheck(){ + if(isTranslateButler && !isTranslateButlerFinish){ + if(UserData().isTranslateUser){ + showToast('翻译服务未结束不能主动结束'); + }else{ + CustomUI.buildTowConfirm( + context, + '是否提前结束翻译管家服务?', + I18n.of(context).confirm, + (){ + setState(() { + isTranslateButlerFinish=true; + + }); + + MsgHandler.sendEndTransHKOrderReq(); + Navigator.of(context).pop(); + }, + '取消', + (){ Navigator.of(context).pop();}); + } + }else{ + Navigator.of(context).pop(); + } } Widget getAudioChatView() { - if (friendInfo == null) { + if (friendInfo == null || isTranslateButlerFinish) { return Container(); } @@ -441,6 +495,7 @@ class _ChatPageState extends State { child: AudioChatPage( userInfo: friendInfo, isTranslateButler: true, + isReplay: !TranslateHKMgr().isUser, translateButlerCloseCallBack: audioChatPageCallBack, ), ); @@ -471,7 +526,7 @@ class _ChatPageState extends State { bool isShowZoomButton = true; GlobalKey mykey = GlobalKey(); - double dx = 0, dy = 0; + double dx = 0 , dy = 0; double zoomButtonSize = 60; void dragEvent(DragUpdateDetails details) { @@ -480,7 +535,7 @@ class _ChatPageState extends State { dx = details.globalPosition.dx - mykey.currentContext.size.width / 2; dy = details.globalPosition.dy - mykey.currentContext.size.height / 2; - print('dx $dx dy $dy screen width:${Screen.width}'); +// print('dx $dx dy $dy screen width:${Screen.width}'); if (dx > Screen.width - zoomButtonSize) { dx = Screen.width - zoomButtonSize; @@ -498,33 +553,33 @@ class _ChatPageState extends State { } Widget zoomAudioButton() { - friendInfo == null - ? Container() - : AudioChatPage( - userInfo: friendInfo, - ); if (friendInfo == null || !isShowZoomButton) { return Container(); } - Widget button = Container( + Widget button = Container( key: mykey, - color: Colors.blue, - width: 60, - height: 60, + width: 57, + height: 74, + child: Card(child: Align(child: Icon( + IconData(0xe67d, fontFamily: Constants.IconFontFamily), + color: Color(0xFF008AFF), + size: 35.0, + ),alignment: Alignment.center,),), ); return GestureDetector( onHorizontalDragUpdate: dragEvent, onVerticalDragUpdate: dragEvent, - onTap: () { + onTap: (){ setState(() { isShowAudio = !isShowAudio; isShowZoomButton = !isShowZoomButton; }); }, child: Container( + child: Transform.translate( offset: Offset(dx, dy), child: Align( @@ -597,26 +652,31 @@ class _ChatPageState extends State { constraints: BoxConstraints(maxWidth: 135), ), ), - Expanded( + TranslateHKMgr().isUser?Expanded( child: Container( constraints: BoxConstraints(maxWidth: 130), width: double.maxFinite, child: CountDownButton( I18n.of(context).translation_butler_end_service, () { - Navigator.of(context).pop(); + +// Navigator.of(context).pop(); }, - countDownTime: 3600, + countDownTime: 60*5, align: Alignment.centerRight, - onPress: () {}, + onPress: () { + MsgHandler.sendEndTransHKOrderReq(); +// Navigator.of(context).pop(); + }, ), // alignment: Alignment(1,0), - )), + )):Container(), ], ), ); } + Widget _buildMessageList() { return Container( alignment: Alignment.topCenter, @@ -656,10 +716,15 @@ class _ChatPageState extends State { _keyboardIndexProvider.changeReadOnlyKey(true); } +<<<<<<< HEAD sendMsg(MsgModel msg) async { // if(widget.isTranslateButler){ ///翻译管家聊天通道 // msg.channelType = ChatChannelType.TransHK.value; // } +======= + sendMsg(MsgModel msg) { + +>>>>>>> 81c28f9c954a27b2453da76e51b7ec7c3f76017c print('对方是否拉黑你 ${friendInfo.isBlackened}'); if (BlacklistMgr.isBlack(friendInfo.userId)) { diff --git a/lib/chat/ChatPageItem.dart b/lib/chat/ChatPageItem.dart index 998edc7..9d3e849 100644 --- a/lib/chat/ChatPageItem.dart +++ b/lib/chat/ChatPageItem.dart @@ -261,18 +261,16 @@ class _ChatPageItemState extends State ///todo 翻译管家系统通知消息 print('这里应该要有翻译管家'); - if (type == ChatType.GroupChatNoticeType.value && - widget.msg.channelType == ChatChannelType.Session.value) { - TransHKChatNotice res = - TransHKChatNotice.fromBuffer(widget.msg.msgContent); + if (type == ChatType.GroupChatNoticeType.value && widget.msg.channelType ==ChatChannelType.Session.value) { + TransHKChatNotice res = TransHKChatNotice.fromBuffer(widget.msg.msgContent); - if (res.noticeType == TransHKChatNoticeType.StartChat) { + if(res.noticeType==TransHKChatNoticeType.StartChat){ ///开始翻译服务 return _buildServiceCard(true, () {}); - } else if (res.noticeType == TransHKChatNoticeType.EndChat) { + }else if(res.noticeType==TransHKChatNoticeType.EndChat){ ///翻译服务结束 return _buildServiceCard(false, () {}); - } else { + }else{ return Container(); } // return Container(); @@ -297,6 +295,8 @@ class _ChatPageItemState extends State // } // } + + } return Container(); } @@ -700,6 +700,7 @@ class _ChatPageItemState extends State List actions = [ I18n.of(context).delete, I18n.of(context).reply, + ]; actionsFunc.add(() { @@ -710,6 +711,7 @@ class _ChatPageItemState extends State MessageMgr().emit('Reply Select Message', widget.msg); }); + ///转发 if (widget.msg.msgType == ChatType.TextChatType.value || widget.msg.msgType == ChatType.ImageChatType.value || @@ -751,7 +753,10 @@ class _ChatPageItemState extends State } ShareExtend.share(FileCacheMgr.replacePath(path), type); + + }); + } if (widget.msg.msgType == ChatType.TextChatType.value) { @@ -956,6 +961,7 @@ class _ChatPageItemState extends State showMsg.add(tranWidget); } + ///todo Widget text = Stack(children: [ Container( width: width + 20, @@ -1186,6 +1192,7 @@ class _ChatPageItemState extends State ), ), ); + } _receiveVideo(BuildContext context, List imgData, @@ -1535,8 +1542,13 @@ class _ChatPageItemState extends State ]); } + Widget _buildServiceCard(bool isStart, Function callBack) { + + + String endStr = UserData().isTranslateUser?I18n.of(context).translation_butler_evaluation_tips2:I18n.of(context).translation_butler_evaluation_tips; return Container( + alignment: Alignment.center, margin: EdgeInsets.all(10), child: Card( @@ -1550,51 +1562,52 @@ class _ChatPageItemState extends State padding: EdgeInsets.only(left: 10, right: 10, top: 15, bottom: 15), child: Row( children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - isStart - ? I18n.of(context).translation_butler_start_service - : I18n.of(context).translation_butler_service_end, - textScaleFactor: 1.0, - style: TextStyle( - color: AppColors.NewAppbarTextColor, fontSize: 15), - ), - Text( - isStart - ? I18n.of(context).translation_butler_start_tips - : I18n.of(context).translation_butler_evaluation_tips, - textScaleFactor: 1.0, - style: TextStyle( - color: AppColors.NewAppbarTextColor, fontSize: 13), - ) - ], - ), - isStart + Expanded(child: Container( child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + isStart + ? I18n.of(context).translation_butler_start_service + : I18n.of(context).translation_butler_service_end, + textScaleFactor: 1.0, + style: TextStyle( + color: AppColors.NewAppbarTextColor, fontSize: 15), + ), + Text( + isStart + ? I18n.of(context).translation_butler_start_tips + : endStr, + textScaleFactor: 1.0, + style: TextStyle( + color: Color(0xFF797979), fontSize: 13), + ), + ], + ),)), + (isStart||UserData().isTranslateUser) ? Container() : Expanded( - child: Container( - margin: EdgeInsets.only(left: 15), - height: 30, - child: RaisedButton( - color: Color(0xff3875E9), - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.all(Radius.circular(10))), - child: Text( - I18n.of(context).translation_butler_evaluation, - textScaleFactor: 1.0, - style: TextStyle(color: Colors.white, fontSize: 15), - ), - onPressed: () { - CustomUI.buildTranslationEvaluationDialog(context); - }), - )), + child: Container( + margin: EdgeInsets.only(left: 15), + height: 30, + child: RaisedButton( + color: Color(0xff3875E9), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(10))), + child: Text( + I18n.of(context).translation_butler_evaluation, + textScaleFactor: 1.0, + style: TextStyle(color: Colors.white, fontSize: 15), + ), + onPressed: () { + CustomUI.buildTranslationEvaluationDialog(context); + }), + )), ], ), ), ), ); } + } diff --git a/lib/chat/input_bar.dart b/lib/chat/input_bar.dart index dfa7926..14ae663 100644 --- a/lib/chat/input_bar.dart +++ b/lib/chat/input_bar.dart @@ -1,7 +1,6 @@ import 'dart:convert'; import 'dart:io'; import 'dart:typed_data'; - import 'package:chat/chat/keyboard_icon.dart'; import 'package:chat/chat/record_view.dart'; import 'package:chat/chat/util_keyboard.dart'; @@ -36,7 +35,7 @@ import 'emoji_text.dart'; class InputBar extends StatefulWidget { final Function sendMsg; final bool isTranslateHK; - InputBar({this.sendMsg, this.isTranslateHK = false}); + InputBar({this.sendMsg,this.isTranslateHK=false}); @override InputBarState createState() => InputBarState(); @@ -714,10 +713,13 @@ class InputBarState extends State _sendPhotoFile(file); } } + + } on Exception catch (e) { print(e.toString()); } + // var photos = await PhotoPicker.pickAsset( // context: context, // themeColor: Color(0xFFF0F0F0), @@ -742,13 +744,19 @@ class InputBarState extends State friendId = Provider.of(context); } + ChatChannelType channelType =isGroup ? ChatChannelType.Group : ChatChannelType.Session; + if(widget.isTranslateHK){ + channelType = ChatChannelType.TransHK; + print('聊天是 TransHK'); + } + print('群聊模式 $isGroup'); var msg = MsgHandler.createSendMsg( ChatType.ShortVoiceChatType, Uint8List(0), localFile: soundPath, friendId: friendId, extra: duration, - channelType: isGroup ? ChatChannelType.Group : ChatChannelType.Session); + channelType: channelType); widget.sendMsg(msg); } @@ -785,11 +793,16 @@ class InputBarState extends State friendId = Provider.of(context); } + ChatChannelType channelType =isGroup ? ChatChannelType.Group : ChatChannelType.Session; + if(widget.isTranslateHK){ + channelType = ChatChannelType.TransHK; + print('聊天是 TransHK'); + } var msg = MsgHandler.createSendMsg(ChatType.ImageChatType, sendImg, localFile: isNeedUpload ? imgFile.absolute.path : null, extra: aspectRatio, friendId: friendId, - channelType: isGroup ? ChatChannelType.Group : ChatChannelType.Session); + channelType: channelType); widget.sendMsg(msg); } @@ -840,9 +853,8 @@ class InputBarState extends State } } - ChatChannelType channelType = - isGroup ? ChatChannelType.Group : ChatChannelType.Session; - if (widget.isTranslateHK) { + ChatChannelType channelType =isGroup ? ChatChannelType.Group : ChatChannelType.Session; + if(widget.isTranslateHK){ channelType = ChatChannelType.TransHK; print('聊天是 TransHK'); } diff --git a/lib/data/UserData.dart b/lib/data/UserData.dart index 1d39edb..fdd1ead 100644 --- a/lib/data/UserData.dart +++ b/lib/data/UserData.dart @@ -59,6 +59,7 @@ class UserData { bool stationOpenSwitch = true; //开启电台开关 bool myProgramOpenSwitch = true; //我的节目开关 bool nearbyOpenSwitch = true; //附近的人开关 + bool isTranslateUser = false ; List contactList = []; bool isInChina = false; int homemainIndex = 0; diff --git a/lib/data/translate_hk_data_mgr.dart b/lib/data/translate_hk_data_mgr.dart index 9b3570f..c367273 100644 --- a/lib/data/translate_hk_data_mgr.dart +++ b/lib/data/translate_hk_data_mgr.dart @@ -7,6 +7,7 @@ class TranslateOrder{ int tLanguage; int scenes; String desc; + String userName; } class TranslateHKMgr { @@ -21,17 +22,19 @@ class TranslateHKMgr { return _instance; } - TranslateOrder order; + TranslateOrder order; ///翻译官被指派的订单 - String orderId; + String orderId; ///用户发起的订单Id int waitNum=0; + int startWaitTime=0; + + bool isUser=false; ///是用户或者翻译官 - bool isUser=false; - int orderStatus=0; + + int orderStatus=0; static const ORDER_STATUS_EMPTY=0; ///未创建订单 static const ORDER_STATUS_WAITING=1;///等待翻译官 - static const ORDER_STATUS_START=1;///翻译管家开始 } diff --git a/lib/generated/i18n.dart b/lib/generated/i18n.dart index 1f6d354..ee33eb1 100644 --- a/lib/generated/i18n.dart +++ b/lib/generated/i18n.dart @@ -2489,6 +2489,32 @@ class I18n implements WidgetsLocalizations { String get total_friends_nus => "共/s1位朋友"; /// "有图片违规" String get hava_error_photo => "有图片违规"; + /// "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知" + String get translation_butler_evaluation_tips2 => "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知"; + /// "时间:今天/s1 时长:" + String get translation_butler_push_order_time => "时间:今天/s1 时长:"; + /// "下单时间:今天/s1 等待时长:" + String get translation_butler_push_order_time2 => "下单时间:今天/s1 等待时长:"; + /// "大神专属" + String get translation_butler_title3 => "大神专属"; + /// "开启接单" + String get translation_butler_start_receive_order => "开启接单"; + /// "未开启接单" + String get translation_butler_stop_receive_order => "未开启接单"; + /// "翻译人员无法进入创建订单" + String get translation_butler_stop_tips => "翻译人员无法进入创建订单"; + /// "场景:" + String get translation_butler_scenes2 => "场景:"; + /// "[翻译管家服务开始]" + String get translation_butler_last_item_start => "[翻译管家服务开始]"; + /// "[翻译管家服务结束]" + String get translation_butler_last_item_end => "[翻译管家服务结束]"; + /// "起点" + String get travel_start => "起点"; + /// "终点" + String get travel_end => "终点"; + /// "翻译订单超时已被取消" + String get translation_butler_order_time_out => "翻译订单超时已被取消"; } class _I18n_en_US extends I18n { @@ -6185,6 +6211,42 @@ class _I18n_vi_VN extends I18n { /// "有图片违规" @override String get hava_error_photo => "有图片违规"; + /// "时间:今天/s1 时长:" + @override + String get translation_butler_push_order_time => "时间:今天/s1 时长:"; + /// "下单时间:今天/s1 等待时长:" + @override + String get translation_butler_push_order_time2 => "下单时间:今天/s1 等待时长:"; + /// "大神专属" + @override + String get translation_butler_title3 => "大神专属"; + /// "开启接单" + @override + String get translation_butler_start_receive_order => "开启接单"; + /// "未开启接单" + @override + String get translation_butler_stop_receive_order => "未开启接单"; + /// "翻译人员无法进入创建订单" + @override + String get translation_butler_stop_tips => "翻译人员无法进入创建订单"; + /// "场景:" + @override + String get translation_butler_scenes2 => "场景:"; + /// "[翻译管家服务开始]" + @override + String get translation_butler_last_item_start => "[翻译管家服务开始]"; + /// "[翻译管家服务结束]" + @override + String get translation_butler_last_item_end => "[翻译管家服务结束]"; + /// "起点" + @override + String get travel_start => "起点"; + /// "终点" + @override + String get travel_end => "终点"; + /// "翻译订单超时已被取消" + @override + String get translation_butler_order_time_out => "翻译订单超时已被取消"; @override TextDirection get textDirection => TextDirection.ltr; @@ -9877,6 +9939,42 @@ class _I18n_zh_HK extends I18n { /// "有圖片違規" @override String get hava_error_photo => "有圖片違規"; + /// "时间:今天/s1 时长:" + @override + String get translation_butler_push_order_time => "时间:今天/s1 时长:"; + /// "下单时间:今天/s1 等待时长:" + @override + String get translation_butler_push_order_time2 => "下单时间:今天/s1 等待时长:"; + /// "大神专属" + @override + String get translation_butler_title3 => "大神专属"; + /// "开启接单" + @override + String get translation_butler_start_receive_order => "开启接单"; + /// "未开启接单" + @override + String get translation_butler_stop_receive_order => "未开启接单"; + /// "翻译人员无法进入创建订单" + @override + String get translation_butler_stop_tips => "翻译人员无法进入创建订单"; + /// "场景:" + @override + String get translation_butler_scenes2 => "场景:"; + /// "[翻译管家服务开始]" + @override + String get translation_butler_last_item_start => "[翻译管家服务开始]"; + /// "[翻译管家服务结束]" + @override + String get translation_butler_last_item_end => "[翻译管家服务结束]"; + /// "起点" + @override + String get travel_start => "起点"; + /// "终点" + @override + String get travel_end => "终点"; + /// "翻译订单超时已被取消" + @override + String get translation_butler_order_time_out => "翻译订单超时已被取消"; @override TextDirection get textDirection => TextDirection.ltr; @@ -13569,6 +13667,45 @@ class _I18n_zh_CN extends _I18n_zh_HK { /// "有图片违规" @override String get hava_error_photo => "有图片违规"; + /// "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知" + @override + String get translation_butler_evaluation_tips2 => "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知"; + /// "时间:今天/s1 时长:" + @override + String get translation_butler_push_order_time => "时间:今天/s1 时长:"; + /// "下单时间:今天/s1 等待时长:" + @override + String get translation_butler_push_order_time2 => "下单时间:今天/s1 等待时长:"; + /// "大神专属" + @override + String get translation_butler_title3 => "大神专属"; + /// "开启接单" + @override + String get translation_butler_start_receive_order => "开启接单"; + /// "未开启接单" + @override + String get translation_butler_stop_receive_order => "未开启接单"; + /// "翻译人员无法进入创建订单" + @override + String get translation_butler_stop_tips => "翻译人员无法进入创建订单"; + /// "场景:" + @override + String get translation_butler_scenes2 => "场景:"; + /// "[翻译管家服务开始]" + @override + String get translation_butler_last_item_start => "[翻译管家服务开始]"; + /// "[翻译管家服务结束]" + @override + String get translation_butler_last_item_end => "[翻译管家服务结束]"; + /// "起点" + @override + String get travel_start => "起点"; + /// "终点" + @override + String get travel_end => "终点"; + /// "翻译订单超时已被取消" + @override + String get translation_butler_order_time_out => "翻译订单超时已被取消"; @override TextDirection get textDirection => TextDirection.ltr; @@ -17261,6 +17398,45 @@ class _I18n_ko_KR extends I18n { /// "有图片违规" @override String get hava_error_photo => "有图片违规"; + /// "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知" + @override + String get translation_butler_evaluation_tips2 => "翻译服务已结束,辛苦你了。请保持在线,留意新订单通知"; + /// "时间:今天/s1 时长:" + @override + String get translation_butler_push_order_time => "时间:今天/s1 时长:"; + /// "下单时间:今天/s1 等待时长:" + @override + String get translation_butler_push_order_time2 => "下单时间:今天/s1 等待时长:"; + /// "大神专属" + @override + String get translation_butler_title3 => "大神专属"; + /// "开启接单" + @override + String get translation_butler_start_receive_order => "开启接单"; + /// "未开启接单" + @override + String get translation_butler_stop_receive_order => "未开启接单"; + /// "翻译人员无法进入创建订单" + @override + String get translation_butler_stop_tips => "翻译人员无法进入创建订单"; + /// "场景:" + @override + String get translation_butler_scenes2 => "场景:"; + /// "[翻译管家服务开始]" + @override + String get translation_butler_last_item_start => "[翻译管家服务开始]"; + /// "[翻译管家服务结束]" + @override + String get translation_butler_last_item_end => "[翻译管家服务结束]"; + /// "起点" + @override + String get travel_start => "起点"; + /// "终点" + @override + String get travel_end => "终点"; + /// "翻译订单超时已被取消" + @override + String get translation_butler_order_time_out => "翻译订单超时已被取消"; @override TextDirection get textDirection => TextDirection.ltr; @@ -20953,6 +21129,42 @@ class _I18n_ja_JP extends I18n { /// "有图片违规" @override String get hava_error_photo => "有图片违规"; + /// "时间:今天/s1 时长:" + @override + String get translation_butler_push_order_time => "时间:今天/s1 时长:"; + /// "下单时间:今天/s1 等待时长:" + @override + String get translation_butler_push_order_time2 => "下单时间:今天/s1 等待时长:"; + /// "大神专属" + @override + String get translation_butler_title3 => "大神专属"; + /// "开启接单" + @override + String get translation_butler_start_receive_order => "开启接单"; + /// "未开启接单" + @override + String get translation_butler_stop_receive_order => "未开启接单"; + /// "翻译人员无法进入创建订单" + @override + String get translation_butler_stop_tips => "翻译人员无法进入创建订单"; + /// "场景:" + @override + String get translation_butler_scenes2 => "场景:"; + /// "[翻译管家服务开始]" + @override + String get translation_butler_last_item_start => "[翻译管家服务开始]"; + /// "[翻译管家服务结束]" + @override + String get translation_butler_last_item_end => "[翻译管家服务结束]"; + /// "起点" + @override + String get travel_start => "起点"; + /// "终点" + @override + String get travel_end => "终点"; + /// "翻译订单超时已被取消" + @override + String get translation_butler_order_time_out => "翻译订单超时已被取消"; @override TextDirection get textDirection => TextDirection.ltr; diff --git a/lib/home/audio_chat_view.dart b/lib/home/audio_chat_view.dart index f014f22..cc49c7e 100644 --- a/lib/home/audio_chat_view.dart +++ b/lib/home/audio_chat_view.dart @@ -217,10 +217,14 @@ class _AudioChatPageState extends State { isReply ? _replayToolBar() : _bottomToolBar(), ], ))), - widget.isTranslateButler?Material(child: InkWell(child: Container(color: Colors.yellow,width: 60,height: 60,),onTap: (){ + widget.isTranslateButler?InkWell(child: Container( width: 60,height: 60,child: Align(child: Icon( + IconData(0xe67f, fontFamily: Constants.IconFontFamily), + color: Colors.white, + size: 35.0, + ),alignment: Alignment.center,),),onTap: (){ widget.translateButlerCloseCallBack(1); print('内页内页'); - },),):Container() + },):Container() ], ))); } diff --git a/lib/home/homeMain.dart b/lib/home/homeMain.dart index 66e27ed..e6fafac 100644 --- a/lib/home/homeMain.dart +++ b/lib/home/homeMain.dart @@ -3,6 +3,7 @@ import 'package:chat/chat/ChatPage.dart'; import 'package:chat/data/UserData.dart'; import 'package:chat/data/chat_data_mgr.dart'; import 'package:chat/data/constants.dart'; +import 'package:chat/data/translate_hk_data_mgr.dart'; import 'package:chat/generated/i18n.dart'; import 'package:chat/home/SystemEditPage.dart'; import 'package:chat/home/find_page.dart'; @@ -279,22 +280,44 @@ class _HomeMainState extends State { } receiveTranslateOrder(var data) async { - CustomUI.buildTranslationHelperOrderDialog(context, false, - orderId: data.orderId, scenes: data.scenes, desc: data.desc); + + TranslateOrder order = data; + + CustomUI.buildTranslationHelperOrderDialog(context,false,orderId: order.orderId,scenes: order.scenes,desc: order.desc,createTime: order.createTime,userName: order.userName); } - startTranslateHKChat(var friendID) { - Navigator.of(context).push( - new MaterialPageRoute( - builder: (context) { - return ChatPage( - key: Key('Chat'), - friendId: friendID, - isTranslateButler: true, - ); - }, - ), - ); + startTranslateHKChat(var friendID){ + + if(TranslateHKMgr().isUser){ + CustomUI.buildTranslationHelperOrderDialog(context,true,userStartChat: (){ + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return ChatPage( + key: Key('Chat'), + friendId: friendID, + isTranslateButler: true, + ); + }, + ), + ); + }); + }else{ + Navigator.of(context).push( + new MaterialPageRoute( + builder: (context) { + return ChatPage( + key: Key('Chat'), + friendId: friendID, + isTranslateButler: true, + ); + }, + ), + ); + } + + + } msgTestPermission(data) async { @@ -477,26 +500,26 @@ class _HomeMainState extends State { child: Container( // color: Colors.white, color: AppColors.NewAppbarBgColor, - child: Scaffold( - appBar: PreferredSize( - preferredSize: Size.fromHeight(1), - child: AppBar( - backgroundColor: AppColors.NewAppbarBgColor, - ), - ), + child: SafeArea(top: false,child: Scaffold( +// appBar: PreferredSize( +// preferredSize: Size.fromHeight(1), +//// child: AppBar( +//// backgroundColor: AppColors.NewAppbarBgColor, +//// ), +// ), resizeToAvoidBottomPadding: false, - body: SafeArea( - child: Stack( + body: Stack( alignment: AlignmentDirectional.bottomStart, children: [ Container( padding: EdgeInsets.only(bottom: 48), color: Constants.LightGreyBackgroundColor, child: SafeArea( + top: false, child: IndexedStack( - index: _currentIndex, - children: _pages, - )), + index: _currentIndex, + children: _pages, + )), ), Positioned( bottom: 0, @@ -529,7 +552,7 @@ class _HomeMainState extends State { type: myBottm.BottomNavigationBarType.fixed, fixedColor: const Color(AppColors.TabIconActive), items: - _navigationViews.map((NavigationIconView view) { + _navigationViews.map((NavigationIconView view) { return view.item; }).toList(), onTap: (int index) { diff --git a/lib/home/realtimehelper/real_time_helper_page.dart b/lib/home/realtimehelper/real_time_helper_page.dart index 322f695..11545d5 100644 --- a/lib/home/realtimehelper/real_time_helper_page.dart +++ b/lib/home/realtimehelper/real_time_helper_page.dart @@ -1,8 +1,15 @@ +import 'package:chat/data/UserData.dart'; import 'package:chat/home/realtimehelper/translation_butler_page.dart'; import 'package:chat/home/realtimehelper/travel_butler_page.dart'; import 'package:chat/models/group_info_model.dart'; +import 'package:chat/utils/HttpUtil.dart'; +import 'package:chat/utils/MessageMgr.dart'; +import 'package:chat/utils/TokenMgr.dart'; +import 'package:chat/utils/screen.dart'; +import 'package:dio/dio.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:oktoast/oktoast.dart'; import '../../data/constants.dart'; import '../../generated/i18n.dart'; @@ -20,21 +27,69 @@ class RealTimeHelperPage extends StatefulWidget { } class RealTimeHelperPageState extends State { + + bool isTranslateHKLogin = false; + + + bool isReady=false; @override void initState() { super.initState(); + MessageMgr().on('update_system',refresh); + WidgetsBinding.instance.addPostFrameCallback((_) { + isTranslateAndStatus(); + }); + } + refresh(args){ + isTranslateAndStatus(); + } + + + ///实时帮-翻译人员状态,是否是翻译人员 + isTranslateAndStatus() async { + Map data = { + "userId": UserData().basicInfo.userId, + }; + data['sign'] = TokenMgr().getSign(data); + Response res = await HttpUtil().post('steward/userStatus', data: data); + + if (res == null) { + print('请求异常'); + return; + } + var resData = res.data; + if (resData['code'] == 0) { + isReady=true; + print('xxxdksldsd $resData'); + UserData().isTranslateUser = resData['data']['isTranslateUser'] == 1; + int status = resData['data']['Status'] ; + + if(status==1){ + isTranslateHKLogin=true; + } + + setState(() { + }); + print('翻译人员状态 status $status isTranslateUser ${UserData().isTranslateUser} '); + }else{ + print('获取翻译人员翻译人员状态 失败 ${resData['msg']}'); + } + } + + @override void dispose() { -// MessageMgr().off('Update Group Info', updateGroupInfo); super.dispose(); + MessageMgr().on('update_system',refresh); } + @override Widget build(BuildContext context) { Widget appBar = AppBar( - backgroundColor: AppColors.NewAppbarBgColor, + backgroundColor: Colors.white, title: Text( I18n.of(context).real_time_helper, textScaleFactor: 1.0, @@ -44,7 +99,90 @@ class RealTimeHelperPageState extends State { centerTitle: false, ); - return Scaffold( + + return UserData().isTranslateUser?Scaffold( +// appBar: appBar, + body: Container( + color: Color(0xffE8EAF0), + child: Stack( + children: [ + Container( + child: Image.asset( + R.assetsImagesImgRealtimeBg2, + width: MediaQuery.of(context).size.width, + height:250, + fit: BoxFit.cover, + ), + ), + Container( + child: Image.asset( + R.assetsImagesImgRealtimeBg1, + width: MediaQuery.of(context).size.width, + height:MediaQuery.of(context).padding.top+80, + fit: BoxFit.cover, + ), + ), + Container( + child: SafeArea( + child: ListView( + children: [ + Container( + alignment: Alignment.center, + child: fixedText(I18n.of(context).translation_butler_title3, color: Colors.white, fontSize: 21), + ), + UnconstrainedBox(child: InkWell(onTap: (){ + + HttpUtil().translateHKloginRecord(!isTranslateHKLogin,(){ + + isTranslateHKLogin = !isTranslateHKLogin; + setState(() { + }); + }); + + + + },child: Container( + alignment: Alignment.center, + padding: EdgeInsets.only(left: 11,right: 11,top: 3,bottom: 3), + decoration: BoxDecoration( + border: Border.all(color: isTranslateHKLogin?Color(0xFFFEE645):Colors.white, width: 1), + borderRadius: BorderRadius.circular(11)), + child: fixedText(isTranslateHKLogin?I18n.of(context).translation_butler_start_receive_order:I18n.of(context).translation_butler_stop_receive_order, color: isTranslateHKLogin?Color(0xFFFEE645):Colors.white, fontSize: 15), + ),),), + Container( + padding: EdgeInsets.only(left: 13,top: 20), + child: fixedText(I18n.of(context).real_time_helper, color: Colors.white, fontSize: 22,fontWeight: FontWeight.w700), + ), + helperCard(I18n.of(context).translation_butler, + R.assetsImagesImgTranslationButler, () { + if (UserData().isTranslateUser) { + showToast(I18n.of(context).translation_butler_stop_tips); + } else { + Navigator.of(context).push( + MaterialPageRoute( + builder: (_) => TranslationButlerPage(), + ), + ); + } + }, textColor: Color(0xff2685FA)), + helperCard(I18n.of(context).travel_butler, + R.assetsImagesImgTravelButler, () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (_) => TravelButlerPage(), + ), + ); + }, textColor: Color(0xffff682d)), + SizedBox( + height: 15, + ), + ], + )), + ) + ], + ), + ), + ):Scaffold( appBar: appBar, body: SafeArea( child: Container( @@ -53,21 +191,21 @@ class RealTimeHelperPageState extends State { children: [ helperCard(I18n.of(context).translation_butler, R.assetsImagesImgTranslationButler, () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => TranslationButlerPage(), - ), - ); - },textColor: Color(0xff2685FA)), + Navigator.of(context).push( + MaterialPageRoute( + builder: (_) => TranslationButlerPage(), + ), + ); + },textColor: Color(0xff2685FA)), helperCard( I18n.of(context).travel_butler, R.assetsImagesImgTravelButler, - () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => TravelButlerPage(), - ), - ); - },textColor: Color(0xffff682d)), + () { + Navigator.of(context).push( + MaterialPageRoute( + builder: (_) => TravelButlerPage(), + ), + ); + },textColor: Color(0xffff682d)), SizedBox( height: 15, ), @@ -78,7 +216,8 @@ class RealTimeHelperPageState extends State { ); } - Widget helperCard(String title, String assets, Function callBack,{Color textColor }) { + Widget helperCard(String title, String assets, Function callBack, + {Color textColor}) { return InkWell( child: Container( margin: EdgeInsets.all(10), @@ -88,24 +227,27 @@ class RealTimeHelperPageState extends State { borderRadius: BorderRadius.circular(10), // side: BorderSide(color: Colors.green,width: 25), ), - child: Container(padding: EdgeInsets.all(10),child: Column( - children: [ - Image.asset( - assets, - ), - Padding( - padding: EdgeInsets.only(top: 15, bottom: 15), - child: Text( - title + ' >>', - textScaleFactor: 1.0, - style: TextStyle(color: textColor, fontSize: 20), + child: Container( + padding: EdgeInsets.all(10), + child: Column( + children: [ + Image.asset( + assets, ), - ) - ], - ),), + Padding( + padding: EdgeInsets.only(top: 15, bottom: 15), + child: Text( + title + ' >>', + textScaleFactor: 1.0, + style: TextStyle(color: textColor, fontSize: 20), + ), + ) + ], + ), + ), ), ), - onTap: callBack, + onTap: isReady?callBack:null, ); } } diff --git a/lib/home/realtimehelper/translation_butler_page.dart b/lib/home/realtimehelper/translation_butler_page.dart index b4180d3..1cb08cf 100644 --- a/lib/home/realtimehelper/translation_butler_page.dart +++ b/lib/home/realtimehelper/translation_butler_page.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:ffi'; import 'package:chat/data/UserData.dart'; import 'package:chat/data/translate_hk_data_mgr.dart'; @@ -62,13 +63,34 @@ class TranslationButlerPageState extends State { refreshOrder(args){ orderStatus = TranslateHKMgr().orderStatus; - waitNum = TranslateHKMgr().waitNum; - waitTimer = Timer.periodic(Duration(seconds: 1), (Timer t) { - handleTick(); - }); + + + switch(orderStatus){ + case TranslateHKMgr.ORDER_STATUS_EMPTY: + isCreatingOrder=false; + waitTimer?.cancel(); + secondsPassed = 0; + SPUtils.save(Constants.TranslationHelper,null); + break; + case TranslateHKMgr.ORDER_STATUS_WAITING: + secondsPassed = 0; + waitNum = TranslateHKMgr().waitNum; + waitTimer = Timer.periodic(Duration(seconds: 1), (Timer t) { + handleTick(); + }); + break; + } + + setState(() {}); } + ///订单没有人接,超时,服务器会发送取消订单通知 + canceledOrder(args){ + TranslateHKMgr().orderStatus = TranslateHKMgr.ORDER_STATUS_EMPTY; + refreshOrder(null); + } + @override void initState() { super.initState(); @@ -79,7 +101,7 @@ class TranslationButlerPageState extends State { initData(); MessageMgr().on(MessageMgr.TRANSLATE_HK_REFRESH_ORDER, refreshOrder); - + MessageMgr().on(MessageMgr.TRANSLATE_HK_CANCEL_ORDER, canceledOrder); WidgetsBinding.instance.addPostFrameCallback((_) { @@ -116,7 +138,6 @@ class TranslationButlerPageState extends State { } secondsPassed = ((DateTime.now().millisecondsSinceEpoch ~/ 1000 - second)); - apply(); } else { print('time: null'); } @@ -129,9 +150,9 @@ class TranslationButlerPageState extends State { return; } isCreatingOrder=true; - + TranslateHKMgr().startWaitTime=DateTime.now().millisecondsSinceEpoch; MsgHandler.sendCreateTranslateOrder(langList[curSourceLang].key,langList[curToLang].key,scenesList[curScenes].key,extraMsg); - + extraMsg=''; } @@ -162,6 +183,7 @@ class TranslationButlerPageState extends State { void dispose() { waitTimer?.cancel(); MessageMgr().off(MessageMgr.TRANSLATE_HK_REFRESH_ORDER, refreshOrder); + MessageMgr().off(MessageMgr.TRANSLATE_HK_CANCEL_ORDER, canceledOrder); if (orderStatus==TranslateHKMgr.ORDER_STATUS_WAITING && timeStamp != null) { print('保存时间戳$timeStamp'); SPUtils.save(Constants.TranslationHelper, timeStamp.toString()); @@ -698,36 +720,22 @@ class TranslationButlerPageState extends State { textScaleFactor: 1.0, style: TextStyle(color: Colors.white, fontSize: 19), ), - onPressed: () async { - await SPUtils.save(Constants.TranslationHelper, null); - setState(() { - orderStatus = TranslateHKMgr.ORDER_STATUS_EMPTY; - waitTimer?.cancel(); - secondsPassed = 0; - MsgHandler.sendCancelTranslateOrder(); - - }); - }), + onPressed: cancelOrder ), ), - Container( - margin: EdgeInsets.only(left: 70, right: 70, top: 25), - height: 47, - child: RaisedButton( - color: Color(0xffB3B3B3), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(10))), - child: Text( - I18n.of(context).translation_butler_wait_service, - textScaleFactor: 1.0, - style: TextStyle(color: Colors.white, fontSize: 19), - ), - onPressed: () {}), - ) ], ); } + void cancelOrder()async { + await SPUtils.save(Constants.TranslationHelper, null); + setState(() { + TranslateHKMgr().orderStatus = TranslateHKMgr.ORDER_STATUS_EMPTY; + refreshOrder(null); + MsgHandler.sendCancelTranslateOrder(); + }); + } + void handleTick() { setState(() { diff --git a/lib/home/realtimehelper/translation_evaluation_dialog.dart b/lib/home/realtimehelper/translation_evaluation_dialog.dart index fbfffaf..582c8da 100644 --- a/lib/home/realtimehelper/translation_evaluation_dialog.dart +++ b/lib/home/realtimehelper/translation_evaluation_dialog.dart @@ -1,6 +1,8 @@ import 'package:chat/data/constants.dart'; +import 'package:chat/data/translate_hk_data_mgr.dart'; import 'package:chat/generated/i18n.dart'; import 'package:chat/r.dart'; +import 'package:chat/utils/HttpUtil.dart'; import 'package:chat/utils/screen.dart'; import 'package:flutter/material.dart'; @@ -36,11 +38,11 @@ class TravelEvaluationPageState extends State { void didChangeDependencies() { super.didChangeDependencies(); posList = [ - EvaluationBean(1, I18n.of(context).translation_pos_1), - EvaluationBean(2, I18n.of(context).translation_pos_2), - EvaluationBean(3, I18n.of(context).translation_pos_3), - EvaluationBean(4, I18n.of(context).translation_pos_4), - EvaluationBean(5, I18n.of(context).translation_pos_5), + EvaluationBean(6, I18n.of(context).translation_pos_1), + EvaluationBean(7, I18n.of(context).translation_pos_2), + EvaluationBean(8, I18n.of(context).translation_pos_3), + EvaluationBean(9, I18n.of(context).translation_pos_4), + EvaluationBean(10, I18n.of(context).translation_pos_5), ]; negList = [ @@ -52,6 +54,29 @@ class TravelEvaluationPageState extends State { ]; } + ///评价接口 + evaluationAPI(){ + + List list= isGood ? posList : negList; + String value=''; + for(int k=0;k { style: TextStyle(color: Colors.white, fontSize: 15,fontWeight: FontWeight.w500), ),), - onPressed:(){ - Navigator.of(context)..pop(); - } ), + onPressed:evaluationAPI ), ) ], @@ -239,6 +262,9 @@ class TravelEvaluationPageState extends State { ),); } + + + getItem(List posList) { List evaluationWidget = []; for (int k = 0; k < posList.length; k++) { diff --git a/lib/home/realtimehelper/translation_order_push_dialog.dart b/lib/home/realtimehelper/translation_order_push_dialog.dart new file mode 100644 index 0000000..fe42c31 --- /dev/null +++ b/lib/home/realtimehelper/translation_order_push_dialog.dart @@ -0,0 +1,218 @@ +import 'package:chat/data/UserData.dart'; +import 'package:chat/data/constants.dart'; +import 'package:chat/data/translate_hk_data_mgr.dart'; +import 'package:chat/generated/i18n.dart'; +import 'package:chat/r.dart'; +import 'package:chat/utils/HttpUtil.dart'; +import 'package:chat/utils/MessageMgr.dart'; +import 'package:chat/utils/count_down_button.dart'; +import 'package:chat/utils/msgHandler.dart'; +import 'package:chat/utils/screen.dart'; +import 'package:flutter/material.dart'; + +///翻译管家-结束后评论弹窗 +class TranslateOrderPushPage extends StatefulWidget { + bool isUser; + String orderId; + int scenes; + + String desc; + Function userStartChat; + int createTime; + String userName; + + TranslateOrderPushPage(this.isUser, + {this.orderId, + this.scenes, + this.desc, + this.userStartChat, + this.createTime, + this.userName}); + + @override + State createState() { + return TranslateOrderPushPageState(); + } +} + +class TranslateOrderPushPageState extends State { + @override + void initState() { + // TODO: implement initState + super.initState(); + MessageMgr().on(MessageMgr.TRANSLATE_HK_CANCEL_ORDER, cancelOrder); + } + + + + cancelOrder(args){ + Navigator.pop(context); + } + + @override + void dispose() { + // TODO: implement dispose + super.dispose(); + MessageMgr().off(MessageMgr.TRANSLATE_HK_CANCEL_ORDER, cancelOrder); + } + + @override + void didChangeDependencies() { + // TODO: implement didChangeDependencies + super.didChangeDependencies(); + } + + String withZero(int num){ + return num<10?'0$num':'$num'; + } + + @override + Widget build(BuildContext context) { + // TODO: implement build + var scenesList = [ + I18n.of(context).translation_scenes_1, + I18n.of(context).translation_scenes_2, + I18n.of(context).translation_scenes_3, + I18n.of(context).translation_scenes_4, + ]; + + DateTime date = UserData().isTranslateUser?DateTime.now():DateTime.fromMillisecondsSinceEpoch(TranslateHKMgr().startWaitTime); + String time = '${withZero(date.hour)}:${withZero(date.minute)}'; + + int second = (DateTime.now().millisecondsSinceEpoch-TranslateHKMgr().startWaitTime)~/1000; + String userWaitStr ; + if( second>60){ + userWaitStr = (second~/60).toString()+I18n.of(context).minute; + }else{ + userWaitStr = second.toString()+I18n.of(context).second; + } + + String translateStr= I18n.of(context).translation_butler_push_order_time.replaceAll('/s1', time)+'5${I18n.of(context).minute}'; + String userStr= I18n.of(context).translation_butler_push_order_time2.replaceAll('/s1', time)+userWaitStr; + + return UnconstrainedBox( + alignment: Alignment.topCenter, + child: InkWell( + onTap: () {}, + child: Container( + alignment: Alignment.topCenter, + +// height: 180, + width: Screen.width - 20, + margin: EdgeInsets.all(10), + child: Card( + elevation: 2, // 阴影 + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10), +// side: BorderSide(color: Colors.green,width: 25), + ), + child: Container( +// color: Colors.yellow, + width: double.maxFinite, + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(bottom: 15), + child: Text( + I18n.of(context).translation_butler_dialog_title, + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w500, + color: AppColors.NewAppbarTextColor, + fontSize: 17), + ), + ), + Text( + I18n.of(context).translation_butler_dialog_order.replaceAll( + '/s1', widget.isUser ? I18n.of(context).you : widget.userName), + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: TextStyle( + color: AppColors.NewAppbarTextColor, fontSize: 14), + ), + SizedBox( + height: 10, + ), + Text( + widget.isUser?userStr: translateStr, + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: TextStyle(color: Color(0xFF797979), fontSize: 11), + ), + + widget.isUser + ? Container() + : Text( + '${I18n.of(context).translation_butler_scenes2}:${scenesList[widget.scenes]}', + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: + TextStyle(color: Color(0xFF797979), fontSize: 11), + ), + + widget.isUser + ? Container() + : Text( + '${I18n.of(context).translation_more_desc}:${widget.desc}', + textScaleFactor: 1.0, + textAlign: TextAlign.left, + style: + TextStyle(color: Color(0xFF797979), fontSize: 11), + ), +// + Container( + margin: EdgeInsets.only( + left: 30, right: 30, top: 20, bottom: 10), + child: widget.isUser + ? Container( + margin: EdgeInsets.only(top: 10), + height: 36, + alignment: Alignment.center, + child: RaisedButton( + color: Color(0xff3875E9), + shape: RoundedRectangleBorder( + borderRadius: + BorderRadius.all(Radius.circular(10))), + child: Padding( + padding: EdgeInsets.only(left: 10, right: 10), + child: Text( + I18n.of(context) + .translation_butler_dialog_start_chat, + textScaleFactor: 1.0, + style: TextStyle( + color: Colors.white, + fontSize: 15, + fontWeight: FontWeight.w500), + ), + ), + onPressed: () { + Navigator.of(context).pop(); + widget.userStartChat(); + }), + ) + : CountDownButton( + I18n.of(context) + .translation_butler_dialog_start_service, + () { + ///倒计时结束自动关闭 + Navigator.of(context).pop(); + }, + onPress: () { + ///发送确认接单 + MsgHandler.sendReceiveOrder(); + Navigator.of(context).pop(); + }, + ), + ) + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/home/realtimehelper/travel_butler_page.dart b/lib/home/realtimehelper/travel_butler_page.dart index 19ba83f..75b55bd 100644 --- a/lib/home/realtimehelper/travel_butler_page.dart +++ b/lib/home/realtimehelper/travel_butler_page.dart @@ -3,6 +3,7 @@ import 'package:chat/data/UserData.dart'; import 'package:chat/map/google_map_location_picker.dart'; import 'package:chat/map/location_result.dart'; import 'package:chat/models/group_info_model.dart'; +import 'package:chat/utils/HttpUtil.dart'; import 'package:chat/utils/screen.dart'; import 'package:chat/utils/separator_line.dart'; import 'package:flutter/cupertino.dart'; @@ -178,6 +179,9 @@ class TravelButlerPageState extends State { endResult.latLng.latitude, endResult.latLng.longitude); + + HttpUtil().userRanging(distanceB.toInt(),startResult.address,endResult.address); + setState(() { }); } @@ -243,7 +247,7 @@ class TravelButlerPageState extends State { Widget positionLayout(bool isStart){ - String str = isStart?'我的位置':'你要去哪儿'; + String str = isStart?I18n.of(context).travel_my_location:I18n.of(context).travel_go_where; if(isStart && startResult!=null && startResult.address!=null){ str = startResult.address; }else if (!isStart && endResult!=null &&endResult.address!=null){ @@ -251,7 +255,7 @@ class TravelButlerPageState extends State { } return Container(height:50,child: Row(mainAxisSize: MainAxisSize.max, children: [ Expanded(child: Container( child: fixedText(str,color: Colors.black,fontSize: 16),)), - fixedText(isStart?'起点':'终点',color: Color(0xff797979),fontSize: 14) + fixedText(isStart?I18n.of(context).travel_start:I18n.of(context).travel_end,color: Color(0xff797979),fontSize: 14) ],),); diff --git a/lib/models/last_msg_description.dart b/lib/models/last_msg_description.dart index 79534d0..f015afb 100644 --- a/lib/models/last_msg_description.dart +++ b/lib/models/last_msg_description.dart @@ -140,15 +140,14 @@ class _LastMsgDescriptionState extends State { if(widget.lastMessageModel.channelType==ChatChannelType.Session.value){ ///翻译管家的 通知消息 - desc = '翻译管家---'; print('翻译管家的 通知消息-'); TransHKChatNotice res = TransHKChatNotice.fromBuffer(widget.lastMessageModel.msgContent); if(res.noticeType==TransHKChatNoticeType.StartChat){ - return '[翻译管家服务开始]'; + desc = I18n.of(Constants.getCurrentContext()).translation_butler_last_item_start; }else if(res.noticeType==TransHKChatNoticeType.EndChat){ - return '[翻译管家服务结束]'; + desc = I18n.of(Constants.getCurrentContext()).translation_butler_last_item_end; }else{ - return ''; + desc = ''; } diff --git a/lib/proto/transhousekeeper.pb.dart b/lib/proto/transhousekeeper.pb.dart index 13d5d7f..927f703 100644 --- a/lib/proto/transhousekeeper.pb.dart +++ b/lib/proto/transhousekeeper.pb.dart @@ -202,13 +202,72 @@ class CancellationTransHKOrderRes extends $pb.GeneratedMessage { void clearOrderId() => clearField(2); } +class EndTransHKOrderReq extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('EndTransHKOrderReq', package: const $pb.PackageName('yl_pb')) + ..aOS(1, 'orderId') + ..hasRequiredFields = false + ; + + EndTransHKOrderReq._() : super(); + factory EndTransHKOrderReq() => create(); + factory EndTransHKOrderReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EndTransHKOrderReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + EndTransHKOrderReq clone() => EndTransHKOrderReq()..mergeFromMessage(this); + EndTransHKOrderReq copyWith(void Function(EndTransHKOrderReq) updates) => super.copyWith((message) => updates(message as EndTransHKOrderReq)); + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static EndTransHKOrderReq create() => EndTransHKOrderReq._(); + EndTransHKOrderReq createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static EndTransHKOrderReq getDefault() => _defaultInstance ??= create()..freeze(); + static EndTransHKOrderReq _defaultInstance; + + $core.String get orderId => $_getS(0, ''); + set orderId($core.String v) { $_setString(0, v); } + $core.bool hasOrderId() => $_has(0); + void clearOrderId() => clearField(1); +} + +class EndTransHKOrderRes extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo('EndTransHKOrderRes', package: const $pb.PackageName('yl_pb')) + ..a<$core.int>(1, 'errorCode', $pb.PbFieldType.O3) + ..aOS(2, 'orderId') + ..hasRequiredFields = false + ; + + EndTransHKOrderRes._() : super(); + factory EndTransHKOrderRes() => create(); + factory EndTransHKOrderRes.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory EndTransHKOrderRes.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + EndTransHKOrderRes clone() => EndTransHKOrderRes()..mergeFromMessage(this); + EndTransHKOrderRes copyWith(void Function(EndTransHKOrderRes) updates) => super.copyWith((message) => updates(message as EndTransHKOrderRes)); + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static EndTransHKOrderRes create() => EndTransHKOrderRes._(); + EndTransHKOrderRes createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + static EndTransHKOrderRes getDefault() => _defaultInstance ??= create()..freeze(); + static EndTransHKOrderRes _defaultInstance; + + $core.int get errorCode => $_get(0, 0); + set errorCode($core.int v) { $_setSignedInt32(0, v); } + $core.bool hasErrorCode() => $_has(0); + void clearErrorCode() => clearField(1); + + $core.String get orderId => $_getS(1, ''); + set orderId($core.String v) { $_setString(1, v); } + $core.bool hasOrderId() => $_has(1); + void clearOrderId() => clearField(2); +} + class DeliveryTransHKOrderPush extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo('DeliveryTransHKOrderPush', package: const $pb.PackageName('yl_pb')) ..aOS(1, 'orderId') - ..aInt64(2, 'createTime') - ..a<$core.int>(3, 'tLanguage', $pb.PbFieldType.OU3) - ..a<$core.int>(4, 'scenes', $pb.PbFieldType.O3) - ..aOS(5, 'desc') + ..a<$0.BaseUserInfo>(2, 'employer', $pb.PbFieldType.OM, $0.BaseUserInfo.getDefault, $0.BaseUserInfo.create) + ..aInt64(3, 'createTime') + ..a<$core.int>(4, 'tLanguage', $pb.PbFieldType.OU3) + ..a<$core.int>(5, 'scenes', $pb.PbFieldType.O3) + ..aOS(6, 'desc') ..hasRequiredFields = false ; @@ -231,25 +290,30 @@ class DeliveryTransHKOrderPush extends $pb.GeneratedMessage { $core.bool hasOrderId() => $_has(0); void clearOrderId() => clearField(1); - Int64 get createTime => $_getI64(1); - set createTime(Int64 v) { $_setInt64(1, v); } - $core.bool hasCreateTime() => $_has(1); - void clearCreateTime() => clearField(2); - - $core.int get tLanguage => $_get(2, 0); - set tLanguage($core.int v) { $_setUnsignedInt32(2, v); } - $core.bool hasTLanguage() => $_has(2); - void clearTLanguage() => clearField(3); - - $core.int get scenes => $_get(3, 0); - set scenes($core.int v) { $_setSignedInt32(3, v); } - $core.bool hasScenes() => $_has(3); - void clearScenes() => clearField(4); - - $core.String get desc => $_getS(4, ''); - set desc($core.String v) { $_setString(4, v); } - $core.bool hasDesc() => $_has(4); - void clearDesc() => clearField(5); + $0.BaseUserInfo get employer => $_getN(1); + set employer($0.BaseUserInfo v) { setField(2, v); } + $core.bool hasEmployer() => $_has(1); + void clearEmployer() => clearField(2); + + Int64 get createTime => $_getI64(2); + set createTime(Int64 v) { $_setInt64(2, v); } + $core.bool hasCreateTime() => $_has(2); + void clearCreateTime() => clearField(3); + + $core.int get tLanguage => $_get(3, 0); + set tLanguage($core.int v) { $_setUnsignedInt32(3, v); } + $core.bool hasTLanguage() => $_has(3); + void clearTLanguage() => clearField(4); + + $core.int get scenes => $_get(4, 0); + set scenes($core.int v) { $_setSignedInt32(4, v); } + $core.bool hasScenes() => $_has(4); + void clearScenes() => clearField(5); + + $core.String get desc => $_getS(5, ''); + set desc($core.String v) { $_setString(5, v); } + $core.bool hasDesc() => $_has(5); + void clearDesc() => clearField(6); } class CancellationTransHKOrderPush extends $pb.GeneratedMessage { @@ -283,6 +347,8 @@ class TransHKChatNotice extends $pb.GeneratedMessage { ..e(1, 'noticeType', $pb.PbFieldType.OE, TransHKChatNoticeType.StartChat, TransHKChatNoticeType.valueOf, TransHKChatNoticeType.values) ..a<$0.BaseUserInfo>(2, 'operatuId', $pb.PbFieldType.OM, $0.BaseUserInfo.getDefault, $0.BaseUserInfo.create) ..pc<$0.BaseUserInfo>(3, 'operateduId', $pb.PbFieldType.PM,$0.BaseUserInfo.create) + ..a<$0.BaseUserInfo>(4, 'inter', $pb.PbFieldType.OM, $0.BaseUserInfo.getDefault, $0.BaseUserInfo.create) + ..a<$0.BaseUserInfo>(5, 'employer', $pb.PbFieldType.OM, $0.BaseUserInfo.getDefault, $0.BaseUserInfo.create) ..hasRequiredFields = false ; @@ -311,5 +377,15 @@ class TransHKChatNotice extends $pb.GeneratedMessage { void clearOperatuId() => clearField(2); $core.List<$0.BaseUserInfo> get operateduId => $_getList(2); + + $0.BaseUserInfo get inter => $_getN(3); + set inter($0.BaseUserInfo v) { setField(4, v); } + $core.bool hasInter() => $_has(3); + void clearInter() => clearField(4); + + $0.BaseUserInfo get employer => $_getN(4); + set employer($0.BaseUserInfo v) { setField(5, v); } + $core.bool hasEmployer() => $_has(4); + void clearEmployer() => clearField(5); } diff --git a/lib/proto/transhousekeeper.pbjson.dart b/lib/proto/transhousekeeper.pbjson.dart index aad108a..39c5d9b 100644 --- a/lib/proto/transhousekeeper.pbjson.dart +++ b/lib/proto/transhousekeeper.pbjson.dart @@ -71,14 +71,30 @@ const CancellationTransHKOrderRes$json = const { ], }; +const EndTransHKOrderReq$json = const { + '1': 'EndTransHKOrderReq', + '2': const [ + const {'1': 'OrderId', '3': 1, '4': 1, '5': 9, '10': 'OrderId'}, + ], +}; + +const EndTransHKOrderRes$json = const { + '1': 'EndTransHKOrderRes', + '2': const [ + const {'1': 'ErrorCode', '3': 1, '4': 1, '5': 5, '10': 'ErrorCode'}, + const {'1': 'OrderId', '3': 2, '4': 1, '5': 9, '10': 'OrderId'}, + ], +}; + const DeliveryTransHKOrderPush$json = const { '1': 'DeliveryTransHKOrderPush', '2': const [ const {'1': 'OrderId', '3': 1, '4': 1, '5': 9, '10': 'OrderId'}, - const {'1': 'CreateTime', '3': 2, '4': 1, '5': 3, '10': 'CreateTime'}, - const {'1': 'TLanguage', '3': 3, '4': 1, '5': 13, '10': 'TLanguage'}, - const {'1': 'Scenes', '3': 4, '4': 1, '5': 5, '10': 'Scenes'}, - const {'1': 'Desc', '3': 5, '4': 1, '5': 9, '10': 'Desc'}, + const {'1': 'Employer', '3': 2, '4': 1, '5': 11, '6': '.yl_pb.BaseUserInfo', '10': 'Employer'}, + const {'1': 'CreateTime', '3': 3, '4': 1, '5': 3, '10': 'CreateTime'}, + const {'1': 'TLanguage', '3': 4, '4': 1, '5': 13, '10': 'TLanguage'}, + const {'1': 'Scenes', '3': 5, '4': 1, '5': 5, '10': 'Scenes'}, + const {'1': 'Desc', '3': 6, '4': 1, '5': 9, '10': 'Desc'}, ], }; @@ -95,6 +111,8 @@ const TransHKChatNotice$json = const { const {'1': 'NoticeType', '3': 1, '4': 1, '5': 14, '6': '.yl_pb.TransHKChatNoticeType', '10': 'NoticeType'}, const {'1': 'OperatuId', '3': 2, '4': 1, '5': 11, '6': '.yl_pb.BaseUserInfo', '10': 'OperatuId'}, const {'1': 'OperateduId', '3': 3, '4': 3, '5': 11, '6': '.yl_pb.BaseUserInfo', '10': 'OperateduId'}, + const {'1': 'Inter', '3': 4, '4': 1, '5': 11, '6': '.yl_pb.BaseUserInfo', '10': 'Inter'}, + const {'1': 'Employer', '3': 5, '4': 1, '5': 11, '6': '.yl_pb.BaseUserInfo', '10': 'Employer'}, ], }; diff --git a/lib/proto/transhousekeeper.proto b/lib/proto/transhousekeeper.proto old mode 100755 new mode 100644 index 3269413..0fa63a7 --- a/lib/proto/transhousekeeper.proto +++ b/lib/proto/transhousekeeper.proto @@ -13,7 +13,6 @@ enum TransHKOrderState{ Completed = 5; //已完成 } -//comid = 3 enum TransHKChatNoticeType{ StartChat = 1; //开始 EndChat = 2; //结束 @@ -55,15 +54,25 @@ message CancellationTransHKOrderRes { optional string OrderId = 2; //订单号 } +//Msg= 7 结束订单请求 +message EndTransHKOrderReq{ + optional string OrderId = 1; //订单号 +} +//Msg= 8 结束订单请求回应 +message EndTransHKOrderRes{ + optional int32 ErrorCode = 1; //详见错误码文档 + optional string OrderId = 2; //订单号 +} //Msg= 20 派送订单推送 message DeliveryTransHKOrderPush { optional string OrderId =1; //订单号 - optional int64 CreateTime = 2; //创建时间 - optional uint32 TLanguage =3; //翻译语言 - optional int32 Scenes =4; //场景 - optional string Desc =5; //描述 + optional BaseUserInfo Employer = 2; //雇主 + optional int64 CreateTime = 3; //创建时间 + optional uint32 TLanguage =4; //翻译语言 + optional int32 Scenes =5; //场景 + optional string Desc =6; //描述 } //Msg= 21 订单取消推送 @@ -77,4 +86,6 @@ message TransHKChatNotice { optional TransHKChatNoticeType NoticeType = 1; //公告类型 optional BaseUserInfo OperatuId = 2; //操作用户Id repeated BaseUserInfo OperateduId = 3; //被操作用户Ids 有可能是多人 + optional BaseUserInfo Inter = 4; //翻译官 + optional BaseUserInfo Employer = 5; //客户 } \ No newline at end of file diff --git a/lib/r.dart b/lib/r.dart index 3266174..700e20e 100644 --- a/lib/r.dart +++ b/lib/r.dart @@ -1,526 +1,532 @@ class R { - /// ![](http://127.0.0.1:4343/assets/images/bofang.png) + /// ![](http://127.0.0.1:3132/assets/images/img_realtime_bg2.png) + static final String assetsImagesImgRealtimeBg2 = 'assets/images/img_realtime_bg2.png'; + /// ![](http://127.0.0.1:3132/assets/images/bofang.png) static final String assetsImagesBofang = 'assets/images/bofang.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_quick_search.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_quick_search.png) static final String assetsImagesIcQuickSearch = 'assets/images/ic_quick_search.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_temp_share.png) + /// ![](http://127.0.0.1:3132/assets/images/img_temp_share.png) static final String assetsImagesImgTempShare = 'assets/images/img_temp_share.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_tag.png) + /// ![](http://127.0.0.1:3132/assets/images/img_realtime_bg1.png) + static final String assetsImagesImgRealtimeBg1 = 'assets/images/img_realtime_bg1.png'; + /// ![](http://127.0.0.1:3132/assets/images/ic_tag.png) static final String assetsImagesIcTag = 'assets/images/ic_tag.png'; - /// ![](http://127.0.0.1:4343/assets/images/default_nor_avatar.png) + /// ![](http://127.0.0.1:3132/assets/images/default_nor_avatar.png) static final String assetsImagesDefaultNorAvatar = 'assets/images/default_nor_avatar.png'; - /// ![](http://127.0.0.1:4343/assets/images/server_icon.png) + /// ![](http://127.0.0.1:3132/assets/images/server_icon.png) static final String assetsImagesServerIcon = 'assets/images/server_icon.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_public_account.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_public_account.png) static final String assetsImagesIcPublicAccount = 'assets/images/ic_public_account.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_feeds.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_feeds.png) static final String assetsImagesIcFeeds = 'assets/images/ic_feeds.png'; - /// ![](http://127.0.0.1:4343/assets/images/daily_bg_1.png) + /// ![](http://127.0.0.1:3132/assets/images/daily_bg_1.png) static final String assetsImagesDailyBg1 = 'assets/images/daily_bg_1.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_translation_no.png) + /// ![](http://127.0.0.1:3132/assets/images/img_translation_no.png) static final String assetsImagesImgTranslationNo = 'assets/images/img_translation_no.png'; - /// ![](http://127.0.0.1:4343/assets/images/yqm_bg.png) + /// ![](http://127.0.0.1:3132/assets/images/img_check_photo_bg.png) + static final String assetsImagesImgCheckPhotoBg = 'assets/images/img_check_photo_bg.png'; + /// ![](http://127.0.0.1:3132/assets/images/yqm_bg.png) static final String assetsImagesYqmBg = 'assets/images/yqm_bg.png'; - /// ![](http://127.0.0.1:4343/assets/images/daily_bg_2.png) + /// ![](http://127.0.0.1:3132/assets/images/daily_bg_2.png) static final String assetsImagesDailyBg2 = 'assets/images/daily_bg_2.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_excel.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_excel.png) static final String assetsImagesExtExcel = 'assets/images/ext_excel.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_fyj.png) + /// ![](http://127.0.0.1:3132/assets/images/img_fyj.png) static final String assetsImagesImgFyj = 'assets/images/img_fyj.png'; - /// ![](http://127.0.0.1:4343/assets/images/right_gray.png) + /// ![](http://127.0.0.1:3132/assets/images/right_gray.png) static final String assetsImagesRightGray = 'assets/images/right_gray.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_group_chat.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_group_chat.png) static final String assetsImagesIcGroupChat = 'assets/images/ic_group_chat.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_temp_see.png) + /// ![](http://127.0.0.1:3132/assets/images/img_temp_see.png) static final String assetsImagesImgTempSee = 'assets/images/img_temp_see.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_pdf.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_pdf.png) static final String assetsImagesExtPdf = 'assets/images/ext_pdf.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_ppt.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_ppt.png) static final String assetsImagesExtPpt = 'assets/images/ext_ppt.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_mini_program.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_mini_program.png) static final String assetsImagesIcMiniProgram = 'assets/images/ic_mini_program.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_shake_phone.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_shake_phone.png) static final String assetsImagesIcShakePhone = 'assets/images/ic_shake_phone.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_translation_no_p.png) + /// ![](http://127.0.0.1:3132/assets/images/img_translation_no_p.png) static final String assetsImagesImgTranslationNoP = 'assets/images/img_translation_no_p.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_game_entry.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_game_entry.png) static final String assetsImagesIcGameEntry = 'assets/images/ic_game_entry.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_translation_yes.png) + /// ![](http://127.0.0.1:3132/assets/images/img_translation_yes.png) static final String assetsImagesImgTranslationYes = 'assets/images/img_translation_yes.png'; - /// ![](http://127.0.0.1:4343/assets/images/daily_icon.png) + /// ![](http://127.0.0.1:3132/assets/images/daily_icon.png) static final String assetsImagesDailyIcon = 'assets/images/daily_icon.png'; - /// ![](http://127.0.0.1:4343/assets/images/left_gray.png) + /// ![](http://127.0.0.1:3132/assets/images/left_gray.png) static final String assetsImagesLeftGray = 'assets/images/left_gray.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_social_circle.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_social_circle.png) static final String assetsImagesIcSocialCircle = 'assets/images/ic_social_circle.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_apk.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_apk.png) static final String assetsImagesExtApk = 'assets/images/ext_apk.png'; - /// ![](http://127.0.0.1:4343/assets/images/svip.png) + /// ![](http://127.0.0.1:3132/assets/images/svip.png) static final String assetsImagesSvip = 'assets/images/svip.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_qrcode_preview_tiny.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_qrcode_preview_tiny.png) static final String assetsImagesIcQrcodePreviewTiny = 'assets/images/ic_qrcode_preview_tiny.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_tran_icon.png) + /// ![](http://127.0.0.1:3132/assets/images/img_tran_icon.png) static final String assetsImagesImgTranIcon = 'assets/images/img_tran_icon.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_album.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_album.png) static final String assetsImagesIcAlbum = 'assets/images/ic_album.png'; - /// ![](http://127.0.0.1:4343/assets/images/zhiwen.png) + /// ![](http://127.0.0.1:3132/assets/images/zhiwen.png) static final String assetsImagesZhiwen = 'assets/images/zhiwen.png'; - /// ![](http://127.0.0.1:4343/assets/images/net_error.png) + /// ![](http://127.0.0.1:3132/assets/images/net_error.png) static final String assetsImagesNetError = 'assets/images/net_error.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_emotions.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_emotions.png) static final String assetsImagesIcEmotions = 'assets/images/ic_emotions.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_video.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_video.png) static final String assetsImagesExtVideo = 'assets/images/ext_video.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_word.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_word.png) static final String assetsImagesExtWord = 'assets/images/ext_word.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_temp_hy.png) + /// ![](http://127.0.0.1:3132/assets/images/img_temp_hy.png) static final String assetsImagesImgTempHy = 'assets/images/img_temp_hy.png'; - /// ![](http://127.0.0.1:4343/assets/images/hand.png) + /// ![](http://127.0.0.1:3132/assets/images/hand.png) static final String assetsImagesHand = 'assets/images/hand.png'; - /// ![](http://127.0.0.1:4343/assets/images/qianbao_bg.png) + /// ![](http://127.0.0.1:3132/assets/images/qianbao_bg.png) static final String assetsImagesQianbaoBg = 'assets/images/qianbao_bg.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_splash_3.png) + /// ![](http://127.0.0.1:3132/assets/images/img_splash_3.png) static final String assetsImagesImgSplash3 = 'assets/images/img_splash_3.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_update_bg.png) + /// ![](http://127.0.0.1:3132/assets/images/img_update_bg.png) static final String assetsImagesImgUpdateBg = 'assets/images/img_update_bg.png'; - /// ![](http://127.0.0.1:4343/assets/images/daily_btn_1.png) + /// ![](http://127.0.0.1:3132/assets/images/daily_btn_1.png) static final String assetsImagesDailyBtn1 = 'assets/images/daily_btn_1.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat_item_4.png) + /// ![](http://127.0.0.1:3132/assets/images/chat_item_4.png) static final String assetsImagesChatItem4 = 'assets/images/chat_item_4.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat_item_5.png) + /// ![](http://127.0.0.1:3132/assets/images/chat_item_5.png) static final String assetsImagesChatItem5 = 'assets/images/chat_item_5.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_people_nearby.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_people_nearby.png) static final String assetsImagesIcPeopleNearby = 'assets/images/ic_people_nearby.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_splash_2.png) + /// ![](http://127.0.0.1:3132/assets/images/img_splash_2.png) static final String assetsImagesImgSplash2 = 'assets/images/img_splash_2.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_tx_news.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_tx_news.png) static final String assetsImagesIcTxNews = 'assets/images/ic_tx_news.png'; - /// ![](http://127.0.0.1:4343/assets/images/service_icon.png) + /// ![](http://127.0.0.1:3132/assets/images/service_icon.png) static final String assetsImagesServiceIcon = 'assets/images/service_icon.png'; - /// ![](http://127.0.0.1:4343/assets/images/daily_btn_2.png) + /// ![](http://127.0.0.1:3132/assets/images/daily_btn_2.png) static final String assetsImagesDailyBtn2 = 'assets/images/daily_btn_2.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat_item_7.png) + /// ![](http://127.0.0.1:3132/assets/images/chat_item_7.png) static final String assetsImagesChatItem7 = 'assets/images/chat_item_7.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_temp_qb.png) + /// ![](http://127.0.0.1:3132/assets/images/img_temp_qb.png) static final String assetsImagesImgTempQb = 'assets/images/img_temp_qb.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_travel_butler.png) + /// ![](http://127.0.0.1:3132/assets/images/img_travel_butler.png) static final String assetsImagesImgTravelButler = 'assets/images/img_travel_butler.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat_item_6.png) + /// ![](http://127.0.0.1:3132/assets/images/chat_item_6.png) static final String assetsImagesChatItem6 = 'assets/images/chat_item_6.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_long_index.png) + /// ![](http://127.0.0.1:3132/assets/images/img_long_index.png) static final String assetsImagesImgLongIndex = 'assets/images/img_long_index.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_splash_1.png) + /// ![](http://127.0.0.1:3132/assets/images/img_splash_1.png) static final String assetsImagesImgSplash1 = 'assets/images/img_splash_1.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_translation_yes_p.png) + /// ![](http://127.0.0.1:3132/assets/images/img_translation_yes_p.png) static final String assetsImagesImgTranslationYesP = 'assets/images/img_translation_yes_p.png'; - /// ![](http://127.0.0.1:4343/assets/images/daily_coin.png) + /// ![](http://127.0.0.1:3132/assets/images/daily_coin.png) static final String assetsImagesDailyCoin = 'assets/images/daily_coin.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_new_friend.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_new_friend.png) static final String assetsImagesIcNewFriend = 'assets/images/ic_new_friend.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_settings.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_settings.png) static final String assetsImagesIcSettings = 'assets/images/ic_settings.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_cards_wallet.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_cards_wallet.png) static final String assetsImagesIcCardsWallet = 'assets/images/ic_cards_wallet.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat_item_2.png) + /// ![](http://127.0.0.1:3132/assets/images/chat_item_2.png) static final String assetsImagesChatItem2 = 'assets/images/chat_item_2.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat_item_3.png) + /// ![](http://127.0.0.1:3132/assets/images/chat_item_3.png) static final String assetsImagesChatItem3 = 'assets/images/chat_item_3.png'; - /// ![](http://127.0.0.1:4343/assets/images/robot.jpg) + /// ![](http://127.0.0.1:3132/assets/images/robot.jpg) static final String assetsImagesRobot = 'assets/images/robot.jpg'; - /// ![](http://127.0.0.1:4343/assets/images/ext_sound.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_sound.png) static final String assetsImagesExtSound = 'assets/images/ext_sound.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_zip.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_zip.png) static final String assetsImagesExtZip = 'assets/images/ext_zip.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat_item_1.png) + /// ![](http://127.0.0.1:3132/assets/images/chat_item_1.png) static final String assetsImagesChatItem1 = 'assets/images/chat_item_1.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_temp_qd.png) + /// ![](http://127.0.0.1:3132/assets/images/img_temp_qd.png) static final String assetsImagesImgTempQd = 'assets/images/img_temp_qd.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_translation_butler.png) + /// ![](http://127.0.0.1:3132/assets/images/img_translation_butler.png) static final String assetsImagesImgTranslationButler = 'assets/images/img_translation_butler.png'; - /// ![](http://127.0.0.1:4343/assets/images/left_white.png) + /// ![](http://127.0.0.1:3132/assets/images/left_white.png) static final String assetsImagesLeftWhite = 'assets/images/left_white.png'; - /// ![](http://127.0.0.1:4343/assets/images/voucher.png) + /// ![](http://127.0.0.1:3132/assets/images/voucher.png) static final String assetsImagesVoucher = 'assets/images/voucher.png'; - /// ![](http://127.0.0.1:4343/assets/images/VIP.png) + /// ![](http://127.0.0.1:3132/assets/images/VIP.png) static final String assetsImagesVIP = 'assets/images/VIP.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_wallet.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_wallet.png) static final String assetsImagesIcWallet = 'assets/images/ic_wallet.png'; - /// ![](http://127.0.0.1:4343/assets/images/right_white.png) + /// ![](http://127.0.0.1:3132/assets/images/right_white.png) static final String assetsImagesRightWhite = 'assets/images/right_white.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_collections.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_collections.png) static final String assetsImagesIcCollections = 'assets/images/ic_collections.png'; - /// ![](http://127.0.0.1:4343/assets/images/gift_show_2_4.png) + /// ![](http://127.0.0.1:3132/assets/images/gift_show_2_4.png) static final String assetsImagesGiftShow24 = 'assets/images/gift_show_2_4.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_wx_games.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_wx_games.png) static final String assetsImagesIcWxGames = 'assets/images/ic_wx_games.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_shopping.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_shopping.png) static final String assetsImagesIcShopping = 'assets/images/ic_shopping.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_fengchao.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_fengchao.png) static final String assetsImagesIcFengchao = 'assets/images/ic_fengchao.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_file_transfer.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_file_transfer.png) static final String assetsImagesIcFileTransfer = 'assets/images/ic_file_transfer.png'; - /// ![](http://127.0.0.1:4343/assets/images/suo.png) + /// ![](http://127.0.0.1:3132/assets/images/suo.png) static final String assetsImagesSuo = 'assets/images/suo.png'; - /// ![](http://127.0.0.1:4343/assets/images/red_packet_bg.png) + /// ![](http://127.0.0.1:3132/assets/images/red_packet_bg.png) static final String assetsImagesRedPacketBg = 'assets/images/red_packet_bg.png'; - /// ![](http://127.0.0.1:4343/assets/images/gift_show_2_3.png) + /// ![](http://127.0.0.1:3132/assets/images/gift_show_2_3.png) static final String assetsImagesGiftShow23 = 'assets/images/gift_show_2_3.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_unknown.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_unknown.png) static final String assetsImagesExtUnknown = 'assets/images/ext_unknown.png'; - /// ![](http://127.0.0.1:4343/assets/images/coin.png) + /// ![](http://127.0.0.1:3132/assets/images/coin.png) static final String assetsImagesCoin = 'assets/images/coin.png'; - /// ![](http://127.0.0.1:4343/assets/images/gift_anim_3.gif) + /// ![](http://127.0.0.1:3132/assets/images/gift_anim_3.gif) static final String assetsImagesGiftAnim3 = 'assets/images/gift_anim_3.gif'; - /// ![](http://127.0.0.1:4343/assets/images/gift_anim_2.gif) + /// ![](http://127.0.0.1:3132/assets/images/gift_anim_2.gif) static final String assetsImagesGiftAnim2 = 'assets/images/gift_anim_2.gif'; - /// ![](http://127.0.0.1:4343/assets/images/gift_1.png) + /// ![](http://127.0.0.1:3132/assets/images/gift_1.png) static final String assetsImagesGift1 = 'assets/images/gift_1.png'; - /// ![](http://127.0.0.1:4343/assets/images/back.png) + /// ![](http://127.0.0.1:3132/assets/images/back.png) static final String assetsImagesBack = 'assets/images/back.png'; - /// ![](http://127.0.0.1:4343/assets/images/gift_show_2_2.png) + /// ![](http://127.0.0.1:3132/assets/images/gift_show_2_2.png) static final String assetsImagesGiftShow22 = 'assets/images/gift_show_2_2.png'; - /// ![](http://127.0.0.1:4343/assets/images/gift_3.png) + /// ![](http://127.0.0.1:3132/assets/images/gift_3.png) static final String assetsImagesGift3 = 'assets/images/gift_3.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_quick_scan.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_quick_scan.png) static final String assetsImagesIcQuickScan = 'assets/images/ic_quick_scan.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_translation_icon.png) + /// ![](http://127.0.0.1:3132/assets/images/img_translation_icon.png) static final String assetsImagesImgTranslationIcon = 'assets/images/img_translation_icon.png'; - /// ![](http://127.0.0.1:4343/assets/images/img_translation_tick.png) + /// ![](http://127.0.0.1:3132/assets/images/img_translation_tick.png) static final String assetsImagesImgTranslationTick = 'assets/images/img_translation_tick.png'; - /// ![](http://127.0.0.1:4343/assets/images/ic_bottle_msg.png) + /// ![](http://127.0.0.1:3132/assets/images/ic_bottle_msg.png) static final String assetsImagesIcBottleMsg = 'assets/images/ic_bottle_msg.png'; - /// ![](http://127.0.0.1:4343/assets/images/gift_anim_1.gif) + /// ![](http://127.0.0.1:3132/assets/images/gift_anim_1.gif) static final String assetsImagesGiftAnim1 = 'assets/images/gift_anim_1.gif'; - /// ![](http://127.0.0.1:4343/assets/images/bg.png) + /// ![](http://127.0.0.1:3132/assets/images/bg.png) static final String assetsImagesBg = 'assets/images/bg.png'; - /// ![](http://127.0.0.1:4343/assets/images/gift_2.png) + /// ![](http://127.0.0.1:3132/assets/images/gift_2.png) static final String assetsImagesGift2 = 'assets/images/gift_2.png'; - /// ![](http://127.0.0.1:4343/assets/images/ext_txt.png) + /// ![](http://127.0.0.1:3132/assets/images/ext_txt.png) static final String assetsImagesExtTxt = 'assets/images/ext_txt.png'; - /// ![](http://127.0.0.1:4343/assets/images/gift_show_2_1.png) + /// ![](http://127.0.0.1:3132/assets/images/gift_show_2_1.png) static final String assetsImagesGiftShow21 = 'assets/images/gift_show_2_1.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat/emoji.png) + /// ![](http://127.0.0.1:3132/assets/images/chat/emoji.png) static final String assetsImagesChatEmoji = 'assets/images/chat/emoji.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat/onion.png) + /// ![](http://127.0.0.1:3132/assets/images/chat/onion.png) static final String assetsImagesChatOnion = 'assets/images/chat/onion.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat/icon1.png) + /// ![](http://127.0.0.1:3132/assets/images/chat/icon1.png) static final String assetsImagesChatIcon1 = 'assets/images/chat/icon1.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat/icon3.png) + /// ![](http://127.0.0.1:3132/assets/images/chat/icon3.png) static final String assetsImagesChatIcon3 = 'assets/images/chat/icon3.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat/icon2.png) + /// ![](http://127.0.0.1:3132/assets/images/chat/icon2.png) static final String assetsImagesChatIcon2 = 'assets/images/chat/icon2.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat/icon6.png) + /// ![](http://127.0.0.1:3132/assets/images/chat/icon6.png) static final String assetsImagesChatIcon6 = 'assets/images/chat/icon6.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat/icon5.png) + /// ![](http://127.0.0.1:3132/assets/images/chat/icon5.png) static final String assetsImagesChatIcon5 = 'assets/images/chat/icon5.png'; - /// ![](http://127.0.0.1:4343/assets/images/chat/icon4.png) + /// ![](http://127.0.0.1:3132/assets/images/chat/icon4.png) static final String assetsImagesChatIcon4 = 'assets/images/chat/icon4.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/vip_wx.png) + /// ![](http://127.0.0.1:3132/assets/images/login/vip_wx.png) static final String assetsImagesLoginVipWx = 'assets/images/login/vip_wx.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/vip_logio.png) + /// ![](http://127.0.0.1:3132/assets/images/login/vip_logio.png) static final String assetsImagesLoginVipLogio = 'assets/images/login/vip_logio.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/lock.png) + /// ![](http://127.0.0.1:3132/assets/images/login/lock.png) static final String assetsImagesLoginLock = 'assets/images/login/lock.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/vip_rect1.png) + /// ![](http://127.0.0.1:3132/assets/images/login/vip_rect1.png) static final String assetsImagesLoginVipRect1 = 'assets/images/login/vip_rect1.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/vip_rect3.png) + /// ![](http://127.0.0.1:3132/assets/images/login/vip_rect3.png) static final String assetsImagesLoginVipRect3 = 'assets/images/login/vip_rect3.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/vip_rect2.png) + /// ![](http://127.0.0.1:3132/assets/images/login/vip_rect2.png) static final String assetsImagesLoginVipRect2 = 'assets/images/login/vip_rect2.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/vip_zfb.png) + /// ![](http://127.0.0.1:3132/assets/images/login/vip_zfb.png) static final String assetsImagesLoginVipZfb = 'assets/images/login/vip_zfb.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/dly_icon3.png) + /// ![](http://127.0.0.1:3132/assets/images/login/dly_icon3.png) static final String assetsImagesLoginDlyIcon3 = 'assets/images/login/dly_icon3.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/dly_icon2.png) + /// ![](http://127.0.0.1:3132/assets/images/login/dly_icon2.png) static final String assetsImagesLoginDlyIcon2 = 'assets/images/login/dly_icon2.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/SY_bg.png) + /// ![](http://127.0.0.1:3132/assets/images/login/SY_bg.png) static final String assetsImagesLoginSYBg = 'assets/images/login/SY_bg.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/dly_logo.png) + /// ![](http://127.0.0.1:3132/assets/images/login/dly_logo.png) static final String assetsImagesLoginDlyLogo = 'assets/images/login/dly_logo.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/vip_other.png) + /// ![](http://127.0.0.1:3132/assets/images/login/vip_other.png) static final String assetsImagesLoginVipOther = 'assets/images/login/vip_other.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/dly_icon1.png) + /// ![](http://127.0.0.1:3132/assets/images/login/dly_icon1.png) static final String assetsImagesLoginDlyIcon1 = 'assets/images/login/dly_icon1.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/rzzx.png) + /// ![](http://127.0.0.1:3132/assets/images/login/rzzx.png) static final String assetsImagesLoginRzzx = 'assets/images/login/rzzx.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/dly_icon4.png) + /// ![](http://127.0.0.1:3132/assets/images/login/dly_icon4.png) static final String assetsImagesLoginDlyIcon4 = 'assets/images/login/dly_icon4.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/money.png) + /// ![](http://127.0.0.1:3132/assets/images/login/money.png) static final String assetsImagesLoginMoney = 'assets/images/login/money.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/SY_logo.png) + /// ![](http://127.0.0.1:3132/assets/images/login/SY_logo.png) static final String assetsImagesLoginSYLogo = 'assets/images/login/SY_logo.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/delete.png) + /// ![](http://127.0.0.1:3132/assets/images/login/delete.png) static final String assetsImagesLoginDelete = 'assets/images/login/delete.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/xzxb_male.png) + /// ![](http://127.0.0.1:3132/assets/images/login/xzxb_male.png) static final String assetsImagesLoginXzxbMale = 'assets/images/login/xzxb_male.png'; - /// ![](http://127.0.0.1:4343/assets/images/login/xzxb_female.png) + /// ![](http://127.0.0.1:3132/assets/images/login/xzxb_female.png) static final String assetsImagesLoginXzxbFemale = 'assets/images/login/xzxb_female.png'; - /// ![](http://127.0.0.1:4343/assets/images/park/qz_icon8.png) + /// ![](http://127.0.0.1:3132/assets/images/park/qz_icon8.png) static final String assetsImagesParkQzIcon8 = 'assets/images/park/qz_icon8.png'; - /// ![](http://127.0.0.1:4343/assets/images/park/qz_icon1.png) + /// ![](http://127.0.0.1:3132/assets/images/park/qz_icon1.png) static final String assetsImagesParkQzIcon1 = 'assets/images/park/qz_icon1.png'; - /// ![](http://127.0.0.1:4343/assets/images/park/qz_icon2.png) + /// ![](http://127.0.0.1:3132/assets/images/park/qz_icon2.png) static final String assetsImagesParkQzIcon2 = 'assets/images/park/qz_icon2.png'; - /// ![](http://127.0.0.1:4343/assets/images/park/qz_icon3.png) + /// ![](http://127.0.0.1:3132/assets/images/park/qz_icon3.png) static final String assetsImagesParkQzIcon3 = 'assets/images/park/qz_icon3.png'; - /// ![](http://127.0.0.1:4343/assets/images/park/qz_icon7.png) + /// ![](http://127.0.0.1:3132/assets/images/park/qz_icon7.png) static final String assetsImagesParkQzIcon7 = 'assets/images/park/qz_icon7.png'; - /// ![](http://127.0.0.1:4343/assets/images/park/qz_icon6.png) + /// ![](http://127.0.0.1:3132/assets/images/park/qz_icon6.png) static final String assetsImagesParkQzIcon6 = 'assets/images/park/qz_icon6.png'; - /// ![](http://127.0.0.1:4343/assets/images/park/qz_icon4.png) + /// ![](http://127.0.0.1:3132/assets/images/park/qz_icon4.png) static final String assetsImagesParkQzIcon4 = 'assets/images/park/qz_icon4.png'; - /// ![](http://127.0.0.1:4343/assets/images/park/qz_icon5.png) + /// ![](http://127.0.0.1:3132/assets/images/park/qz_icon5.png) static final String assetsImagesParkQzIcon5 = 'assets/images/park/qz_icon5.png'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_11.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_11.gif) static final String assetsImagesStickerSticker11 = 'assets/images/sticker/sticker_11.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_7.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_7.gif) static final String assetsImagesStickerSticker7 = 'assets/images/sticker/sticker_7.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_6.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_6.gif) static final String assetsImagesStickerSticker6 = 'assets/images/sticker/sticker_6.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_10.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_10.gif) static final String assetsImagesStickerSticker10 = 'assets/images/sticker/sticker_10.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_12.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_12.gif) static final String assetsImagesStickerSticker12 = 'assets/images/sticker/sticker_12.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_4.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_4.gif) static final String assetsImagesStickerSticker4 = 'assets/images/sticker/sticker_4.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_5.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_5.gif) static final String assetsImagesStickerSticker5 = 'assets/images/sticker/sticker_5.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_13.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_13.gif) static final String assetsImagesStickerSticker13 = 'assets/images/sticker/sticker_13.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_17.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_17.gif) static final String assetsImagesStickerSticker17 = 'assets/images/sticker/sticker_17.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_1.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_1.gif) static final String assetsImagesStickerSticker1 = 'assets/images/sticker/sticker_1.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_16.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_16.gif) static final String assetsImagesStickerSticker16 = 'assets/images/sticker/sticker_16.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_14.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_14.gif) static final String assetsImagesStickerSticker14 = 'assets/images/sticker/sticker_14.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_28.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_28.gif) static final String assetsImagesStickerSticker28 = 'assets/images/sticker/sticker_28.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_2.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_2.gif) static final String assetsImagesStickerSticker2 = 'assets/images/sticker/sticker_2.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_3.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_3.gif) static final String assetsImagesStickerSticker3 = 'assets/images/sticker/sticker_3.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_29.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_29.gif) static final String assetsImagesStickerSticker29 = 'assets/images/sticker/sticker_29.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_15.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_15.gif) static final String assetsImagesStickerSticker15 = 'assets/images/sticker/sticker_15.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_18.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_18.gif) static final String assetsImagesStickerSticker18 = 'assets/images/sticker/sticker_18.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_24.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_24.gif) static final String assetsImagesStickerSticker24 = 'assets/images/sticker/sticker_24.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_30.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_30.gif) static final String assetsImagesStickerSticker30 = 'assets/images/sticker/sticker_30.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_25.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_25.gif) static final String assetsImagesStickerSticker25 = 'assets/images/sticker/sticker_25.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_19.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_19.gif) static final String assetsImagesStickerSticker19 = 'assets/images/sticker/sticker_19.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_27.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_27.gif) static final String assetsImagesStickerSticker27 = 'assets/images/sticker/sticker_27.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_26.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_26.gif) static final String assetsImagesStickerSticker26 = 'assets/images/sticker/sticker_26.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_22.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_22.gif) static final String assetsImagesStickerSticker22 = 'assets/images/sticker/sticker_22.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_8.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_8.gif) static final String assetsImagesStickerSticker8 = 'assets/images/sticker/sticker_8.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_9.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_9.gif) static final String assetsImagesStickerSticker9 = 'assets/images/sticker/sticker_9.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_23.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_23.gif) static final String assetsImagesStickerSticker23 = 'assets/images/sticker/sticker_23.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_21.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_21.gif) static final String assetsImagesStickerSticker21 = 'assets/images/sticker/sticker_21.gif'; - /// ![](http://127.0.0.1:4343/assets/images/sticker/sticker_20.gif) + /// ![](http://127.0.0.1:3132/assets/images/sticker/sticker_20.gif) static final String assetsImagesStickerSticker20 = 'assets/images/sticker/sticker_20.gif'; - /// ![](http://127.0.0.1:4343/assets/images/vip/hy_bg.png) + /// ![](http://127.0.0.1:3132/assets/images/vip/hy_bg.png) static final String assetsImagesVipHyBg = 'assets/images/vip/hy_bg.png'; - /// ![](http://127.0.0.1:4343/assets/images/vip/hy_tj.png) + /// ![](http://127.0.0.1:3132/assets/images/vip/hy_tj.png) static final String assetsImagesVipHyTj = 'assets/images/vip/hy_tj.png'; - /// ![](http://127.0.0.1:4343/assets/images/vip/hy_xz.png) + /// ![](http://127.0.0.1:3132/assets/images/vip/hy_xz.png) static final String assetsImagesVipHyXz = 'assets/images/vip/hy_xz.png'; - /// ![](http://127.0.0.1:4343/assets/images/vip/hy_cjhy.png) + /// ![](http://127.0.0.1:3132/assets/images/vip/hy_cjhy.png) static final String assetsImagesVipHyCjhy = 'assets/images/vip/hy_cjhy.png'; - /// ![](http://127.0.0.1:4343/assets/images/vip/hy_hy.png) + /// ![](http://127.0.0.1:3132/assets/images/vip/hy_hy.png) static final String assetsImagesVipHyHy = 'assets/images/vip/hy_hy.png'; - /// ![](http://127.0.0.1:4343/assets/images/vip/hy_tq.png) + /// ![](http://127.0.0.1:3132/assets/images/vip/hy_tq.png) static final String assetsImagesVipHyTq = 'assets/images/vip/hy_tq.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/88.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/88.png) static final String assetsImagesEmojiface88 = 'assets/images/emojiface/88.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/77.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/77.png) static final String assetsImagesEmojiface77 = 'assets/images/emojiface/77.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/63.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/63.png) static final String assetsImagesEmojiface63 = 'assets/images/emojiface/63.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/62.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/62.png) static final String assetsImagesEmojiface62 = 'assets/images/emojiface/62.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/76.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/76.png) static final String assetsImagesEmojiface76 = 'assets/images/emojiface/76.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/89.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/89.png) static final String assetsImagesEmojiface89 = 'assets/images/emojiface/89.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/60.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/60.png) static final String assetsImagesEmojiface60 = 'assets/images/emojiface/60.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/74.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/74.png) static final String assetsImagesEmojiface74 = 'assets/images/emojiface/74.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/48.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/48.png) static final String assetsImagesEmojiface48 = 'assets/images/emojiface/48.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/49.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/49.png) static final String assetsImagesEmojiface49 = 'assets/images/emojiface/49.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/75.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/75.png) static final String assetsImagesEmojiface75 = 'assets/images/emojiface/75.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/61.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/61.png) static final String assetsImagesEmojiface61 = 'assets/images/emojiface/61.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/59.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/59.png) static final String assetsImagesEmojiface59 = 'assets/images/emojiface/59.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/65.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/65.png) static final String assetsImagesEmojiface65 = 'assets/images/emojiface/65.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/71.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/71.png) static final String assetsImagesEmojiface71 = 'assets/images/emojiface/71.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/70.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/70.png) static final String assetsImagesEmojiface70 = 'assets/images/emojiface/70.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/64.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/64.png) static final String assetsImagesEmojiface64 = 'assets/images/emojiface/64.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/58.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/58.png) static final String assetsImagesEmojiface58 = 'assets/images/emojiface/58.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/8.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/8.png) static final String assetsImagesEmojiface8 = 'assets/images/emojiface/8.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/72.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/72.png) static final String assetsImagesEmojiface72 = 'assets/images/emojiface/72.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/66.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/66.png) static final String assetsImagesEmojiface66 = 'assets/images/emojiface/66.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/67.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/67.png) static final String assetsImagesEmojiface67 = 'assets/images/emojiface/67.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/73.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/73.png) static final String assetsImagesEmojiface73 = 'assets/images/emojiface/73.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/9.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/9.png) static final String assetsImagesEmojiface9 = 'assets/images/emojiface/9.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/14.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/14.png) static final String assetsImagesEmojiface14 = 'assets/images/emojiface/14.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/28.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/28.png) static final String assetsImagesEmojiface28 = 'assets/images/emojiface/28.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/29.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/29.png) static final String assetsImagesEmojiface29 = 'assets/images/emojiface/29.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/15.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/15.png) static final String assetsImagesEmojiface15 = 'assets/images/emojiface/15.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/17.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/17.png) static final String assetsImagesEmojiface17 = 'assets/images/emojiface/17.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/16.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/16.png) static final String assetsImagesEmojiface16 = 'assets/images/emojiface/16.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/12.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/12.png) static final String assetsImagesEmojiface12 = 'assets/images/emojiface/12.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/13.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/13.png) static final String assetsImagesEmojiface13 = 'assets/images/emojiface/13.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/39.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/39.png) static final String assetsImagesEmojiface39 = 'assets/images/emojiface/39.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/11.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/11.png) static final String assetsImagesEmojiface11 = 'assets/images/emojiface/11.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/10.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/10.png) static final String assetsImagesEmojiface10 = 'assets/images/emojiface/10.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/38.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/38.png) static final String assetsImagesEmojiface38 = 'assets/images/emojiface/38.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/35.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/35.png) static final String assetsImagesEmojiface35 = 'assets/images/emojiface/35.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/21.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/21.png) static final String assetsImagesEmojiface21 = 'assets/images/emojiface/21.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/20.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/20.png) static final String assetsImagesEmojiface20 = 'assets/images/emojiface/20.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/34.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/34.png) static final String assetsImagesEmojiface34 = 'assets/images/emojiface/34.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/22.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/22.png) static final String assetsImagesEmojiface22 = 'assets/images/emojiface/22.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/36.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/36.png) static final String assetsImagesEmojiface36 = 'assets/images/emojiface/36.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/37.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/37.png) static final String assetsImagesEmojiface37 = 'assets/images/emojiface/37.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/23.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/23.png) static final String assetsImagesEmojiface23 = 'assets/images/emojiface/23.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/27.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/27.png) static final String assetsImagesEmojiface27 = 'assets/images/emojiface/27.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/33.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/33.png) static final String assetsImagesEmojiface33 = 'assets/images/emojiface/33.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/32.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/32.png) static final String assetsImagesEmojiface32 = 'assets/images/emojiface/32.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/26.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/26.png) static final String assetsImagesEmojiface26 = 'assets/images/emojiface/26.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/18.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/18.png) static final String assetsImagesEmojiface18 = 'assets/images/emojiface/18.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/30.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/30.png) static final String assetsImagesEmojiface30 = 'assets/images/emojiface/30.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/24.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/24.png) static final String assetsImagesEmojiface24 = 'assets/images/emojiface/24.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/25.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/25.png) static final String assetsImagesEmojiface25 = 'assets/images/emojiface/25.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/31.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/31.png) static final String assetsImagesEmojiface31 = 'assets/images/emojiface/31.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/19.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/19.png) static final String assetsImagesEmojiface19 = 'assets/images/emojiface/19.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/81.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/81.png) static final String assetsImagesEmojiface81 = 'assets/images/emojiface/81.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/4.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/4.png) static final String assetsImagesEmojiface4 = 'assets/images/emojiface/4.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/56.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/56.png) static final String assetsImagesEmojiface56 = 'assets/images/emojiface/56.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/42.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/42.png) static final String assetsImagesEmojiface42 = 'assets/images/emojiface/42.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/43.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/43.png) static final String assetsImagesEmojiface43 = 'assets/images/emojiface/43.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/5.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/5.png) static final String assetsImagesEmojiface5 = 'assets/images/emojiface/5.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/57.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/57.png) static final String assetsImagesEmojiface57 = 'assets/images/emojiface/57.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/80.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/80.png) static final String assetsImagesEmojiface80 = 'assets/images/emojiface/80.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/82.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/82.png) static final String assetsImagesEmojiface82 = 'assets/images/emojiface/82.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/41.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/41.png) static final String assetsImagesEmojiface41 = 'assets/images/emojiface/41.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/55.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/55.png) static final String assetsImagesEmojiface55 = 'assets/images/emojiface/55.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/7.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/7.png) static final String assetsImagesEmojiface7 = 'assets/images/emojiface/7.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/69.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/69.png) static final String assetsImagesEmojiface69 = 'assets/images/emojiface/69.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/68.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/68.png) static final String assetsImagesEmojiface68 = 'assets/images/emojiface/68.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/54.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/54.png) static final String assetsImagesEmojiface54 = 'assets/images/emojiface/54.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/6.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/6.png) static final String assetsImagesEmojiface6 = 'assets/images/emojiface/6.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/40.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/40.png) static final String assetsImagesEmojiface40 = 'assets/images/emojiface/40.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/83.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/83.png) static final String assetsImagesEmojiface83 = 'assets/images/emojiface/83.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/87.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/87.png) static final String assetsImagesEmojiface87 = 'assets/images/emojiface/87.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/78.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/78.png) static final String assetsImagesEmojiface78 = 'assets/images/emojiface/78.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/44.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/44.png) static final String assetsImagesEmojiface44 = 'assets/images/emojiface/44.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/2.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/2.png) static final String assetsImagesEmojiface2 = 'assets/images/emojiface/2.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/50.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/50.png) static final String assetsImagesEmojiface50 = 'assets/images/emojiface/50.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/3.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/3.png) static final String assetsImagesEmojiface3 = 'assets/images/emojiface/3.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/51.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/51.png) static final String assetsImagesEmojiface51 = 'assets/images/emojiface/51.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/45.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/45.png) static final String assetsImagesEmojiface45 = 'assets/images/emojiface/45.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/79.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/79.png) static final String assetsImagesEmojiface79 = 'assets/images/emojiface/79.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/86.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/86.png) static final String assetsImagesEmojiface86 = 'assets/images/emojiface/86.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/90.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/90.png) static final String assetsImagesEmojiface90 = 'assets/images/emojiface/90.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/84.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/84.png) static final String assetsImagesEmojiface84 = 'assets/images/emojiface/84.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/53.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/53.png) static final String assetsImagesEmojiface53 = 'assets/images/emojiface/53.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/1.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/1.png) static final String assetsImagesEmojiface1 = 'assets/images/emojiface/1.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/47.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/47.png) static final String assetsImagesEmojiface47 = 'assets/images/emojiface/47.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/46.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/46.png) static final String assetsImagesEmojiface46 = 'assets/images/emojiface/46.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/52.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/52.png) static final String assetsImagesEmojiface52 = 'assets/images/emojiface/52.png'; - /// ![](http://127.0.0.1:4343/assets/images/emojiface/85.png) + /// ![](http://127.0.0.1:3132/assets/images/emojiface/85.png) static final String assetsImagesEmojiface85 = 'assets/images/emojiface/85.png'; } diff --git a/lib/utils/CustomUI.dart b/lib/utils/CustomUI.dart index fd2dfed..13bebaa 100644 --- a/lib/utils/CustomUI.dart +++ b/lib/utils/CustomUI.dart @@ -8,6 +8,7 @@ import 'package:chat/generated/i18n.dart'; import 'package:chat/home/VerificationCenter.dart'; import 'package:chat/home/VipPage.dart'; import 'package:chat/home/realtimehelper/translation_evaluation_dialog.dart'; +import 'package:chat/home/realtimehelper/translation_order_push_dialog.dart'; import 'package:chat/models/group_info_model.dart'; import 'package:chat/photo/ui/dialog/not_permission_dialog.dart'; import 'package:chat/utils/LoadingDialog.dart'; @@ -1266,145 +1267,11 @@ class CustomUI { ///** isUser 是否是用户,或为 翻译 static void buildTranslationHelperOrderDialog( BuildContext context, bool isUser, - {String orderId, int scenes = 0, String desc}) { - var scenesList = [ - I18n.of(context).translation_scenes_1, - I18n.of(context).translation_scenes_2, - I18n.of(context).translation_scenes_3, - I18n.of(context).translation_scenes_4, - ]; + {String orderId, int scenes = 0, String desc,Function userStartChat,int createTime,String userName}) { - Navigator.of(context).push(TutorialOverlay( - child: InkWell( - onTap: () { - Navigator.of(context).pop(); - }, - child: UnconstrainedBox( - alignment: Alignment.topCenter, - child: InkWell( - onTap: () {}, - child: Container( - alignment: Alignment.topCenter, - -// height: 180, - width: Screen.width - 20, - margin: EdgeInsets.all(10), - child: Card( - elevation: 2, // 阴影 - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10), -// side: BorderSide(color: Colors.green,width: 25), - ), - child: Container( -// color: Colors.yellow, - width: double.maxFinite, - padding: EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(bottom: 15), - child: Text( - I18n.of(context).translation_butler_dialog_title, - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - fontWeight: FontWeight.w500, - color: AppColors.NewAppbarTextColor, - fontSize: 17), - ), - ), - Text( - I18n.of(context) - .translation_butler_dialog_order - .replaceAll( - '/s1', isUser ? I18n.of(context).you : 'xxx'), - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - color: AppColors.NewAppbarTextColor, fontSize: 14), - ), - SizedBox( - height: 10, - ), - Text( - '时间:今天11:45 时长:5分钟', - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: - TextStyle(color: Color(0xFF797979), fontSize: 11), - ), - - isUser - ? Container() - : Text( - '场景:${scenesList[scenes]}', - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - color: Color(0xFF797979), fontSize: 11), - ), - isUser - ? Container() - : Text( - '更多描述:$desc}', - textScaleFactor: 1.0, - textAlign: TextAlign.left, - style: TextStyle( - color: Color(0xFF797979), fontSize: 11), - ), -// - Container( - margin: EdgeInsets.only( - left: 30, right: 30, top: 20, bottom: 10), - child: isUser - ? Container( - margin: EdgeInsets.only(top: 10), - height: 36, - alignment: Alignment.center, - child: RaisedButton( - color: Color(0xff3875E9), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.all( - Radius.circular(10))), - child: Padding( - padding: - EdgeInsets.only(left: 10, right: 10), - child: Text( - I18n.of(context) - .translation_butler_dialog_start_chat, - textScaleFactor: 1.0, - style: TextStyle( - color: Colors.white, - fontSize: 15, - fontWeight: FontWeight.w500), - ), - ), - onPressed: () { - Navigator.of(context)..pop(); - }), - ) - : CountDownButton( - I18n.of(context) - .translation_butler_dialog_start_service, - () { - Navigator.of(context).pop(); - }, - onPress: () { - MsgHandler.sendReceiveOrder(); - Navigator.of(context).pop(); - }, - ), - ) - ], - ), - ), - ), - ), - ), - ), - ), + Navigator.of(context).push(TutorialOverlay( + child: TranslateOrderPushPage(isUser,orderId: orderId,scenes: scenes,desc: desc,userStartChat: userStartChat,createTime: createTime,userName: userName,), )); } diff --git a/lib/utils/HttpUtil.dart b/lib/utils/HttpUtil.dart index f8bb798..f4a5a37 100644 --- a/lib/utils/HttpUtil.dart +++ b/lib/utils/HttpUtil.dart @@ -1418,7 +1418,7 @@ class HttpUtil { } } - + //保存设备名称和编码 saveMobileInfo() async { @@ -1446,4 +1446,79 @@ String mobileType = ''; Map resData = res.data; print(resData); } + + ///实时帮-翻译管家评价 + evaluationTransalteHK(String orderNo,String value,bool isGood,Function callback) async { + Map data = { + "userId": UserData().basicInfo.userId, + "orderNo": orderNo, + "gradeStatus":isGood?1:2 + }; + data['sign'] = TokenMgr().getSign(data); + data['value'] = value; + Response res = await HttpUtil().post('steward/evaluation', data: data); + callback(); + if (res == null) { + print('请求异常'); + return; + } + var resData = res.data; + if (resData['code'] == 0) { + showToast('评价成功'); + }else{ + showToast(I18n.of(Constants.getCurrentContext()).net_error); + } + } + + + ///实时帮-用户测距 + userRanging(int distance,String origin,String ending) async { + Map data = { + "userId": UserData().basicInfo.userId, + "distance": distance, + }; + data['sign'] = TokenMgr().getSign(data); + data['origin'] = origin; + data['ending'] = ending; + Response res = await HttpUtil().post('steward/userRanging', data: data); + + if (res == null) { + print('请求异常'); + return; + } + var resData = res.data; + if (resData['code'] == 0) { + print('实时帮-用户测距提交 成功'); + }else{ + print('实时帮-用户测距提交 失败'); + } + } + + + ///实时帮-翻译人员上线、下线 + translateHKloginRecord(bool isLogin,Function callback) async { + Map data = { + "userId": UserData().basicInfo.userId, + "type": isLogin?1:2, + }; + data['sign'] = TokenMgr().getSign(data); + print('请求data : $data'); + Response res = await HttpUtil().post('steward/loginRecord', data: data); + + if (res == null) { + print('请求异常'); + return; + } + var resData = res.data; + if (resData['code'] == 0) { + callback(); + print('翻译人员上线、下线 成功'); + }else{ + print('翻译人员上线、下线 失败 ${resData['msg']}'); + } + } + + + + } diff --git a/lib/utils/MessageMgr.dart b/lib/utils/MessageMgr.dart index 7860774..f8dacd0 100644 --- a/lib/utils/MessageMgr.dart +++ b/lib/utils/MessageMgr.dart @@ -8,7 +8,9 @@ class MessageMgr { static const String TRANSLATE_HK_REFRESH_ORDER ='translate_hk_refresh_order'; static const String TRANSLATE_HK_RECEIVE_ORDER ='translate_hk_receive_order'; + static const String TRANSLATE_HK_CANCEL_ORDER ='translate_hk_cancel_order'; static const String TRANSLATE_HK_START_CHAT ='translate_hk_start_chat'; + static const String TRANSLATE_HK_END_CHAT ='translate_hk_end_chat'; //私有构造函数 diff --git a/lib/utils/msgHandler.dart b/lib/utils/msgHandler.dart index df52514..20d85bc 100644 --- a/lib/utils/msgHandler.dart +++ b/lib/utils/msgHandler.dart @@ -412,39 +412,46 @@ class MsgHandler { } } else if (isTranslateHK) { var myId = UserData().basicInfo.userId; - TransHKChatNotice notice = - TransHKChatNotice.fromBuffer(chat.contentBuff); - BaseUserInfo friendId; - - if (notice.operateduId[0].id == myId) { - friendId = notice.operateduId[1]; - } else { - friendId = notice.operateduId[0]; + print('chat.contentBuff:${chat.contentBuff.length}'); + TransHKChatNotice notice = TransHKChatNotice.fromBuffer(chat.contentBuff); + BaseUserInfo friendId ; + print('chat.contentBuff AAAA'); + TranslateHKMgr().isUser = myId== notice.employer.id; ///判断自己是翻译官还是用户 + + print('chat.contentBuff BBBB'); + if(myId== notice.employer.id){ + friendId =notice.inter; + }else{ + friendId = notice.employer; } - print('notice.operateduId length ${notice.operateduId.length}'); + print('friend id: ${friendId.id} '); int sessionId = chat.targetId; if (chat.cType == ChatType.GroupChatNoticeType) { - print('是群公告哦'); + msgModel = MsgModel(0, friendId.id, chat.cType.value, chat.contentBuff, chat.sendTime.toInt(), sessionId, channelType: ChatChannelType.Session.value); } - ///接到开始翻译管家消息-打开翻译管家页面 - if (notice.noticeType == TransHKChatNoticeType.StartChat) { - if (TranslateHKMgr().isUser) { - //TRANSLATE_HK_RECEIVE_ORDER 发送开始聊天弹窗 - } else { - Future.delayed(Duration(seconds: 3), () { - curActiveSession = sessionId; - print('curActiveSession:$curActiveSession'); - MessageMgr() - .emit(MessageMgr.TRANSLATE_HK_START_CHAT, friendId.id); - }); - } + ///接到开始翻译管家消息-打开翻译管家聊天页面 + if(notice.noticeType==TransHKChatNoticeType.StartChat){ + + + Future.delayed(Duration(seconds: 1),(){ + TranslateHKMgr().orderStatus = TranslateHKMgr.ORDER_STATUS_EMPTY; + MessageMgr().emit(MessageMgr.TRANSLATE_HK_REFRESH_ORDER ); + + curActiveSession = sessionId; + print('curActiveSession:$curActiveSession'); + MessageMgr().emit(MessageMgr.TRANSLATE_HK_START_CHAT, friendId.id); + }); + + }else if(notice.noticeType==TransHKChatNoticeType.EndChat){ + print('chat.contentBuff cccc'); + MessageMgr().emit(MessageMgr.TRANSLATE_HK_END_CHAT, friendId.id); } } else { //私聊通知消息 @@ -872,8 +879,9 @@ class MsgHandler { } } } else if (msgId == 3) { + print('收到聊天消息'); var msgContent = PushChat.fromBuffer(content); -// print('收到聊天消息'); + print('收到聊天消息BBBBB'); ackServerMsg(msgContent.sendTime); handlerReceiveMsg(msgContent); } else if (msgId == 4) { @@ -967,6 +975,10 @@ class MsgHandler { handlerCancelTranslateOrder(content); } else if (msgId == 20) { handlerDeliveryInterpreterOrderPush(content); + }else if(msgId==21){ + handlerCancellationTransHKOrderPush(content); + }else if(msgId==8){ + handlerEndTransHKOrderRes(content); } break; @@ -1256,15 +1268,14 @@ class MsgHandler { } //发布翻译管家帮助订单 - static sendCreateTranslateOrder( - int fromLanguage, int toLanguage, int scences, String extraDesc) { - debugPrint( - '发布翻译管家帮助订单 fromLanguage:$fromLanguage toLanguage: $toLanguage | ${fromLanguage | toLanguage}'); + static sendCreateTranslateOrder(int fromLanguage,int toLanguage,int scences,String extraDesc) { + + TranslateHKMgr().isUser=true; + debugPrint('发布翻译管家帮助订单 fromLanguage:$fromLanguage toLanguage: $toLanguage | ${fromLanguage|toLanguage}' ); var seq = IssueTransHKOrderReq.create(); seq.tLanguage = fromLanguage | toLanguage; seq.scenes = scences; seq.desc = extraDesc; - TranslateHKMgr().isUser = true; NetWork().sendMsg(ComId.TranslateOrder, 1, seq); } @@ -1313,15 +1324,31 @@ class MsgHandler { 'OrderId: ${res.orderId} createTime: ${res.createTime} tLanguage:${res.tLanguage} scenes:${res.scenes} desc${res.desc}'); TranslateOrder order = new TranslateOrder(); - order.orderId = res.orderId; - order.desc = res.desc; - order.createTime = res.createTime.toInt(); - order.tLanguage = res.tLanguage.toInt(); - order.scenes = res.scenes.toInt(); + order.orderId=res.orderId; + order.desc=res.desc; + order.createTime=res.createTime.toInt(); + order.tLanguage=res.tLanguage.toInt(); + order.scenes=res.scenes.toInt(); + order.userName = res.employer.niceName; TranslateHKMgr().order = order; - MessageMgr().emit(MessageMgr.TRANSLATE_HK_RECEIVE_ORDER, res); + MessageMgr().emit(MessageMgr.TRANSLATE_HK_RECEIVE_ORDER, order); + } +//派送订单已被取消 + static handlerCancellationTransHKOrderPush(List msgContent) { + + var res = CancellationTransHKOrderPush.fromBuffer(msgContent); + debugPrint('派送订单已被取消: orderId${res.orderId}'); +// print('OrderId: ${res.orderId} createTime: ${res.createTime} tLanguage:${res.tLanguage} scenes:${res.scenes} desc${res.desc}'); + + TranslateHKMgr().order = null; + MessageMgr().emit(MessageMgr.TRANSLATE_HK_CANCEL_ORDER); + showToast(I18n.of(context).translation_butler_order_time_out); + } + + + //接收订单请求 static sendReceiveOrder() { TranslateOrder order = TranslateHKMgr().order; @@ -1344,12 +1371,36 @@ class MsgHandler { } } - ///翻译官价聊天开始推送 - static handlerTranslateStart(List msgContent) { - debugPrint('翻译官价聊天开始推送'); -// var res = TransHKChatStartPush.fromBuffer(msgContent); + + + + //用户主动结束翻译管家服务 + static sendEndTransHKOrderReq() { + + debugPrint('用户主动结束翻译管家服务 ${TranslateHKMgr().orderId}' ); + var seq = EndTransHKOrderReq.create(); + seq.orderId = TranslateHKMgr().orderId; + NetWork().sendMsg(ComId.TranslateOrder, 7, seq); } + //用户主动结束翻译管家服务回应 + static handlerEndTransHKOrderRes(List msgContent) { + debugPrint('用户主动结束翻译管家服务'); + var res = EndTransHKOrderRes.fromBuffer(msgContent); + if (res.errorCode == 0) { + +// GroupInfoMgr().updateMemberMsgFree(res.groupId, res.messageFree); + debugPrint('用户主动结束翻译管家服务 成功: '); + } else { + debugPrint('用户主动结束翻译管家服务 失败${res.errorCode}'); + } + } + + + + + + //消息免打扰请求结果 static handlerGroupIsShowMenberNiceName(List msgContent) { print('设置是否显示群昵称'); diff --git a/pubspec.yaml b/pubspec.yaml index 16a42d9..595fcf7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -204,9 +204,11 @@ flutter: assets: # assets-generator-begin # assets/images/* + - assets/images/img_realtime_bg2.png - assets/images/bofang.png - assets/images/ic_quick_search.png - assets/images/img_temp_share.png + - assets/images/img_realtime_bg1.png - assets/images/ic_tag.png - assets/images/default_nor_avatar.png - assets/images/server_icon.png @@ -214,6 +216,7 @@ flutter: - assets/images/ic_feeds.png - assets/images/daily_bg_1.png - assets/images/img_translation_no.png + - assets/images/img_check_photo_bg.png - assets/images/yqm_bg.png - assets/images/daily_bg_2.png - assets/images/ext_excel.png