Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
a513da19
提交
a513da19
authored
3月 08, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
图片 处理审核 敏感词
上级
869f1134
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
55 行增加
和
6 行删除
+55
-6
discuss.dart
lib/pages/user_discuss_des/widgets/discuss.dart
+32
-3
note.dart
lib/pages/user_notes_des/widgets/note.dart
+23
-3
没有找到文件。
lib/pages/user_discuss_des/widgets/discuss.dart
浏览文件 @
a513da19
...
...
@@ -268,6 +268,35 @@ class _BuildDiscussState extends State<BuildDiscuss> {
}
return
text
;
}
String
_showImageStatus
(
DiscussModel
discussModel
,
MediaModel
?
mediaModel
){
String
text
=
''
;
// 是我的
if
(
discussModel
.
isMy
==
1
){
if
(
discussModel
.
commentsCheck
==
1
){
// 审核中
if
(
mediaModel
?.
privacyStatus
==
0
||
mediaModel
?.
privacyStatus
==
2
||
discussModel
.
status
==
0
){
text
=
'(审核中)'
;
}
// 审核未通过
else
if
(
mediaModel
?.
privacyStatus
==-
1
||
discussModel
.
status
==
2
){
text
=
'(审核未通过)'
;
}
}
else
{
// 审核中
if
(
mediaModel
?.
privacyStatus
==
0
||
mediaModel
?.
privacyStatus
==
2
){
text
=
'(审核中)'
;
}
// 审核未通过
else
if
(
mediaModel
?.
privacyStatus
==-
1
){
text
=
'(审核未通过)'
;
}
}
}
return
text
;
}
Widget
_buildListView
(
DiscussModel
model
){
List
<
DiscussModel
>
data
=
model
.
commentAll
!=
null
?
model
.
commentAll
!:[];
return
ListView
.
builder
(
...
...
@@ -309,7 +338,7 @@ class _BuildDiscussState extends State<BuildDiscuss> {
child:
CustomImage
.
network
(
url:
mediaModel
?.
content
??
''
,
fit:
BoxFit
.
cover
,)
),
Visibility
(
visible:
mediaModel
?.
privacyStatus
==
0
?
true
:
fals
e
,
visible:
tru
e
,
child:
Positioned
(
left:
0
,
right:
0
,
...
...
@@ -317,8 +346,8 @@ class _BuildDiscussState extends State<BuildDiscuss> {
bottom:
0
,
child:
Container
(
alignment:
Alignment
.
center
,
color:
widget
.
model
.
isMy
==
1
?
Colours
.
c9
.
withOpacity
(
0.5
):
Colours
.
c9
.
withOpacity
(
1
),
child:
Text
(
'(审核中)'
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.5
,
color:
AppTheme
.
primary
),),
//
color: widget.model.isMy==1?Colours.c9.withOpacity(0.5):Colours.c9.withOpacity(1),
child:
Text
(
_showImageStatus
(
widget
.
model
,
mediaModel
)
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.5
,
color:
AppTheme
.
primary
),),
)
),
),
...
...
lib/pages/user_notes_des/widgets/note.dart
浏览文件 @
a513da19
...
...
@@ -128,6 +128,26 @@ class BuildNote extends StatelessWidget {
}
return
text
;
}
String
_showImageStatus
(
NoteModel
discussModel
,
MediaModel
?
mediaModel
){
String
text
=
''
;
// 是我的
if
(
discussModel
.
isMy
==
1
){
// 审核中
if
(
mediaModel
?.
privacyStatus
==
0
||
mediaModel
?.
privacyStatus
==
2
){
text
=
'(审核中)'
;
}
// 审核未通过
else
if
(
mediaModel
?.
privacyStatus
==-
1
){
text
=
'(审核未通过)'
;
}
// 审核通过
else
{
text
=
''
;
}
}
return
text
;
}
// 图片
Widget
_buildImageGridView
(){
return
GridView
.
builder
(
...
...
@@ -157,7 +177,7 @@ class BuildNote extends StatelessWidget {
child:
CustomImage
.
network
(
url:
mediaModel
?.
content
??
''
,
fit:
BoxFit
.
cover
,)
),
Visibility
(
visible:
mediaModel
?.
privacyStatus
==
0
?
true
:
fals
e
,
visible:
tru
e
,
child:
Positioned
(
left:
0
,
right:
0
,
...
...
@@ -165,8 +185,8 @@ class BuildNote extends StatelessWidget {
bottom:
0
,
child:
Container
(
alignment:
Alignment
.
center
,
color:
model
.
isMy
==
1
?
Colours
.
c9
.
withOpacity
(
0.5
):
Colours
.
c9
.
withOpacity
(
1
),
child:
Text
(
'(审核中)'
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.5
,
color:
AppTheme
.
primary
),),
//
color: model.isMy==1?Colours.c9.withOpacity(0.5):Colours.c9.withOpacity(1),
child:
Text
(
_showImageStatus
(
model
,
mediaModel
)
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.5
,
color:
AppTheme
.
primary
),),
)
),
),
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论