Browse Source

safety

master
fmk 3 years ago
parent
commit
87bd021e23
  1. 1
      lib/main.dart
  2. 4
      lib/web/web_page.dart
  3. 25
      lib/web/web_view/comment_list.dart
  4. 6
      lib/web/web_view/web_content.dart
  5. 23
      lib/web/web_view/web_header.dart

1
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';

4
lib/web/web_page.dart

@ -219,7 +219,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
),
),
),
background: Color(0xFFF7F7F7),
background: Color(0xFFFFFFFFF),
leadingColor: Colors.black,
title: activity != null
? activity.mainTitle
@ -262,7 +262,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
isKeyBoardShow,
_reply,
_delCommentTips,
12
12.sp
),
],
),

25
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<StatefulWidget> createState() {
@ -171,10 +164,8 @@ class _CommentList extends State<CommentList> {
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),
@ -216,10 +207,12 @@ class _CommentList extends State<CommentList> {
token: sharedPreferences.getString("token"),
showLoading: false,
);
BaseData<PageInfo<MemberCommentList>> baseData = await apiService.memberCommentList({
BaseData<PageInfo<MemberCommentList>> 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) {

6
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<WebContent> {
: widget.article != null
? widget.article.content
: "",
style: {
"html": Style(
backgroundColor: Colors.white
)
},
customImageRenders: {
base64DataUriMatcher(): base64ImageRender(),
assetUriMatcher(): assetImageRender(),

23
lib/web/web_view/web_header.dart

@ -1,11 +1,9 @@
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;
@ -17,7 +15,6 @@ class WebHeader extends StatefulWidget {
State<StatefulWidget> createState() {
return _WebHeader();
}
}
class _WebHeader extends State<WebHeader> {
@ -26,7 +23,7 @@ class _WebHeader extends State<WebHeader> {
return Column(
children: [
Container(
color: Color(0xFFF7F7F7),
color: Color(0xFFFFFFFF),
padding: EdgeInsets.all(12),
alignment: Alignment.centerLeft,
child: Text(
@ -43,12 +40,15 @@ class _WebHeader extends State<WebHeader> {
),
),
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,
@ -58,17 +58,16 @@ class _WebHeader extends State<WebHeader> {
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"]
});
"source": widget.arguments["activityId"]
},
);
}
}
},
@ -94,8 +93,4 @@ class _WebHeader extends State<WebHeader> {
],
);
}
}

Loading…
Cancel
Save