SMSCodeMessage.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /********************************************************************************
  5. ** Company: YC
  6. ** auth: CaoTing
  7. ** date: 2021\5
  8. ** desc: 手机验证码
  9. *******************************************************************************/
  10. namespace Studio.Scripts.HttpMessage
  11. {
  12. public class SMSCodeMessage : BaseHttpMessage
  13. {
  14. public SMSCodeBody body;
  15. public SMSCodeMessage()
  16. {
  17. messageModuleType = MessageModuleType.Common;
  18. methodType = HttpMethodType.Get;
  19. _path = "v1/smsCode";
  20. //GetHttpGetForm<SMSCodeBody>(path, body);
  21. headers = new Dictionary<string, string>();
  22. _wwwForm = null;
  23. }
  24. public override string path
  25. {
  26. get
  27. {
  28. _path = GetHttpGetForm<SMSCodeBody>(_path, body);
  29. return _path;
  30. }
  31. }
  32. public override WWWForm wwwForm
  33. {
  34. get
  35. {
  36. if (_wwwForm == null)
  37. {
  38. _wwwForm = GetWWWFrom<SMSCodeBody>(body);
  39. }
  40. return _wwwForm;
  41. }
  42. }
  43. public override string ToBodyString()
  44. {
  45. return Newtonsoft.Json.JsonConvert.SerializeObject(body);
  46. }
  47. }
  48. public struct SMSCodeBody
  49. {
  50. public string phone;
  51. public int type;
  52. }
  53. }