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. 33
      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( GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {

3
lib/mine/mine_view/mine_item.dart

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

4
lib/mine/release_page.dart

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

33
lib/order/edit_remarks_page.dart

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

12
lib/settlement/settlement.dart

@ -51,7 +51,7 @@ class _Settlement extends State<Settlement> {
SettleOrderInfo settleOrderInfo; SettleOrderInfo settleOrderInfo;
MinOrderInfo minOrderInfo; MinOrderInfo minOrderInfo;
int selectedBtn = 0; int selectedBtn = 0;
String remakers = ""; String remakers = "口味、面包硬度等";
String parentCode = ""; String parentCode = "";
String parentId = ""; String parentId = "";
int payChannel = 4; int payChannel = 4;
@ -393,6 +393,16 @@ class _Settlement extends State<Settlement> {
promotions, promotions,
couponCount(), couponCount(),
placeOrder, placeOrder,
remakers,
(){
Navigator.of(context).pushNamed(
'/router/edit_remarks_page',
arguments: {},
).then((value) => {setState(() {
if(value != null)
remakers = value;
})});
}
), ),
if (placeOrder) /// 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 { class ActivityCouponRemarks extends StatefulWidget {
final Function() couponCart; final Function() couponCart;
final Function() activityCart; final Function() activityCart;
final Function() editRemark;
final String coupons; final String coupons;
final String promotions; final String promotions;
final SettleOrderInfo settleOrderInfo; final SettleOrderInfo settleOrderInfo;
final int couponCount; final int couponCount;
final bool placeOrder; final bool placeOrder;
final String remark;
ActivityCouponRemarks( ActivityCouponRemarks(
this.couponCart, this.couponCart,
@ -22,6 +24,8 @@ class ActivityCouponRemarks extends StatefulWidget {
this.promotions, this.promotions,
this.couponCount, this.couponCount,
this.placeOrder, this.placeOrder,
this.remark,
this.editRemark,
); );
@override @override
@ -145,7 +149,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
widget.editRemark();
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -162,15 +166,15 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
), ),
), ),
Text( Expanded(child:Text(
"口味、面包硬度等", widget.remark,
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.semi_bold,
), ),
), ),),
Icon( Icon(
Icons.keyboard_arrow_right, Icons.keyboard_arrow_right,
size: 16, size: 16,

Loading…
Cancel
Save