Browse Source

safety

master
fmk 3 years ago
parent
commit
58437ca219
  1. 2
      android/app/src/main/assets/data/dcloud_control.xml
  2. 1
      lib/generated/intl/messages_en.dart
  3. 1
      lib/generated/intl/messages_zh_CN.dart
  4. 1
      lib/generated/intl/messages_zh_Hans_CN.dart
  5. 1
      lib/generated/intl/messages_zh_Hant_CN.dart
  6. 1
      lib/generated/intl/messages_zh_TW.dart
  7. 10
      lib/generated/l10n.dart
  8. 1
      lib/l10n/intl_en.arb
  9. 1
      lib/l10n/intl_zh_CN.arb
  10. 1
      lib/l10n/intl_zh_Hans_CN.arb
  11. 1
      lib/l10n/intl_zh_Hant_CN.arb
  12. 1
      lib/l10n/intl_zh_TW.arb
  13. 87
      lib/mine/roll_center_page.dart
  14. 144
      lib/order/order_detail_page.dart
  15. 6
      lib/web/web_page.dart
  16. 71
      lib/web/web_view/comment_list.dart
  17. 34
      lib/web/web_view/input_comment.dart
  18. 12
      lib/web/web_view/web_content.dart

2
android/app/src/main/assets/data/dcloud_control.xml

@ -1,4 +1,4 @@
<hbuilder version="1.9.9.80110" debug="false" syncDebug ="true"> <hbuilder version="1.9.9.80110" debug="false" syncDebug="true">
<apps> <apps>
<app appid="__UNI__ACD00DA" appver="1.0"/> <app appid="__UNI__ACD00DA" appver="1.0"/>
<app appid="__UNI__E60E056" appver="1.0"/> <app appid="__UNI__E60E056" appver="1.0"/>

1
lib/generated/intl/messages_en.dart

