Przeglądaj źródła

修改举报需求一些调整。

zhoukun 6 miesięcy temu
rodzic
commit
92de6ea1b2

+ 1 - 1
lib/module/news/news_controller.dart

@@ -119,7 +119,7 @@ class NewsController extends BaseController {
                 Assets.images.iconNewsReport.image(width:20.w,height: 20.w),
                 SizedBox(width: 6.w,),
                 Text(
-                  '举报昵称',
+                  '举报',
                   style: TextStyle(
                       fontSize: 13.sp, color: "#333333".color, fontWeight: FontWeight.w400),
                 ),

+ 1 - 1
lib/module/news/news_list_item.dart

@@ -11,7 +11,7 @@ import '../../utils/date_util.dart';
 
 typedef MessageFunCallback = void Function(MessageInfo info);
 
-Widget buildMessageInfoItem(MessageInfo item, VoidCallback onReportEvent,MessageFunCallback callback) {
+Widget buildMessageInfoItem(MessageInfo item,MessageFunCallback callback,{VoidCallback? onReportEvent}) {
   return buildMessageItem(Assets.images.iconDefaultFriendAvatar.provider(),
       title: item.senderPhone ?? '',
       content: getMessageContentTxt(item.type),

+ 3 - 3
lib/module/news/news_page.dart

@@ -163,9 +163,9 @@ class NewsPage extends BasePage<NewsController> {
   Widget buildNewsItem(BuildContext context, int index) {
     final item = controller.messageList[index];
     return buildMessageInfoItem(
-        item,
-        () => controller.onReportEventClick(),
-            (info) => controller.onMessageFunClick(info));
+        item, (info) => controller.onMessageFunClick(info),
+        onReportEvent: (item.type == 3 || item.type == 4) ? controller.onReportEventClick : null
+    );
   }
 
   Widget buildNoMessageView() {

+ 1 - 15
lib/module/news/news_report/news_report_controller.dart

@@ -17,11 +17,6 @@ class NewsReportController extends BaseController {
   late TextEditingController reportContetnController;
   late String reportContentString;
 
-  ///用户的基本信息
-  late TextEditingController reportTitleContetnController;
-  late String reportTitleString;
-
-
   RxBool submitBuEnble = RxBool(false);
 
   @override
@@ -30,8 +25,6 @@ class NewsReportController extends BaseController {
     super.onInit();
     reportContetnController = TextEditingController(text:"");
     reportContentString = "";
-    reportTitleContetnController = TextEditingController(text:"用户昵称有违规现象");
-    reportTitleString = "用户昵称有违规现象";
   }
 
   @override
@@ -50,15 +43,8 @@ class NewsReportController extends BaseController {
     onTextInputChange();
   }
 
-  void inputTitleText(String inpustr) {
-    reportTitleString = inpustr;
-    onTextInputChange();
-  }
-
-
   void onTextInputChange() {
-    print('sfdsdffdfdfd: ${reportTitleString.length}');
-    if (reportContentString.length > 3 && reportContentString.length < 500 && reportTitleString.length > 0) {
+    if (reportContentString.length > 3 && reportContentString.length < 500) {
        submitBuEnble.value = true;
      } else {
        submitBuEnble.value = false;

+ 0 - 49
lib/module/news/news_report/news_report_page.dart

@@ -66,55 +66,6 @@ class NewsReportPage extends BasePage<NewsReportController> {
                   },
                 ),
               ),
-              SizedBox(height: 20.w,),
-              Row(
-                children: [
-                  Text("*",
-                      style: TextStyle(
-                          fontSize: 14.sp,
-                          color: '#FF3C3C'.color,
-                          fontWeight: FontWeight.w500)),
-                  Text("违规原因",
-                      style: TextStyle(
-                          fontSize: 14.sp,
-                          color: "#333333".color,
-                          fontWeight: FontWeight.w500))
-                ],
-              ),
-              SizedBox(height: 10.w,),
-              Container(
-                height: 44.w,
-                color: ColorName.white,
-                child: TextField(
-                  controller: controller.reportTitleContetnController,
-                  onChanged: (text ) {
-                    controller.inputTitleText(text);
-                  },
-                  decoration:  InputDecoration(
-                    hintText: "请输入违规原因",
-                    border:  OutlineInputBorder(
-                      borderSide: BorderSide(
-                        color: "#12C2C2C2".color,
-                        width: 1.0,
-                      ),
-                    ),
-                    enabledBorder:  OutlineInputBorder(
-                      borderSide: BorderSide(
-                        color: "#12C2C2C2".color,
-                        width: 1.0,
-                      ),
-                    ),
-                    focusedBorder: OutlineInputBorder(
-                      borderSide: BorderSide(
-                        color: "#12C2C2C2".color,
-                        width: 1.0,
-                      ),
-                    ),
-                    // errorText: _errorText,
-                    // counterText: '$_currentLength/${widget.maxLength}', // 显示字数统计
-                  ),
-                ),
-              ),
               SizedBox(height: 30.w,),
               Container(
                 child: Obx(() {

+ 5 - 5
lib/module/news/news_report/news_repost_text_view.dart

@@ -14,7 +14,7 @@ class NewsRepostTextView extends StatefulWidget {
     Key? key,
     this.initialValue,
     required this.controller,
-    this.hintText = '请输入用户所违规的场景中,让你感到不适的地方(3~500字以内)',
+    this.hintText = '请输入举报原因,确保您提交的信息真实、客观,且符合中华人民共和国相关法律法规。我们将由专门的审核团队对您提供的内容进行核查并第一时间处理。',
     this.onChanged,
     this.onSubmitted,
     this.minLength = 3,
@@ -66,7 +66,7 @@ class _NewsRepostTextViewState extends State<NewsRepostTextView> {
   String get _lengthStatusText {
     if (_currentLength < widget.minLength) {
       return '至少输入${widget.minLength}个字';
-    } else if (_currentLength > widget.maxLength) {
+    } else if (_currentLength >= widget.maxLength) {
       return '已超出最大字数限制';
     } else {
       return '${_currentLength}/${widget.maxLength}';
@@ -104,6 +104,9 @@ class _NewsRepostTextViewState extends State<NewsRepostTextView> {
             keyboardType: TextInputType.multiline,
             decoration: InputDecoration(
               hintText: widget.hintText,
+              hintStyle: TextStyle(
+                color: Colors.grey
+              ),
               border:  OutlineInputBorder(
                 borderSide: BorderSide(
                   color: "#12C2C2C2".color,
@@ -116,9 +119,6 @@ class _NewsRepostTextViewState extends State<NewsRepostTextView> {
                   width: 1.0,
                 ),
               ),
-
-
-
               focusedBorder: OutlineInputBorder(
                   borderSide: BorderSide(
                     color: _isValid ? "#12C2C2C2".color : Colors.red,