提交 cb527402 authored 作者: yueweilu's avatar yueweilu

简介使用web显示

上级 a17607dd
......@@ -85,10 +85,18 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
controller: controller.tabController,
children: [
BookCategoryPage(chapters: controller.chapters,bookId: controller.bookId,bookDetails: controller.bookDetails,),
Container(
padding: EdgeInsets.only(left: 15.w,right: 15.w,top:12.w),
color: Colors.white,
child: Text(controller.bookDetails.content??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c3),),
// Container(
// padding: EdgeInsets.only(left: 15.w,right: 15.w,top:12.w),
// color: Colors.white,
// child: Text(controller.bookDetails.content??'',style: TextStyle(fontSize: 12.w,height: 1.5,color: Colours.c3),),
// ),
InAppWebView(
contextMenu: ContextMenu(
options: ContextMenuOptions(hideDefaultSystemContextMenuItems: true),
),
onWebViewCreated: (InAppWebViewController wcontroller){
wcontroller.loadData(data: controller.bookDetails.content??'',);
},
),
BookInfoPage(model:controller.bookDetails,)
],
......
......@@ -54,9 +54,9 @@ class BuildBook extends StatelessWidget {
),
Row(
children: [
Text('¥${model.vipPrice}',style: TextStyle(fontSize: 15.w,fontWeight: FontWeight.w500,color: AppTheme.primary)),
Text('¥${model.vipPrice??''}',style: TextStyle(fontSize: 15.w,fontWeight: FontWeight.w500,color: AppTheme.primary)),
Gaps.hGaps10,
Text('¥${model.price}',style: TextStyle(
Text('¥${model.price??''}',style: TextStyle(
fontSize: 13.w,color: Colours.c9,
decoration: TextDecoration.lineThrough,
decorationColor: Colours.c9, // 可选,指定删除线的颜色
......
......@@ -80,7 +80,7 @@ class BookInfoPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: List.generate(model.ratingList!.length, (index){
return _buildProgrss(5- index.toDouble(), model.ratingList![index].toDouble()/model.ratingCount!);
return _buildProgrss(5- index.toDouble(), model.ratingCount == 0?0:model.ratingList![index].toDouble()/model.ratingCount!);
}).toList()
),
Text('${model.ratingCount}个评分',style: TextStyle(fontSize: 9.w,height: 1.4,color: Colours.c9),)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论