Showing
7 changed files
with
107 additions
and
29 deletions
| @@ -16,17 +16,17 @@ if (flutterRoot == null) { | @@ -16,17 +16,17 @@ if (flutterRoot == null) { | ||
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | -def flutterVersionCode = "490" | 19 | +def flutterVersionCode = "492" |
| 20 | if (flutterVersionCode == null) { | 20 | if (flutterVersionCode == null) { |
| 21 | - flutterVersionCode = '490' | 21 | + flutterVersionCode = '492' |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | -def flutterVersionName = "4.9.0" | 27 | +def flutterVersionName = "4.9.2" |
| 28 | if (flutterVersionName == null) { | 28 | if (flutterVersionName == null) { |
| 29 | - flutterVersionName = '4.9.0' | 29 | + flutterVersionName = '4.9.2' |
| 30 | 30 | ||
| 31 | } | 31 | } |
| 32 | 32 |
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | archiveVersion = 1; | 3 | archiveVersion = 1; |
| 4 | classes = { | 4 | classes = { |
| 5 | }; | 5 | }; |
| 6 | - objectVersion = 46; | 6 | + objectVersion = 50; |
| 7 | objects = { | 7 | objects = { |
| 8 | 8 | ||
| 9 | /* Begin PBXBuildFile section */ | 9 | /* Begin PBXBuildFile section */ |
| @@ -510,7 +510,7 @@ | @@ -510,7 +510,7 @@ | ||
| 510 | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; | 510 | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; |
| 511 | CODE_SIGN_IDENTITY = "Apple Development"; | 511 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 512 | CODE_SIGN_STYLE = Automatic; | 512 | CODE_SIGN_STYLE = Automatic; |
| 513 | - CURRENT_PROJECT_VERSION = 490; | 513 | + CURRENT_PROJECT_VERSION = 4901; |
| 514 | DEVELOPMENT_TEAM = 8J59HM8B82; | 514 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 515 | ENABLE_BITCODE = NO; | 515 | ENABLE_BITCODE = NO; |
| 516 | FLUTTER_BUILD_MODE = release; | 516 | FLUTTER_BUILD_MODE = release; |
| @@ -656,7 +656,7 @@ | @@ -656,7 +656,7 @@ | ||
| 656 | CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; | 656 | CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; |
| 657 | CODE_SIGN_IDENTITY = "Apple Development"; | 657 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 658 | CODE_SIGN_STYLE = Automatic; | 658 | CODE_SIGN_STYLE = Automatic; |
| 659 | - CURRENT_PROJECT_VERSION = 490; | 659 | + CURRENT_PROJECT_VERSION = 4901; |
| 660 | DEVELOPMENT_TEAM = 8J59HM8B82; | 660 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 661 | ENABLE_BITCODE = NO; | 661 | ENABLE_BITCODE = NO; |
| 662 | FLUTTER_BUILD_MODE = release; | 662 | FLUTTER_BUILD_MODE = release; |
| @@ -692,7 +692,7 @@ | @@ -692,7 +692,7 @@ | ||
| 692 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 692 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 693 | CODE_SIGN_IDENTITY = "Apple Development"; | 693 | CODE_SIGN_IDENTITY = "Apple Development"; |
| 694 | CODE_SIGN_STYLE = Automatic; | 694 | CODE_SIGN_STYLE = Automatic; |
| 695 | - CURRENT_PROJECT_VERSION = 490; | 695 | + CURRENT_PROJECT_VERSION = 4901; |
| 696 | DEVELOPMENT_TEAM = 8J59HM8B82; | 696 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 697 | ENABLE_BITCODE = NO; | 697 | ENABLE_BITCODE = NO; |
| 698 | FLUTTER_BUILD_MODE = release; | 698 | FLUTTER_BUILD_MODE = release; |
| @@ -3,10 +3,10 @@ import 'package:fluwx/fluwx.dart'; | @@ -3,10 +3,10 @@ import 'package:fluwx/fluwx.dart'; | ||
| 3 | 3 | ||
| 4 | class Constant { | 4 | class Constant { |
| 5 | static const int status_success = 200; //服务器返回成功 | 5 | static const int status_success = 200; //服务器返回成功 |
| 6 | - // static const WXMiniProgramType wxMiniProgramType = | ||
| 7 | - // WXMiniProgramType.RELEASE; //正式版 | ||
| 8 | static const WXMiniProgramType wxMiniProgramType = | 6 | static const WXMiniProgramType wxMiniProgramType = |
| 9 | - WXMiniProgramType.PREVIEW; //体验版 | 7 | + WXMiniProgramType.RELEASE; //正式版 |
| 8 | + // static const WXMiniProgramType wxMiniProgramType = | ||
| 9 | + // WXMiniProgramType.PREVIEW; //体验版 | ||
| 10 | // static const WXMiniProgramType wxMiniProgramType = | 10 | // static const WXMiniProgramType wxMiniProgramType = |
| 11 | // WXMiniProgramType.TEST; //开发版 | 11 | // WXMiniProgramType.TEST; //开发版 |
| 12 | 12 |
| @@ -126,7 +126,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -126,7 +126,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 126 | _currIndex = widget.initialIndex; | 126 | _currIndex = widget.initialIndex; |
| 127 | if (App.sp.containsKey('sellerEdate')) { | 127 | if (App.sp.containsKey('sellerEdate')) { |
| 128 | List<String> data = App.sp.getStringList('sellerEdate'); | 128 | List<String> data = App.sp.getStringList('sellerEdate'); |
| 129 | - if (data.contains('0')) { | 129 | + if (data.contains('-1')) { |
| 130 | //已经弹过过期弹窗,默认我的 | 130 | //已经弹过过期弹窗,默认我的 |
| 131 | _currIndex = 4; | 131 | _currIndex = 4; |
| 132 | } | 132 | } |
| @@ -240,8 +240,10 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -240,8 +240,10 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 240 | //店铺过期日期 | 240 | //店铺过期日期 |
| 241 | DateTime edate = DateTime.fromMillisecondsSinceEpoch( | 241 | DateTime edate = DateTime.fromMillisecondsSinceEpoch( |
| 242 | int.parse(sellerInfoSunModel.data.edate) * 1000); | 242 | int.parse(sellerInfoSunModel.data.edate) * 1000); |
| 243 | + | ||
| 243 | //当前日期 | 244 | //当前日期 |
| 244 | final datenow = DateTime.now(); | 245 | final datenow = DateTime.now(); |
| 246 | + | ||
| 245 | //比较相差的天数 | 247 | //比较相差的天数 |
| 246 | int difference = edate.difference(datenow).inDays; | 248 | int difference = edate.difference(datenow).inDays; |
| 247 | 249 | ||
| @@ -257,9 +259,12 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -257,9 +259,12 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 257 | } else if (difference == 1) { | 259 | } else if (difference == 1) { |
| 258 | //过期差1天,提醒一次 | 260 | //过期差1天,提醒一次 |
| 259 | _showSellerAlert('1', edate); | 261 | _showSellerAlert('1', edate); |
| 262 | + } else if (difference == 0 && differenceSeconds > 0) { | ||
| 263 | + //剩余不足一天 | ||
| 264 | + _showSellerAlert('0', edate); | ||
| 260 | } else if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) { | 265 | } else if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) { |
| 261 | //已到期 | 266 | //已到期 |
| 262 | - _showSellerAlert('0', edate); | 267 | + _showSellerAlert('-1', edate); |
| 263 | } else if (difference > 7) { | 268 | } else if (difference > 7) { |
| 264 | //没到期 | 269 | //没到期 |
| 265 | App.sp.remove('sellerEdate'); | 270 | App.sp.remove('sellerEdate'); |
| @@ -274,17 +279,19 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -274,17 +279,19 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 274 | Provider.of<StoreBaseIndoProvider>(context, listen: false); | 279 | Provider.of<StoreBaseIndoProvider>(context, listen: false); |
| 275 | sellerInfoSunModel = await storeBaseIndoProvider.getSellerById(context); | 280 | sellerInfoSunModel = await storeBaseIndoProvider.getSellerById(context); |
| 276 | if (sellerInfoSunModel != null) { | 281 | if (sellerInfoSunModel != null) { |
| 277 | - //获取到店铺过期时间 | ||
| 278 | - //店铺过期提醒 | ||
| 279 | - // 计算时间差 | ||
| 280 | - //店铺过期日期 | ||
| 281 | - _edateShow(); | ||
| 282 | - timerSellerEdate = Timer.periodic(Duration(days: 1), (_) { | 282 | + if (sellerInfoSunModel.data.edate != null) { |
| 283 | +//获取到店铺过期时间 | ||
| 283 | //店铺过期提醒 | 284 | //店铺过期提醒 |
| 284 | // 计算时间差 | 285 | // 计算时间差 |
| 285 | //店铺过期日期 | 286 | //店铺过期日期 |
| 286 | _edateShow(); | 287 | _edateShow(); |
| 287 | - }); | 288 | + timerSellerEdate = Timer.periodic(Duration(days: 1), (_) { |
| 289 | + //店铺过期提醒 | ||
| 290 | + // 计算时间差 | ||
| 291 | + //店铺过期日期 | ||
| 292 | + _edateShow(); | ||
| 293 | + }); | ||
| 294 | + } | ||
| 288 | } | 295 | } |
| 289 | } | 296 | } |
| 290 | 297 | ||
| @@ -296,7 +303,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -296,7 +303,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 296 | data.add(day); | 303 | data.add(day); |
| 297 | App.sp.setStringList("sellerEdate", data); | 304 | App.sp.setStringList("sellerEdate", data); |
| 298 | //过期差ji天,提醒一次s | 305 | //过期差ji天,提醒一次s |
| 299 | - if (day == '0') { | 306 | + if (day == '-1') { |
| 300 | DialogUtil.cupertinoAlertSellerHasEdateDialog( | 307 | DialogUtil.cupertinoAlertSellerHasEdateDialog( |
| 301 | context, | 308 | context, |
| 302 | title: '温馨提示', | 309 | title: '温馨提示', |
| @@ -326,7 +333,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -326,7 +333,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 326 | } else { | 333 | } else { |
| 327 | App.sp.setStringList("sellerEdate", [day]); | 334 | App.sp.setStringList("sellerEdate", [day]); |
| 328 | //过期差ji天,提醒一次s | 335 | //过期差ji天,提醒一次s |
| 329 | - if (day == '0') { | 336 | + if (day == '-1') { |
| 330 | DialogUtil.cupertinoAlertSellerHasEdateDialog( | 337 | DialogUtil.cupertinoAlertSellerHasEdateDialog( |
| 331 | context, | 338 | context, |
| 332 | title: '温馨提示', | 339 | title: '温馨提示', |
| @@ -1225,7 +1232,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -1225,7 +1232,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 1225 | if (_currIndex != index) { | 1232 | if (_currIndex != index) { |
| 1226 | if (App.sp.containsKey('sellerEdate')) { | 1233 | if (App.sp.containsKey('sellerEdate')) { |
| 1227 | List<String> data = App.sp.getStringList('sellerEdate'); | 1234 | List<String> data = App.sp.getStringList('sellerEdate'); |
| 1228 | - if (data.contains('0')) { | 1235 | + if (data.contains('-1')) { |
| 1229 | DialogUtil.cupertinoAlertSellerHasEdateDialog( | 1236 | DialogUtil.cupertinoAlertSellerHasEdateDialog( |
| 1230 | context, | 1237 | context, |
| 1231 | title: '温馨提示', | 1238 | title: '温馨提示', |
| @@ -43,7 +43,9 @@ import 'dart:ui' as ui; | @@ -43,7 +43,9 @@ import 'dart:ui' as ui; | ||
| 43 | 43 | ||
| 44 | import '../../app.dart'; | 44 | import '../../app.dart'; |
| 45 | 45 | ||
| 46 | +import '../../models/sms_info.dart'; | ||
| 46 | import '../../provider/customer_provider.dart'; | 47 | import '../../provider/customer_provider.dart'; |
| 48 | +import '../../provider/my_model.dart'; | ||
| 47 | import '../../widgets/special_text/my_extended_text_selection_controls.dart'; | 49 | import '../../widgets/special_text/my_extended_text_selection_controls.dart'; |
| 48 | 50 | ||
| 49 | class InvicationPage extends StatefulWidget { | 51 | class InvicationPage extends StatefulWidget { |
| @@ -158,6 +160,9 @@ class InvicationPageState extends State<InvicationPage> | @@ -158,6 +160,9 @@ class InvicationPageState extends State<InvicationPage> | ||
| 158 | MyTextSelectionControls _myExtendedMaterialTextSelectionControlsNum = | 160 | MyTextSelectionControls _myExtendedMaterialTextSelectionControlsNum = |
| 159 | MyTextSelectionControls(); | 161 | MyTextSelectionControls(); |
| 160 | 162 | ||
| 163 | + MyModel myModel; | ||
| 164 | + SmsInfoData smsInfoData; | ||
| 165 | + | ||
| 161 | @override | 166 | @override |
| 162 | void initState() { | 167 | void initState() { |
| 163 | super.initState(); | 168 | super.initState(); |
| @@ -258,9 +263,9 @@ class InvicationPageState extends State<InvicationPage> | @@ -258,9 +263,9 @@ class InvicationPageState extends State<InvicationPage> | ||
| 258 | offset: value.toString().length))); | 263 | offset: value.toString().length))); |
| 259 | }); | 264 | }); |
| 260 | couponProvider.sendSMS = 0; | 265 | couponProvider.sendSMS = 0; |
| 261 | - await _couponNetworkData(isShowLoading: false); | 266 | + // await _couponNetworkData(isShowLoading: false); |
| 262 | await _getCustomerActivityBaseinfo(); | 267 | await _getCustomerActivityBaseinfo(); |
| 263 | - | 268 | + _getSmsInfo(context); |
| 264 | await _getReserveDetail(showCicle: false); | 269 | await _getReserveDetail(showCicle: false); |
| 265 | 270 | ||
| 266 | await _getTablesPhoto(); | 271 | await _getTablesPhoto(); |
| @@ -270,7 +275,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -270,7 +275,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 270 | await remarkManagerModel.getRemarks(context, params); | 275 | await remarkManagerModel.getRemarks(context, params); |
| 271 | }); | 276 | }); |
| 272 | bus.on("refresh_coupon_invitation", (args) { | 277 | bus.on("refresh_coupon_invitation", (args) { |
| 273 | - _couponNetworkData(isShowLoading: false); | 278 | + // _couponNetworkData(isShowLoading: false); |
| 274 | }); | 279 | }); |
| 275 | bus.on("refresh_invitaion_info", (args) { | 280 | bus.on("refresh_invitaion_info", (args) { |
| 276 | _getReserveDetail(); | 281 | _getReserveDetail(); |
| @@ -318,6 +323,34 @@ class InvicationPageState extends State<InvicationPage> | @@ -318,6 +323,34 @@ class InvicationPageState extends State<InvicationPage> | ||
| 318 | } | 323 | } |
| 319 | } | 324 | } |
| 320 | 325 | ||
| 326 | + ///获取短信余量 | ||
| 327 | + _getSmsInfo(context) async { | ||
| 328 | + smsInfoData = await myModel.getSmsInfo(context, selfDismiss: false); | ||
| 329 | + if (myModel.smsInfo == '0') { | ||
| 330 | + if (!mounted) { | ||
| 331 | + return; | ||
| 332 | + } | ||
| 333 | + setState(() { | ||
| 334 | + showErroInfo = true; | ||
| 335 | + erroInfo = '短信余额不足,请充值短信条数'; | ||
| 336 | + }); | ||
| 337 | + } else { | ||
| 338 | + if (!mounted) { | ||
| 339 | + return; | ||
| 340 | + } | ||
| 341 | + setState(() { | ||
| 342 | + showErroInfo = false; | ||
| 343 | + erroInfo = ''; | ||
| 344 | + }); | ||
| 345 | + } | ||
| 346 | + | ||
| 347 | + // setState(() { | ||
| 348 | + // if (smsInfoData != null) { | ||
| 349 | + // smsInfo = smsInfoData?.lastNum; | ||
| 350 | + // } | ||
| 351 | + // }); | ||
| 352 | + } | ||
| 353 | + | ||
| 321 | ///倒计时方法 | 354 | ///倒计时方法 |
| 322 | startCountdown() { | 355 | startCountdown() { |
| 323 | countdownTime = 60; | 356 | countdownTime = 60; |
| @@ -1175,7 +1208,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -1175,7 +1208,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 1175 | } | 1208 | } |
| 1176 | couponProvider.couponListSelect = temp; | 1209 | couponProvider.couponListSelect = temp; |
| 1177 | //获取绑定的优惠券 | 1210 | //获取绑定的优惠券 |
| 1178 | - _getActivityByRid(); | 1211 | + // _getActivityByRid(); |
| 1179 | 1212 | ||
| 1180 | // if (couponProvider.coupons.length == 0) { | 1213 | // if (couponProvider.coupons.length == 0) { |
| 1181 | // setState(() { | 1214 | // setState(() { |
| @@ -2275,7 +2308,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -2275,7 +2308,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 2275 | ], | 2308 | ], |
| 2276 | ), | 2309 | ), |
| 2277 | // 选择优惠 | 2310 | // 选择优惠 |
| 2278 | - _couponWidget(), | 2311 | + // _couponWidget(), |
| 2279 | showErroInfo | 2312 | showErroInfo |
| 2280 | ? Container( | 2313 | ? Container( |
| 2281 | margin: EdgeInsets.only( | 2314 | margin: EdgeInsets.only( |
| @@ -3905,6 +3938,13 @@ class InvicationPageState extends State<InvicationPage> | @@ -3905,6 +3938,13 @@ class InvicationPageState extends State<InvicationPage> | ||
| 3905 | _showConfirmWidget( | 3938 | _showConfirmWidget( |
| 3906 | needWechat: true, | 3939 | needWechat: true, |
| 3907 | callback: () async { | 3940 | callback: () async { |
| 3941 | + if (myModel.smsInfo == '0') { | ||
| 3942 | + setState(() { | ||
| 3943 | + showErroInfo = true; | ||
| 3944 | + erroInfo = '短信余额不足,请充值短信条数'; | ||
| 3945 | + }); | ||
| 3946 | + return; | ||
| 3947 | + } | ||
| 3908 | if (canSendSms) { | 3948 | if (canSendSms) { |
| 3909 | if (reserverPhone == null || | 3949 | if (reserverPhone == null || |
| 3910 | reserverPhone.isEmpty || | 3950 | reserverPhone.isEmpty || |
| @@ -4001,6 +4041,13 @@ class InvicationPageState extends State<InvicationPage> | @@ -4001,6 +4041,13 @@ class InvicationPageState extends State<InvicationPage> | ||
| 4001 | }); | 4041 | }); |
| 4002 | canSendSms = false; | 4042 | canSendSms = false; |
| 4003 | startCountdown(); | 4043 | startCountdown(); |
| 4044 | + } else { | ||
| 4045 | + if (couponProvider.errorSMS != '') { | ||
| 4046 | + setState(() { | ||
| 4047 | + showErroInfo = true; | ||
| 4048 | + erroInfo = couponProvider.errorSMS; | ||
| 4049 | + }); | ||
| 4050 | + } | ||
| 4004 | } | 4051 | } |
| 4005 | // if (success) { | 4052 | // if (success) { |
| 4006 | // Utils.showToast('短信已经发送成功!'); | 4053 | // Utils.showToast('短信已经发送成功!'); |
| @@ -4020,6 +4067,13 @@ class InvicationPageState extends State<InvicationPage> | @@ -4020,6 +4067,13 @@ class InvicationPageState extends State<InvicationPage> | ||
| 4020 | }); | 4067 | }); |
| 4021 | removeOverlay(); | 4068 | removeOverlay(); |
| 4022 | } else { | 4069 | } else { |
| 4070 | + if (myModel.smsInfo == '0') { | ||
| 4071 | + setState(() { | ||
| 4072 | + showErroInfo = true; | ||
| 4073 | + erroInfo = '短信余额不足,请充值短信条数'; | ||
| 4074 | + }); | ||
| 4075 | + return; | ||
| 4076 | + } | ||
| 4023 | if (canSendSms) { | 4077 | if (canSendSms) { |
| 4024 | if (reserverPhone == null || | 4078 | if (reserverPhone == null || |
| 4025 | reserverPhone.isEmpty || | 4079 | reserverPhone.isEmpty || |
| @@ -4064,6 +4118,13 @@ class InvicationPageState extends State<InvicationPage> | @@ -4064,6 +4118,13 @@ class InvicationPageState extends State<InvicationPage> | ||
| 4064 | }); | 4118 | }); |
| 4065 | canSendSms = false; | 4119 | canSendSms = false; |
| 4066 | startCountdown(); | 4120 | startCountdown(); |
| 4121 | + } else { | ||
| 4122 | + if (couponProvider.errorSMS != '') { | ||
| 4123 | + setState(() { | ||
| 4124 | + showErroInfo = true; | ||
| 4125 | + erroInfo = couponProvider.errorSMS; | ||
| 4126 | + }); | ||
| 4127 | + } | ||
| 4067 | } | 4128 | } |
| 4068 | } | 4129 | } |
| 4069 | } else { | 4130 | } else { |
| @@ -4567,6 +4628,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -4567,6 +4628,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 4567 | _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true); | 4628 | _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true); |
| 4568 | couponProvider = Provider.of<CouponProvider>(context, listen: true); | 4629 | couponProvider = Provider.of<CouponProvider>(context, listen: true); |
| 4569 | remarkManagerModel = Provider.of<RemarkManagerModel>(context, listen: true); | 4630 | remarkManagerModel = Provider.of<RemarkManagerModel>(context, listen: true); |
| 4631 | + myModel = Provider.of<MyModel>(context, listen: true); | ||
| 4570 | return SafeArea( | 4632 | return SafeArea( |
| 4571 | child: Scaffold( | 4633 | child: Scaffold( |
| 4572 | appBar: SystemAppBar('预订安排', titleColor: MyColours.color_438E93, | 4634 | appBar: SystemAppBar('预订安排', titleColor: MyColours.color_438E93, |
| @@ -40,6 +40,7 @@ class CouponProvider with ChangeNotifier { | @@ -40,6 +40,7 @@ class CouponProvider with ChangeNotifier { | ||
| 40 | 40 | ||
| 41 | List<IsExamineSunModel> isExamineList = []; //商家券核销列表 | 41 | List<IsExamineSunModel> isExamineList = []; //商家券核销列表 |
| 42 | IsExamineSunModel isExamineDetail; | 42 | IsExamineSunModel isExamineDetail; |
| 43 | + String errorSMS = ''; | ||
| 43 | CouponProvider() { | 44 | CouponProvider() { |
| 44 | // for (int i = 0; i < 20; i++) { | 45 | // for (int i = 0; i < 20; i++) { |
| 45 | // swichStateData.add(true); | 46 | // swichStateData.add(true); |
| @@ -781,6 +782,12 @@ class CouponProvider with ChangeNotifier { | @@ -781,6 +782,12 @@ class CouponProvider with ChangeNotifier { | ||
| 781 | sendSMS++; | 782 | sendSMS++; |
| 782 | return true; | 783 | return true; |
| 783 | } else { | 784 | } else { |
| 785 | + if (baseResp.code == 396) { | ||
| 786 | + //余量不足 | ||
| 787 | + errorSMS = '短信余额不足,请充值短信条数'; | ||
| 788 | + } else { | ||
| 789 | + errorSMS = ''; | ||
| 790 | + } | ||
| 784 | Utils.showToast(baseResp.msg ?? ""); | 791 | Utils.showToast(baseResp.msg ?? ""); |
| 785 | return false; | 792 | return false; |
| 786 | } | 793 | } |
| @@ -423,7 +423,9 @@ var handleInvicationHandler = new Handler( | @@ -423,7 +423,9 @@ var handleInvicationHandler = new Handler( | ||
| 423 | child: ChangeNotifierProvider<BaseIndoProvider>( | 423 | child: ChangeNotifierProvider<BaseIndoProvider>( |
| 424 | create: (_) => BaseIndoProvider(), | 424 | create: (_) => BaseIndoProvider(), |
| 425 | child: ChangeNotifierProvider<CustomerProvider>( | 425 | child: ChangeNotifierProvider<CustomerProvider>( |
| 426 | - create: (_) => CustomerProvider(), child: InvicationPage(rid)))); | 426 | + create: (_) => CustomerProvider(), |
| 427 | + child: ChangeNotifierProvider<MyModel>( | ||
| 428 | + create: (_) => MyModel(), child: InvicationPage(rid))))); | ||
| 427 | }); | 429 | }); |
| 428 | 430 | ||
| 429 | // 发短信 | 431 | // 发短信 |
-
Please register or login to post a comment