Browse Source

Merge branches 'dev' and 'master' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	lib/community/community_view/community_dynamic.dart
	lib/settlement/settlement.dart
	lib/settlement/settlement_view/activity_coupon_remarks.dart
master
fmk 3 years ago
parent
commit
ddb753f144
  1. 2
      lib/community/community_view/community_dynamic.dart
  2. 3
      lib/mine/mine_view/mine_item.dart
  3. 4
      lib/mine/release_page.dart
  4. 55
      lib/order/edit_remarks_page.dart
  5. 12
      lib/settlement/settlement.dart
  6. 12
      lib/settlement/settlement_view/activity_coupon_remarks.dart

2
lib/community/community_view/community_dynamic.dart

@ -205,7 +205,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
],
),
),
if(widget.comment.memberInfo == null || widget.comment.memberInfo.mid != widget.userId??"")
if(widget?.comment?.memberInfo?.mid != widget.userId??"")
GestureDetector(
onTap: () {
setState(() {

3
lib/mine/mine_view/mine_item.dart

@ -69,7 +69,8 @@ class _MineItem extends State<MineItem> {
return;
}
Navigator.of(context)
.pushNamed('/router/releasePage');
.pushNamed('/router/releasePage',
arguments: {});
});
},
child: mineItem(

4
lib/mine/release_page.dart

@ -24,6 +24,7 @@ class _ReleasePage extends State<ReleasePage> {
RefreshController refreshController = RefreshController();
ApiService apiService;
int pageNum = 0;
String userId;
List<ComunityComment> comments = [];
@ -42,6 +43,7 @@ class _ReleasePage extends State<ReleasePage> {
queryCommunity() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
userId = value.getString('userId');
apiService = ApiService(
Dio(),
context: context,
@ -119,7 +121,7 @@ class _ReleasePage extends State<ReleasePage> {
Navigator.of(context).pushNamed(
'/router/community_details',
arguments: {
"comment": comments[position],
"comment": comments[position],"userId":userId,
},
);
},

55
lib/order/edit_remarks_page.dart

@ -12,6 +12,8 @@ class EditRemarksPage extends StatefulWidget {
}
class _EditRemarksPage extends State<EditRemarksPage> {
TextEditingController commentTextController = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
@ -65,6 +67,9 @@ class _EditRemarksPage extends State<EditRemarksPage> {
],
),
child: TextField(
controller: commentTextController,
keyboardType: TextInputType.multiline,
maxLines: 10,
decoration: InputDecoration(
isDense: true,
hintText: '请填写备注信息,例如:面包切一刀',
@ -85,17 +90,22 @@ class _EditRemarksPage extends State<EditRemarksPage> {
),
flex: 1,
),
Container(
padding: EdgeInsets.all(16.h),
width: MediaQuery.of(context).size.width,
alignment: Alignment.center,
color: Color(0xFF32A060),
child: Text(
S.of(context).tijiao,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16.sp,
GestureDetector(
onTap: (){
Navigator.pop(context,commentTextController.text);
},
child: Container(
padding: EdgeInsets.all(16.h),
width: MediaQuery.of(context).size.width,
alignment: Alignment.center,
color: Color(0xFF32A060),
child: Text(
S.of(context).tijiao,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16.sp,
),
),
),
),
@ -104,8 +114,15 @@ class _EditRemarksPage extends State<EditRemarksPage> {
);
}
addRemarksCnt(cnt){
setState(() {
commentTextController.text = commentTextController.text + cnt;
});
}
List<Widget> remarks() {
return [
GestureDetector(child:
Container(
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w),
decoration: BoxDecoration(
@ -119,8 +136,9 @@ class _EditRemarksPage extends State<EditRemarksPage> {
fontSize: 12.sp,
),
),
),
Container(
),onTap: (){addRemarksCnt("面包");},),
GestureDetector(child:
Container(
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w),
decoration: BoxDecoration(
color: Color(0xFF32A060),
@ -133,7 +151,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
fontSize: 12.sp,
),
),
),
),onTap: (){addRemarksCnt("面包要切好");},),
GestureDetector(child:
Container(
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w),
decoration: BoxDecoration(
@ -147,7 +166,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
fontSize: 12.sp,
),
),
),
),onTap: (){addRemarksCnt("一点");},),
GestureDetector(child:
Container(
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w),
decoration: BoxDecoration(
@ -161,7 +181,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
fontSize: 12.sp,
),
),
),
),onTap: (){addRemarksCnt("");},),
GestureDetector(child:
Container(
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w),
decoration: BoxDecoration(
@ -175,7 +196,7 @@ class _EditRemarksPage extends State<EditRemarksPage> {
fontSize: 12.sp,
),
),
),
),onTap: (){addRemarksCnt("");},),
];
}
}

12
lib/settlement/settlement.dart

@ -51,7 +51,7 @@ class _Settlement extends State<Settlement> {
SettleOrderInfo settleOrderInfo;
MinOrderInfo minOrderInfo;
int selectedBtn = 0;
String remakers = "";
String remakers = "口味、面包硬度等";
String parentCode = "";
String parentId = "";
int payChannel = 4;
@ -393,6 +393,16 @@ class _Settlement extends State<Settlement> {
promotions,
couponCount(),
placeOrder,
remakers,
(){
Navigator.of(context).pushNamed(
'/router/edit_remarks_page',
arguments: {},
).then((value) => {setState(() {
if(value != null)
remakers = value;
})});
}
),
if (placeOrder) ///

12
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -7,12 +7,14 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
class ActivityCouponRemarks extends StatefulWidget {
final Function() couponCart;
final Function() activityCart;
final Function() editRemark;
final String coupons;
final String promotions;
final SettleOrderInfo settleOrderInfo;
final int couponCount;
final bool placeOrder;
final String remark;
ActivityCouponRemarks(
this.couponCart,
@ -22,6 +24,8 @@ class ActivityCouponRemarks extends StatefulWidget {
this.promotions,
this.couponCount,
this.placeOrder,
this.remark,
this.editRemark,
);
@override
@ -145,7 +149,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
),
InkWell(
onTap: () {
widget.editRemark();
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -162,15 +166,15 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
),
),
),
Text(
"口味、面包硬度等",
Expanded(child:Text(
widget.remark,
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold,
),
),
),),
Icon(
Icons.keyboard_arrow_right,
size: 16,

Loading…
Cancel
Save