@@ -1219,5 +1219,6 @@ | |||
"translation_input_limit": "还可以输入/s1字", | |||
"translation_more_desc": "更多描述", | |||
"feedback_assistant": "反馈小助手", | |||
"feedback_tips":"有什么问题都可以反馈给我哦" | |||
"feedback_tips":"有什么问题都可以反馈给我哦", | |||
"forward":"Forward" | |||
} |
@@ -1219,5 +1219,6 @@ | |||
"translation_input_limit": "还可以输入/s1字", | |||
"translation_more_desc": "更多描述", | |||
"feedback_assistant": "反馈小助手", | |||
"feedback_tips":"有什么问题都可以反馈给我哦" | |||
"feedback_tips":"有什么问题都可以反馈给我哦", | |||
"forward":"转发" | |||
} |
@@ -1219,5 +1219,6 @@ | |||
"translation_input_limit": "还可以输入/s1字", | |||
"translation_more_desc": "更多描述", | |||
"feedback_assistant": "反馈小助手", | |||
"feedback_tips": "有什么问题都可以反馈给我哦" | |||
"feedback_tips": "有什么问题都可以反馈给我哦", | |||
"forward":"转发" | |||
} |
@@ -1219,5 +1219,6 @@ | |||
"translation_input_limit": "还可以输入/s1字", | |||
"translation_more_desc": "更多描述", | |||
"feedback_assistant": "反馈小助手", | |||
"feedback_tips":"有什么问题都可以反馈给我哦" | |||
"feedback_tips":"有什么问题都可以反馈给我哦", | |||
"forward":"转发" | |||
} |
@@ -1219,5 +1219,7 @@ | |||
"file": "文件", | |||
"max_file": "文件大于/s1M", | |||
"feedback_assistant":"反馈小助手", | |||
"feedback_tips":"有什么问题都可以反馈给我哦" | |||
"feedback_tips":"有什么问题都可以反馈给我哦", | |||
"forward":"转发" | |||
} |
@@ -1219,5 +1219,6 @@ | |||
"translation_input_limit": "还可以输入/s1字", | |||
"translation_more_desc": "更多描述", | |||
"feedback_assistant": "反饋小助手", | |||
"feedback_tips":"有什麼問題都可以反饋給我哦" | |||
"feedback_tips":"有什麼問題都可以反饋給我哦", | |||
"forward":"转发" | |||
} |
@@ -623,7 +623,7 @@ class _ChatPageItemState extends State<ChatPageItem> | |||
List<String> actions = [ | |||
I18n.of(context).delete, | |||
I18n.of(context).reply, | |||
'转发' | |||
I18n.of(context).forward | |||
]; | |||
actionsFunc.add(() { | |||
@@ -563,7 +563,7 @@ class _GroupChatPageItemState extends State<GroupChatPageItem> | |||
Widget wrapItemWithMenu(item) { | |||
List<Function> actionsFunc = []; | |||
List<String> actions = [I18n.of(context).delete, I18n.of(context).reply]; | |||
List<String> actions = [I18n.of(context).delete, I18n.of(context).reply,I18n.of(context).forward]; | |||
actionsFunc.add(() { | |||
MessageMgr().emit('Delete Select Message', widget.msg); | |||
@@ -572,6 +572,10 @@ class _GroupChatPageItemState extends State<GroupChatPageItem> | |||
print('发送引用的消息'); | |||
MessageMgr().emit('Reply Select Message', widget.msg); | |||
}); | |||
actionsFunc.add(() { | |||
print('转发消息'); | |||
AppNavigator.pushForwardPage(context, widget.msg); | |||
}); | |||
if (widget.msg.msgType == ChatType.TextChatType.value) { | |||
actions.insert(0, I18n.of(context).copy); | |||
@@ -59,6 +59,7 @@ class ComId { | |||
static const int Heart = 0; | |||
static const int Login = 1; | |||
static const int Chat = 2; | |||
static const int TranslateOrder = 3; | |||
static const int PushMsg = 100; | |||
} | |||
@@ -2475,6 +2475,8 @@ class I18n implements WidgetsLocalizations { | |||
String get feedback_assistant => "反馈小助手"; | |||
/// "有什么问题都可以反馈给我哦" | |||
String get feedback_tips => "有什么问题都可以反馈给我哦"; | |||
/// "Forward" | |||
String get forward => "Forward"; | |||
} | |||
class _I18n_en_US extends I18n { | |||
@@ -6150,6 +6152,9 @@ class _I18n_vi_VN extends I18n { | |||
/// "有什么问题都可以反馈给我哦" | |||
@override | |||
String get feedback_tips => "有什么问题都可以反馈给我哦"; | |||
/// "转发" | |||
@override | |||
String get forward => "转发"; | |||
@override | |||
TextDirection get textDirection => TextDirection.ltr; | |||
@@ -9821,6 +9826,9 @@ class _I18n_zh_HK extends I18n { | |||
/// "有什麼問題都可以反饋給我哦" | |||
@override | |||
String get feedback_tips => "有什麼問題都可以反饋給我哦"; | |||
/// "转发" | |||
@override | |||
String get forward => "转发"; | |||
@override | |||
TextDirection get textDirection => TextDirection.ltr; | |||
@@ -13492,6 +13500,9 @@ class _I18n_zh_CN extends _I18n_zh_HK { | |||
/// "有什么问题都可以反馈给我哦" | |||
@override | |||
String get feedback_tips => "有什么问题都可以反馈给我哦"; | |||
/// "转发" | |||
@override | |||
String get forward => "转发"; | |||
@override | |||
TextDirection get textDirection => TextDirection.ltr; | |||
@@ -17163,6 +17174,9 @@ class _I18n_ko_KR extends I18n { | |||
/// "有什么问题都可以反馈给我哦" | |||
@override | |||
String get feedback_tips => "有什么问题都可以反馈给我哦"; | |||
/// "转发" | |||
@override | |||
String get forward => "转发"; | |||
@override | |||
TextDirection get textDirection => TextDirection.ltr; | |||
@@ -20834,6 +20848,9 @@ class _I18n_ja_JP extends I18n { | |||
/// "有什么问题都可以反馈给我哦" | |||
@override | |||
String get feedback_tips => "有什么问题都可以反馈给我哦"; | |||
/// "转发" | |||
@override | |||
String get forward => "转发"; | |||
@override | |||
TextDirection get textDirection => TextDirection.ltr; | |||
@@ -313,79 +313,22 @@ class _HomeMainState extends State<HomeMain> { | |||
I18n.of(context).me | |||
]; | |||
// _navigationViews = [ | |||
// NavigationIconView( | |||
// title: _titles[2], | |||
// icon: IconData( | |||
// 0xe67c, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// isShowdot: true, | |||
// iconSize: 29), | |||
// NavigationIconView( | |||
// title: _titles[0], | |||
// isShowdot: true, | |||
// iconMargin: EdgeInsets.only(top: 2), | |||
// type: 5, | |||
// icon: IconData( | |||
// 0xe66e, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// iconSize: 26.5), | |||
// NavigationIconView( | |||
// title: _titles[1], | |||
// icon: IconData( | |||
// 0xe656, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// isCenter: true, | |||
// iconSize: 31), | |||
// NavigationIconView( | |||
// title: _titles[1], | |||
// isShowdot: true, | |||
// icon: IconData( | |||
// 0xe60b, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// type: 6, | |||
// iconSize: 26.5), | |||
// NavigationIconView( | |||
// title: _titles[3], | |||
// icon: IconData( | |||
// 0xe67b, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// iconSize: 26.5), | |||
// ]; | |||
// | |||
// _pages = [ | |||
// RealTimeHelperPage(), | |||
// FriendPage(), | |||
// FindPage(), | |||
// ConversActionPage(), | |||
//// GroupChatListPage(), | |||
// ProfilePage( | |||
// userId: UserData().basicInfo.userId, | |||
// ), | |||
// ]; | |||
_navigationViews = [ | |||
NavigationIconView( | |||
title: _titles[1], | |||
isShowdot: true, | |||
title: _titles[2], | |||
icon: IconData( | |||
0xe60b, | |||
0xe67c, | |||
fontFamily: 'iconfont', | |||
), | |||
type: 1, | |||
iconSize: 26.5), | |||
isShowdot: true, | |||
iconSize: 29), | |||
NavigationIconView( | |||
title: _titles[0], | |||
isShowdot: true, | |||
iconMargin: EdgeInsets.only(top: 2), | |||
type: 5, | |||
icon: IconData( | |||
0xe663, | |||
0xe66e, | |||
fontFamily: 'iconfont', | |||
), | |||
iconSize: 26.5), | |||
@@ -397,18 +340,15 @@ class _HomeMainState extends State<HomeMain> { | |||
), | |||
isCenter: true, | |||
iconSize: 31), | |||
NavigationIconView( | |||
title: _titles[3], | |||
title: _titles[1], | |||
isShowdot: true, | |||
icon: IconData( | |||
0xe66e, | |||
0xe60b, | |||
fontFamily: 'iconfont', | |||
), | |||
type: 4, | |||
isShowdot: true, | |||
type: 6, | |||
iconSize: 26.5), | |||
NavigationIconView( | |||
title: _titles[3], | |||
icon: IconData( | |||
@@ -419,17 +359,76 @@ class _HomeMainState extends State<HomeMain> { | |||
]; | |||
_pages = [ | |||
ConversActionPage(), | |||
// RealTimeHelperPage(), | |||
RealTimeHelperPage(), | |||
FriendPage(), | |||
FindPage(), | |||
// ConversActionPage(), | |||
GroupChatListPage(), | |||
ConversActionPage(), | |||
// GroupChatListPage(), | |||
ProfilePage( | |||
userId: UserData().basicInfo.userId, | |||
), | |||
]; | |||
// _navigationViews = [ | |||
// NavigationIconView( | |||
// title: _titles[1], | |||
// isShowdot: true, | |||
// icon: IconData( | |||
// 0xe60b, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// type: 1, | |||
// iconSize: 26.5), | |||
// NavigationIconView( | |||
// title: _titles[0], | |||
// isShowdot: true, | |||
// iconMargin: EdgeInsets.only(top: 2), | |||
// type: 5, | |||
// icon: IconData( | |||
// 0xe663, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// iconSize: 26.5), | |||
// NavigationIconView( | |||
// title: _titles[1], | |||
// icon: IconData( | |||
// 0xe656, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// isCenter: true, | |||
// iconSize: 31), | |||
// | |||
// NavigationIconView( | |||
// title: _titles[3], | |||
// isShowdot: true, | |||
// icon: IconData( | |||
// 0xe66e, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// type: 4, | |||
// iconSize: 26.5), | |||
// | |||
// NavigationIconView( | |||
// title: _titles[3], | |||
// icon: IconData( | |||
// 0xe67b, | |||
// fontFamily: 'iconfont', | |||
// ), | |||
// iconSize: 26.5), | |||
// ]; | |||
// | |||
// _pages = [ | |||
// ConversActionPage(), | |||
//// RealTimeHelperPage(), | |||
// FriendPage(), | |||
// FindPage(), | |||
//// ConversActionPage(), | |||
// GroupChatListPage(), | |||
// ProfilePage( | |||
// userId: UserData().basicInfo.userId, | |||
// ), | |||
// ]; | |||
} | |||
@@ -42,12 +42,19 @@ class TranslationButlerPage extends StatefulWidget { | |||
} | |||
} | |||
class ValueModel{ | |||
String name; | |||
var key; | |||
ValueModel(this.name,this.key); | |||
} | |||
class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
int curToLang = 1; | |||
int curSourceLang = UserData().language; | |||
int curScenes = 0; | |||
List langList; | |||
List scenesList; | |||
List<ValueModel> langList; | |||
List<ValueModel> scenesList; | |||
String extraMsg; | |||
@@ -67,8 +74,8 @@ class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
WidgetsBinding.instance.addPostFrameCallback((_) { | |||
// Future.delayed(Duration(seconds: 4), () { | |||
//// CustomUI.buildTranslationHelperOrderDialog(context); | |||
Future.delayed(Duration(seconds: 1), () { | |||
CustomUI.buildTranslationHelperOrderDialog(context,true); | |||
// Navigator.of(context).push( | |||
// new MaterialPageRoute( | |||
// builder: (context) { | |||
@@ -80,7 +87,7 @@ class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
// }, | |||
// ), | |||
// ); | |||
// }); | |||
}); | |||
@@ -107,6 +114,12 @@ class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
} | |||
apply() { | |||
MsgHandler.sendCreateTranslateOrder(langList[curSourceLang].key,langList[curToLang].key,scenesList[curScenes].key,extraMsg); | |||
isApply = false; | |||
timer = Timer.periodic(Duration(seconds: 1), (Timer t) { | |||
@@ -121,19 +134,19 @@ class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
textLimitTips = I18n.of(context).translation_input_limit.replaceAll('/s1', '80'); | |||
langList = [ | |||
I18n.of(context).english, | |||
I18n.of(context).Vietnamese, | |||
I18n.of(context).traditional_Chinese, | |||
I18n.of(context).Simplified_Chinese, | |||
I18n.of(context).Korean, | |||
I18n.of(context).Japanese, | |||
ValueModel(I18n.of(context).english,1), | |||
ValueModel(I18n.of(context).Vietnamese,2), | |||
ValueModel(I18n.of(context).traditional_Chinese,4), | |||
ValueModel(I18n.of(context).Simplified_Chinese,8), | |||
ValueModel(I18n.of(context).Korean,16), | |||
ValueModel(I18n.of(context).Japanese,32), | |||
]; | |||
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, | |||
ValueModel(I18n.of(context).translation_scenes_1,0), | |||
ValueModel(I18n.of(context).translation_scenes_2,1), | |||
ValueModel(I18n.of(context).translation_scenes_3,2), | |||
ValueModel(I18n.of(context).translation_scenes_4,3), | |||
]; | |||
} | |||
@@ -164,7 +177,7 @@ class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
children: <Widget>[ | |||
Expanded( | |||
child: Container(padding: EdgeInsets.only(left: 5),alignment: Alignment.center,child: Text( | |||
langList[curIndex], | |||
langList[curIndex].name, | |||
textAlign: TextAlign.center, | |||
overflow: TextOverflow.ellipsis, | |||
textScaleFactor: 1.0, | |||
@@ -195,7 +208,7 @@ class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
alignment: Alignment.center, | |||
color: Colors.white, | |||
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10), | |||
child: Text(langList[i], | |||
child: Text(langList[i].name, | |||
textScaleFactor: 1.0, | |||
maxLines: 1, | |||
style: TextStyle( | |||
@@ -235,7 +248,7 @@ class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
children: <Widget>[ | |||
Expanded( | |||
child: Text( | |||
scenesList[curIndex], | |||
scenesList[curIndex].name, | |||
textAlign: TextAlign.center, | |||
overflow: TextOverflow.ellipsis, | |||
textScaleFactor: 1.0, | |||
@@ -263,7 +276,7 @@ class TranslationButlerPageState extends State<TranslationButlerPage> { | |||
alignment: Alignment.center, | |||
color: Colors.white, | |||
padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10), | |||
child: Text(scenesList[i], | |||
child: Text(scenesList[i].name, | |||
textScaleFactor: 1.0, | |||
maxLines: 1, | |||
style: TextStyle( | |||
@@ -134,11 +134,17 @@ Map<String, int> language = { | |||
'zh_Hant_CN': LanguageType.TraditionalChinese, | |||
'zh_TW': LanguageType.TraditionalChinese, | |||
'zh_HK': LanguageType.TraditionalChinese, | |||
'zh_Hant': LanguageType.TraditionalChinese, | |||
'zh_Hant_MO': LanguageType.TraditionalChinese, | |||
'zh_Hant_TW': LanguageType.TraditionalChinese, | |||
'zh_Hant_HK': LanguageType.TraditionalChinese, | |||
'zh_Hant_US': LanguageType.TraditionalChinese, | |||
'zh_Hans': LanguageType.SimplifiedChinese, | |||
'zh_Hans_CN': LanguageType.SimplifiedChinese, | |||
'zh_Hans_US': LanguageType.SimplifiedChinese, | |||
'zh_Hans_MO': LanguageType.SimplifiedChinese, | |||
'zh_Hans_SG': LanguageType.SimplifiedChinese, | |||
'zh_CN': LanguageType.SimplifiedChinese, | |||
'ko_KR': LanguageType.Korean, | |||
'ko_KP': LanguageType.Korean, | |||
@@ -0,0 +1,250 @@ | |||
/// | |||
// Generated code. Do not modify. | |||
// source: interpreter.proto | |||
// | |||
// @dart = 2.3 | |||
// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type | |||
import 'dart:core' as $core show bool, Deprecated, double, int, List, Map, override, pragma, String; | |||
import 'package:fixnum/fixnum.dart'; | |||
import 'package:protobuf/protobuf.dart' as $pb; | |||
export 'interpreter.pbenum.dart'; | |||
class IssueInterpreterOrderReq extends $pb.GeneratedMessage { | |||
static final $pb.BuilderInfo _i = $pb.BuilderInfo('IssueInterpreterOrderReq', package: const $pb.PackageName('yl_pb')) | |||
..a<$core.int>(1, 'tLanguage', $pb.PbFieldType.OU3) | |||
..a<$core.int>(2, 'scenes', $pb.PbFieldType.O3) | |||
..aOS(3, 'desc') | |||
..hasRequiredFields = false | |||
; | |||
IssueInterpreterOrderReq._() : super(); | |||
factory IssueInterpreterOrderReq() => create(); | |||
factory IssueInterpreterOrderReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | |||
factory IssueInterpreterOrderReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | |||
IssueInterpreterOrderReq clone() => IssueInterpreterOrderReq()..mergeFromMessage(this); | |||
IssueInterpreterOrderReq copyWith(void Function(IssueInterpreterOrderReq) updates) => super.copyWith((message) => updates(message as IssueInterpreterOrderReq)); | |||
$pb.BuilderInfo get info_ => _i; | |||
@$core.pragma('dart2js:noInline') | |||
static IssueInterpreterOrderReq create() => IssueInterpreterOrderReq._(); | |||
IssueInterpreterOrderReq createEmptyInstance() => create(); | |||
static $pb.PbList<IssueInterpreterOrderReq> createRepeated() => $pb.PbList<IssueInterpreterOrderReq>(); | |||
static IssueInterpreterOrderReq getDefault() => _defaultInstance ??= create()..freeze(); | |||
static IssueInterpreterOrderReq _defaultInstance; | |||
$core.int get tLanguage => $_get(0, 0); | |||
set tLanguage($core.int v) { $_setUnsignedInt32(0, v); } | |||
$core.bool hasTLanguage() => $_has(0); | |||
void clearTLanguage() => clearField(1); | |||
$core.int get scenes => $_get(1, 0); | |||
set scenes($core.int v) { $_setSignedInt32(1, v); } | |||
$core.bool hasScenes() => $_has(1); | |||
void clearScenes() => clearField(2); | |||
$core.String get desc => $_getS(2, ''); | |||
set desc($core.String v) { $_setString(2, v); } | |||
$core.bool hasDesc() => $_has(2); | |||
void clearDesc() => clearField(3); | |||
} | |||
class IssueInterpreterOrderRes extends $pb.GeneratedMessage { | |||
static final $pb.BuilderInfo _i = $pb.BuilderInfo('IssueInterpreterOrderRes', package: const $pb.PackageName('yl_pb')) | |||
..a<$core.int>(1, 'errorCode', $pb.PbFieldType.O3) | |||
..aOS(2, 'orderId') | |||
..a<$core.int>(3, 'waitNum', $pb.PbFieldType.O3) | |||
..hasRequiredFields = false | |||
; | |||
IssueInterpreterOrderRes._() : super(); | |||
factory IssueInterpreterOrderRes() => create(); | |||
factory IssueInterpreterOrderRes.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | |||
factory IssueInterpreterOrderRes.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | |||
IssueInterpreterOrderRes clone() => IssueInterpreterOrderRes()..mergeFromMessage(this); | |||
IssueInterpreterOrderRes copyWith(void Function(IssueInterpreterOrderRes) updates) => super.copyWith((message) => updates(message as IssueInterpreterOrderRes)); | |||
$pb.BuilderInfo get info_ => _i; | |||
@$core.pragma('dart2js:noInline') | |||
static IssueInterpreterOrderRes create() => IssueInterpreterOrderRes._(); | |||
IssueInterpreterOrderRes createEmptyInstance() => create(); | |||
static $pb.PbList<IssueInterpreterOrderRes> createRepeated() => $pb.PbList<IssueInterpreterOrderRes>(); | |||
static IssueInterpreterOrderRes getDefault() => _defaultInstance ??= create()..freeze(); | |||
static IssueInterpreterOrderRes _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); | |||
$core.int get waitNum => $_get(2, 0); | |||
set waitNum($core.int v) { $_setSignedInt32(2, v); } | |||
$core.bool hasWaitNum() => $_has(2); | |||
void clearWaitNum() => clearField(3); | |||
} | |||
class ReceivingInterpreterOrderReq extends $pb.GeneratedMessage { | |||
static final $pb.BuilderInfo _i = $pb.BuilderInfo('ReceivingInterpreterOrderReq', package: const $pb.PackageName('yl_pb')) | |||
..aOS(1, 'orderId') | |||
..hasRequiredFields = false | |||
; | |||
ReceivingInterpreterOrderReq._() : super(); | |||
factory ReceivingInterpreterOrderReq() => create(); | |||
factory ReceivingInterpreterOrderReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | |||
factory ReceivingInterpreterOrderReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | |||
ReceivingInterpreterOrderReq clone() => ReceivingInterpreterOrderReq()..mergeFromMessage(this); | |||
ReceivingInterpreterOrderReq copyWith(void Function(ReceivingInterpreterOrderReq) updates) => super.copyWith((message) => updates(message as ReceivingInterpreterOrderReq)); | |||
$pb.BuilderInfo get info_ => _i; | |||
@$core.pragma('dart2js:noInline') | |||
static ReceivingInterpreterOrderReq create() => ReceivingInterpreterOrderReq._(); | |||
ReceivingInterpreterOrderReq createEmptyInstance() => create(); | |||
static $pb.PbList<ReceivingInterpreterOrderReq> createRepeated() => $pb.PbList<ReceivingInterpreterOrderReq>(); | |||
static ReceivingInterpreterOrderReq getDefault() => _defaultInstance ??= create()..freeze(); | |||
static ReceivingInterpreterOrderReq _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 ReceivingInterpreterOrderRes extends $pb.GeneratedMessage { | |||
static final $pb.BuilderInfo _i = $pb.BuilderInfo('ReceivingInterpreterOrderRes', package: const $pb.PackageName('yl_pb')) | |||
..a<$core.int>(1, 'errorCode', $pb.PbFieldType.O3) | |||
..hasRequiredFields = false | |||
; | |||
ReceivingInterpreterOrderRes._() : super(); | |||
factory ReceivingInterpreterOrderRes() => create(); | |||
factory ReceivingInterpreterOrderRes.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | |||
factory ReceivingInterpreterOrderRes.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | |||
ReceivingInterpreterOrderRes clone() => ReceivingInterpreterOrderRes()..mergeFromMessage(this); | |||
ReceivingInterpreterOrderRes copyWith(void Function(ReceivingInterpreterOrderRes) updates) => super.copyWith((message) => updates(message as ReceivingInterpreterOrderRes)); | |||
$pb.BuilderInfo get info_ => _i; | |||
@$core.pragma('dart2js:noInline') | |||
static ReceivingInterpreterOrderRes create() => ReceivingInterpreterOrderRes._(); | |||
ReceivingInterpreterOrderRes createEmptyInstance() => create(); | |||
static $pb.PbList<ReceivingInterpreterOrderRes> createRepeated() => $pb.PbList<ReceivingInterpreterOrderRes>(); | |||
static ReceivingInterpreterOrderRes getDefault() => _defaultInstance ??= create()..freeze(); | |||
static ReceivingInterpreterOrderRes _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); | |||
} | |||
class CancellationInterpreterOrderReq extends $pb.GeneratedMessage { | |||
static final $pb.BuilderInfo _i = $pb.BuilderInfo('CancellationInterpreterOrderReq', package: const $pb.PackageName('yl_pb')) | |||
..aOS(1, 'orderId') | |||
..hasRequiredFields = false | |||
; | |||
CancellationInterpreterOrderReq._() : super(); | |||
factory CancellationInterpreterOrderReq() => create(); | |||
factory CancellationInterpreterOrderReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | |||
factory CancellationInterpreterOrderReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | |||
CancellationInterpreterOrderReq clone() => CancellationInterpreterOrderReq()..mergeFromMessage(this); | |||
CancellationInterpreterOrderReq copyWith(void Function(CancellationInterpreterOrderReq) updates) => super.copyWith((message) => updates(message as CancellationInterpreterOrderReq)); | |||
$pb.BuilderInfo get info_ => _i; | |||
@$core.pragma('dart2js:noInline') | |||
static CancellationInterpreterOrderReq create() => CancellationInterpreterOrderReq._(); | |||
CancellationInterpreterOrderReq createEmptyInstance() => create(); | |||
static $pb.PbList<CancellationInterpreterOrderReq> createRepeated() => $pb.PbList<CancellationInterpreterOrderReq>(); | |||
static CancellationInterpreterOrderReq getDefault() => _defaultInstance ??= create()..freeze(); | |||
static CancellationInterpreterOrderReq _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 CancellationInterpreterOrderRes extends $pb.GeneratedMessage { | |||
static final $pb.BuilderInfo _i = $pb.BuilderInfo('CancellationInterpreterOrderRes', package: const $pb.PackageName('yl_pb')) | |||
..a<$core.int>(1, 'errorCode', $pb.PbFieldType.O3) | |||
..aOS(2, 'orderId') | |||
..hasRequiredFields = false | |||
; | |||
CancellationInterpreterOrderRes._() : super(); | |||
factory CancellationInterpreterOrderRes() => create(); | |||
factory CancellationInterpreterOrderRes.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | |||
factory CancellationInterpreterOrderRes.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | |||
CancellationInterpreterOrderRes clone() => CancellationInterpreterOrderRes()..mergeFromMessage(this); | |||
CancellationInterpreterOrderRes copyWith(void Function(CancellationInterpreterOrderRes) updates) => super.copyWith((message) => updates(message as CancellationInterpreterOrderRes)); | |||
$pb.BuilderInfo get info_ => _i; | |||
@$core.pragma('dart2js:noInline') | |||
static CancellationInterpreterOrderRes create() => CancellationInterpreterOrderRes._(); | |||
CancellationInterpreterOrderRes createEmptyInstance() => create(); | |||
static $pb.PbList<CancellationInterpreterOrderRes> createRepeated() => $pb.PbList<CancellationInterpreterOrderRes>(); | |||
static CancellationInterpreterOrderRes getDefault() => _defaultInstance ??= create()..freeze(); | |||
static CancellationInterpreterOrderRes _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 DeliveryInterpreterOrderPush extends $pb.GeneratedMessage { | |||
static final $pb.BuilderInfo _i = $pb.BuilderInfo('DeliveryInterpreterOrderPush', 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') | |||
..hasRequiredFields = false | |||
; | |||
DeliveryInterpreterOrderPush._() : super(); | |||
factory DeliveryInterpreterOrderPush() => create(); | |||
factory DeliveryInterpreterOrderPush.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); | |||
factory DeliveryInterpreterOrderPush.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); | |||
DeliveryInterpreterOrderPush clone() => DeliveryInterpreterOrderPush()..mergeFromMessage(this); | |||
DeliveryInterpreterOrderPush copyWith(void Function(DeliveryInterpreterOrderPush) updates) => super.copyWith((message) => updates(message as DeliveryInterpreterOrderPush)); | |||
$pb.BuilderInfo get info_ => _i; | |||
@$core.pragma('dart2js:noInline') | |||
static DeliveryInterpreterOrderPush create() => DeliveryInterpreterOrderPush._(); | |||
DeliveryInterpreterOrderPush createEmptyInstance() => create(); | |||
static $pb.PbList<DeliveryInterpreterOrderPush> createRepeated() => $pb.PbList<DeliveryInterpreterOrderPush>(); | |||
static DeliveryInterpreterOrderPush getDefault() => _defaultInstance ??= create()..freeze(); | |||
static DeliveryInterpreterOrderPush _defaultInstance; | |||
$core.String get orderId => $_getS(0, ''); | |||
set orderId($core.String v) { $_setString(0, v); } | |||
$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,0 +1,30 @@ | |||
/// | |||
// Generated code. Do not modify. | |||
// source: interpreter.proto | |||
// | |||
// @dart = 2.3 | |||
// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type | |||
// ignore_for_file: UNDEFINED_SHOWN_NAME,UNUSED_SHOWN_NAME | |||
import 'dart:core' as $core show int, dynamic, String, List, Map; | |||
import 'package:protobuf/protobuf.dart' as $pb; | |||
class InterpreterOrderState extends $pb.ProtobufEnum { | |||
static const InterpreterOrderState Distributeing = InterpreterOrderState._(1, 'Distributeing'); | |||
static const InterpreterOrderState Underway = InterpreterOrderState._(2, 'Underway'); | |||
static const InterpreterOrderState Rescinded = InterpreterOrderState._(3, 'Rescinded'); | |||
static const InterpreterOrderState Completed = InterpreterOrderState._(4, 'Completed'); | |||
static const $core.List<InterpreterOrderState> values = <InterpreterOrderState> [ | |||
Distributeing, | |||
Underway, | |||
Rescinded, | |||
Completed, | |||
]; | |||
static final $core.Map<$core.int, InterpreterOrderState> _byValue = $pb.ProtobufEnum.initByValue(values); | |||
static InterpreterOrderState valueOf($core.int value) => _byValue[value]; | |||
const InterpreterOrderState._($core.int v, $core.String n) : super(v, n); | |||
} | |||
@@ -0,0 +1,75 @@ | |||
/// | |||
// Generated code. Do not modify. | |||
// source: interpreter.proto | |||
// | |||
// @dart = 2.3 | |||
// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type | |||
const InterpreterOrderState$json = const { | |||
'1': 'InterpreterOrderState', | |||
'2': const [ | |||
const {'1': 'Distributeing', '2': 1}, | |||
const {'1': 'Underway', '2': 2}, | |||
const {'1': 'Rescinded', '2': 3}, | |||
const {'1': 'Completed', '2': 4}, | |||
], | |||
}; | |||
const IssueInterpreterOrderReq$json = const { | |||
'1': 'IssueInterpreterOrderReq', | |||
'2': const [ | |||
const {'1': 'TLanguage', '3': 1, '4': 1, '5': 13, '10': 'TLanguage'}, | |||
const {'1': 'Scenes', '3': 2, '4': 1, '5': 5, '10': 'Scenes'}, | |||
const {'1': 'Desc', '3': 3, '4': 1, '5': 9, '10': 'Desc'}, | |||
], | |||
}; | |||
const IssueInterpreterOrderRes$json = const { | |||
'1': 'IssueInterpreterOrderRes', | |||
'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 {'1': 'WaitNum', '3': 3, '4': 1, '5': 5, '10': 'WaitNum'}, | |||
], | |||
}; | |||
const ReceivingInterpreterOrderReq$json = const { | |||
'1': 'ReceivingInterpreterOrderReq', | |||
'2': const [ | |||
const {'1': 'OrderId', '3': 1, '4': 1, '5': 9, '10': 'OrderId'}, | |||
], | |||
}; | |||
const ReceivingInterpreterOrderRes$json = const { | |||
'1': 'ReceivingInterpreterOrderRes', | |||
'2': const [ | |||
const {'1': 'ErrorCode', '3': 1, '4': 1, '5': 5, '10': 'ErrorCode'}, | |||
], | |||
}; | |||
const CancellationInterpreterOrderReq$json = const { | |||
'1': 'CancellationInterpreterOrderReq', | |||
'2': const [ | |||
const {'1': 'OrderId', '3': 1, '4': 1, '5': 9, '10': 'OrderId'}, | |||
], | |||
}; | |||
const CancellationInterpreterOrderRes$json = const { | |||
'1': 'CancellationInterpreterOrderRes', | |||
'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 DeliveryInterpreterOrderPush$json = const { | |||
'1': 'DeliveryInterpreterOrderPush', | |||
'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'}, | |||
], | |||
}; | |||
@@ -0,0 +1,9 @@ | |||
/// | |||
// Generated code. Do not modify. | |||
// source: interpreter.proto | |||
// | |||
// @dart = 2.3 | |||
// ignore_for_file: camel_case_types,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type | |||
export 'interpreter.pb.dart'; | |||
@@ -0,0 +1,55 @@ | |||
syntax = "proto2"; | |||
package yl_pb; | |||
//comid = 3 | |||
enum InterpreterOrderState{ | |||
Distributeing = 1; //派发中 | |||
Underway = 2; //进行中 | |||
Rescinded = 3; //已撤销 | |||
Completed = 4; //已完成 | |||
} | |||
//-------------------------------------------消息------------------------- | |||
//Msg=1 发布翻译管家帮助订单 | |||
message IssueInterpreterOrderReq { | |||
optional uint32 TLanguage =1; //翻译语言 | |||
optional int32 Scenes =2; //场景 | |||
optional string Desc =3; //描述 | |||
} | |||
//Msg=2 发布翻译管家帮助订单回应 | |||
message IssueInterpreterOrderRes { | |||
optional int32 ErrorCode = 1; //详见错误码文档 | |||
optional string OrderId =2; //订单号 | |||
optional int32 WaitNum =3; //需要等待人数 | |||
} | |||
//Msg= 3 接收订单消息请求 | |||
message ReceivingInterpreterOrderReq { | |||
optional string OrderId =1; //订单号 | |||
} | |||
//Msg= 4 接收订单消息回应 | |||
message ReceivingInterpreterOrderRes { | |||
optional int32 ErrorCode = 1; //详见错误码文档 | |||
} | |||
//Msg= 5 撤销订单消息 | |||
message CancellationInterpreterOrderReq { | |||
optional string OrderId =1; //订单号 | |||
} | |||
//Msg= 6 撤销订单消息回应 | |||
message CancellationInterpreterOrderRes { | |||
optional int32 ErrorCode = 1; //详见错误码文档 | |||
optional string OrderId = 2; //订单号 | |||
} | |||
//Msg= 50 派送订单推送 | |||
message DeliveryInterpreterOrderPush { | |||
optional string OrderId =1; //订单号 | |||
optional int64 CreateTime = 2; //创建时间 | |||
optional uint32 TLanguage =3; //翻译语言 | |||
optional int32 Scenes =4; //场景 | |||
optional string Desc =5; //描述 | |||
} |
@@ -11,6 +11,7 @@ import 'package:chat/models/group_info_model.dart'; | |||
import 'package:chat/photo/ui/dialog/not_permission_dialog.dart'; | |||
import 'package:chat/utils/LoadingDialog.dart'; | |||
import 'package:chat/utils/TokenMgr.dart'; | |||
import 'package:chat/utils/msgHandler.dart'; | |||
import 'package:chat/utils/screen.dart'; | |||
import 'package:dio/dio.dart'; | |||
import 'package:flutter/cupertino.dart'; | |||
@@ -1250,7 +1251,15 @@ class CustomUI { | |||
static void buildTranslationHelperOrderDialog(BuildContext context) { | |||
///** 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, | |||
]; | |||
Navigator.of(context).push(TutorialOverlay( | |||
child: | |||
@@ -1287,22 +1296,57 @@ class CustomUI { | |||
), | |||
), | |||
Text( | |||
I18n.of(context).translation_butler_dialog_order.replaceAll('s1', 'xxx'), | |||
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 时长:10分钟', | |||
Text( | |||
'时间:今天11:45 时长:5分钟', | |||
textScaleFactor: 1.0, | |||
textAlign: TextAlign.left, | |||
style: TextStyle( | |||
color: AppColors.NewAppbarTextColor, fontSize: 14), | |||
color: Color(0xFF797979), fontSize: 11), | |||
), | |||
isUser?Container():Text( | |||
'场景:${scenesList[scenes]}', | |||
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: CountDownButton( I18n.of(context).translation_butler_dialog_start_service,(){ | |||
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,(){ | |||
MsgHandler.sendReceiveOrder(orderId); | |||
Navigator.of(context).pop(); | |||
}) ,) | |||
@@ -339,7 +339,7 @@ class NetWork { | |||
checkConnect() { | |||
debugPrint(' ios bg 取消计时器'); | |||
iosBgTimer?.cancel(); | |||
iosBgTimer=null; | |||
if (isInit && !isConnect && !isConnecting) { | |||
reconnect(); | |||
} else { | |||
@@ -102,7 +102,7 @@ class AppNavigator { | |||
//聊天 | |||
static pushChatPage(BuildContext context, int friendId, | |||
{enterType = 0, enterContent}) async { | |||
if (enterType == 1) { | |||
if (enterType == 1 ||enterType == 2) { | |||
Navigator.of(context).pop(context); | |||
} | |||
AppNavigator.push( | |||
@@ -118,7 +118,7 @@ class AppNavigator { | |||
//群聊 | |||
static pushGroupChatPage(BuildContext context, GroupInfoModel groupInfoModel, | |||
{enterType = 0, enterContent}) async { | |||
if (enterType == 1) { | |||
if (enterType == 1 ||enterType == 2) { | |||
Navigator.of(context).pop(context); | |||
} | |||
@@ -11,6 +11,7 @@ import 'package:chat/home/IndexPage.dart'; | |||
import 'package:chat/models/ChatMsg.dart'; | |||
import 'package:chat/models/group_info_model.dart'; | |||
import 'package:chat/proto/all.pbserver.dart'; | |||
import 'package:chat/proto/interpreter.pb.dart'; | |||
import 'package:chat/utils/NetUtil.dart'; | |||
import 'package:chat/utils/blacklist_mgr.dart'; | |||
import 'package:chat/utils/friend_list_mgr.dart'; | |||
@@ -919,6 +920,21 @@ class MsgHandler { | |||
handlerGroupIsShowMenberNiceName(content); | |||
} | |||
break; | |||
case ComId.TranslateOrder: | |||
if(msgId==2){ | |||
handlerCreateTranslateOrder(content); | |||
}else if(msgId ==4){ | |||
handlerReceiveOrder(content); | |||
}else if(msgId ==6){ | |||
handlerCancelTranslateOrder(content); | |||
}else if(msgId==50){ | |||
handlerDeliveryInterpreterOrderPush(content); | |||
} | |||
break; | |||
case ComId.PushMsg: | |||
String msg = PushNetRelay.fromBuffer(content).msg; | |||
print('接受的推送消息:msg $msg'); | |||
@@ -1205,6 +1221,89 @@ class MsgHandler { | |||
NetWork().sendMsg(ComId.Chat, 229, seq); | |||
} | |||
//发布翻译管家帮助订单 | |||
static sendCreateTranslateOrder(int fromLanguage,int toLanguage,int scences,String extraDesc) { | |||
debugPrint('发布翻译管家帮助订单 fromLanguage:$fromLanguage toLanguage: $toLanguage | ${fromLanguage|toLanguage}' ); | |||
var seq = IssueInterpreterOrderReq.create(); | |||
seq.tLanguage = fromLanguage|toLanguage; | |||
NetWork().sendMsg(ComId.TranslateOrder, 1, seq); | |||
} | |||
//发布翻译管家帮助订单回应 | |||
static handlerCreateTranslateOrder(List<int> msgContent) { | |||
debugPrint('发布翻译管家帮助订单回应'); | |||
var res = IssueInterpreterOrderRes.fromBuffer(msgContent); | |||
if (res.errorCode == 0) { | |||
// GroupInfoMgr().updateMemberMsgFree(res.groupId, res.messageFree); | |||
debugPrint('发布翻译管家帮助订单回应-订单号: ${res.orderId} 等待人数 ${res.waitNum}'); | |||
} else { | |||
debugPrint('发布翻译管家帮助订单回应${res.errorCode}'); | |||
} | |||
} | |||
//撤销订单消息 | |||
static sendCancelTranslateOrder( String orderId) { | |||
debugPrint('取消订单 fromLanguage:$orderId' ); | |||
var seq = CancellationInterpreterOrderReq.create(); | |||
seq.orderId = orderId; | |||
NetWork().sendMsg(ComId.TranslateOrder, 5, seq); | |||
} | |||
//撤销订单消息回应 | |||
static handlerCancelTranslateOrder(List<int> msgContent) { | |||
debugPrint('撤销订单消息回应'); | |||
var res = CancellationInterpreterOrderRes.fromBuffer(msgContent); | |||
if (res.errorCode == 0) { | |||
// GroupInfoMgr().updateMemberMsgFree(res.groupId, res.messageFree); | |||
debugPrint('撤销订单消息回应成功: ${res.orderId}'); | |||
} else { | |||
debugPrint('撤销订单消息回应成功失败${res.errorCode}'); | |||
} | |||
} | |||
//派送订单推送 | |||
static handlerDeliveryInterpreterOrderPush(List<int> msgContent) { | |||
debugPrint('撤销订单消息回应'); | |||
var res = DeliveryInterpreterOrderPush.fromBuffer(msgContent); | |||
print('OrderId: ${res.orderId} createTime: ${res.createTime} tLanguage:${res.tLanguage} scenes:${res.scenes} desc${res.desc}'); | |||
} | |||
//接收订单请求 | |||
static sendReceiveOrder( String orderId) { | |||
debugPrint('接收订单消息请求 orderId:$orderId' ); | |||
var seq = ReceivingInterpreterOrderReq.create(); | |||
seq.orderId = orderId; | |||
NetWork().sendMsg(ComId.TranslateOrder,3, seq); | |||
} | |||
//接收订单消息回应 | |||
static handlerReceiveOrder(List<int> msgContent) { | |||
debugPrint('接收订单消息回应'); | |||
var res = ReceivingInterpreterOrderRes.fromBuffer(msgContent); | |||
if (res.errorCode == 0) { | |||
// GroupInfoMgr().updateMemberMsgFree(res.groupId, res.messageFree); | |||
debugPrint('接收订单消息回应成功: '); | |||
} else { | |||
debugPrint('接收订单消息回应失败${res.errorCode}'); | |||
} | |||
} | |||
//消息免打扰请求结果 | |||
static handlerGroupIsShowMenberNiceName(List<int> msgContent) { | |||
print('设置是否显示群昵称'); | |||
@@ -317,7 +317,7 @@ class _MenuPopWidgetState extends State<_MenuPopWidget> { | |||
}); | |||
}, | |||
child: Container( | |||
width: _arrowWidth, | |||
width: _arrowWidth-4, | |||
height: widget.menuHeight, | |||
child: Image.asset( | |||
(_curPage + 1) * | |||
@@ -482,7 +482,7 @@ packages: | |||
name: flutter_webview_plugin | |||
url: "https://pub.flutter-io.cn" | |||
source: hosted | |||
version: "0.3.10" | |||
version: "0.3.10+1" | |||
fluwx_no_pay: | |||
dependency: "direct main" | |||
description: | |||
@@ -814,10 +814,10 @@ packages: | |||
description: | |||
path: "." | |||
ref: HEAD | |||
resolved-ref: c3f6591a653851399ab957ed00651cfd86410e37 | |||
resolved-ref: a9ada07787cd41ea8acd97904ee2d1d44e3c07ea | |||
url: "https://github.com/CaiJingLong/flutter_photo_manager.git" | |||
source: git | |||
version: "0.5.0-dev.1" | |||
version: "0.5.0-dev.3" | |||
platform: | |||
dependency: transitive | |||
description: | |||
@@ -156,7 +156,8 @@ dependencies: | |||
lpinyin: ^1.0.7 | |||
#网页-支付跳转 | |||
flutter_webview_plugin: ^0.3.10 | |||
flutter_webview_plugin: ^0.3.10+1 | |||
# firebase_auth: ^0.15.3 | |||
#图片保存 | |||
image_gallery_saver: ^1.2.2 | |||