|
...
|
...
|
@@ -5341,6 +5341,31 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_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(
|
|
...
|
...
|
@@ -5459,30 +5484,9 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
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());
|
|
|
|
|
|
|
|
// if (success) {
|
|
|
|
// Utils.showToast('短信已经发送成功!');
|
|
|
|
// } else {
|
|
...
|
...
|
@@ -5542,29 +5546,8 @@ class InvicationPageState extends State<InvicationPage> |
|
|
|
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次短信
|
...
|
...
|
|