Commit bad84057fb9f6bbf07a21300a10bd5a37fb20b49

Authored by wdn127929
1 parent 5dd3f388

短信修改

@@ -11,14 +11,14 @@ if (flutterRoot == null) { @@ -11,14 +11,14 @@ if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 } 12 }
13 13
14 -def flutterVersionCode = "271" 14 +def flutterVersionCode = "272"
15 if (flutterVersionCode == null) { 15 if (flutterVersionCode == null) {
16 - flutterVersionCode = '271' 16 + flutterVersionCode = '272'
17 } 17 }
18 18
19 -def flutterVersionName = "2.7.1" 19 +def flutterVersionName = "2.7.2"
20 if (flutterVersionName == null) { 20 if (flutterVersionName == null) {
21 - flutterVersionName = '2.7.1' 21 + flutterVersionName = '2.7.2'
22 } 22 }
23 23
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
@@ -910,8 +910,9 @@ class InvicationPageState extends State<InvicationPage> { @@ -910,8 +910,9 @@ class InvicationPageState extends State<InvicationPage> {
910 Utils.showToast("没有预订人电话信息"); 910 Utils.showToast("没有预订人电话信息");
911 return; 911 return;
912 } 912 }
913 - /* 旧的发短信 913 +
914 if (!couponProvider.sendSMS) { 914 if (!couponProvider.sendSMS) {
  915 + /*
915 String dateSoltStr = ''; 916 String dateSoltStr = '';
916 if (widget.dateSolt == '1') { 917 if (widget.dateSolt == '1') {
917 dateSoltStr = '早餐'; 918 dateSoltStr = '早餐';
@@ -952,20 +953,27 @@ class InvicationPageState extends State<InvicationPage> { @@ -952,20 +953,27 @@ class InvicationPageState extends State<InvicationPage> {
952 } else { 953 } else {
953 params['Strtext'] = user.sellername; 954 params['Strtext'] = user.sellername;
954 } 955 }
  956 + */
  957 + UserModel userModel =
  958 + Provider.of<UserModel>(context,
  959 + listen: false);
  960 + Map<String, String> params = {
  961 + "rid": widget.rid,
  962 + "sid": userModel.user.sellerid
  963 + };
955 bool success = await couponProvider 964 bool success = await couponProvider
956 .sendSMSWxSendSms(context, params); 965 .sendSMSWxSendSms(context, params);
957 print(success); 966 print(success);
958 - if (success) {  
959 - Utils.showToast('短信已经发送成功!');  
960 - } else {  
961 - Utils.showToast('发送次数太频繁!');  
962 - } 967 + // if (success) {
  968 + // Utils.showToast('短信已经发送成功!');
  969 + // } else {
  970 + // Utils.showToast('发送次数太频繁!');
  971 + // }
963 } else { 972 } else {
964 Utils.showToast('短信已经发送成功!'); 973 Utils.showToast('短信已经发送成功!');
965 } 974 }
966 - */  
967 975
968 - _sendSms(); 976 + // _sendSms();
969 977
970 // NavigatorUtil.goSmsPage(context, widget.rid); 978 // NavigatorUtil.goSmsPage(context, widget.rid);
971 }, 979 },
@@ -414,43 +414,51 @@ class CouponProvider with ChangeNotifier { @@ -414,43 +414,51 @@ class CouponProvider with ChangeNotifier {
414 if (error is MyError) {} 414 if (error is MyError) {}
415 }); 415 });
416 if (baseResp.code == Constant.status_success) { 416 if (baseResp.code == Constant.status_success) {
417 - if (baseResp.data == null) {  
418 - return false;  
419 - } else {  
420 - if (baseResp.data['errcode'].toString() == '0') {  
421 - if (WxSendSmsModel.fromJson(baseResp.responseData)  
422 - .data  
423 - .sendStatusList  
424 - .length >  
425 - 0) {  
426 - String code = WxSendSmsModel.fromJson(baseResp.responseData)  
427 - .data  
428 - .sendStatusList[0]  
429 - .code;  
430 - if (code == 'Ok') {  
431 - sendSMS = true;  
432 -  
433 - return true;  
434 - } else if (code ==  
435 - 'LimitExceeded.PhoneNumberSameContentDailyLimit') {  
436 - return false;  
437 - } else {  
438 - return false;  
439 - }  
440 - } else {  
441 - return false;  
442 - }  
443 - } else {  
444 - Utils.showToast(baseResp.data['errmsg']);  
445 - return false;  
446 - }  
447 - } 417 + Utils.showToast("短信发送成功");
  418 + sendSMS = true;
  419 + return true;
448 } else { 420 } else {
449 - if (baseResp != null) {  
450 - Utils.showToast(baseResp.msg ?? "");  
451 - } 421 + Utils.showToast(baseResp.msg ?? "");
452 return false; 422 return false;
453 } 423 }
  424 + // if (baseResp.code == Constant.status_success) {
  425 + // if (baseResp.data == null) {
  426 + // return false;
  427 + // } else {
  428 + // if (baseResp.data['errcode'].toString() == '0') {
  429 + // if (WxSendSmsModel.fromJson(baseResp.responseData)
  430 + // .data
  431 + // .sendStatusList
  432 + // .length >
  433 + // 0) {
  434 + // String code = WxSendSmsModel.fromJson(baseResp.responseData)
  435 + // .data
  436 + // .sendStatusList[0]
  437 + // .code;
  438 + // if (code == 'Ok') {
  439 + // sendSMS = true;
  440 +
  441 + // return true;
  442 + // } else if (code ==
  443 + // 'LimitExceeded.PhoneNumberSameContentDailyLimit') {
  444 + // return false;
  445 + // } else {
  446 + // return false;
  447 + // }
  448 + // } else {
  449 + // return false;
  450 + // }
  451 + // } else {
  452 + // Utils.showToast(baseResp.data['errmsg']);
  453 + // return false;
  454 + // }
  455 + // }
  456 + // } else {
  457 + // if (baseResp != null) {
  458 + // Utils.showToast(baseResp.msg ?? "");
  459 + // }
  460 + // return false;
  461 + // }
454 } 462 }
455 463
456 //发送短信 464 //发送短信