diff --git a/lib/main.dart b/lib/main.dart index 98e47eed..da62d3d6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -54,6 +54,7 @@ import 'package:huixiang/setting/setting_page.dart'; import 'package:huixiang/setting/treaty_page.dart'; // import 'package:huixiang/store/settlement.dart'; import 'package:huixiang/store/store_order.dart'; +import 'package:huixiang/store/store_view/settlement.dart'; import 'package:huixiang/union/location_map_page.dart'; import 'package:huixiang/web/web_page.dart'; diff --git a/lib/web/web_page.dart b/lib/web/web_page.dart index 34a5b6a3..c4ecde42 100644 --- a/lib/web/web_page.dart +++ b/lib/web/web_page.dart @@ -219,7 +219,7 @@ class _WebPage extends State with WidgetsBindingObserver { ), ), ), - background: Color(0xFFF7F7F7), + background: Color(0xFFFFFFFFF), leadingColor: Colors.black, title: activity != null ? activity.mainTitle @@ -262,7 +262,7 @@ class _WebPage extends State with WidgetsBindingObserver { isKeyBoardShow, _reply, _delCommentTips, - 12 + 12.sp ), ], ), diff --git a/lib/web/web_view/comment_list.dart b/lib/web/web_view/comment_list.dart index 4f438915..13a791cf 100644 --- a/lib/web/web_view/comment_list.dart +++ b/lib/web/web_view/comment_list.dart @@ -25,16 +25,9 @@ class CommentList extends StatefulWidget { final Function delCommentTips; final double fontSize; - CommentList( - Key key, - this.arguments, - this.activity, - this.article, - this.isKeyBoardShow, - this.reply, - this.delCommentTips, - this.fontSize - ) : super(key: key); + CommentList(Key key, this.arguments, this.activity, this.article, + this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize) + : super(key: key); @override State createState() { @@ -104,7 +97,7 @@ class _CommentList extends State { Text( S.of(context).pinglun_(commentTotal.toString()), style: TextStyle( - fontSize:widget.fontSize+4, + fontSize: widget.fontSize + 4, fontWeight: FontWeight.bold, color: Color(0xff1A1A1A), ), @@ -116,7 +109,7 @@ class _CommentList extends State { S.of(context).xihuan_( "${widget.article?.likes ?? widget.activity?.likes ?? "0"}"), style: TextStyle( - fontSize:widget.fontSize+4, + fontSize: widget.fontSize + 4, fontWeight: FontWeight.bold, color: Color(0xff1A1A1A), ), @@ -163,7 +156,7 @@ class _CommentList extends State { child: Text( S.of(context).yixiansquanbupinglun, style: TextStyle( - fontSize:widget.fontSize+2, + fontSize: widget.fontSize + 2, color: Color(0xff353535), ), ), @@ -171,17 +164,15 @@ class _CommentList extends State { if (memberList == null || memberList.length == 0) Container( width: double.infinity, - height: MediaQuery.of(context).size.height - - kToolbarHeight - - MediaQuery.of(context).padding.top - - 160.h, + height: MediaQuery.of(context).size.height - kToolbarHeight + - MediaQuery.of(context).padding.top - 160.h, alignment: Alignment.topCenter, color: Color(0xFFF2F2F2), padding: EdgeInsets.only(top: 22.h), child: Text( S.of(context).zanwupinglun, style: TextStyle( - fontSize:widget.fontSize+2, + fontSize: widget.fontSize + 2, fontWeight: FontWeight.bold, color: Color(0xFFA0A0A0), ), @@ -216,10 +207,12 @@ class _CommentList extends State { token: sharedPreferences.getString("token"), showLoading: false, ); - BaseData> baseData = await apiService.memberCommentList({ + BaseData> baseData = + await apiService.memberCommentList({ "pageNum": 1, "pageSize": 100, - "relationalId": widget.arguments["activityId"] ?? widget.arguments["articleId"], + "relationalId": + widget.arguments["activityId"] ?? widget.arguments["articleId"], "relationalType": 1, }).catchError((error) {}); if (baseData != null && baseData.isSuccess) { @@ -292,7 +285,7 @@ class _CommentList extends State { text: memberList.username, style: TextStyle( fontWeight: FontWeight.bold, - fontSize:widget.fontSize+2, + fontSize: widget.fontSize + 2, color: Colors.black, ), ), @@ -308,7 +301,7 @@ class _CommentList extends State { overflow: TextOverflow.ellipsis, maxLines: 2, style: TextStyle( - fontSize:widget.fontSize, + fontSize: widget.fontSize, color: Color(0xff808080), ), ), @@ -359,7 +352,7 @@ class _CommentList extends State { text, style: TextStyle( color: Color(0xFF1A1A1A), - fontSize:widget.fontSize, + fontSize: widget.fontSize, ), ); }, @@ -381,7 +374,7 @@ class _CommentList extends State { child: Text( memberList.content, style: TextStyle( - fontSize:widget.fontSize+2, + fontSize: widget.fontSize + 2, color: Color(0xff1A1A1A), ), ), @@ -415,7 +408,7 @@ class _CommentList extends State { child: Text( memberList.parentContent ?? "", style: TextStyle( - fontSize:widget.fontSize, + fontSize: widget.fontSize, color: Color(0xff808080), ), ), diff --git a/lib/web/web_view/web_content.dart b/lib/web/web_view/web_content.dart index b9bf54b5..65d1b5ab 100644 --- a/lib/web/web_view/web_content.dart +++ b/lib/web/web_view/web_content.dart @@ -7,6 +7,7 @@ import 'package:flutter_html/image_render.dart'; import 'package:chewie/src/chewie_progress_colors.dart' as chewie; import 'package:flutter/material.dart'; import 'package:flutter_html/src/replaced_element.dart'; +import 'package:flutter_html/style.dart'; import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/article.dart'; import 'package:video_player/video_player.dart'; @@ -38,6 +39,11 @@ class _WebContent extends State { : widget.article != null ? widget.article.content : "", + style: { + "html": Style( + backgroundColor: Colors.white + ) + }, customImageRenders: { base64DataUriMatcher(): base64ImageRender(), assetUriMatcher(): assetImageRender(), diff --git a/lib/web/web_view/web_header.dart b/lib/web/web_view/web_header.dart index a88ff5e0..aa7a5807 100644 --- a/lib/web/web_view/web_header.dart +++ b/lib/web/web_view/web_header.dart @@ -1,23 +1,20 @@ - import 'package:flutter/material.dart'; import 'package:huixiang/retrofit/data/activity.dart'; import 'package:huixiang/retrofit/data/article.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class WebHeader extends StatefulWidget { - final Map arguments; final Activity activity; final Article article; final double fontSize; - WebHeader(this.arguments, this.activity, this.article,this.fontSize); + WebHeader(this.arguments, this.activity, this.article, this.fontSize); @override State createState() { return _WebHeader(); } - } class _WebHeader extends State { @@ -26,15 +23,15 @@ class _WebHeader extends State { return Column( children: [ Container( - color: Color(0xFFF7F7F7), + color: Color(0xFFFFFFFF), padding: EdgeInsets.all(12), alignment: Alignment.centerLeft, child: Text( widget.activity != null ? widget.activity.mainTitle : widget.article != null - ? widget.article.mainTitle - : "", + ? widget.article.mainTitle + : "", style: TextStyle( fontSize: widget.fontSize, fontWeight: FontWeight.bold, @@ -43,32 +40,34 @@ class _WebHeader extends State { ), ), Container( + color: Color(0xFFFFFFFF), padding: EdgeInsets.symmetric(horizontal: 12.w), child: Row( children: [ InkWell( child: Text( - "${widget.activity != null ? (widget.activity.storeName ?? "") : (widget.article != null && widget.article.author != null) ? (widget.article.author.name ?? "") : ""}", + "${widget.activity != null ? (widget.activity.storeName ?? "") + : (widget.article != null && widget.article.author != null) + ? (widget.article.author.name ?? "") : ""}", style: TextStyle( fontWeight: FontWeight.normal, - fontSize:widget.fontSize-2, + fontSize: widget.fontSize - 2, color: Colors.blue, ), ), onTap: () { if (widget.activity != null) { if (widget.arguments["source"] != null && - widget.arguments["source"] == - widget.activity.storeId) { + widget.arguments["source"] == widget.activity.storeId) { Navigator.of(context).pop(); } else { Navigator.of(context).pushNamed( - '/router/union_detail_page', - arguments: { - "id": widget.activity.storeId, - "source": - widget.arguments["activityId"] - }); + '/router/union_detail_page', + arguments: { + "id": widget.activity.storeId, + "source": widget.arguments["activityId"] + }, + ); } } }, @@ -80,11 +79,11 @@ class _WebHeader extends State { widget.activity != null ? widget.activity.createTime : widget.article != null - ? widget.article.createTime - : "", + ? widget.article.createTime + : "", style: TextStyle( fontWeight: FontWeight.normal, - fontSize: widget.fontSize-4, + fontSize: widget.fontSize - 4, color: Colors.grey, ), ), @@ -94,8 +93,4 @@ class _WebHeader extends State { ], ); } - } - - -