Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
e39d7286
提交
e39d7286
authored
2月 20, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add
上级
c507b566
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
104 行增加
和
25 行删除
+104
-25
mine.dart
lib/models/mine.dart
+8
-4
controller.dart
lib/pages/book_pay/controller.dart
+1
-1
banner.dart
lib/pages/course/widgets/banner.dart
+1
-1
controller.dart
lib/pages/login/controller.dart
+4
-4
controller.dart
lib/pages/mine/controller.dart
+1
-1
view.dart
lib/pages/pay_coupon/view.dart
+1
-0
discuss_controller.dart
lib/pages/read_web/discuss_controller.dart
+2
-0
discuss.dart
lib/pages/user_discuss_des/widgets/discuss.dart
+83
-11
note.dart
lib/pages/user_notes_des/widgets/note.dart
+1
-1
validator.dart
lib/utils/validator.dart
+2
-2
没有找到文件。
lib/models/mine.dart
浏览文件 @
e39d7286
...
@@ -526,7 +526,8 @@ class DiscussModel {
...
@@ -526,7 +526,8 @@ class DiscussModel {
id
=
json
[
'id'
];
id
=
json
[
'id'
];
chapterId
=
json
[
'chapter_id'
];
chapterId
=
json
[
'chapter_id'
];
chapterName
=
json
[
'chapter_name'
];
chapterName
=
json
[
'chapter_name'
];
content
=
json
[
'content'
];
// content = json['content'];
content
=
json
[
'content'
]
!=
null
?
NoteContentModel
.
fromJson
(
json
[
'content'
])
:
null
;
quoteContent
=
json
[
'quote_content'
];
quoteContent
=
json
[
'quote_content'
];
title
=
json
[
'title'
];
title
=
json
[
'title'
];
replyId
=
json
[
'reply_id'
];
replyId
=
json
[
'reply_id'
];
...
@@ -550,7 +551,7 @@ class DiscussModel {
...
@@ -550,7 +551,7 @@ class DiscussModel {
num
?
id
;
num
?
id
;
num
?
chapterId
;
num
?
chapterId
;
String
?
chapterName
;
String
?
chapterName
;
String
?
content
;
NoteContentModel
?
content
;
String
?
quoteContent
;
String
?
quoteContent
;
String
?
title
;
String
?
title
;
num
?
replyId
;
num
?
replyId
;
...
@@ -569,7 +570,7 @@ class DiscussModel {
...
@@ -569,7 +570,7 @@ class DiscussModel {
num
?
id
,
num
?
id
,
num
?
chapterId
,
num
?
chapterId
,
String
?
chapterName
,
String
?
chapterName
,
String
?
content
,
NoteContentModel
?
content
,
String
?
quoteContent
,
String
?
quoteContent
,
String
?
title
,
String
?
title
,
num
?
replyId
,
num
?
replyId
,
...
@@ -609,7 +610,10 @@ class DiscussModel {
...
@@ -609,7 +610,10 @@ class DiscussModel {
map
[
'id'
]
=
id
;
map
[
'id'
]
=
id
;
map
[
'chapter_id'
]
=
chapterId
;
map
[
'chapter_id'
]
=
chapterId
;
map
[
'chapter_name'
]
=
chapterName
;
map
[
'chapter_name'
]
=
chapterName
;
map
[
'content'
]
=
content
;
// map['content'] = content;
if
(
content
!=
null
)
{
map
[
'note_content'
]
=
content
?.
toJson
();
}
map
[
'quote_content'
]
=
quoteContent
;
map
[
'quote_content'
]
=
quoteContent
;
map
[
'title'
]
=
title
;
map
[
'title'
]
=
title
;
map
[
'reply_id'
]
=
replyId
;
map
[
'reply_id'
]
=
replyId
;
...
...
lib/pages/book_pay/controller.dart
浏览文件 @
e39d7286
...
@@ -54,7 +54,7 @@ class BookPayController extends GetxController {
...
@@ -54,7 +54,7 @@ class BookPayController extends GetxController {
/// 使用优惠券
/// 使用优惠券
void
setUseCoupon
(
CouponModel
model
){
void
setUseCoupon
(
CouponModel
model
){
useCouponModel
=
model
;
useCouponModel
=
model
;
print
(
'使用优惠券。。。。。。。。。。。。。。。。'
);
print
(
'使用优惠券。。。。。。。。。。。。。。。。
${model.couponRecId}
'
);
computeFinalPrice
();
computeFinalPrice
();
}
}
...
...
lib/pages/course/widgets/banner.dart
浏览文件 @
e39d7286
...
@@ -47,7 +47,7 @@ class BuildBanner extends StatelessWidget {
...
@@ -47,7 +47,7 @@ class BuildBanner extends StatelessWidget {
},
},
child:
ClipRRect
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
borderRadius:
BorderRadius
.
circular
(
8
.
w
),
child:
CustomImage
.
network
(
url:
item
.
pic
??
''
)
child:
CustomImage
.
network
(
url:
item
.
pic
??
''
,
fit:
BoxFit
.
contain
,
)
),
),
),
),
// child: CustomImage.asset(
// child: CustomImage.asset(
...
...
lib/pages/login/controller.dart
浏览文件 @
e39d7286
...
@@ -87,10 +87,10 @@ class LoginController extends GetxController {
...
@@ -87,10 +87,10 @@ class LoginController extends GetxController {
// 定时器回调
// 定时器回调
});
});
/// 测试账号
/// 测试账号
//
if (kDebugMode) {
if
(
kDebugMode
)
{
//
phoneInput.text = '13521054068';
phoneInput
.
text
=
'13521054068'
;
//
passwordInput.text = '123456';
passwordInput
.
text
=
'123456'
;
//
}
}
super
.
onInit
();
super
.
onInit
();
}
}
...
...
lib/pages/mine/controller.dart
浏览文件 @
e39d7286
...
@@ -63,7 +63,7 @@ class MineController extends GetxController {
...
@@ -63,7 +63,7 @@ class MineController extends GetxController {
link:
Routes
.
point
,
link:
Routes
.
point
,
icon:
'assets/images/point.png'
),
icon:
'assets/images/point.png'
),
ReadModel
(
ReadModel
(
name:
'紫
金
币'
,
name:
'紫
荆
币'
,
value:
userInfo
.
beanNums
.
toString
(),
value:
userInfo
.
beanNums
.
toString
(),
link:
Routes
.
coin
,
link:
Routes
.
coin
,
icon:
'assets/images/coin.png'
),
icon:
'assets/images/coin.png'
),
...
...
lib/pages/pay_coupon/view.dart
浏览文件 @
e39d7286
...
@@ -90,6 +90,7 @@ class _CouponPageState extends State<CouponPage> with AutomaticKeepAliveClientMi
...
@@ -90,6 +90,7 @@ class _CouponPageState extends State<CouponPage> with AutomaticKeepAliveClientMi
itemBuilder:
(
BuildContext
context
,
int
index
){
itemBuilder:
(
BuildContext
context
,
int
index
){
CouponModel
model
=
controller
.
coupons
[
index
];
CouponModel
model
=
controller
.
coupons
[
index
];
return
BuildItem
(
model:
model
,
useTap:
(){
return
BuildItem
(
model:
model
,
useTap:
(){
Console
.
log
(
'选择优惠券--------------------------------
${model.couponRecId}
'
);
widget
.
payController
.
setUseCoupon
(
model
);
widget
.
payController
.
setUseCoupon
(
model
);
context
.
pop
();
context
.
pop
();
},);
},);
...
...
lib/pages/read_web/discuss_controller.dart
浏览文件 @
e39d7286
...
@@ -39,6 +39,7 @@ class DiscussController extends GetxController {
...
@@ -39,6 +39,7 @@ class DiscussController extends GetxController {
bookId:
bookDetailModel
.
bookId
.
toString
(),
bookId:
bookDetailModel
.
bookId
.
toString
(),
chapterId:
chapterId
chapterId:
chapterId
);
);
Console
.
log
(
'--------------------------------'
);
// 如果是刷新 清理数据
// 如果是刷新 清理数据
if
(
isRefresh
)
discuss
.
clear
();
if
(
isRefresh
)
discuss
.
clear
();
discuss
.
addAll
(
result
);
discuss
.
addAll
(
result
);
...
@@ -54,6 +55,7 @@ class DiscussController extends GetxController {
...
@@ -54,6 +55,7 @@ class DiscussController extends GetxController {
refreshController
.
finishRefresh
(
IndicatorResult
.
success
);
refreshController
.
finishRefresh
(
IndicatorResult
.
success
);
refreshController
.
resetFooter
();
refreshController
.
resetFooter
();
}
catch
(
error
)
{
}
catch
(
error
)
{
Console
.
log
(
'--error-----------------------------
$error
-'
);
refreshController
.
finishRefresh
(
IndicatorResult
.
fail
);
refreshController
.
finishRefresh
(
IndicatorResult
.
fail
);
}
}
}
}
...
...
lib/pages/user_discuss_des/widgets/discuss.dart
浏览文件 @
e39d7286
...
@@ -73,14 +73,18 @@ class BuildDiscuss extends StatelessWidget {
...
@@ -73,14 +73,18 @@ class BuildDiscuss extends StatelessWidget {
Widget
_buildItem
(
DiscussModel
model
,{
int
type
=
0
}){
Widget
_buildItem
(
DiscussModel
model
,{
int
type
=
0
}){
return
Row
(
return
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
ClipRRect
(
Container
(
borderRadius:
BorderRadius
.
circular
(
17.5
.
w
),
margin:
EdgeInsets
.
only
(
top:
10
.
w
),
child:
Container
(
child:
ClipRRect
(
width:
35
.
w
,
borderRadius:
BorderRadius
.
circular
(
17.5
.
w
),
height:
35
.
w
,
child:
Container
(
color:
Colors
.
red
,
width:
35
.
w
,
child:
CustomImage
.
network
(
url:
model
.
personPic
??
''
),
height:
35
.
w
,
color:
Colors
.
red
,
child:
CustomImage
.
network
(
url:
model
.
personPic
??
''
),
),
),
),
),
),
Expanded
(
Expanded
(
...
@@ -96,18 +100,25 @@ class BuildDiscuss extends StatelessWidget {
...
@@ -96,18 +100,25 @@ class BuildDiscuss extends StatelessWidget {
children:
[
children:
[
Text
(
model
.
personName
??
''
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.5
,
color:
Colours
.
c9
),),
Text
(
model
.
personName
??
''
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.5
,
color:
Colours
.
c9
),),
Gaps
.
hGaps10
,
Gaps
.
hGaps10
,
type
==
0
?
const
SizedBox
():
Text
(
'发起人'
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.5
,
color:
AppTheme
.
primary
),)
type
==
1
?
const
SizedBox
():
Text
(
'发起人'
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.5
,
color:
AppTheme
.
primary
),)
],
],
),
),
Text
(
model
.
createTime
??
''
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.5
,
color:
Colours
.
c9
),)
Text
(
model
.
createTime
??
''
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.5
,
color:
Colours
.
c9
),)
],
],
),
),
type
==
0
?
Text
(
model
.
content
??
''
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c3
),)
type
==
0
?
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
model
.
content
?.
text
?.
content
??
''
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c3
),),
Gaps
.
vGaps10
,
_buildImageGridView
()
],
)
:
RichText
(
text:
TextSpan
(
:
RichText
(
text:
TextSpan
(
children:
[
children:
[
TextSpan
(
text:
'回复 '
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c3
)),
TextSpan
(
text:
'回复 '
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c3
)),
TextSpan
(
text:
model
.
replacePersonName
??
''
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c9
)),
TextSpan
(
text:
model
.
replacePersonName
??
''
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c9
)),
TextSpan
(
text:
':
${model.content??''}
'
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c3
)),
TextSpan
(
text:
':
${model.content?
.text?.content?
?''}
'
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c3
)),
]
]
)),
)),
Row
(
Row
(
...
@@ -151,11 +162,72 @@ class BuildDiscuss extends StatelessWidget {
...
@@ -151,11 +162,72 @@ class BuildDiscuss extends StatelessWidget {
physics:
const
NeverScrollableScrollPhysics
(),
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
shrinkWrap:
true
,
itemBuilder:
(
BuildContext
context
,
int
index
){
itemBuilder:
(
BuildContext
context
,
int
index
){
return
_buildItem
(
data
[
index
]);
return
_buildItem
(
data
[
index
]
,
type:
1
);
},
},
itemCount:
data
.
length
,
itemCount:
data
.
length
,
);
);
}
}
// 图片
Widget
_buildImageGridView
(){
return
GridView
.
builder
(
// padding: const EdgeInsets.only(left: 13,top: 10),
physics:
const
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
6
,
crossAxisSpacing:
2
.
w
,
mainAxisSpacing:
2
.
w
,
childAspectRatio:
1
),
itemBuilder:
(
BuildContext
context
,
int
index
)
{
MediaModel
?
mediaModel
=
model
.
content
?.
image
?[
index
];
return
CustomImage
.
network
(
url:
model
?.
content
?.
image
?[
index
].
content
??
''
,
fit:
BoxFit
.
cover
,);
// return Container(
// color: Colors.red,
// );
},
itemCount:
model
.
content
?.
image
?.
length
,
// itemCount: 2,
);
}
// Widget _buildAudioListView(){
// return ListView.builder(
// physics: const NeverScrollableScrollPhysics(),
// shrinkWrap: true,
// itemBuilder: (BuildContext context, int index) {
// MediaModel mediaModel = model.noteContent!.audio![index];
// return Container(
// height: 20.w,
// margin: EdgeInsets.only(right: 130.w),
// child: Container(
// margin: EdgeInsets.only(top: 5.w),
// padding: EdgeInsets.only(right:20.w,left: 10.w),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(10.w),
// color: Colours.cF9,
// ),
// child: Row(
// // mainAxisSize: MainAxisSize.min,
// mainAxisAlignment:MainAxisAlignment.spaceBetween,
// children: [
// GestureDetector(
// onTap: (){
// if (onTapAudio !=null) onTapAudio!(mediaModel);
// },
// child: Image.asset('assets/images/audio.png')
// ),
// Text('0:00/${mediaModel.duration}',style: TextStyle(fontSize: 10.w,height: 1.4,color: Colours.c9),)
// ],
// ),
// ),
// );
// },
// itemCount: model.noteContent?.audio?.length,
// );
// }
}
}
lib/pages/user_notes_des/widgets/note.dart
浏览文件 @
e39d7286
...
@@ -105,7 +105,7 @@ class BuildNote extends StatelessWidget {
...
@@ -105,7 +105,7 @@ class BuildNote extends StatelessWidget {
childAspectRatio:
1
childAspectRatio:
1
),
),
itemBuilder:
(
BuildContext
context
,
int
index
)
{
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
CustomImage
.
network
(
url:
model
.
noteContent
!.
image
!
[
index
].
content
??
''
,
fit:
BoxFit
.
cover
,);
return
CustomImage
.
network
(
url:
model
.
noteContent
?.
image
?
[
index
].
content
??
''
,
fit:
BoxFit
.
cover
,);
},
},
itemCount:
model
.
noteContent
?.
image
?.
length
,
itemCount:
model
.
noteContent
?.
image
?.
length
,
);
);
...
...
lib/utils/validator.dart
浏览文件 @
e39d7286
...
@@ -91,9 +91,9 @@ class ValidatorTool {
...
@@ -91,9 +91,9 @@ class ValidatorTool {
// 密码
// 密码
static
bool
isValidPassword
(
String
value
)
{
static
bool
isValidPassword
(
String
value
)
{
RegExp
passwordPattern
=
RegExp
(
r'^[A-Za-z0-9!@#\$%^&*()_+{}\[\]:;<>,.?~\\/-]{8,12}$'
);
//
RegExp passwordPattern = RegExp(r'^[A-Za-z0-9!@#\$%^&*()_+{}\[\]:;<>,.?~\\/-]{8,12}$');
// RegExp passwordPattern = RegExp(r'^(?=.*[A-Za-z])(?=.*\d)(?=.*[~@#%$*()_+{}\[\]:;<>,.?\\/-])[A-Za-z0-9~@#%$*()_+{}\[\]:;<>,.?\\/-]{8,12}$');
// RegExp passwordPattern = RegExp(r'^(?=.*[A-Za-z])(?=.*\d)(?=.*[~@#%$*()_+{}\[\]:;<>,.?\\/-])[A-Za-z0-9~@#%$*()_+{}\[\]:;<>,.?\\/-]{8,12}$');
//
RegExp passwordPattern = RegExp(r'^\d{6}$');
RegExp
passwordPattern
=
RegExp
(
r'^\d{6}$'
);
return
passwordPattern
.
hasMatch
(
value
);
return
passwordPattern
.
hasMatch
(
value
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论