|
...
|
...
|
@@ -430,6 +430,8 @@ class InvicationPageSimState extends State<InvicationPageSim> |
|
|
|
removeOverlay();
|
|
|
|
Utils.changeStatusColor();
|
|
|
|
couponProvider.clearSelect();
|
|
|
|
couponProvider.sendSMS = 0;
|
|
|
|
couponProvider.errorSMS = '';
|
|
|
|
bus.off("refresh_coupon_invitation");
|
|
|
|
bus.off("refresh_invitaion_info");
|
|
|
|
bus.off("refresh_photo_invication");
|
|
...
|
...
|
@@ -1810,7 +1812,7 @@ class InvicationPageSimState extends State<InvicationPageSim> |
|
|
|
}
|
|
|
|
|
|
|
|
await customerProvider.setGuestInfo(context, pramas);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// else {
|
|
|
|
// Map<String, String?> pramas = {
|
|
|
|
// 'sellerid':
|
|
...
|
...
|
@@ -4563,6 +4565,31 @@ class InvicationPageSimState extends State<InvicationPageSim> |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_send() async {
|
|
|
|
UserModel userModel = Provider.of<UserModel>(context, listen: false);
|
|
|
|
Map<String, String?> params = {
|
|
|
|
"rid": widget.rid,
|
|
|
|
"sid": userModel.user!.sellerid
|
|
|
|
};
|
|
|
|
|
|
|
|
bool success = await couponProvider.sendSMSWxSendSms(context, params);
|
|
|
|
print(success);
|
|
|
|
if (success) {
|
|
|
|
setState(() {
|
|
|
|
smsTitle = '已发${couponProvider.sendSMS}次';
|
|
|
|
});
|
|
|
|
canSendSms = false;
|
|
|
|
startCountdown(120);
|
|
|
|
} else {
|
|
|
|
if (couponProvider.errorSMS != '') {
|
|
|
|
setState(() {
|
|
|
|
showErroInfo = true;
|
|
|
|
erroInfo = couponProvider.errorSMS;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///微信通知、发短信
|
|
|
|
Widget _btnWidget() {
|
|
|
|
return Padding(
|
|
...
|
...
|
@@ -4680,30 +4707,31 @@ class InvicationPageSimState extends State<InvicationPageSim> |
|
|
|
showErroInfo = false;
|
|
|
|
erroInfo = '';
|
|
|
|
});
|
|
|
|
UserModel userModel = Provider.of<UserModel>(
|
|
|
|
context,
|
|
|
|
listen: false);
|
|
|
|
Map<String, String?> params = {
|
|
|
|
"rid": widget.rid,
|
|
|
|
"sid": userModel.user!.sellerid
|
|
|
|
};
|
|
|
|
bool success = await couponProvider
|
|
|
|
.sendSMSWxSendSms(context, params);
|
|
|
|
print(success);
|
|
|
|
if (success) {
|
|
|
|
setState(() {
|
|
|
|
smsTitle = '已发${couponProvider.sendSMS}次';
|
|
|
|
});
|
|
|
|
canSendSms = false;
|
|
|
|
startCountdown(120);
|
|
|
|
} else {
|
|
|
|
if (couponProvider.errorSMS != '') {
|
|
|
|
setState(() {
|
|
|
|
showErroInfo = true;
|
|
|
|
erroInfo = couponProvider.errorSMS;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JhCommonUtils.debounce(() => _send());
|
|
|
|
// UserModel userModel = Provider.of<UserModel>(
|
|
|
|
// context,
|
|
|
|
// listen: false);
|
|
|
|
// Map<String, String?> params = {
|
|
|
|
// "rid": widget.rid,
|
|
|
|
// "sid": userModel.user!.sellerid
|
|
|
|
// };
|
|
|
|
// bool success = await couponProvider
|
|
|
|
// .sendSMSWxSendSms(context, params);
|
|
|
|
// print(success);
|
|
|
|
// if (success) {
|
|
|
|
// setState(() {
|
|
|
|
// smsTitle = '已发${couponProvider.sendSMS}次';
|
|
|
|
// });
|
|
|
|
// canSendSms = false;
|
|
|
|
// startCountdown(120);
|
|
|
|
// } else {
|
|
|
|
// if (couponProvider.errorSMS != '') {
|
|
|
|
// setState(() {
|
|
|
|
// showErroInfo = true;
|
|
|
|
// erroInfo = couponProvider.errorSMS;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// if (success) {
|
|
|
|
// Utils.showToast('短信已经发送成功!');
|
|
|
|
// } else {
|
|
...
|
...
|
@@ -4762,29 +4790,7 @@ class InvicationPageSimState extends State<InvicationPageSim> |
|
|
|
showErroInfo = false;
|
|
|
|
erroInfo = '';
|
|
|
|
});
|
|
|
|
UserModel userModel =
|
|
|
|
Provider.of<UserModel>(context, listen: false);
|
|
|
|
Map<String, String?> params = {
|
|
|
|
"rid": widget.rid,
|
|
|
|
"sid": userModel.user!.sellerid
|
|
|
|
};
|
|
|
|
bool success = await couponProvider.sendSMSWxSendSms(
|
|
|
|
context, params);
|
|
|
|
print(success);
|
|
|
|
if (success) {
|
|
|
|
setState(() {
|
|
|
|
smsTitle = '已发${couponProvider.sendSMS}次';
|
|
|
|
});
|
|
|
|
canSendSms = false;
|
|
|
|
startCountdown(120);
|
|
|
|
} else {
|
|
|
|
if (couponProvider.errorSMS != '') {
|
|
|
|
setState(() {
|
|
|
|
showErroInfo = true;
|
|
|
|
erroInfo = couponProvider.errorSMS;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
JhCommonUtils.debounce(() => _send());
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
//显示2分钟只能发1次短信
|
...
|
...
|
|