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>
<app appid="__UNI__ACD00DA" 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("关于创始人"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合计:"),

1
lib/generated/intl/messages_zh_CN.dart

@ -213,6 +213,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("关于"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : 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("关于"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("过健康有机生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("还没有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("还没有优惠券可以领取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峡姐妹"),
"haowu" : 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("關於"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"),
"haowu" : MessageLookupByLibrary.simpleMessage("好物"),
"heji" : MessageLookupByLibrary.simpleMessage("合計:"),

1
lib/generated/intl/messages_zh_TW.dart

@ -213,6 +213,7 @@ class MessageLookup extends MessageLookupByLibrary {
"guanyu" : MessageLookupByLibrary.simpleMessage("關於"),
"guojiankangyoujishenghuo" : MessageLookupByLibrary.simpleMessage("過健康有機生活"),
"haimeiyouxiaoxi" : MessageLookupByLibrary.simpleMessage("還沒有消息~"),
"haimeiyouyouhuiquankeyilingqu" : MessageLookupByLibrary.simpleMessage("還沒有優惠券可以領取~"),
"haixiajiemei" : MessageLookupByLibrary.simpleMessage("海峽姐妹"),
"haowu" : 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 {
return Intl.message(

1
lib/l10n/intl_en.arb

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

1
lib/l10n/intl_zh_CN.arb

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

1
lib/l10n/intl_zh_Hans_CN.arb

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

1
lib/l10n/intl_zh_Hant_CN.arb

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

1
lib/l10n/intl_zh_TW.arb

@ -506,6 +506,7 @@
"yaoqingrenshoujihao_": "邀请人手機號:{shoujihao}",
"saomashibieguanzhugongzonghao": "掃碼識別,關注公眾號",
"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_footer.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/selector_store_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -34,8 +35,11 @@ class _RollCenterPage extends State<RollCenterPage> {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString('token')),
apiService = ApiService(
Dio(),
context: context,
token: value.getString('token'),
),
queryCoupon(),
});
_refreshController = RefreshController(initialRefresh: false);
@ -114,40 +118,46 @@ class _RollCenterPage extends State<RollCenterPage> {
onRefresh: refreshCoupon,
onLoading: queryCoupon,
physics: BouncingScrollPhysics(),
child: ListView.builder(
itemBuilder: (context, position) {
return GestureDetector(
child: NewCouponWidget(
coupons[position],
(type) {
if (type == 1) {
receiveCoupon(coupons[position].id);
} else {
if (coupons[position].bizType == 5) {
Navigator.of(context).pushNamed(
'/router/write_off_page',
arguments: {
"couponId": coupons[position].id,
"coupon": coupons[position].toJson()
});
} else {
showStoreSelector(coupons[position].storeList);
}
}
child: (coupons != null && coupons.length > 0)
? ListView.builder(
itemBuilder: (context, position) {
return GestureDetector(
child: NewCouponWidget(
coupons[position],
(type) {
if (type == 1) {
receiveCoupon(coupons[position].id);
} else {
if (coupons[position].bizType == 5) {
Navigator.of(context).pushNamed(
'/router/write_off_page',
arguments: {
"couponId": coupons[position].id,
"coupon": coupons[position].toJson()
});
} else {
showStoreSelector(coupons[position].storeList);
}
}
},
() {
setState((){
coupons[position].isEx = !coupons[position].isEx;
});
},
type: 1,
),
);
},
() {
setState(() {
coupons[position].isEx = !coupons[position].isEx;
});
},
type: 1,
itemCount: (coupons != null && coupons.length > 0) ? coupons.length : 0,
)
: NoDataView(
isShowBtn: false,
text: S.of(context).haimeiyouyouhuiquankeyilingqu,
fontSize: 16.sp,
),
);
},
itemCount: coupons != null ? coupons.length : 0,
),
),
)
),
],
),
),
@ -164,11 +174,12 @@ class _RollCenterPage extends State<RollCenterPage> {
showStoreSelector(storeList) {
showModalBottomSheet(
context: context,
backgroundColor: Colors.transparent,
builder: (context) {
return SelectorStoreWidget(storeList);
});
context: context,
backgroundColor: Colors.transparent,
builder: (context) {
return SelectorStoreWidget(storeList);
},
);
}
showAlertDialog() {

144
lib/order/order_detail_page.dart

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

6
lib/web/web_page.dart

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

71
lib/web/web_view/comment_list.dart

@ -52,7 +52,7 @@ class _CommentList extends State<CommentList> {
LoginTipsDialog().show(context);
return;
}
BaseData baseData = await apiService.commentLike(id).catchError((error){});
BaseData baseData = await apiService.commentLike(id).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
memberList.forEach((element) {
if (element.id == id) {
@ -134,15 +134,15 @@ class _CommentList extends State<CommentList> {
showPressMenu(memberList[position].createUser,
memberList[position]);
},
child: commentItem(memberList[position], position,
memberList.length),
child: commentItem(
memberList[position], position, memberList.length),
),
);
},
),
if (memberList != null && memberList.length > 0)
Container(
height: 63.h,
height: commentHeight,
decoration: BoxDecoration(
color: Color(0xFFF2F2F2),
boxShadow: [
@ -154,7 +154,8 @@ class _CommentList extends State<CommentList> {
),
],
),
alignment: Alignment.center,
alignment: Alignment.topCenter,
padding: EdgeInsets.only(top: 22.h),
child: Text(
S.of(context).yixiansquanbupinglun,
style: TextStyle(
@ -166,8 +167,13 @@ class _CommentList extends State<CommentList> {
if (memberList == null || memberList.length == 0)
Container(
width: double.infinity,
height: 80.h,
alignment: Alignment.center,
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(
@ -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 {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(Dio(),
context: context, token: sharedPreferences.getString("token"));
BaseData<PageInfo<MemberCommentList>> baseData =
await apiService.memberCommentList({
apiService = ApiService(
Dio(),
context: context,
token: sharedPreferences.getString("token"),
);
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) {
commentTotal = baseData.data.size;
memberList = baseData.data.list;
contentHeight();
setState(() {});
}
}
@ -214,24 +231,6 @@ class _CommentList extends State<CommentList> {
return;
}
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(
widget: CommentMenu(
(type) {
@ -364,8 +363,8 @@ class _CommentList extends State<CommentList> {
),
Container(
padding: EdgeInsets.only(
left: 68,
right: 16,
left: 68.w,
right: 16.w,
top: 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),
borderRadius: BorderRadius.circular(2.0),
),
child: Column(
children: [
Container(
margin: EdgeInsets.symmetric(horizontal: 4.w),
alignment: Alignment.topLeft,
child: TextField(
maxLines: 8,
minLines: 1,
focusNode: widget.commentFocus,
controller: widget.commentTextController,
decoration: InputDecoration(
border: InputBorder.none,
hintText: widget.hintText,
hintStyle: TextStyle(
fontSize: 14.sp,
color: Color(0xFF868686),
),
),
child: Container(
margin: EdgeInsets.symmetric(horizontal: 4.w),
alignment: Alignment.topLeft,
child: TextField(
maxLines: 8,
minLines: 1,
focusNode: widget.commentFocus,
controller: widget.commentTextController,
decoration: InputDecoration(
border: InputBorder.none,
hintText: widget.hintText,
hintStyle: TextStyle(
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 Article article;
final Function exitFull;
WebContent(this.activity, this.article);
WebContent(this.activity, this.article, this.exitFull);
@override
State<StatefulWidget> createState() {
@ -137,7 +138,7 @@ class _WebContent extends State<WebContent> {
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaleFactor: textScaleFactor,
textScaleFactor: 0.9,
),
child: Container(
width: MediaQuery.of(context).size.width - 17,
@ -154,13 +155,12 @@ class _WebContent extends State<WebContent> {
print("object: isFullScreen: ${chewieAudioController.isFullScreen}");
if (!chewieAudioController.isFullScreen) {
textScaleFactor = 1;
setState(() {});
Future.delayed(Duration(seconds: 1), () {
widget.exitFull();
});
}
}
double textScaleFactor = 0.9;
Widget audioWidget(showControls, loop, autoplay, src, width) {
return Container(
width: width,

Loading…
Cancel
Save