Browse Source

消息更改ui;

登录页手机号间距更改;
订单详情页增加刷新;
优惠券名字增加两行;
new_revision_app
wurong 2 years ago
parent
commit
00d657f991
  1. BIN
      assets/image/2x/c_z.webp
  2. BIN
      assets/image/2x/icon_chat.webp
  3. BIN
      assets/image/2x/icon_cz.webp
  4. BIN
      assets/image/2x/icon_gz.webp
  5. BIN
      assets/image/2x/icon_order.webp
  6. BIN
      assets/image/2x/icon_pl.webp
  7. BIN
      assets/image/2x/icon_scan_qr_code.webp
  8. BIN
      assets/image/2x/icon_system_message.webp
  9. BIN
      assets/image/2x/icon_z.webp
  10. BIN
      assets/image/3x/c_z.webp
  11. BIN
      assets/image/3x/icon_chat.webp
  12. BIN
      assets/image/3x/icon_cz.webp
  13. BIN
      assets/image/3x/icon_gz.webp
  14. BIN
      assets/image/3x/icon_order.webp
  15. BIN
      assets/image/3x/icon_pl.webp
  16. BIN
      assets/image/3x/icon_scan_qr_code.webp
  17. BIN
      assets/image/3x/icon_system_message.webp
  18. BIN
      assets/image/3x/icon_z.webp
  19. BIN
      assets/image/c_z.webp
  20. BIN
      assets/image/icon_chat.webp
  21. BIN
      assets/image/icon_cz.webp
  22. BIN
      assets/image/icon_gz.webp
  23. BIN
      assets/image/icon_order.webp
  24. BIN
      assets/image/icon_pl.webp
  25. BIN
      assets/image/icon_scan_qr_code.webp
  26. BIN
      assets/image/icon_system_message.webp
  27. BIN
      assets/image/icon_z.webp
  28. 2
      lib/login/new_login_page.dart
  29. 3
      lib/main.dart
  30. 138
      lib/message/system_message.dart
  31. 323
      lib/message/system_notice.dart
  32. 15
      lib/mine/mine_view/mine_view.dart
  33. 139
      lib/order/order_detail_page.dart
  34. 2
      lib/view_widget/new_coupon_widget.dart

BIN
assets/image/2x/c_z.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 702 B

BIN
assets/image/2x/icon_chat.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/2x/icon_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/icon_gz.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/icon_order.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/image/2x/icon_pl.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
assets/image/2x/icon_scan_qr_code.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 666 B

BIN
assets/image/2x/icon_system_message.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/2x/icon_z.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/3x/c_z.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/image/3x/icon_chat.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
assets/image/3x/icon_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/image/3x/icon_gz.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
assets/image/3x/icon_order.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
assets/image/3x/icon_pl.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
assets/image/3x/icon_scan_qr_code.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 766 B

BIN
assets/image/3x/icon_system_message.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
assets/image/3x/icon_z.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/image/c_z.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

BIN
assets/image/icon_chat.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

BIN
assets/image/icon_cz.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

BIN
assets/image/icon_gz.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 870 B

BIN
assets/image/icon_order.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B

BIN
assets/image/icon_pl.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 808 B

BIN
assets/image/icon_scan_qr_code.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 B

After

Width:  |  Height:  |  Size: 600 B

BIN
assets/image/icon_system_message.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 892 B

BIN
assets/image/icon_z.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 806 B

2
lib/login/new_login_page.dart

