sMS.dart 699 B

12345678910111213141516171819202122232425262728
  1. import 'dart:core';
  2. import '../client_base.dart';
  3. class SMSService extends JsonRpcClientBase {
  4. SMSService(
  5. String host, {
  6. String serviceName = "ISMSService",
  7. Map<String, String>? headers,
  8. int? timeout,
  9. }) : super(
  10. host,
  11. serviceName,
  12. headers: headers,
  13. timeout: timeout,
  14. );
  15. Future<bool> sendMessage(List<String> mobiles, String template) async {
  16. var rpcRst = await call("SendMessage", [mobiles, template]);
  17. return rpcRst;
  18. }
  19. Future<bool> checkVerificationCode(
  20. String userPhone, String verifyCode) async {
  21. var rpcRst = await call("CheckVerificationCode", [userPhone, verifyCode]);
  22. return rpcRst;
  23. }
  24. }