Sfoglia il codice sorgente

修改举报位置

iOS_cz 4 anni fa
parent
commit
697ac6350e

+ 11 - 11
lib/internal/bbs/page/chat_room.dart

@@ -452,17 +452,17 @@ class _ChatDetailPageState extends State<ChatDetailPage> {
         Scaffold(
       appBar: MyAppBar(
         centerTitle: widget.title,
-        actions: [
-          new FlatButton(
-            onPressed: () {
-              Navigator.of(context).push(MaterialPageRoute(
-                  builder: (context) => JuBaoPage(
-                        toUserId: widget.jubaoToUserId,
-                      )));
-            },
-            child: Text("举报"),
-          ),
-        ],
+        // actions: [
+        //   new FlatButton(
+        //     onPressed: () {
+        //       Navigator.of(context).push(MaterialPageRoute(
+        //           builder: (context) => JuBaoPage(
+        //                 toUserId: widget.jubaoToUserId,
+        //               )));
+        //     },
+        //     child: Text("举报"),
+        //   ),
+        // ],
         // onPressed:(){
         //   NavigatorUtils.push(context, FriendsRouter.friendsList);
         // }

+ 43 - 2
lib/internal/friends/page/near_detail.dart

@@ -1,5 +1,6 @@
 import 'package:flutter/material.dart';
 import 'package:liftmanager/internal/bbs/page/chat_room.dart';
+import 'package:liftmanager/internal/bbs/page/jubao_page.dart';
 import 'package:liftmanager/net/api_service.dart';
 import 'package:liftmanager/res/iconfont.dart';
 import 'package:liftmanager/utils/toast.dart';
@@ -56,7 +57,12 @@ class NearDetailState extends State<NearDetail> {
         context,
         MaterialPageRoute(
           builder: (_) => ChatDetailPage(
-              id: roomId, type: 'nearToOne', toUserId: id, title: name, jubaoToUserId: widget.friendModel.targetUserId,),
+            id: roomId,
+            type: 'nearToOne',
+            toUserId: id,
+            title: name,
+            jubaoToUserId: widget.friendModel.targetUserId,
+          ),
         ),
       );
     }, onError: (code, msg) {
@@ -179,6 +185,41 @@ class NearDetailState extends State<NearDetail> {
               ),
             ),
           ),
+          GestureDetector(
+            onTap: () async {
+              Navigator.of(context).push(MaterialPageRoute(
+                  builder: (context) => JuBaoPage(
+                        toUserId: widget.friendModel.targetUserId,
+                      )));
+            },
+            child: Container(
+              color: Colors.white,
+              height: 50,
+              child: Row(
+                children: [
+                  SizedBox(
+                    width: 10,
+                  ),
+                  Text(
+                    '举报',
+                    style: TextStyle(
+                      color: Color(0xff333333),
+                      fontSize: 14,
+                    ),
+                  ),
+                  Spacer(),
+                  Icon(
+                    Iconfont.gengduo,
+                    color: Color(0xffcccccc),
+                    size: 14,
+                  ),
+                  SizedBox(
+                    width: 10,
+                  ),
+                ],
+              ),
+            ),
+          ),
           Divider(
             height: 5,
             thickness: 5,
@@ -200,7 +241,7 @@ class NearDetailState extends State<NearDetail> {
                           id: widget.friendModel.sessionid,
                           type: 'nearToOne',
                           toUserId: widget.friendModel.userId,
-                           jubaoToUserId: widget.friendModel.targetUserId,
+                          jubaoToUserId: widget.friendModel.targetUserId,
                           title: widget.friendModel.remarks ??
                               widget.friendModel.userName),
                     ),