@ -416,7 +416,7 @@ class _NewLoginPage extends State<NewLoginPage> {
Container(
height: 30.h,
width: MediaQuery.of(context).size.width - 100.w,
margin: EdgeInsets.only(bottom: 10.h),
margin: EdgeInsets.only(bottom:5.h),
child: TextField(
style: TextStyle(
height: 1.h,

3
lib/main.dart

@ -98,6 +98,7 @@ import 'login/new_login_page.dart';
import 'login/phone_address_page.dart';
import 'main_page.dart';
import 'message/system_details.dart';
import 'message/system_notice.dart';
import 'mine/coupon_page.dart';
import 'mine/edit_signature.dart';
import 'mine/invitation_record.dart';
@ -423,4 +424,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
ScanWeb(arguments:arguments),
'/router/vip_pay_code': (context, {arguments}) =>
VipPayCode(),
'/router/system_notice': (context, {arguments}) =>
SystemNotice(),
};

138
lib/message/system_message.dart

@ -204,14 +204,13 @@ class _SystemMessagePage extends State<SystemMessagePage> {
),
),
),
Spacer(),
Expanded(
child: Text(
S.of(context).xiaoxi,
style: TextStyle(
color: Colors.black,
fontSize: 16.sp,
fontWeight: MyFontWeight.regular,
fontSize: 18.sp,
fontWeight: MyFontWeight.bold,
),
)),
GestureDetector(
@ -236,11 +235,59 @@ class _SystemMessagePage extends State<SystemMessagePage> {
],
),
),
newsSurvey(),
SizedBox(
height: 16.h,
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pushNamed('/router/system_details',
arguments: {"msgType": 6}).then((value) {
setState(() {
msgNumber["6"] = 0;
});
});
},
child:messageItem("assets/image/icon_pl.webp", S.of(context).pinglun, msgNumber["6"].toString()),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pushNamed('/router/system_details',
arguments: {"msgType": 5}).then((value) {
setState(() {
msgNumber["5"] = 0;
});
});
},
child: messageItem("assets/image/icon_z.webp", S.of(context).dianzan, msgNumber["5"].toString()),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pushNamed('/router/system_details',
arguments: {"msgType": 4}).then((value) {
setState(() {
msgNumber["4"] = 0;
});
});
},
child:messageItem("assets/image/icon_gz.webp", S.of(context).guanzhu,msgNumber["4"].toString()),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pushNamed('/router/system_notice').then((value) {
setState(() {
msgNumber["2"] = 0;
msgNumber["3"] = 0;
});
});
},
child:messageItem("assets/image/icon_system_message.webp", S.of(context).xitongxiaoxi, (msgNumber["2"]+msgNumber["3"]).toString()),
),
buildMessage(),
// newsSurvey(),
// SizedBox(
// height: 16.h,
// ),
// buildMessage(),
],
),
),
@ -250,6 +297,83 @@ class _SystemMessagePage extends State<SystemMessagePage> {
);
}
Widget messageItem(img, title, messageNum) {
return Container(
padding: EdgeInsets.only(top:14.h, left:14.w, bottom:10.h, right:14.w),
decoration: BoxDecoration(
color: Colors.white,
),
child: Column(
children: [
Row(
children: [
Image.asset(
img,
fit: BoxFit.fill,
),
SizedBox(
width: 12.w,
),
Text(
title,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF060606),
fontWeight: MyFontWeight.semi_bold,
),
),
SizedBox(
width: 9.w,
),
if(messageNum != "0")
((double.tryParse(messageNum) < 100)?
Container(
width: 16,
height: 16,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xFFFF441A),
),
child: RoundButton(
text:messageNum,
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFFF441A),
fontSize: 10.sp,
radius: 100,
)):
Container(
padding: EdgeInsets.symmetric(horizontal:4.w,vertical:2.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: Color(0xFFFF441A),
),
child: RoundButton(
text:"99+",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFFFF441A),
fontSize: 10.sp,
radius: 100,
))),
Spacer(),
Icon(
Icons.keyboard_arrow_right,
size: 24,
),
],
),
Container(
margin: EdgeInsets.only(top: 12.h),
width: double.infinity,
height: 1.h,
color: Color(0xFFF7F7F7),
)
],
),
);
}
Widget newsSurvey() {
return Container(
color: Colors.white,

323
lib/message/system_notice.dart

@ -0,0 +1,323 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/message.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/no_data_view.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class SystemNotice extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _SystemNotice();
}
}
class _SystemNotice extends State<SystemNotice> {
ApiService apiService;
int pageNum = 1;
List<Message> messages = [];
int msgType = 0;
// String parenId = "0";
var commentFocus = FocusNode();
String hintText = S.current.liuxianinjingcaidepinglunba;
bool isKeyBoardShow = false;
final GlobalKey commentKey = GlobalKey();
final GlobalKey inputKey = GlobalKey();
final TextEditingController commentTextController = TextEditingController();
int indexMsg = 0;
@override
void initState() {
super.initState();
// msgType = widget.arguments["msgType"];
SharedPreferences.getInstance().then((value) {
apiService =
ApiService(Dio(), token: value.getString("token"), context: context);
queryMessage();
});
}
_refresh() {
pageNum = 1;
queryMessage();
}
queryMessage() async {
BaseData<PageInfo<Message>> baseData = await apiService.msgList({
"pageNum": pageNum,
"pageSize": 10,
"searchKey": "",
"state": "",
"typed": ""
}).catchError((onError) {
_refreshController.loadFailed();
_refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
if (pageNum == 1) {
messages.clear();
}
List<Message> message = [];
message.addAll(baseData.data.list);
message.forEach((element) {
if (element.typed == 2 || element.typed == 3) {
messages.add(element);
}
});
_refreshController.loadComplete();
_refreshController.refreshCompleted();
if (mounted) setState(() {});
if (pageNum * 10 > int.tryParse(baseData.data.total)) {
_refreshController.loadNoData();
} else {
pageNum += 1;
}
} else {
_refreshController.loadFailed();
_refreshController.refreshFailed();
}
}
RefreshController _refreshController = RefreshController();
@override
Widget build(BuildContext context) {
return Scaffold(
body: SmartRefresher(
enablePullDown: true,
enablePullUp: true,
header: MyHeader(),
physics: BouncingScrollPhysics(),
footer: CustomFooter(
loadStyle: LoadStyle.ShowWhenLoading,
builder: (BuildContext context, LoadStatus mode) {
return (messages.length == 0) ? Container() : MyFooter(mode);
},
),
controller: _refreshController,
onRefresh: _refresh,
onLoading: () {
queryMessage();
},
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child: Column(
children: [
Container(
color: Colors.white,
padding: EdgeInsets.only(
top: MediaQuery.of(context).padding.top + 10.h,
bottom: 10.h,
right: 16.w),
child: Row(
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pop();
},
child: Container(
alignment: Alignment.centerRight,
margin: EdgeInsets.only(
left: 12,
),
padding: EdgeInsets.all(6),
child: Icon(
Icons.arrow_back_ios,
color: Colors.black,
size: 24,
),
),
),
Text(
"消息通知",
style: TextStyle(
color: Colors.black,
fontSize: 18.sp,
fontWeight: MyFontWeight.bold,
),
),
],
),
),
buildMessage()
],
),
),
),
),
),
);
}
Widget buildMessage() {
return Container(
color: Colors.white,
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
(messages == null || messages.length == 0)
? NoDataView(
src: "assets/image/icon_empty.webp",
isShowBtn: false,
text: S.of(context).haimeiyouxiaoxi,
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h),
)
: ListView.builder(
padding: EdgeInsets.only(top: 16),
itemCount: messages.length,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (messages[position].typed == 2)
Navigator.of(context).pushNamed(
'/router/system_details',
arguments: {"msgType": 2});
else if (messages[position].typed == 3)
Navigator.of(context).pushNamed(
'/router/system_details',
arguments: {"msgType": 3});
},
child: buildMessageItem(messages[position]),
);
}),
],
));
}
Widget buildMessageItem(Message message) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h,left: 16.w,right: 17.w),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image.asset(
(message.typed == 1)
? "assets/image/icon_order.webp"
: (message.typed == 2)
? "assets/image/icon_order.webp"
: "assets/image/icon_cz.webp",
width: 24.w,
height: 24.h,
),
SizedBox(
width: 8.w,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Expanded(
child: Text(
(message.typed == 1)
? S.of(context).xitongtongzhi
: (message.typed == 2)
? S.of(context).dingdanxiaoxi
: S.of(context).chongzhixiaoxi,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF060606),
),
)),
Text(
message.updateTime,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),
),
),
],
),
SizedBox(
height: 24.h,
),
(message.typed != 3)
? Row(
mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
S.of(context).ninyouyigexindedingdan,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
),
),
),
Icon(
Icons.keyboard_arrow_right,
size: 24,
),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Text(
message.content,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
),
)),
Icon(
Icons.keyboard_arrow_right,
size: 24,
),
],
),
Container(
margin: EdgeInsets.only(top: 16.h, bottom: 8.h),
height: 1.h,
width: double.infinity,
color: Color(0xFFF7F7F7),
),
],
),
),
],
),
],
),
);
}
}

