Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
0f3d3747
提交
0f3d3747
authored
3月 22, 2024
作者:
岳维路
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'test' 到 'sim'
Test 查看合并请求 kiwitap/zijing-app!16
上级
35b2f1c1
4deb8b30
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
64 行增加
和
25 行删除
+64
-25
view.dart
lib/pages/bai_ke/view.dart
+1
-1
controller.dart
lib/pages/login/controller.dart
+1
-0
controller.dart
lib/pages/read_web/controller.dart
+14
-6
category.dart
lib/pages/read_web/widgets/category.dart
+3
-0
discuss.dart
lib/pages/read_web/widgets/discuss.dart
+5
-1
input_discuss.dart
lib/pages/read_web/widgets/input_discuss.dart
+2
-2
note.dart
lib/pages/read_web/widgets/note.dart
+3
-0
controller.dart
lib/pages/user_edit_note/controller.dart
+3
-0
view.dart
lib/pages/user_edit_note/view.dart
+24
-10
view.dart
lib/pages/user_nick/view.dart
+1
-0
controller.dart
lib/pages/user_notes_des/controller.dart
+1
-1
note.dart
lib/pages/user_notes_des/widgets/note.dart
+6
-4
没有找到文件。
lib/pages/bai_ke/view.dart
浏览文件 @
0f3d3747
...
...
@@ -17,7 +17,7 @@ class _BaiKePageState extends State<BaiKePage> {
return
Scaffold
(
appBar:
AppBar
(
centerTitle:
false
,
title:
Text
(
'
${widget.keyword}
百度百科'
,
style:
TextStyle
(
fontSize:
14
.
w
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c3
),),
title:
Text
(
widget
.
keyword
,
style:
TextStyle
(
fontSize:
14
.
w
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c3
),),
),
body:
InAppWebView
(
initialUrlRequest:
URLRequest
(
...
...
lib/pages/login/controller.dart
浏览文件 @
0f3d3747
...
...
@@ -117,6 +117,7 @@ class LoginController extends GetxController {
/// 登录
void
onLogin
(
BuildContext
context
)
async
{
Tools
.
unfocus
();
if
(!
agree
)
{
Toast
.
show
(
'请先阅读并同意《用户协议》和《隐私政策》'
);
return
;
...
...
lib/pages/read_web/controller.dart
浏览文件 @
0f3d3747
...
...
@@ -49,7 +49,7 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
bool
get
show
=>
_show
;
// 录音
final
FlutterSoundRecorder
_mRecorder
=
FlutterSoundRecorder
(
logLevel:
Level
.
error
);
FlutterSoundRecorder
_mRecorder
=
FlutterSoundRecorder
(
logLevel:
Level
.
error
);
// 录音开始
bool
startRecording
=
false
;
// 是否存在离线文件
...
...
@@ -90,6 +90,7 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
///------------------------------------------ 页面 生命周期--------------------------------------------------------
@override
void
onInit
()
async
{
...
...
@@ -136,6 +137,9 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
contentInput
.
dispose
();
flutterTts
.
stop
();
searchInput
.
dispose
();
if
(
_mRecorder
!=
null
)
{
_mRecorder
.
closeRecorder
();
}
// 关闭防截屏
// await ScreenProtector.preventScreenshotOff();
super
.
onClose
();
...
...
@@ -153,6 +157,8 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
model
.
selected
=
!
model
.
selected
;
}
}
setShowSearch
(
false
);
searchInput
.
text
=
''
;
toolModel
=
selectedModel
;
update
();
}
...
...
@@ -306,14 +312,13 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
// 开启录音
void
record
()
async
{
openTheRecorder
();
update
();
startRecording
=
true
;
String
filePath
=
await
Tools
.
getDirectory
();
String
fileName
=
Tools
.
generateVoiceFileName
();
Console
.
log
(
'record---------------------
$filePath
/
$fileName
'
);
String
recordePath
=
'
$filePath
/
$fileName
'
;
Console
.
log
(
'record---------------------
$recordePath
'
);
_mRecorder
.
startRecorder
(
toFile:
'
$filePath
/
$fileName
'
,
toFile:
recordePath
,
audioSource:
AudioSource
.
microphone
,
codec:
Codec
.
aacMP4
,
...
...
@@ -334,12 +339,15 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
startRecording
=
false
;
final
path
=
await
_mRecorder
.
stopRecorder
();
Console
.
log
(
'stopRecorder-----------path---------------------
$path
'
);
if
(
path
!=
null
&&
path
.
isNotEmpty
){
var
duration
=
await
audioPlayer
.
setFilePath
(
path
!);
Console
.
log
(
'-----duration---------------------
$duration
------'
);
AudioModel
audioModel
=
AudioModel
(
path:
path
,
duration:
Tools
.
formatDuration
(
duration
!),
currentDuration:
'0:00:00'
);
AudioModel
audioModel
=
AudioModel
(
path:
path
!
,
duration:
Tools
.
formatDuration
(
duration
!),
currentDuration:
'0:00:00'
);
if
(
audioModel
.
duration
!=
'0:00:00'
){
discussInputAudios
.
add
(
audioModel
);
}
}
update
();
}
...
...
lib/pages/read_web/widgets/category.dart
浏览文件 @
0f3d3747
...
...
@@ -87,6 +87,8 @@ class _ReadCategoryPageState extends State<ReadCategoryPage> {
],
),
widget
.
controller
.
showSearch
?
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
only
(
top:
15
.
w
),
child:
CustomPullScrollView
(
controller:
widget
.
controller
.
refreshController
,
onRefresh:
widget
.
controller
.
onRefreshSearch
,
...
...
@@ -99,6 +101,7 @@ class _ReadCategoryPageState extends State<ReadCategoryPage> {
},
searchALlResults:
widget
.
controller
.
searchALlResults
,),
),
)):
widget
.
controller
.
showSearch
?
const
SizedBox
():
BuildBook
(
bookDetailModel:
widget
.
controller
.
bookDetailModel
,),
widget
.
controller
.
showSearch
?
const
SizedBox
():
Expanded
(
...
...
lib/pages/read_web/widgets/discuss.dart
浏览文件 @
0f3d3747
...
...
@@ -88,6 +88,8 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
],
),
controller
.
showSearch
?
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
only
(
top:
15
.
w
),
child:
CustomPullScrollView
(
controller:
controller
.
refreshController
,
onRefresh:
controller
.
onRefreshSearch
,
...
...
@@ -100,6 +102,7 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
},
searchALlResults:
controller
.
searchALlResults
,
),
),
)):
Expanded
(
child:
Stack
(
children:
[
...
...
@@ -130,12 +133,13 @@ class _ReadDiscussPageState extends State<ReadDiscussPage> {
Visibility
(
visible:
controller
.
showReply
,
child:
Positioned
(
bottom:
-
69
,
bottom:
-
69
.
w
,
left:
0
,
right:
0
,
top:
0
,
child:
GestureDetector
(
onTap:
(){
Tools
.
unfocus
();
controller
.
setShow
();
},
child:
Container
(
...
...
lib/pages/read_web/widgets/input_discuss.dart
浏览文件 @
0f3d3747
...
...
@@ -198,7 +198,7 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> {
);
widget
.
controller
.
addDiscussInputImages
(
assets
!.
path
);
},
child:
Container
(
child:
SizedBox
(
// color: Colors.red,
width:
25
,
height:
25
,
...
...
@@ -215,7 +215,7 @@ class _ReadInputDiscussState extends State<ReadInputDiscuss> {
}
},
child:
Container
(
child:
SizedBox
(
// color: Colors.red,
width:
23
,
height:
23
,
...
...
lib/pages/read_web/widgets/note.dart
浏览文件 @
0f3d3747
...
...
@@ -88,6 +88,8 @@ class _ReadNotePageState extends State<ReadNotePage> {
],
),
controller
.
showSearch
?
Expanded
(
child:
Container
(
margin:
EdgeInsets
.
only
(
top:
15
.
w
),
child:
CustomPullScrollView
(
controller:
controller
.
refreshController
,
onRefresh:
controller
.
onRefreshSearch
,
...
...
@@ -100,6 +102,7 @@ class _ReadNotePageState extends State<ReadNotePage> {
},
searchALlResults:
controller
.
searchALlResults
),
),
)):
controller
.
showSearch
?
const
SizedBox
():
BuildBook
(
bookDetailModel:
widget
.
bookDetailModel
,),
controller
.
showSearch
?
const
SizedBox
():
Expanded
(
...
...
lib/pages/user_edit_note/controller.dart
浏览文件 @
0f3d3747
...
...
@@ -34,6 +34,7 @@ class UserEditNoteController extends GetxController {
void
onClose
()
{
contentInput
.
dispose
();
audioPlayer
.
dispose
();
Tools
.
unfocus
();
super
.
onClose
();
}
...
...
@@ -186,6 +187,7 @@ class UserEditNoteController extends GetxController {
// 提交
Future
<
bool
>
submit
()
async
{
CustomToast
.
loading
();
// 循环上传图片获取地址
for
(
MediaModel
mediaModel
in
model
.
noteContent
!.
image
!){
if
(
mediaModel
.
id
==
0
){
...
...
@@ -201,6 +203,7 @@ class UserEditNoteController extends GetxController {
mediaModel
.
content
=
url
;
}
}
CustomToast
.
dismiss
();
// 组织图片
List
<
Map
>
images
=
[];
...
...
lib/pages/user_edit_note/view.dart
浏览文件 @
0f3d3747
...
...
@@ -28,7 +28,9 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
.
w
),
child:
Stack
(
children:
[
Container
(
SingleChildScrollView
(
padding:
EdgeInsets
.
only
(
bottom:
100
.
w
),
child:
Container
(
// color: Colours.cF8,
constraints:
BoxConstraints
(
minHeight:
100
.
w
...
...
@@ -88,9 +90,7 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
},
itemCount:
controller
.
model
.
noteContent
?.
image
?.
length
,
),
Container
(
// color: Colors.red,
child:
MediaQuery
.
removePadding
(
MediaQuery
.
removePadding
(
context:
context
,
removeTop:
true
,
child:
ListView
.
builder
(
...
...
@@ -141,20 +141,21 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
},
itemCount:
controller
.
model
.
noteContent
?.
audio
?.
length
,
),
),
)
],
)
],
),
),
),
Visibility
(
visible:
true
,
child:
Positioned
(
left:
1
0
,
right:
1
0
,
left:
0
,
right:
0
,
bottom:
0
,
child:
Container
(
color:
Colors
.
white
,
padding:
EdgeInsets
.
symmetric
(
vertical:
10
.
w
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
...
...
@@ -169,7 +170,12 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
);
controller
.
addImage
(
assets
!.
path
);
},
child:
Image
.
asset
(
'assets/images/read_add_img.png'
)),
child:
SizedBox
(
// color: Colors.red,
width:
25
,
height:
25
,
child:
Image
.
asset
(
'assets/images/read_add_img.png'
,
fit:
BoxFit
.
contain
,)),
),
Gaps
.
hGaps10
,
GestureDetector
(
onTap:
()
async
{
...
...
@@ -181,7 +187,11 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
}
},
child:
Image
.
asset
(
controller
.
startRecording
?
'assets/images/stop.png'
:
'assets/images/read_add_audio.png'
)
child:
SizedBox
(
width:
23
,
height:
23
,
child:
Image
.
asset
(
controller
.
startRecording
?
'assets/images/stop.png'
:
'assets/images/read_add_audio.png'
,
fit:
BoxFit
.
contain
,)
)
),
GestureDetector
(
onTap:
(){
...
...
@@ -191,7 +201,11 @@ class _UserEditNotePageState extends State<UserEditNotePage> {
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Gaps
.
hGaps10
,
Image
.
asset
(
controller
.
isPublic
?
'assets/images/pay_check.png'
:
'assets/images/pay_uncheck.png'
),
SizedBox
(
width:
15
,
height:
15
,
child:
Image
.
asset
(
controller
.
isPublic
?
'assets/images/pay_check.png'
:
'assets/images/public.png'
,
fit:
BoxFit
.
contain
,)
),
SizedBox
(
width:
3
.
w
,),
Text
(
'公开'
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.3
,
color:
Colours
.
c9
),)
],
...
...
lib/pages/user_nick/view.dart
浏览文件 @
0f3d3747
...
...
@@ -40,6 +40,7 @@ class _UserNickPageState extends State<UserNickPage> {
// print("保存昵称");
controller
.
changeInfo
(
_textFieldController
.
text
);
_focusNode
.
unfocus
();
Tools
.
unfocus
();
},
child:
Text
(
'保存'
,
...
...
lib/pages/user_notes_des/controller.dart
浏览文件 @
0f3d3747
...
...
@@ -86,7 +86,7 @@ class UserNotesDesController extends GetxController {
if
(
noteModel
.
noteContent
!=
null
&&
noteModel
.
noteContent
!.
audio
!=
null
){
if
(
noteModel
.
noteContent
!.
audio
!.
isNotEmpty
){
for
(
MediaModel
?
mediaModel
in
noteModel
.
noteContent
!.
audio
!){
Duration
?
duration
=
await
just_audio
.
AudioPlayer
()
.
setUrl
(
mediaModel
?.
content
??
''
);
Duration
?
duration
=
await
audioPlayer
.
setUrl
(
mediaModel
?.
content
??
''
);
mediaModel
?.
duration
=
Tools
.
formatDuration
(
duration
!);
}
...
...
lib/pages/user_notes_des/widgets/note.dart
浏览文件 @
0f3d3747
...
...
@@ -66,18 +66,20 @@ class BuildNote extends StatelessWidget {
_showText
(
model
).
isEmpty
?
const
SizedBox
():
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Text
(
_showText
(
model
),
style:
TextStyle
(
Expanded
(
child:
Text
(
_showText
(
model
),
style:
TextStyle
(
fontSize:
14
.
w
,
height:
1.5
,
// color: Colors.red,
color:
Colours
.
c3
),),
),
maxLines:
999
,
overflow:
TextOverflow
.
ellipsis
,),
),
Text
(
_showStatus
(
model
),
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.5
,
color:
AppTheme
.
primary
),),
],
),
Gaps
.
vGaps13
,
model
.
noteContent
!.
image
!.
isEmpty
?
const
SizedBox
():
Gaps
.
vGaps13
,
_buildImageGridView
(),
Gaps
.
vGaps13
,
model
.
noteContent
!.
audio
!.
isEmpty
?
const
SizedBox
():
Gaps
.
vGaps13
,
_buildAudioListView
(),
Gaps
.
vGaps13
,
Container
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论