周睿 2 years ago
parent
commit
1efcb6e7e5

+ 1 - 0
android/build.gradle

@@ -22,6 +22,7 @@ allprojects {
         maven { url 'https://maven.aliyun.com/repository/jcenter' }
         maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
         google()
+        maven { url 'https://mirrors.tuna.tsinghua.edu.cn/flutter/download.flutter.io' }
         mavenCentral()
     }
 }

BIN
assets/images/ic_cp.png


+ 1 - 0
lib/generated/assets.dart

@@ -6,6 +6,7 @@ class Assets {
   static const String imagesBkCommonPage = 'assets/images/bk_common_page.png';
   static const String imagesBkLogin = 'assets/images/bk_login.png';
   static const String imagesBkLoginRight = 'assets/images/bk_login_right.png';
+  static const String imagesIcCp = 'assets/images/ic_cp.png';
   static const String imagesIcLocation = 'assets/images/ic_location.png';
   static const String imagesIcLoginLogo = 'assets/images/ic_login_logo.png';
   static const String imagesIcMapScale = 'assets/images/ic_map_scale.png';

+ 6 - 2
lib/generated/google/protobuf/any.pb.dart

@@ -38,6 +38,10 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
 ///      if (any.is(Foo.class)) {
 ///        foo = any.unpack(Foo.class);
 ///      }
+///      // or ...
+///      if (any.isSameTypeAs(Foo.getDefaultInstance())) {
+///        foo = any.unpack(Foo.getDefaultInstance());
+///      }
 ///
 ///   Example 3: Pack and unpack a message in Python.
 ///
@@ -68,7 +72,6 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
 ///  in the type URL, for example "foo.bar.com/x/y.z" will yield type
 ///  name "y.z".
 ///
-///
 ///  JSON
 ///  ====
 ///  The JSON representation of an `Any` value uses the regular
@@ -164,7 +167,8 @@ class Any extends $pb.GeneratedMessage with $mixin.AnyMixin {
   ///
   ///  Note: this functionality is not currently available in the official
   ///  protobuf release, and it is not used for type URLs beginning with
-  ///  type.googleapis.com.
+  ///  type.googleapis.com. As of May 2023, there are no widely used type server
+  ///  implementations and no plans to implement one.
   ///
   ///  Schemes other than `http`, `https` (or the empty scheme) might be
   ///  used with implementation specific semantics.

+ 1 - 3
lib/generated/google/protobuf/timestamp.pb.dart

@@ -65,7 +65,6 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
 ///      Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
 ///          .setNanos((int) ((millis % 1000) * 1000000)).build();
 ///
-///
 ///  Example 5: Compute Timestamp from Java `Instant.now()`.
 ///
 ///      Instant now = Instant.now();
@@ -74,7 +73,6 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
 ///          Timestamp.newBuilder().setSeconds(now.getEpochSecond())
 ///              .setNanos(now.getNano()).build();
 ///
-///
 ///  Example 6: Compute Timestamp from current time in Python.
 ///
 ///      timestamp = Timestamp()
@@ -104,7 +102,7 @@ import 'package:protobuf/src/protobuf/mixins/well_known.dart' as $mixin;
 ///  [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
 ///  the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
 ///  the Joda Time's [`ISODateTimeFormat.dateTime()`](
-///  http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
+///  http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
 ///  ) to obtain a formatter capable of generating timestamps in this format.
 class Timestamp extends $pb.GeneratedMessage with $mixin.TimestampMixin {
   factory Timestamp({

+ 227 - 71
lib/generated/to_app_api.pb.dart

@@ -19,6 +19,70 @@ import 'base.pbenum.dart' as $1;
 import 'google/protobuf/duration.pb.dart' as $3;
 import 'google/protobuf/timestamp.pb.dart' as $2;
 
+class ToUserInActionBasicQueryRequest extends $pb.GeneratedMessage {
+  factory ToUserInActionBasicQueryRequest({
+    $core.int? actId,
+    $core.int? userId,
+  }) {
+    final $result = create();
+    if (actId != null) {
+      $result.actId = actId;
+    }
+    if (userId != null) {
+      $result.userId = userId;
+    }
+    return $result;
+  }
+  ToUserInActionBasicQueryRequest._() : super();
+  factory ToUserInActionBasicQueryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory ToUserInActionBasicQueryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToUserInActionBasicQueryRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'toApp.v1'), createEmptyInstance: create)
+    ..a<$core.int>(1, _omitFieldNames ? '' : 'ActId', $pb.PbFieldType.O3, protoName: 'ActId')
+    ..a<$core.int>(2, _omitFieldNames ? '' : 'UserId', $pb.PbFieldType.O3, protoName: 'UserId')
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  ToUserInActionBasicQueryRequest clone() => ToUserInActionBasicQueryRequest()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  ToUserInActionBasicQueryRequest copyWith(void Function(ToUserInActionBasicQueryRequest) updates) => super.copyWith((message) => updates(message as ToUserInActionBasicQueryRequest)) as ToUserInActionBasicQueryRequest;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static ToUserInActionBasicQueryRequest create() => ToUserInActionBasicQueryRequest._();
+  ToUserInActionBasicQueryRequest createEmptyInstance() => create();
+  static $pb.PbList<ToUserInActionBasicQueryRequest> createRepeated() => $pb.PbList<ToUserInActionBasicQueryRequest>();
+  @$core.pragma('dart2js:noInline')
+  static ToUserInActionBasicQueryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ToUserInActionBasicQueryRequest>(create);
+  static ToUserInActionBasicQueryRequest? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.int get actId => $_getIZ(0);
+  @$pb.TagNumber(1)
+  set actId($core.int v) { $_setSignedInt32(0, v); }
+  @$pb.TagNumber(1)
+  $core.bool hasActId() => $_has(0);
+  @$pb.TagNumber(1)
+  void clearActId() => clearField(1);
+
+  @$pb.TagNumber(2)
+  $core.int get userId => $_getIZ(1);
+  @$pb.TagNumber(2)
+  set userId($core.int v) { $_setSignedInt32(1, v); }
+  @$pb.TagNumber(2)
+  $core.bool hasUserId() => $_has(1);
+  @$pb.TagNumber(2)
+  void clearUserId() => clearField(2);
+}
+
 class ToGetBinaryByMd5Request extends $pb.GeneratedMessage {
   factory ToGetBinaryByMd5Request({
     $core.List<$core.int>? md5,
@@ -591,15 +655,11 @@ class ToMapInfoV2 extends $pb.GeneratedMessage {
 class ToUserDetailQueryRequestV2 extends $pb.GeneratedMessage {
   factory ToUserDetailQueryRequestV2({
     $core.int? mapId,
-    $core.bool? isFullQuery,
   }) {
     final $result = create();
     if (mapId != null) {
       $result.mapId = mapId;
     }
-    if (isFullQuery != null) {
-      $result.isFullQuery = isFullQuery;
-    }
     return $result;
   }
   ToUserDetailQueryRequestV2._() : super();
@@ -608,7 +668,6 @@ class ToUserDetailQueryRequestV2 extends $pb.GeneratedMessage {
 
   static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToUserDetailQueryRequestV2', package: const $pb.PackageName(_omitMessageNames ? '' : 'toApp.v1'), createEmptyInstance: create)
     ..a<$core.int>(1, _omitFieldNames ? '' : 'mapId', $pb.PbFieldType.O3, protoName: 'mapId')
-    ..aOB(2, _omitFieldNames ? '' : 'isFullQuery', protoName: 'isFullQuery')
     ..hasRequiredFields = false
   ;
 
@@ -641,15 +700,6 @@ class ToUserDetailQueryRequestV2 extends $pb.GeneratedMessage {
   $core.bool hasMapId() => $_has(0);
   @$pb.TagNumber(1)
   void clearMapId() => clearField(1);
-
-  @$pb.TagNumber(2)
-  $core.bool get isFullQuery => $_getBF(1);
-  @$pb.TagNumber(2)
-  set isFullQuery($core.bool v) { $_setBool(1, v); }
-  @$pb.TagNumber(2)
-  $core.bool hasIsFullQuery() => $_has(1);
-  @$pb.TagNumber(2)
-  void clearIsFullQuery() => clearField(2);
 }
 
 class ToUserDetailQueryReplyV2 extends $pb.GeneratedMessage {
@@ -699,20 +749,12 @@ class ToUserDetailQueryReplyV2 extends $pb.GeneratedMessage {
 class ToActionInfo extends $pb.GeneratedMessage {
   factory ToActionInfo({
     $core.int? actId,
-    $core.String? actName,
-    $core.int? totalControlNum,
     $core.Iterable<ToOrienteerInGameInfo>? userList,
   }) {
     final $result = create();
     if (actId != null) {
       $result.actId = actId;
     }
-    if (actName != null) {
-      $result.actName = actName;
-    }
-    if (totalControlNum != null) {
-      $result.totalControlNum = totalControlNum;
-    }
     if (userList != null) {
       $result.userList.addAll(userList);
     }
@@ -724,8 +766,6 @@ class ToActionInfo extends $pb.GeneratedMessage {
 
   static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToActionInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'toApp.v1'), createEmptyInstance: create)
     ..a<$core.int>(1, _omitFieldNames ? '' : 'actId', $pb.PbFieldType.O3, protoName: 'actId')
-    ..aOS(2, _omitFieldNames ? '' : 'actName', protoName: 'actName')
-    ..a<$core.int>(3, _omitFieldNames ? '' : 'totalControlNum', $pb.PbFieldType.O3, protoName: 'totalControlNum')
     ..pc<ToOrienteerInGameInfo>(4, _omitFieldNames ? '' : 'userList', $pb.PbFieldType.PM, protoName: 'userList', subBuilder: ToOrienteerInGameInfo.create)
     ..hasRequiredFields = false
   ;
@@ -760,6 +800,72 @@ class ToActionInfo extends $pb.GeneratedMessage {
   @$pb.TagNumber(1)
   void clearActId() => clearField(1);
 
+  ///   string actName = 2; //活动名称 ,isFullQuery为False时为空
+  ///  int32  totalControlNum = 3; //控制点数量,不包含开始点结束点,isFullQuery为False时为空
+  @$pb.TagNumber(4)
+  $core.List<ToOrienteerInGameInfo> get userList => $_getList(1);
+}
+
+/// 活动基本信息
+class ToActionBasicInfo extends $pb.GeneratedMessage {
+  factory ToActionBasicInfo({
+    $core.int? actId,
+    $core.String? actName,
+    $core.int? totalControlNum,
+  }) {
+    final $result = create();
+    if (actId != null) {
+      $result.actId = actId;
+    }
+    if (actName != null) {
+      $result.actName = actName;
+    }
+    if (totalControlNum != null) {
+      $result.totalControlNum = totalControlNum;
+    }
+    return $result;
+  }
+  ToActionBasicInfo._() : super();
+  factory ToActionBasicInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory ToActionBasicInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToActionBasicInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'toApp.v1'), createEmptyInstance: create)
+    ..a<$core.int>(1, _omitFieldNames ? '' : 'actId', $pb.PbFieldType.O3, protoName: 'actId')
+    ..aOS(2, _omitFieldNames ? '' : 'actName', protoName: 'actName')
+    ..a<$core.int>(3, _omitFieldNames ? '' : 'totalControlNum', $pb.PbFieldType.O3, protoName: 'totalControlNum')
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  ToActionBasicInfo clone() => ToActionBasicInfo()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  ToActionBasicInfo copyWith(void Function(ToActionBasicInfo) updates) => super.copyWith((message) => updates(message as ToActionBasicInfo)) as ToActionBasicInfo;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static ToActionBasicInfo create() => ToActionBasicInfo._();
+  ToActionBasicInfo createEmptyInstance() => create();
+  static $pb.PbList<ToActionBasicInfo> createRepeated() => $pb.PbList<ToActionBasicInfo>();
+  @$core.pragma('dart2js:noInline')
+  static ToActionBasicInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ToActionBasicInfo>(create);
+  static ToActionBasicInfo? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.int get actId => $_getIZ(0);
+  @$pb.TagNumber(1)
+  set actId($core.int v) { $_setSignedInt32(0, v); }
+  @$pb.TagNumber(1)
+  $core.bool hasActId() => $_has(0);
+  @$pb.TagNumber(1)
+  void clearActId() => clearField(1);
+
   @$pb.TagNumber(2)
   $core.String get actName => $_getSZ(1);
   @$pb.TagNumber(2)
@@ -777,28 +883,20 @@ class ToActionInfo extends $pb.GeneratedMessage {
   $core.bool hasTotalControlNum() => $_has(2);
   @$pb.TagNumber(3)
   void clearTotalControlNum() => clearField(3);
-
-  @$pb.TagNumber(4)
-  $core.List<ToOrienteerInGameInfo> get userList => $_getList(3);
 }
 
 class ToOrienteerInGameInfo extends $pb.GeneratedMessage {
   factory ToOrienteerInGameInfo({
     $core.int? userId,
-    OrienteerBaseInfo? baseInfo,
     OrienteerGpsInfo? gpsInfo,
     OrienteerHrInfo? hrInfo,
     OrienteerGameSaveInfo? gameSaveInfo,
-    CourseBaseInfo? courseBaseInfo,
     OrienteerOtherInfo? otherInfo,
   }) {
     final $result = create();
     if (userId != null) {
       $result.userId = userId;
     }
-    if (baseInfo != null) {
-      $result.baseInfo = baseInfo;
-    }
     if (gpsInfo != null) {
       $result.gpsInfo = gpsInfo;
     }
@@ -808,9 +906,6 @@ class ToOrienteerInGameInfo extends $pb.GeneratedMessage {
     if (gameSaveInfo != null) {
       $result.gameSaveInfo = gameSaveInfo;
     }
-    if (courseBaseInfo != null) {
-      $result.courseBaseInfo = courseBaseInfo;
-    }
     if (otherInfo != null) {
       $result.otherInfo = otherInfo;
     }
@@ -822,11 +917,9 @@ class ToOrienteerInGameInfo extends $pb.GeneratedMessage {
 
   static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToOrienteerInGameInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'toApp.v1'), createEmptyInstance: create)
     ..a<$core.int>(1, _omitFieldNames ? '' : 'UserId', $pb.PbFieldType.O3, protoName: 'UserId')
-    ..aOM<OrienteerBaseInfo>(2, _omitFieldNames ? '' : 'baseInfo', protoName: 'baseInfo', subBuilder: OrienteerBaseInfo.create)
     ..aOM<OrienteerGpsInfo>(3, _omitFieldNames ? '' : 'gpsInfo', protoName: 'gpsInfo', subBuilder: OrienteerGpsInfo.create)
     ..aOM<OrienteerHrInfo>(4, _omitFieldNames ? '' : 'hrInfo', protoName: 'hrInfo', subBuilder: OrienteerHrInfo.create)
     ..aOM<OrienteerGameSaveInfo>(5, _omitFieldNames ? '' : 'gameSaveInfo', protoName: 'gameSaveInfo', subBuilder: OrienteerGameSaveInfo.create)
-    ..aOM<CourseBaseInfo>(6, _omitFieldNames ? '' : 'courseBaseInfo', protoName: 'courseBaseInfo', subBuilder: CourseBaseInfo.create)
     ..aOM<OrienteerOtherInfo>(7, _omitFieldNames ? '' : 'otherInfo', protoName: 'otherInfo', subBuilder: OrienteerOtherInfo.create)
     ..hasRequiredFields = false
   ;
@@ -861,71 +954,134 @@ class ToOrienteerInGameInfo extends $pb.GeneratedMessage {
   @$pb.TagNumber(1)
   void clearUserId() => clearField(1);
 
-  @$pb.TagNumber(2)
-  OrienteerBaseInfo get baseInfo => $_getN(1);
-  @$pb.TagNumber(2)
-  set baseInfo(OrienteerBaseInfo v) { setField(2, v); }
-  @$pb.TagNumber(2)
-  $core.bool hasBaseInfo() => $_has(1);
-  @$pb.TagNumber(2)
-  void clearBaseInfo() => clearField(2);
-  @$pb.TagNumber(2)
-  OrienteerBaseInfo ensureBaseInfo() => $_ensure(1);
-
+  /// OrienteerBaseInfo baseInfo = 2; //用户基本信息,isFullQuery为False时为空
   @$pb.TagNumber(3)
-  OrienteerGpsInfo get gpsInfo => $_getN(2);
+  OrienteerGpsInfo get gpsInfo => $_getN(1);
   @$pb.TagNumber(3)
   set gpsInfo(OrienteerGpsInfo v) { setField(3, v); }
   @$pb.TagNumber(3)
-  $core.bool hasGpsInfo() => $_has(2);
+  $core.bool hasGpsInfo() => $_has(1);
   @$pb.TagNumber(3)
   void clearGpsInfo() => clearField(3);
   @$pb.TagNumber(3)
-  OrienteerGpsInfo ensureGpsInfo() => $_ensure(2);
+  OrienteerGpsInfo ensureGpsInfo() => $_ensure(1);
 
   @$pb.TagNumber(4)
-  OrienteerHrInfo get hrInfo => $_getN(3);
+  OrienteerHrInfo get hrInfo => $_getN(2);
   @$pb.TagNumber(4)
   set hrInfo(OrienteerHrInfo v) { setField(4, v); }
   @$pb.TagNumber(4)
-  $core.bool hasHrInfo() => $_has(3);
+  $core.bool hasHrInfo() => $_has(2);
   @$pb.TagNumber(4)
   void clearHrInfo() => clearField(4);
   @$pb.TagNumber(4)
-  OrienteerHrInfo ensureHrInfo() => $_ensure(3);
+  OrienteerHrInfo ensureHrInfo() => $_ensure(2);
 
   @$pb.TagNumber(5)
-  OrienteerGameSaveInfo get gameSaveInfo => $_getN(4);
+  OrienteerGameSaveInfo get gameSaveInfo => $_getN(3);
   @$pb.TagNumber(5)
   set gameSaveInfo(OrienteerGameSaveInfo v) { setField(5, v); }
   @$pb.TagNumber(5)
-  $core.bool hasGameSaveInfo() => $_has(4);
+  $core.bool hasGameSaveInfo() => $_has(3);
   @$pb.TagNumber(5)
   void clearGameSaveInfo() => clearField(5);
   @$pb.TagNumber(5)
-  OrienteerGameSaveInfo ensureGameSaveInfo() => $_ensure(4);
-
-  @$pb.TagNumber(6)
-  CourseBaseInfo get courseBaseInfo => $_getN(5);
-  @$pb.TagNumber(6)
-  set courseBaseInfo(CourseBaseInfo v) { setField(6, v); }
-  @$pb.TagNumber(6)
-  $core.bool hasCourseBaseInfo() => $_has(5);
-  @$pb.TagNumber(6)
-  void clearCourseBaseInfo() => clearField(6);
-  @$pb.TagNumber(6)
-  CourseBaseInfo ensureCourseBaseInfo() => $_ensure(5);
+  OrienteerGameSaveInfo ensureGameSaveInfo() => $_ensure(3);
 
+  /// CourseBaseInfo  courseBaseInfo = 6;//路线基本信息,isFullQuery为False时为空
   @$pb.TagNumber(7)
-  OrienteerOtherInfo get otherInfo => $_getN(6);
+  OrienteerOtherInfo get otherInfo => $_getN(4);
   @$pb.TagNumber(7)
   set otherInfo(OrienteerOtherInfo v) { setField(7, v); }
   @$pb.TagNumber(7)
-  $core.bool hasOtherInfo() => $_has(6);
+  $core.bool hasOtherInfo() => $_has(4);
   @$pb.TagNumber(7)
   void clearOtherInfo() => clearField(7);
   @$pb.TagNumber(7)
-  OrienteerOtherInfo ensureOtherInfo() => $_ensure(6);
+  OrienteerOtherInfo ensureOtherInfo() => $_ensure(4);
+}
+
+/// 用户基本信息
+class ToUserInActionBasicInfo extends $pb.GeneratedMessage {
+  factory ToUserInActionBasicInfo({
+    $core.int? userId,
+    OrienteerBaseInfo? baseInfo,
+    CourseBaseInfo? courseBaseInfo,
+  }) {
+    final $result = create();
+    if (userId != null) {
+      $result.userId = userId;
+    }
+    if (baseInfo != null) {
+      $result.baseInfo = baseInfo;
+    }
+    if (courseBaseInfo != null) {
+      $result.courseBaseInfo = courseBaseInfo;
+    }
+    return $result;
+  }
+  ToUserInActionBasicInfo._() : super();
+  factory ToUserInActionBasicInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+  factory ToUserInActionBasicInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+
+  static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'ToUserInActionBasicInfo', package: const $pb.PackageName(_omitMessageNames ? '' : 'toApp.v1'), createEmptyInstance: create)
+    ..a<$core.int>(1, _omitFieldNames ? '' : 'UserId', $pb.PbFieldType.O3, protoName: 'UserId')
+    ..aOM<OrienteerBaseInfo>(2, _omitFieldNames ? '' : 'baseInfo', protoName: 'baseInfo', subBuilder: OrienteerBaseInfo.create)
+    ..aOM<CourseBaseInfo>(6, _omitFieldNames ? '' : 'courseBaseInfo', protoName: 'courseBaseInfo', subBuilder: CourseBaseInfo.create)
+    ..hasRequiredFields = false
+  ;
+
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+  'Will be removed in next major version')
+  ToUserInActionBasicInfo clone() => ToUserInActionBasicInfo()..mergeFromMessage(this);
+  @$core.Deprecated(
+  'Using this can add significant overhead to your binary. '
+  'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+  'Will be removed in next major version')
+  ToUserInActionBasicInfo copyWith(void Function(ToUserInActionBasicInfo) updates) => super.copyWith((message) => updates(message as ToUserInActionBasicInfo)) as ToUserInActionBasicInfo;
+
+  $pb.BuilderInfo get info_ => _i;
+
+  @$core.pragma('dart2js:noInline')
+  static ToUserInActionBasicInfo create() => ToUserInActionBasicInfo._();
+  ToUserInActionBasicInfo createEmptyInstance() => create();
+  static $pb.PbList<ToUserInActionBasicInfo> createRepeated() => $pb.PbList<ToUserInActionBasicInfo>();
+  @$core.pragma('dart2js:noInline')
+  static ToUserInActionBasicInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<ToUserInActionBasicInfo>(create);
+  static ToUserInActionBasicInfo? _defaultInstance;
+
+  @$pb.TagNumber(1)
+  $core.int get userId => $_getIZ(0);
+  @$pb.TagNumber(1)
+  set userId($core.int v) { $_setSignedInt32(0, v); }
+  @$pb.TagNumber(1)
+  $core.bool hasUserId() => $_has(0);
+  @$pb.TagNumber(1)
+  void clearUserId() => clearField(1);
+
+  @$pb.TagNumber(2)
+  OrienteerBaseInfo get baseInfo => $_getN(1);
+  @$pb.TagNumber(2)
+  set baseInfo(OrienteerBaseInfo v) { setField(2, v); }
+  @$pb.TagNumber(2)
+  $core.bool hasBaseInfo() => $_has(1);
+  @$pb.TagNumber(2)
+  void clearBaseInfo() => clearField(2);
+  @$pb.TagNumber(2)
+  OrienteerBaseInfo ensureBaseInfo() => $_ensure(1);
+
+  @$pb.TagNumber(6)
+  CourseBaseInfo get courseBaseInfo => $_getN(2);
+  @$pb.TagNumber(6)
+  set courseBaseInfo(CourseBaseInfo v) { setField(6, v); }
+  @$pb.TagNumber(6)
+  $core.bool hasCourseBaseInfo() => $_has(2);
+  @$pb.TagNumber(6)
+  void clearCourseBaseInfo() => clearField(6);
+  @$pb.TagNumber(6)
+  CourseBaseInfo ensureCourseBaseInfo() => $_ensure(2);
 }
 
 class OrienteerBaseInfo extends $pb.GeneratedMessage {

+ 40 - 0
lib/generated/to_app_api.pbgrpc.dart

@@ -58,6 +58,14 @@ class ApiToAppClient extends $grpc.Client {
       '/toApp.v1.ApiToApp/ToUserDetailQueryV2',
       ($0.ToUserDetailQueryRequestV2 value) => value.writeToBuffer(),
       ($core.List<$core.int> value) => $0.ToUserDetailQueryReplyV2.fromBuffer(value));
+  static final _$toActionBasicQuery = $grpc.ClientMethod<$1.IdRequest, $0.ToActionBasicInfo>(
+      '/toApp.v1.ApiToApp/ToActionBasicQuery',
+      ($1.IdRequest value) => value.writeToBuffer(),
+      ($core.List<$core.int> value) => $0.ToActionBasicInfo.fromBuffer(value));
+  static final _$toUserInActionBasicQuery = $grpc.ClientMethod<$0.ToUserInActionBasicQueryRequest, $0.ToUserInActionBasicInfo>(
+      '/toApp.v1.ApiToApp/ToUserInActionBasicQuery',
+      ($0.ToUserInActionBasicQueryRequest value) => value.writeToBuffer(),
+      ($core.List<$core.int> value) => $0.ToUserInActionBasicInfo.fromBuffer(value));
   static final _$toRedisTest = $grpc.ClientMethod<$1.DefaultRequest, $0.ToOrienteerInGameInfo>(
       '/toApp.v1.ApiToApp/ToRedisTest',
       ($1.DefaultRequest value) => value.writeToBuffer(),
@@ -105,6 +113,14 @@ class ApiToAppClient extends $grpc.Client {
     return $createUnaryCall(_$toUserDetailQueryV2, request, options: options);
   }
 
+  $grpc.ResponseFuture<$0.ToActionBasicInfo> toActionBasicQuery($1.IdRequest request, {$grpc.CallOptions? options}) {
+    return $createUnaryCall(_$toActionBasicQuery, request, options: options);
+  }
+
+  $grpc.ResponseFuture<$0.ToUserInActionBasicInfo> toUserInActionBasicQuery($0.ToUserInActionBasicQueryRequest request, {$grpc.CallOptions? options}) {
+    return $createUnaryCall(_$toUserInActionBasicQuery, request, options: options);
+  }
+
   $grpc.ResponseFuture<$0.ToOrienteerInGameInfo> toRedisTest($1.DefaultRequest request, {$grpc.CallOptions? options}) {
     return $createUnaryCall(_$toRedisTest, request, options: options);
   }
@@ -178,6 +194,20 @@ abstract class ApiToAppServiceBase extends $grpc.Service {
         false,
         ($core.List<$core.int> value) => $0.ToUserDetailQueryRequestV2.fromBuffer(value),
         ($0.ToUserDetailQueryReplyV2 value) => value.writeToBuffer()));
+    $addMethod($grpc.ServiceMethod<$1.IdRequest, $0.ToActionBasicInfo>(
+        'ToActionBasicQuery',
+        toActionBasicQuery_Pre,
+        false,
+        false,
+        ($core.List<$core.int> value) => $1.IdRequest.fromBuffer(value),
+        ($0.ToActionBasicInfo value) => value.writeToBuffer()));
+    $addMethod($grpc.ServiceMethod<$0.ToUserInActionBasicQueryRequest, $0.ToUserInActionBasicInfo>(
+        'ToUserInActionBasicQuery',
+        toUserInActionBasicQuery_Pre,
+        false,
+        false,
+        ($core.List<$core.int> value) => $0.ToUserInActionBasicQueryRequest.fromBuffer(value),
+        ($0.ToUserInActionBasicInfo value) => value.writeToBuffer()));
     $addMethod($grpc.ServiceMethod<$1.DefaultRequest, $0.ToOrienteerInGameInfo>(
         'ToRedisTest',
         toRedisTest_Pre,
@@ -223,6 +253,14 @@ abstract class ApiToAppServiceBase extends $grpc.Service {
     return toUserDetailQueryV2(call, await request);
   }
 
+  $async.Future<$0.ToActionBasicInfo> toActionBasicQuery_Pre($grpc.ServiceCall call, $async.Future<$1.IdRequest> request) async {
+    return toActionBasicQuery(call, await request);
+  }
+
+  $async.Future<$0.ToUserInActionBasicInfo> toUserInActionBasicQuery_Pre($grpc.ServiceCall call, $async.Future<$0.ToUserInActionBasicQueryRequest> request) async {
+    return toUserInActionBasicQuery(call, await request);
+  }
+
   $async.Future<$0.ToOrienteerInGameInfo> toRedisTest_Pre($grpc.ServiceCall call, $async.Future<$1.DefaultRequest> request) async {
     return toRedisTest(call, await request);
   }
@@ -236,5 +274,7 @@ abstract class ApiToAppServiceBase extends $grpc.Service {
   $async.Future<$0.ToMapInfoV2> toMapDetailV2($grpc.ServiceCall call, $1.IdRequest request);
   $async.Stream<$1.BinaryPartV2> toGetBinaryByMd5($grpc.ServiceCall call, $0.ToGetBinaryByMd5Request request);
   $async.Future<$0.ToUserDetailQueryReplyV2> toUserDetailQueryV2($grpc.ServiceCall call, $0.ToUserDetailQueryRequestV2 request);
+  $async.Future<$0.ToActionBasicInfo> toActionBasicQuery($grpc.ServiceCall call, $1.IdRequest request);
+  $async.Future<$0.ToUserInActionBasicInfo> toUserInActionBasicQuery($grpc.ServiceCall call, $0.ToUserInActionBasicQueryRequest request);
   $async.Future<$0.ToOrienteerInGameInfo> toRedisTest($grpc.ServiceCall call, $1.DefaultRequest request);
 }

+ 55 - 18
lib/generated/to_app_api.pbjson.dart

@@ -13,6 +13,20 @@ import 'dart:convert' as $convert;
 import 'dart:core' as $core;
 import 'dart:typed_data' as $typed_data;
 
+@$core.Deprecated('Use toUserInActionBasicQueryRequestDescriptor instead')
+const ToUserInActionBasicQueryRequest$json = {
+  '1': 'ToUserInActionBasicQueryRequest',
+  '2': [
+    {'1': 'ActId', '3': 1, '4': 1, '5': 5, '10': 'ActId'},
+    {'1': 'UserId', '3': 2, '4': 1, '5': 5, '10': 'UserId'},
+  ],
+};
+
+/// Descriptor for `ToUserInActionBasicQueryRequest`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List toUserInActionBasicQueryRequestDescriptor = $convert.base64Decode(
+    'Ch9Ub1VzZXJJbkFjdGlvbkJhc2ljUXVlcnlSZXF1ZXN0EhQKBUFjdElkGAEgASgFUgVBY3RJZB'
+    'IWCgZVc2VySWQYAiABKAVSBlVzZXJJZA==');
+
 @$core.Deprecated('Use toGetBinaryByMd5RequestDescriptor instead')
 const ToGetBinaryByMd5Request$json = {
   '1': 'ToGetBinaryByMd5Request',
@@ -135,14 +149,12 @@ const ToUserDetailQueryRequestV2$json = {
   '1': 'ToUserDetailQueryRequestV2',
   '2': [
     {'1': 'mapId', '3': 1, '4': 1, '5': 5, '10': 'mapId'},
-    {'1': 'isFullQuery', '3': 2, '4': 1, '5': 8, '10': 'isFullQuery'},
   ],
 };
 
 /// Descriptor for `ToUserDetailQueryRequestV2`. Decode as a `google.protobuf.DescriptorProto`.
 final $typed_data.Uint8List toUserDetailQueryRequestV2Descriptor = $convert.base64Decode(
-    'ChpUb1VzZXJEZXRhaWxRdWVyeVJlcXVlc3RWMhIUCgVtYXBJZBgBIAEoBVIFbWFwSWQSIAoLaX'
-    'NGdWxsUXVlcnkYAiABKAhSC2lzRnVsbFF1ZXJ5');
+    'ChpUb1VzZXJEZXRhaWxRdWVyeVJlcXVlc3RWMhIUCgVtYXBJZBgBIAEoBVIFbWFwSWQ=');
 
 @$core.Deprecated('Use toUserDetailQueryReplyV2Descriptor instead')
 const ToUserDetailQueryReplyV2$json = {
@@ -162,42 +174,67 @@ const ToActionInfo$json = {
   '1': 'ToActionInfo',
   '2': [
     {'1': 'actId', '3': 1, '4': 1, '5': 5, '10': 'actId'},
-    {'1': 'actName', '3': 2, '4': 1, '5': 9, '10': 'actName'},
-    {'1': 'totalControlNum', '3': 3, '4': 1, '5': 5, '10': 'totalControlNum'},
     {'1': 'userList', '3': 4, '4': 3, '5': 11, '6': '.toApp.v1.ToOrienteerInGameInfo', '10': 'userList'},
   ],
 };
 
 /// Descriptor for `ToActionInfo`. Decode as a `google.protobuf.DescriptorProto`.
 final $typed_data.Uint8List toActionInfoDescriptor = $convert.base64Decode(
-    'CgxUb0FjdGlvbkluZm8SFAoFYWN0SWQYASABKAVSBWFjdElkEhgKB2FjdE5hbWUYAiABKAlSB2'
-    'FjdE5hbWUSKAoPdG90YWxDb250cm9sTnVtGAMgASgFUg90b3RhbENvbnRyb2xOdW0SOwoIdXNl'
-    'ckxpc3QYBCADKAsyHy50b0FwcC52MS5Ub09yaWVudGVlckluR2FtZUluZm9SCHVzZXJMaXN0');
+    'CgxUb0FjdGlvbkluZm8SFAoFYWN0SWQYASABKAVSBWFjdElkEjsKCHVzZXJMaXN0GAQgAygLMh'
+    '8udG9BcHAudjEuVG9PcmllbnRlZXJJbkdhbWVJbmZvUgh1c2VyTGlzdA==');
+
+@$core.Deprecated('Use toActionBasicInfoDescriptor instead')
+const ToActionBasicInfo$json = {
+  '1': 'ToActionBasicInfo',
+  '2': [
+    {'1': 'actId', '3': 1, '4': 1, '5': 5, '10': 'actId'},
+    {'1': 'actName', '3': 2, '4': 1, '5': 9, '10': 'actName'},
+    {'1': 'totalControlNum', '3': 3, '4': 1, '5': 5, '10': 'totalControlNum'},
+  ],
+};
+
+/// Descriptor for `ToActionBasicInfo`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List toActionBasicInfoDescriptor = $convert.base64Decode(
+    'ChFUb0FjdGlvbkJhc2ljSW5mbxIUCgVhY3RJZBgBIAEoBVIFYWN0SWQSGAoHYWN0TmFtZRgCIA'
+    'EoCVIHYWN0TmFtZRIoCg90b3RhbENvbnRyb2xOdW0YAyABKAVSD3RvdGFsQ29udHJvbE51bQ==');
 
 @$core.Deprecated('Use toOrienteerInGameInfoDescriptor instead')
 const ToOrienteerInGameInfo$json = {
   '1': 'ToOrienteerInGameInfo',
   '2': [
     {'1': 'UserId', '3': 1, '4': 1, '5': 5, '10': 'UserId'},
-    {'1': 'baseInfo', '3': 2, '4': 1, '5': 11, '6': '.toApp.v1.OrienteerBaseInfo', '10': 'baseInfo'},
     {'1': 'gpsInfo', '3': 3, '4': 1, '5': 11, '6': '.toApp.v1.OrienteerGpsInfo', '10': 'gpsInfo'},
     {'1': 'hrInfo', '3': 4, '4': 1, '5': 11, '6': '.toApp.v1.OrienteerHrInfo', '10': 'hrInfo'},
     {'1': 'gameSaveInfo', '3': 5, '4': 1, '5': 11, '6': '.toApp.v1.OrienteerGameSaveInfo', '10': 'gameSaveInfo'},
-    {'1': 'courseBaseInfo', '3': 6, '4': 1, '5': 11, '6': '.toApp.v1.CourseBaseInfo', '10': 'courseBaseInfo'},
     {'1': 'otherInfo', '3': 7, '4': 1, '5': 11, '6': '.toApp.v1.OrienteerOtherInfo', '10': 'otherInfo'},
   ],
 };
 
 /// Descriptor for `ToOrienteerInGameInfo`. Decode as a `google.protobuf.DescriptorProto`.
 final $typed_data.Uint8List toOrienteerInGameInfoDescriptor = $convert.base64Decode(
-    'ChVUb09yaWVudGVlckluR2FtZUluZm8SFgoGVXNlcklkGAEgASgFUgZVc2VySWQSNwoIYmFzZU'
-    'luZm8YAiABKAsyGy50b0FwcC52MS5PcmllbnRlZXJCYXNlSW5mb1IIYmFzZUluZm8SNAoHZ3Bz'
-    'SW5mbxgDIAEoCzIaLnRvQXBwLnYxLk9yaWVudGVlckdwc0luZm9SB2dwc0luZm8SMQoGaHJJbm'
-    'ZvGAQgASgLMhkudG9BcHAudjEuT3JpZW50ZWVySHJJbmZvUgZockluZm8SQwoMZ2FtZVNhdmVJ'
-    'bmZvGAUgASgLMh8udG9BcHAudjEuT3JpZW50ZWVyR2FtZVNhdmVJbmZvUgxnYW1lU2F2ZUluZm'
-    '8SQAoOY291cnNlQmFzZUluZm8YBiABKAsyGC50b0FwcC52MS5Db3Vyc2VCYXNlSW5mb1IOY291'
-    'cnNlQmFzZUluZm8SOgoJb3RoZXJJbmZvGAcgASgLMhwudG9BcHAudjEuT3JpZW50ZWVyT3RoZX'
-    'JJbmZvUglvdGhlckluZm8=');
+    'ChVUb09yaWVudGVlckluR2FtZUluZm8SFgoGVXNlcklkGAEgASgFUgZVc2VySWQSNAoHZ3BzSW'
+    '5mbxgDIAEoCzIaLnRvQXBwLnYxLk9yaWVudGVlckdwc0luZm9SB2dwc0luZm8SMQoGaHJJbmZv'
+    'GAQgASgLMhkudG9BcHAudjEuT3JpZW50ZWVySHJJbmZvUgZockluZm8SQwoMZ2FtZVNhdmVJbm'
+    'ZvGAUgASgLMh8udG9BcHAudjEuT3JpZW50ZWVyR2FtZVNhdmVJbmZvUgxnYW1lU2F2ZUluZm8S'
+    'OgoJb3RoZXJJbmZvGAcgASgLMhwudG9BcHAudjEuT3JpZW50ZWVyT3RoZXJJbmZvUglvdGhlck'
+    'luZm8=');
+
+@$core.Deprecated('Use toUserInActionBasicInfoDescriptor instead')
+const ToUserInActionBasicInfo$json = {
+  '1': 'ToUserInActionBasicInfo',
+  '2': [
+    {'1': 'UserId', '3': 1, '4': 1, '5': 5, '10': 'UserId'},
+    {'1': 'baseInfo', '3': 2, '4': 1, '5': 11, '6': '.toApp.v1.OrienteerBaseInfo', '10': 'baseInfo'},
+    {'1': 'courseBaseInfo', '3': 6, '4': 1, '5': 11, '6': '.toApp.v1.CourseBaseInfo', '10': 'courseBaseInfo'},
+  ],
+};
+
+/// Descriptor for `ToUserInActionBasicInfo`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List toUserInActionBasicInfoDescriptor = $convert.base64Decode(
+    'ChdUb1VzZXJJbkFjdGlvbkJhc2ljSW5mbxIWCgZVc2VySWQYASABKAVSBlVzZXJJZBI3CghiYX'
+    'NlSW5mbxgCIAEoCzIbLnRvQXBwLnYxLk9yaWVudGVlckJhc2VJbmZvUghiYXNlSW5mbxJACg5j'
+    'b3Vyc2VCYXNlSW5mbxgGIAEoCzIYLnRvQXBwLnYxLkNvdXJzZUJhc2VJbmZvUg5jb3Vyc2VCYX'
+    'NlSW5mbw==');
 
 @$core.Deprecated('Use orienteerBaseInfoDescriptor instead')
 const OrienteerBaseInfo$json = {

+ 3 - 3
lib/service/api.dart

@@ -40,8 +40,8 @@ class ApiService extends GetxService{
       GlobalVar.apiHost,
       port: GlobalVar.apiPort,
       options: const ChannelOptions(credentials:
-      // ChannelCredentials.secure()
-      ChannelCredentials.insecure()
+      ChannelCredentials.secure()
+      // ChannelCredentials.insecure()
       ),
     );
   }
@@ -57,7 +57,7 @@ class ApiService extends GetxService{
     if (token != null) {
       metadata['token'] = token!;
     }
-    debug("token: $token");
+    // debug("token: $token");
 
     return pb.ApiToAppClient(channel??this.channel!,
         options: CallOptions(

+ 93 - 2
lib/service/map_watch.dart

@@ -1,16 +1,106 @@
+import 'package:common_pub/model/distance.dart';
+import 'package:common_pub/model/pace.dart';
+import 'package:common_pub/model/position.dart';
 import 'package:common_pub/service/controller.dart';
 import 'package:common_pub/ui/map_view/map_view.dart';
-import '../service/api.dart';
+import 'package:common_pub/ui/map_view/view_map_trace.dart';
+import '../service/api.dart' as pb;
 import 'package:fixnum/fixnum.dart';
 
+
 typedef MapId = Int64;
 
+
+class ActiveInfo{
+  var id = 0;
+  var name = '';
+  var cpAllCount = 0;
+  var userList = <UserInfo>[];
+  final isHide = false.obs;
+
+  UserInfo? getUserById(int id){
+    for (final one in userList){
+      if(one.gameInfo.userId==id){
+        return one;
+      }
+    }
+
+    return null;
+  }
+
+  Future<UserInfo> newUserInfo(pb.ToOrienteerInGameInfo info)async{
+    final r =await pb.ApiService.to.stub.toUserInActionBasicQuery(pb.ToUserInActionBasicQueryRequest(
+      actId: id,
+      userId: info.userId
+    ));
+
+    return UserInfo()
+      ..routeInfo = r.courseBaseInfo
+      ..userInfo = r.baseInfo
+      ..gameInfo = info
+    ;
+  }
+
+
+}
+extension ActiveInfoExt on pb.ToActionInfo{
+  Future<ActiveInfo> into() async {
+    final info = await pb.ApiService.to.stub.toActionBasicQuery(
+        pb.IdRequest(id: Int64(actId)));
+
+    final out = ActiveInfo()
+      ..id = actId
+      ..name = info.actName
+      ..cpAllCount = info.totalControlNum;
+
+
+    for(final one in userList){
+      out.userList.add(await out.newUserInfo(one));
+    }
+
+    return out;
+  }
+}
+
+
+class UserInfo{
+  final isHide = false.obs;
+  String get name => userInfo.name;
+  String get routeName => routeInfo.courseName;
+  Pace get pace => Pace.perKm( gameInfo.gpsInfo.pace.seconds);
+  Duration get duration => Duration(seconds: gameInfo.gameSaveInfo.duration.seconds.toInt());
+  Distance get distance => Distance(m: gameInfo.gpsInfo.distance.toDouble());
+  var gameInfo = pb.ToOrienteerInGameInfo();
+  var routeInfo = pb.CourseBaseInfo();
+  var userInfo = pb.OrienteerBaseInfo();
+  var trace = <TracePoint>[].obs;
+  Distance get nextDistance {
+    final next = gameInfo.gameSaveInfo.nextControlPoint;
+
+    for (final one in routeInfo.controlPointSortedList){
+      if(one.id==next.id){
+        final p1 = Position(longitude: one.ciPosition.longitude, latitude: one.ciPosition.latitude);
+        final p22 = gameInfo.gpsInfo.gameGpsInfos.lastOrNull;
+        if(p22 == null){
+          break;
+        }
+
+        final p2 = Position(longitude: p22.longitude, latitude: p22.latitude);
+        return p1.distance(p2);
+      }
+    }
+
+    return const Distance(m: 1000);
+  }
+}
+
+
 class MapWatchService extends PlugController{
   static final Rx<MapWatchService?> _instance = Rx(null);
   static MapWatchService? get instance => _instance.value;
 
   static Future<void> setMapById(MapId id)async{
-    final info = await ApiService.to.stub.toMapDetailV2(IdRequest()
+    final info = await pb.ApiService.to.stub.toMapDetailV2(pb.IdRequest()
       ..id = id);
 
     final thisInstance = MapWatchService(
@@ -29,4 +119,5 @@ class MapWatchService extends PlugController{
   final MapId id;
   String name= '';
   final plugMap = PlugMap();
+  final activeList = <ActiveInfo>[].obs;
 }

+ 115 - 4
lib/view/home/field_control/field_control.dart

@@ -3,6 +3,7 @@ import 'package:common_pub/ui/map_view/map_view.dart';
 import 'package:common_pub/ui/map_view/view_map_image.dart';
 import 'package:common_pub/ui/map_view/view_map_touch.dart';
 import 'package:common_pub/ui/map_view/view_plug_loading.dart';
+import 'package:common_pub/utils.dart';
 import 'field_control_controller.dart';
 
 
@@ -75,23 +76,133 @@ class _ActiveInfoView extends GetView<FieldControlController>{
   }
 
   Widget activeView(ActiveInfo info){
+    final children = <Widget>[
+      Row(children: [
+        Text('${info.name} (${info.userList.length}人)'),
+        const Spacer(),
+        IconButton(onPressed: (){}, icon: const Icon(Icons.arrow_drop_up))
+      ]),
+      Container(
+        decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)),
+        padding: const EdgeInsets.fromLTRB(26, 11, 26, 11),
+        child: Row(
+          children: [
+            Text('广播'),
+            const Spacer(),
+            Image.asset(Assets.imagesIcCp, height: 20, width: 20),
+            Text(' ${info.cpAllCount}'),
+            const Spacer(),
+            Text('全部隐藏'),
+          ],
+        ),
+      )
+    ];
+    children.addAll(info.userList.map((e) => _UserInfoView(data: e)).toList());
+
+
     return Container(
       decoration: BoxDecoration(color: const Color(0xffe0e0e0), borderRadius: BorderRadius.circular(5)),
       margin: const EdgeInsets.fromLTRB(9, 12, 9, 12),
       padding: const EdgeInsets.all(9),
       child: Column(
-        children: [
-          Row(children: [
-            Text('${info.name} (${info.userList.length}人)'),
+        children: children,
+      ),
+    );
+  }
+}
+
+class _UserInfoView extends GetView<FieldControlController>{
+  const _UserInfoView({required this.data});
 
-          ]),
+  final UserInfo data;
+
+  @override
+  Widget build(BuildContext context) {
+    return Container(
+      decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(5)),
+      padding: const EdgeInsets.fromLTRB(7, 11, 7, 11),
+      margin: const EdgeInsets.only(top: 5),
+      child: Row(
+        crossAxisAlignment: CrossAxisAlignment.start,
+        children: [
+          Container(
+              margin: const EdgeInsets.only(top: 2),
+              decoration: BoxDecoration(color: Colors.blue, borderRadius: BorderRadius.circular(4)),
+              width: 7, height: 16),
+          const SizedBox(width: 8,),
+          Expanded(child: Column(
+            crossAxisAlignment: CrossAxisAlignment.start,
+            children: [
+              Text.rich(TextSpan(text: data.name,  children: [
+                TextSpan(text: ' [${data.routeName}]')
+              ])),
+              const SizedBox(height: 5),
+              Row(
+                children: [
+                  container(null, cpInfo, Colors.blue),
+                  container(const Icon(Icons.favorite, size: 13, color: Colors.white,), hrInfo, Colors.blue),
+                  container(null, paceInfo, Colors.blue)
+                ],
+              ),
+              const SizedBox(height: 5),
+              Row(
+                mainAxisAlignment: MainAxisAlignment.spaceBetween,
+                children: [
+                  Text('距离 ${data.nextDistance.toString()}'),
+                  Text('时间 ${data.duration.toAppString()}'),
+                  Text('里程 ${data.distance.toString()}'),
+                ],
+              )
+            ],
+          )),
+          GestureDetector(
+            onTap: (){
+              data.isHide.value=!data.isHide.value;
+            },
+            child: Obx(()=> Icon(
+              data.isHide.value?
+              Icons.visibility_off
+                  :Icons.visibility,
+              color: data.isHide.value? Colors.grey: const Color(0xffffbb77),)) ,
+          )
         ],
       ),
     );
   }
+  String get hrInfo{
+    return ' ${data.gameInfo.hrInfo.hrInfo.lastOrNull??0}';
+  }
+  String get cpInfo{
+    final next = data.gameInfo.gameSaveInfo.nextControlPoint;
+    return '${next.orderNo}号点(${next.sn})';
+  }
+  String get paceInfo{
+    Duration;
+    return '${data.pace.toMinSecondString()}/km';
+  }
+
+  Widget container(Widget? icon, String text, Color color){
+    final children = <Widget>[];
+    if(icon!= null){
+      children.add(icon);
+    }
+    children.add(Text(text, style: const TextStyle(color: Colors.white, fontSize: 14)));
+
+    return Container(
+      height: 18,
+      padding: const EdgeInsets.fromLTRB(12, 0, 12, 0),
+      margin: const EdgeInsets.only(right: 10),
+      alignment: Alignment.center,
+      decoration: BoxDecoration(color: color, borderRadius: BorderRadius.circular(9)),
+      child: Row(
+        children: children,
+      ),
+    );
+  }
 
 }
 
+
 class _MsgView extends GetView<FieldControlController>{
 
   @override

+ 22 - 64
lib/view/home/field_control/field_control_controller.dart

@@ -6,45 +6,26 @@ import '../home_controller.dart';
 export 'package:application/service/map_watch.dart';
 
 
-class ActiveInfo{
-  var id = 0;
-  var name = '';
-  var cpAllCount = 0;
-  var userList = <UserInfo>[];
-
-  UserInfo? getUserById(int id){
-    for (final one in userList){
-      if(one.data.userId==id){
-        return one;
+extension ActiveInfoExt2 on ActiveInfo{
+  Future<void> update(ToActionInfo info) async {
+    final newUserList = <UserInfo>[];
+
+    for (final nUser in info.userList) {
+      late UserInfo user;
+      final oUser = getUserById(nUser.userId);
+      if (oUser != null) {
+        user = oUser;
+        user.gameInfo = nUser;
+      }else{
+        user = await newUserInfo(nUser);
       }
-    }
 
-    return null;
+      newUserList.add(user);
+    }
+    userList = newUserList;
   }
 }
 
-class UserInfo{
-  var data = ToOrienteerInGameInfo();
-}
-
-
-extension ActiveInfoExt on ToActionInfo{
-  ActiveInfo into(){
-    return ActiveInfo()
-      ..id = actId
-      ..name = actName
-      ..cpAllCount=totalControlNum
-      ..userList = userList.map((e) => e.into()).toList()
-    ;
-  }
-}
-extension UserInfoExt on ToOrienteerInGameInfo{
-  UserInfo into(){
-    return UserInfo()
-      ..data = this
-    ;
-  }
-}
 
 class FieldControlController extends GetxController{
   HomeController get _home => Get.find();
@@ -58,7 +39,6 @@ class FieldControlController extends GetxController{
   }
 
   Future<void> workFlushData()async{
-    await flushDataFirstTime();
     while(!isClosed){
       try{
         await flushData();
@@ -69,16 +49,6 @@ class FieldControlController extends GetxController{
     }
   }
 
-  Future<void> flushDataFirstTime()async{
-    final r = await ApiService.to.stub.toUserDetailQueryV2(
-        ToUserDetailQueryRequestV2(
-          mapId: mapWatch?.id.toInt(),
-          isFullQuery: true,
-        ));
-
-    activeList.value = r.list.map((e) => e.into()).toList();
-  }
-
   ActiveInfo? getActiveById(int id){
     for (final one in activeList){
       if(one.id==id){
@@ -95,27 +65,15 @@ class FieldControlController extends GetxController{
     final newList = <ActiveInfo>[];
 
     for(final one in r.list){
-      final act = one.into();
-      final old = getActiveById(act.id);
+      late ActiveInfo info;
+      final old = getActiveById(one.actId);
       if(old != null){
-        act.name=old.name;
-        act.cpAllCount=old.cpAllCount;
-        for(final user in act.userList){
-          final oUser = old.getUserById(user.data.userId);
-          if(oUser != null){
-            user.data = ToOrienteerInGameInfo(
-              userId: user.data.userId,
-              baseInfo: oUser.data.baseInfo,
-              gpsInfo: user.data.gpsInfo,
-              hrInfo: user.data.hrInfo,
-              gameSaveInfo: user.data.gameSaveInfo,
-              courseBaseInfo: oUser.data.courseBaseInfo,
-              otherInfo: user.data.otherInfo,
-            );
-          }
-        }
+        info = old;
+        await info.update(one);
+      }else{
+        info = await one.into();
       }
-      newList.add(act);
+      newList.add(info);
     }
 
     activeList.value = newList;

+ 1 - 4
lib/view/home/user_manage/user_manage_controller.dart

@@ -28,7 +28,6 @@ extension ToActionInfoExt on ToActionInfo{
   ActiveInfo toActiveInfo(){
     return ActiveInfo()
       ..id=actId
-      ..name=actName
       ..userList=userList.map((e) => e.toUserInfo()).toList();
   }
 }
@@ -51,7 +50,6 @@ class UserInfo{
 extension ToOrienteerInGameInfoExt on ToOrienteerInGameInfo{
   UserInfo toUserInfo(){
     return UserInfo()
-      ..name=baseInfo.name
       ..startAt=gameSaveInfo.hasStartAt()? gameSaveInfo.startAt.toDateTime(toLocal: true): null;
   }
 }
@@ -67,8 +65,7 @@ class UserManageController extends GetxController{
   Future<void> flushData()async{
     await tryApi(() async{
       final r = await ApiService.to.stub.toUserDetailQueryV2(ToUserDetailQueryRequestV2()
-        ..mapId=MapWatchService.instance?.id.toInt()??0
-        ..isFullQuery=false);
+        ..mapId=MapWatchService.instance?.id.toInt()??0);
       activeList.value = r.list.map((e) => e.toActiveInfo()).toList();
       activeList.value = [
         ActiveInfo()

+ 1 - 1
protos/app_api

@@ -1 +1 @@
-Subproject commit bbb1a6727d8643906a2949c9c3333a6da8e7135a
+Subproject commit b3e499829e85be6a2b06feaffd5fefdaf8dff59f