添加不支持配送提示

master
laiiihz 5 years ago
parent 2ea8e821d0
commit 422b83f0b4

@ -173,7 +173,52 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
DPrint.printf(address.runtimeType);
if (address != null && address is Address) {
// if (_orderModel.data.addr != null && address.id == _orderModel.data.addr.addressId) return;
_changeAddress(address);
_changeAddress(address).then((value) {
if (_orderModel.data.addr.isDeliveryArea == 0) {
showDialog(
context: context,
builder: (context) {
return Dialog(
backgroundColor: Colors.white,
child: Padding(
padding: EdgeInsets.fromLTRB(
rSize(32), rSize(32), rSize(32), rSize(16)),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Center(
child: Text(
'提示',
style: TextStyle(
color: AppColor.blackColor,
fontSize: rSP(16),
fontWeight: FontWeight.bold,
),
),
),
SizedBox(height: rSize(16)),
Text(
'产品不支持配送到该地区',
style: TextStyle(
color: AppColor.blackColor,
fontSize: rSP(12),
),
),
SizedBox(height: rSize(16)),
FlatButton(
onPressed: () => Navigator.pop(context),
child: Text('我知道了'),
color: Color.fromRGBO(244, 3, 5, 1),
),
],
),
),
);
},
);
}
});
}
});
},
@ -763,7 +808,7 @@ class _GoodsOrderPageState extends BaseStoreState<GoodsOrderPage> {
});
}
_changeAddress(Address address) async {
Future _changeAddress(Address address) async {
GSDialog.of(context).showLoadingDialog(context, "");
HttpResultModel<OrderPreviewModel> model =
await _presenterImpl.changeAddress(

@ -54,9 +54,7 @@ class Alert {
enum NormalTextDialogType { normal, delete }
/*
*/
///
class NormalTextDialog extends Dialog {
final String title;
final String content;

Loading…
Cancel
Save