15
lib/mine/mine_view/mine_view.dart

@ -76,6 +76,7 @@ class _MineView extends State<MineView> {
Container(
height: 24.h,
alignment: Alignment.center,
margin: EdgeInsets.only(right: 12.w),
child: GestureDetector(
onTap: () {
Navigator.of(context)
@ -90,10 +91,9 @@ class _MineView extends State<MineView> {
child: Stack(
children: [
Image.asset(
"assets/image/icon_notices.webp",
width: 32,
height: 32,
color: Colors.white,
"assets/image/icon_chat.webp",
width:24,
height: 24,
),
if (widget.totalMsg != 0)
Container(
@ -128,12 +128,11 @@ class _MineView extends State<MineView> {
toScan();
},
child: Container(
padding: EdgeInsets.all(8.h),
padding: EdgeInsets.only(left: 12.w,right:16.w,top:8.h,bottom:8.h),
child: Image.asset(
"assets/image/icon_scan_qr_code.webp",
width: 32,
height: 32,
color: Colors.white,
width: 22,
height: 22,
),
),
),

139
lib/order/order_detail_page.dart

@ -15,9 +15,13 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../utils/flutter_utils.dart';
import '../view_widget/classic_header.dart';
import '../view_widget/my_footer.dart';
import 'order_utils.dart';
class OrderDetailPage extends StatefulWidget {
@ -35,17 +39,14 @@ class _OrderDetailPage extends State<OrderDetailPage> {
ApiService apiService;
MinApiService minService;
int jumpState;
final RefreshController refreshController = RefreshController();
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) {
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
showLoading: true
);
apiService = ApiService(Dio(),
context: context, token: value.getString("token"), showLoading: true);
queryDetails();
});
jumpState = widget.arguments["jumpState"];
@ -89,17 +90,20 @@ class _OrderDetailPage extends State<OrderDetailPage> {
queryDetails() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
showLoading: false
);
}
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(Dio(),
context: context,
token: value.getString("token"),
showLoading: false);
}
BaseData<OrderInfo> baseData = await apiService
.orderDetail(widget.arguments["id"])
.catchError((error) {});
.catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (baseData != null && baseData.isSuccess) {
orderInfo = baseData.data;
payStatus = orderInfo.payStatus;
@ -119,8 +123,12 @@ class _OrderDetailPage extends State<OrderDetailPage> {
setState(() {
statusTitle();
});
}else{
SmartDialog.showToast(baseData.msg,alignment: Alignment.center);
refreshController.refreshCompleted();
refreshController.loadComplete();
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
refreshController.refreshFailed();
refreshController.loadFailed();
}
}
@ -155,27 +163,31 @@ class _OrderDetailPage extends State<OrderDetailPage> {
leadingColor: Colors.white,
brightness: Brightness.dark,
),
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child: Column(
children: [
///
OrderStatus(
orderStatus,
isTakeOut,
sendStatus,
payStatus,
refundStatus,
title,
center,
orderInfo,
),
///
if(orderInfo != null && orderInfo.addressExt != null)
OrderAddress(
body: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh:(){
setState(() {
queryDetails();
});
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
child: Column(
children: [
///
OrderStatus(
orderStatus,
isTakeOut,
sendStatus,
@ -183,24 +195,38 @@ class _OrderDetailPage extends State<OrderDetailPage> {
refundStatus,
title,
center,
paySelected,
_orderCancel,
orderInfo,
jumpState
),
///
if(orderInfo != null)
OrderCommodity(orderInfo),
///
if(orderInfo != null && orderInfo.addressExt != null)
OrderAddress(
orderStatus,
isTakeOut,
sendStatus,
payStatus,
refundStatus,
title,
center,
paySelected,
_orderCancel,
orderInfo,
jumpState
),
///
if(orderInfo != null)
OrderCommodity(orderInfo),
///
if(orderInfo != null)
OrderInfoView(orderInfo, isTakeOut),
///
if(orderInfo != null)
OrderInfoView(orderInfo, isTakeOut),
Container(
height: 42.h,
),
],
Container(
height: 42.h,
),
],
),
),
),
),
@ -227,11 +253,12 @@ class _OrderDetailPage extends State<OrderDetailPage> {
}
}
payResult(BaseData baseData) async{
payResult(BaseData baseData) async {
await queryDetails();
Future.delayed(Duration(milliseconds: 800), () {
EasyLoading.dismiss();
SmartDialog.showToast(baseData?.msg == "ok" ?"订单支付成功" :baseData?.msg,alignment: Alignment.center);
SmartDialog.showToast(baseData?.msg == "ok" ? "订单支付成功" : baseData?.msg,
alignment: Alignment.center);
});
}
@ -525,10 +552,10 @@ class _OrderDetailPage extends State<OrderDetailPage> {
if (baseData != null && baseData.isSuccess) {
SmartDialog.showToast("订单取消成功");
// Future.delayed(Duration(milliseconds:450), () {
queryDetails();
queryDetails();
// });
}else{
SmartDialog.showToast(baseData.msg,alignment: Alignment.center);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}

2
lib/view_widget/new_coupon_widget.dart

@ -84,7 +84,7 @@ class NewCouponWidget extends StatelessWidget {
children: [
Text(
"${coupon != null ? coupon.couponName ?? "" : ""}",
maxLines: 1,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15.sp,

Loading…
Cancel
Save