@ -214,6 +214,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("关于创始人"), "guanyuchuangshiren" : MessageLookupByLibrary.simpleMessage("关于创始人"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"),

1
lib/generated/intl/messages_zh_CN.dart

@ -213,6 +213,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("关于"), "guanyu" : MessageLookupByLibrary.simpleMessage("关于"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"),

1
lib/generated/intl/messages_zh_Hans_CN.dart

@ -213,6 +213,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("关于"), "guanyu" : MessageLookupByLibrary.simpleMessage("关于"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"), "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"), "heji" : MessageLookupByLibrary.simpleMessage("合计:"),

1
lib/generated/intl/messages_zh_Hant_CN.dart

@ -213,6 +213,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("關於"), "guanyu" : MessageLookupByLibrary.simpleMessage("關於"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"), "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合計:"), "heji" : MessageLookupByLibrary.simpleMessage("合計:"),

1
lib/generated/intl/messages_zh_TW.dart

@ -213,6 +213,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("關於"), "guanyu" : MessageLookupByLibrary.simpleMessage("關於"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"), "guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"), "haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"), "haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"), "haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合計:"), "heji" : MessageLookupByLibrary.simpleMessage("合計:"),

10
lib/generated/l10n.dart

@ -4945,6 +4945,16 @@ class S {
); );
} }
/// `~`
String get haimeiyouyouhuiquankeyilingqu {
return Intl.message(
'还没有优惠券可以领取~',
name: 'haimeiyouyouhuiquankeyilingqu',
desc: '',
args: [],
);
}
/// `使` /// `使`
String get privacy_policy4 { String get privacy_policy4 {
return Intl.message( return Intl.message(

1
lib/l10n/intl_en.arb

@ -512,6 +512,7 @@
"yaoqingrenshoujihao_": "邀请人手机号:{shoujihao}", "yaoqingrenshoujihao_": "邀请人手机号:{shoujihao}",
"saomashibieguanzhugongzonghao": "扫码识别,关注公众号", "saomashibieguanzhugongzonghao": "扫码识别,关注公众号",
"fenxiangzhiweixin": "分享至微信", "fenxiangzhiweixin": "分享至微信",
"haimeiyouyouhuiquankeyilingqu": "还没有优惠券可以领取~",

1
lib/l10n/intl_zh_CN.arb

@ -514,6 +514,7 @@
"yaoqingrenshoujihao_": "邀请人手机号:{shoujihao}", "yaoqingrenshoujihao_": "邀请人手机号:{shoujihao}",
"saomashibieguanzhugongzonghao": "扫码识别,关注公众号", "saomashibieguanzhugongzonghao": "扫码识别,关注公众号",
"fenxiangzhiweixin": "分享至微信", "fenxiangzhiweixin": "分享至微信",
"haimeiyouyouhuiquankeyilingqu": "还没有优惠券可以领取~",

1
lib/l10n/intl_zh_Hans_CN.arb

@ -514,6 +514,7 @@
"yaoqingrenshoujihao_": "邀请人手机号:{shoujihao}", "yaoqingrenshoujihao_": "邀请人手机号:{shoujihao}",
"saomashibieguanzhugongzonghao": "扫码识别,关注公众号", "saomashibieguanzhugongzonghao": "扫码识别,关注公众号",
"fenxiangzhiweixin": "分享至微信", "fenxiangzhiweixin": "分享至微信",
"haimeiyouyouhuiquankeyilingqu": "还没有优惠券可以领取~",

1
lib/l10n/intl_zh_Hant_CN.arb

@ -507,6 +507,7 @@
"yaoqingrenshoujihao_": "邀请人手機號:{shoujihao}", "yaoqingrenshoujihao_": "邀请人手機號:{shoujihao}",
"saomashibieguanzhugongzonghao": "掃碼識別,關注公眾號", "saomashibieguanzhugongzonghao": "掃碼識別,關注公眾號",
"fenxiangzhiweixin": "分享至微信", "fenxiangzhiweixin": "分享至微信",
"haimeiyouyouhuiquankeyilingqu": "還沒有優惠券可以領取~",

1
lib/l10n/intl_zh_TW.arb

@ -506,6 +506,7 @@
"yaoqingrenshoujihao_": "邀请人手機號:{shoujihao}", "yaoqingrenshoujihao_": "邀请人手機號:{shoujihao}",
"saomashibieguanzhugongzonghao": "掃碼識別,關注公眾號", "saomashibieguanzhugongzonghao": "掃碼識別,關注公眾號",
"fenxiangzhiweixin": "分享至微信", "fenxiangzhiweixin": "分享至微信",
"haimeiyouyouhuiquankeyilingqu": "還沒有優惠券可以領取~",

87
lib/mine/roll_center_page.dart

@ -11,6 +11,7 @@ import 'package:huixiang/view_widget/item_title.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart'; import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/new_coupon_widget.dart'; import 'package:huixiang/view_widget/new_coupon_widget.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/receive_success.dart'; import 'package:huixiang/view_widget/receive_success.dart';
import 'package:huixiang/view_widget/selector_store_dialog.dart'; import 'package:huixiang/view_widget/selector_store_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -34,8 +35,11 @@ class _RollCenterPage extends State<RollCenterPage> {
super.initState(); super.initState();
SharedPreferences.getInstance().then((value) => { SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(), apiService = ApiService(
context: context, token: value.getString('token')), Dio(),
context: context,
token: value.getString('token'),
),
queryCoupon(), queryCoupon(),
}); });
_refreshController = RefreshController(initialRefresh: false); _refreshController = RefreshController(initialRefresh: false);
@ -114,40 +118,46 @@ class _RollCenterPage extends State<RollCenterPage> {
onRefresh: refreshCoupon, onRefresh: refreshCoupon,
onLoading: queryCoupon, onLoading: queryCoupon,
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
child: ListView.builder( child: (coupons != null && coupons.length > 0)
itemBuilder: (context, position) { ? ListView.builder(
return GestureDetector( itemBuilder: (context, position) {
child: NewCouponWidget( return GestureDetector(
coupons[position], child: NewCouponWidget(
(type) { coupons[position],
if (type == 1) { (type) {
receiveCoupon(coupons[position].id); if (type == 1) {
} else { receiveCoupon(coupons[position].id);
if (coupons[position].bizType == 5) { } else {
Navigator.of(context).pushNamed( if (coupons[position].bizType == 5) {
'/router/write_off_page', Navigator.of(context).pushNamed(
arguments: { '/router/write_off_page',
"couponId": coupons[position].id, arguments: {
"coupon": coupons[position].toJson() "couponId": coupons[position].id,
}); "coupon": coupons[position].toJson()
} else { });
showStoreSelector(coupons[position].storeList); } else {
} showStoreSelector(coupons[position].storeList);
} }
}
},
() {
setState((){
coupons[position].isEx = !coupons[position].isEx;
});
},
type: 1,
),
);
}, },
() { itemCount: (coupons != null && coupons.length > 0) ? coupons.length : 0,
setState(() { )
coupons[position].isEx = !coupons[position].isEx; : NoDataView(
}); isShowBtn: false,
}, text: S.of(context).haimeiyouyouhuiquankeyilingqu,
type: 1, fontSize: 16.sp,
), ),
);
},
itemCount: coupons != null ? coupons.length : 0,
),
), ),
) ),
], ],
), ),
), ),
@ -164,11 +174,12 @@ class _RollCenterPage extends State<RollCenterPage> {
showStoreSelector(storeList) { showStoreSelector(storeList) {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
builder: (context) { builder: (context) {
return SelectorStoreWidget(storeList); return SelectorStoreWidget(storeList);
}); },
);
} }
showAlertDialog() { showAlertDialog() {

144
lib/order/order_detail_page.dart

@ -36,8 +36,11 @@ class _OrderDetailPage extends State<OrderDetailPage> {
super.initState(); super.initState();
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
apiService = apiService = ApiService(
ApiService(Dio(), context: context, token: value.getString("token")); Dio(),
context: context,
token: value.getString("token"),
);
queryDetails(); queryDetails();
}); });
} }
@ -62,11 +65,11 @@ class _OrderDetailPage extends State<OrderDetailPage> {
isTakeOut = orderInfo.isTakeOut; isTakeOut = orderInfo.isTakeOut;
refundStatus = orderInfo.refundStatus; refundStatus = orderInfo.refundStatus;
// storeType = orderInfo.storeVO.posType.code; // storeType = orderInfo.storeVO.posType.code;
print("refund_status: $refundStatus"); print("order refund_status: $refundStatus");
print("payStatus: $payStatus"); print("order payStatus: $payStatus");
print("orderStatus: $orderStatus"); print("order orderStatus: $orderStatus");
print("sendStatus: $sendStatus"); print("order sendStatus: $sendStatus");
print("isTakeOut: $isTakeOut"); print("order isTakeOut: $isTakeOut");
if (mounted) if (mounted)
setState(() { setState(() {
statusTitle(); statusTitle();
@ -465,75 +468,76 @@ class _OrderDetailPage extends State<OrderDetailPage> {
carryOnPay() async { carryOnPay() async {
showDialog( showDialog(
context: context, context: context,
builder: (context) { builder: (context) {
return AlertDialog( return AlertDialog(
content: Container( content: Container(
width: MediaQuery.of(context).size.width - 84.w, width: MediaQuery.of(context).size.width - 84.w,
height: 120.h, height: 140.h,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
"app暂不支持支付,\n请前往对应小程序处理", "app暂不支持支付,\n请前往对应小程序处理",
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 16.sp, fontSize: 16.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
),
),
SizedBox(
height: 30.h,
), ),
Row( ),
children: [ SizedBox(
Expanded( height: 30.h,
child: InkWell( ),
child: BorderText( Row(
text: "取消", children: [
textColor: Color(0xFF32A060), Expanded(
fontSize: 16.sp, child: InkWell(
fontWeight: FontWeight.bold, child: BorderText(
borderColor: Color(0xFF32A060), text: "取消",
radius: 4, textColor: Color(0xFF32A060),
padding: EdgeInsets.all(12), fontSize: 16.sp,
borderWidth: 1, fontWeight: FontWeight.bold,
), borderColor: Color(0xFF32A060),
onTap: () { radius: 4,
Navigator.of(context).pop(); padding: EdgeInsets.all(12),
}, borderWidth: 1,
), ),
flex: 1, onTap: () {
), Navigator.of(context).pop();
SizedBox( },
width: 16.w,
), ),
Expanded( flex: 1,
child: InkWell( ),
child: RoundButton( SizedBox(
text: "好的", width: 16.w,
textColor: Colors.white, ),
radius: 4, Expanded(
padding: EdgeInsets.all(12), child: InkWell(
backgroup: Color(0xFF32A060), child: RoundButton(
fontSize: 16.sp, text: "好的",
fontWeight: FontWeight.bold, textColor: Colors.white,
), radius: 4,
onTap: () { padding: EdgeInsets.all(12),
Navigator.of(context).pop(); backgroup: Color(0xFF32A060),
}, fontSize: 16.sp,
fontWeight: FontWeight.bold,
), ),
flex: 1, onTap: () {
Navigator.of(context).pop();
},
), ),
], flex: 1,
) ),
], ],
), ),
],
), ),
); ),
}); );
},
);
} }
Widget paySelector() { Widget paySelector() {

6
lib/web/web_page.dart

@ -249,7 +249,9 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
WebHeader(widget.arguments, activity, article), WebHeader(widget.arguments, activity, article),
/// ///
WebContent(activity, article), WebContent(activity, article, (){
setState(() {});
}),
/// ///
CommentList( CommentList(
@ -317,7 +319,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
Offset first = firstRenderBox.localToGlobal(Offset.zero); Offset first = firstRenderBox.localToGlobal(Offset.zero);
scrollController.animateTo(first.dy + scrollController.offset - scrollController.animateTo(first.dy + scrollController.offset -
(kToolbarHeight + MediaQuery.of(context).padding.top), (kToolbarHeight + MediaQuery.of(context).padding.top),
duration: Duration(milliseconds: 1000), duration: Duration(milliseconds: 300),
curve: Curves.easeIn); curve: Curves.easeIn);
} }

71
lib/web/web_view/comment_list.dart

@ -52,7 +52,7 @@ class _CommentList extends State<CommentList> {
LoginTipsDialog().show(context); LoginTipsDialog().show(context);
return; return;
} }
BaseData baseData = await apiService.commentLike(id).catchError((error){}); BaseData baseData = await apiService.commentLike(id).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
memberList.forEach((element) { memberList.forEach((element) {
if (element.id == id) { if (element.id == id) {
@ -134,15 +134,15 @@ class _CommentList extends State<CommentList> {
showPressMenu(memberList[position].createUser, showPressMenu(memberList[position].createUser,
memberList[position]); memberList[position]);
}, },
child: commentItem(memberList[position], position, child: commentItem(
memberList.length), memberList[position], position, memberList.length),
), ),
); );
}, },
), ),
if (memberList != null && memberList.length > 0) if (memberList != null && memberList.length > 0)
Container( Container(
height: 63.h, height: commentHeight,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFFF2F2F2), color: Color(0xFFF2F2F2),
boxShadow: [ boxShadow: [
@ -154,7 +154,8 @@ class _CommentList extends State<CommentList> {
), ),
], ],
), ),
alignment: Alignment.center, alignment: Alignment.topCenter,
padding: EdgeInsets.only(top: 22.h),
child: Text( child: Text(
S.of(context).yixiansquanbupinglun, S.of(context).yixiansquanbupinglun,
style: TextStyle( style: TextStyle(
@ -166,8 +167,13 @@ class _CommentList extends State<CommentList> {
if (memberList == null || memberList.length == 0) if (memberList == null || memberList.length == 0)
Container( Container(
width: double.infinity, width: double.infinity,
height: 80.h, height: MediaQuery.of(context).size.height -
alignment: Alignment.center, kToolbarHeight -
MediaQuery.of(context).padding.top -
160.h,
alignment: Alignment.topCenter,
color: Color(0xFFF2F2F2),
padding: EdgeInsets.only(top: 22.h),
child: Text( child: Text(
S.of(context).zanwupinglun, S.of(context).zanwupinglun,
style: TextStyle( style: TextStyle(
@ -180,30 +186,41 @@ class _CommentList extends State<CommentList> {
], ],
), ),
), ),
SizedBox(
height: 12.h,
),
], ],
); );
} }
double commentHeight = 60.h;
contentHeight() {
double contentHeight = MediaQuery.of(context).size.height -
kToolbarHeight -
MediaQuery.of(context).padding.top -
160.h;
if ((contentHeight - 60.h) > (128.h * memberList.length)) {
commentHeight = contentHeight - (128.h * memberList.length);
}
}
// //
queryMemberCommentList() async { queryMemberCommentList() async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance(); SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null) if (apiService == null)
apiService = ApiService(Dio(), apiService = ApiService(
context: context, token: sharedPreferences.getString("token")); Dio(),
BaseData<PageInfo<MemberCommentList>> baseData = context: context,
await apiService.memberCommentList({ token: sharedPreferences.getString("token"),
);
BaseData<PageInfo<MemberCommentList>> baseData = await apiService.memberCommentList({
"pageNum": 1, "pageNum": 1,
"pageSize": 100, "pageSize": 100,
"relationalId": "relationalId": widget.arguments["activityId"] ?? widget.arguments["articleId"],
widget.arguments["activityId"] ?? widget.arguments["articleId"],
"relationalType": 1, "relationalType": 1,
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
commentTotal = baseData.data.size; commentTotal = baseData.data.size;
memberList = baseData.data.list; memberList = baseData.data.list;
contentHeight();
setState(() {}); setState(() {});
} }
} }
@ -214,24 +231,6 @@ class _CommentList extends State<CommentList> {
return; return;
} }
SharedPreferences.getInstance().then((value) { SharedPreferences.getInstance().then((value) {
// showModalBottomSheet(
// context: context,
// backgroundColor: Colors.transparent,
// builder: (context) {
// return CommentMenu(
// (type) {
// print("click: $type");
// if (type == "huifu") {
// widget.reply(memberComment);
// } else if (type == "shanchu") {
// widget.delCommentTips();
// }
// },
// isSelf: userId == value.getString("userId"),
// );
// },
// );
SmartDialog.show( SmartDialog.show(
widget: CommentMenu( widget: CommentMenu(
(type) { (type) {
@ -364,8 +363,8 @@ class _CommentList extends State<CommentList> {
), ),
Container( Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 68, left: 68.w,
right: 16, right: 16.w,
top: 16.h, top: 16.h,
bottom: 16.h, bottom: 16.h,
), ),

34
lib/web/web_view/input_comment.dart

@ -64,27 +64,23 @@ class _InputComment extends State<InputComment> {
color: Color(0xffF2F2F2), color: Color(0xffF2F2F2),
borderRadius: BorderRadius.circular(2.0), borderRadius: BorderRadius.circular(2.0),
), ),
child: Column( child: Container(
children: [ margin: EdgeInsets.symmetric(horizontal: 4.w),
Container( alignment: Alignment.topLeft,
margin: EdgeInsets.symmetric(horizontal: 4.w), child: TextField(
alignment: Alignment.topLeft, maxLines: 8,
child: TextField( minLines: 1,
maxLines: 8, focusNode: widget.commentFocus,
minLines: 1, controller: widget.commentTextController,
focusNode: widget.commentFocus, decoration: InputDecoration(
controller: widget.commentTextController, border: InputBorder.none,
decoration: InputDecoration( hintText: widget.hintText,
border: InputBorder.none, hintStyle: TextStyle(
hintText: widget.hintText, fontSize: 14.sp,
hintStyle: TextStyle( color: Color(0xFF868686),
fontSize: 14.sp,
color: Color(0xFF868686),
),
),
), ),
), ),
], ),
), ),
), ),
), ),

12
lib/web/web_view/web_content.dart

@ -16,8 +16,9 @@ class WebContent extends StatefulWidget {
final Activity activity; final Activity activity;
final Article article; final Article article;
final Function exitFull;
WebContent(this.activity, this.article); WebContent(this.activity, this.article, this.exitFull);
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() {
@ -137,7 +138,7 @@ class _WebContent extends State<WebContent> {
return MediaQuery( return MediaQuery(
data: MediaQuery.of(context).copyWith( data: MediaQuery.of(context).copyWith(
textScaleFactor: textScaleFactor, textScaleFactor: 0.9,
), ),
child: Container( child: Container(
width: MediaQuery.of(context).size.width - 17, width: MediaQuery.of(context).size.width - 17,
@ -154,13 +155,12 @@ class _WebContent extends State<WebContent> {
print("object: isFullScreen: ${chewieAudioController.isFullScreen}"); print("object: isFullScreen: ${chewieAudioController.isFullScreen}");
if (!chewieAudioController.isFullScreen) { if (!chewieAudioController.isFullScreen) {
textScaleFactor = 1; Future.delayed(Duration(seconds: 1), () {
setState(() {}); widget.exitFull();
});
} }
} }
double textScaleFactor = 0.9;
Widget audioWidget(showControls, loop, autoplay, src, width) { Widget audioWidget(showControls, loop, autoplay, src, width) {
return Container( return Container(
width: width, width: width,

Loading…
Cancel
Save