|
|
|
@ -27,7 +27,7 @@ class _ReportPage extends State<ReportPage> {
|
|
|
|
|
ApiService apiService; |
|
|
|
|
int textLength = 0; |
|
|
|
|
final TextEditingController editingController = TextEditingController(); |
|
|
|
|
String textContext; |
|
|
|
|
String textCon; |
|
|
|
|
String userName; |
|
|
|
|
String authorId; |
|
|
|
|
|
|
|
|
@ -48,14 +48,13 @@ class _ReportPage extends State<ReportPage> {
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
BaseData baseData = await apiService.complaint({ |
|
|
|
|
"content": editingController.text, |
|
|
|
|
"informationId":authorId, |
|
|
|
|
"content": checkIndex == 9 ? editingController.text : textCon, |
|
|
|
|
"informationId": authorId, |
|
|
|
|
}).catchError((onError) {}); |
|
|
|
|
if (baseData != null && baseData.isSuccess) { |
|
|
|
|
Navigator.of(context) |
|
|
|
|
.pushNamed('/router/report_success'); |
|
|
|
|
Navigator.of(context).popAndPushNamed('/router/report_success'); |
|
|
|
|
} else { |
|
|
|
|
SmartDialog.showToast(baseData.msg,alignment: Alignment.center); |
|
|
|
|
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -117,11 +116,12 @@ class _ReportPage extends State<ReportPage> {
|
|
|
|
|
), |
|
|
|
|
reportContent(), |
|
|
|
|
SizedBox(height: 12), |
|
|
|
|
if(checkIndex == 9) |
|
|
|
|
if (checkIndex == 9) |
|
|
|
|
Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
height: 186.h, |
|
|
|
|
margin: EdgeInsets.only(right: 16, left: 40, bottom: 100), |
|
|
|
|
margin: |
|
|
|
|
EdgeInsets.only(right: 16, left: 40, bottom: 100), |
|
|
|
|
decoration: new BoxDecoration( |
|
|
|
|
color: Color(0xFFF7F7F7), |
|
|
|
|
borderRadius: BorderRadius.circular(4.0), |
|
|
|
@ -180,6 +180,10 @@ class _ReportPage extends State<ReportPage> {
|
|
|
|
|
Expanded( |
|
|
|
|
child: GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
if(checkIndex == 9 && editingController.text == ""){ |
|
|
|
|
SmartDialog.showToast("请输入举报原因", alignment: Alignment.center); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
report(); |
|
|
|
|
}, |
|
|
|
|
child: Opacity( |
|
|
|
@ -212,134 +216,42 @@ class _ReportPage extends State<ReportPage> {
|
|
|
|
|
Widget reportContent() { |
|
|
|
|
return Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
padding: EdgeInsets.only(left:16, right:16,top:20), |
|
|
|
|
padding: EdgeInsets.only(left: 16, right: 16, top: 20), |
|
|
|
|
child: Column( |
|
|
|
|
children: [ |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 1; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"色情低俗", |
|
|
|
|
1 |
|
|
|
|
content("色情低俗", 1), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18, |
|
|
|
|
), |
|
|
|
|
content("政治宗教", 2), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18, |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 18,), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 2; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"政治宗教", |
|
|
|
|
2 |
|
|
|
|
content("广告骚扰", 3), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18, |
|
|
|
|
), |
|
|
|
|
content("虚假欺骗", 4), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18, |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 18,), |
|
|
|
|
GestureDetector ( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 3; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"广告骚扰", |
|
|
|
|
3 |
|
|
|
|
content("侵权(诽谤、抄袭、冒用)", 5), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18, |
|
|
|
|
), |
|
|
|
|
content("不良封面/标题", 6), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18, |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 18,), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 4; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"虚假欺骗", |
|
|
|
|
4 |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 18,), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 5; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"侵权(诽谤、抄袭、冒用)", |
|
|
|
|
5 |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 18,), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 6; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"不良封面/标题", |
|
|
|
|
6 |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 18,), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 7; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"赌博诈骗", |
|
|
|
|
7 |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 18,), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 8; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"违禁内容(暴利恐怖、令人不适、宣言仇恨)", |
|
|
|
|
8 |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
SizedBox(height: 18,), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = 9; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: |
|
|
|
|
content( |
|
|
|
|
"其他", |
|
|
|
|
9 |
|
|
|
|
content("赌博诈骗", 7), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18, |
|
|
|
|
), |
|
|
|
|
content("违禁内容(暴利恐怖、令人不适、宣言仇恨)", 8), |
|
|
|
|
SizedBox( |
|
|
|
|
height: 18, |
|
|
|
|
), |
|
|
|
|
content("其他", 9), |
|
|
|
|
], |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
@ -348,39 +260,48 @@ class _ReportPage extends State<ReportPage> {
|
|
|
|
|
|
|
|
|
|
Widget checkView(var index) { |
|
|
|
|
return Container( |
|
|
|
|
padding: EdgeInsets.only(right: 16.w,left: 5), |
|
|
|
|
padding: EdgeInsets.only(right: 16.w, left: 5), |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
// color: Colors.red, |
|
|
|
|
child: Image.asset( |
|
|
|
|
checkIndex != index |
|
|
|
|
? "assets/image/icon_radio_unselected.webp" |
|
|
|
|
: "assets/image/icon_radio_selected.webp", |
|
|
|
|
width:20.w, |
|
|
|
|
height:20.h, |
|
|
|
|
width: 20.w, |
|
|
|
|
height: 20.h, |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Widget content(textContext,var index) { |
|
|
|
|
return Container( |
|
|
|
|
Widget content(textContext, var index) { |
|
|
|
|
return GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
checkIndex = index; |
|
|
|
|
textCon = textContext; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
child:Row( |
|
|
|
|
child: Row( |
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start, |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
checkView(index), |
|
|
|
|
Container(), |
|
|
|
|
Expanded(child: |
|
|
|
|
Text( |
|
|
|
|
Expanded( |
|
|
|
|
child: Text( |
|
|
|
|
textContext, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Color(0xFF353535), |
|
|
|
|
fontWeight: MyFontWeight.regular, |
|
|
|
|
), |
|
|
|
|
),) |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|