AdvanceAccountMessage.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 AdvanceAccountMessage : BaseHttpMessage
  13. {
  14. public AdvanceAccountBody body;
  15. public AdvanceAccountMessage()
  16. {
  17. messageModuleType = MessageModuleType.Login;
  18. methodType = HttpMethodType.Post;
  19. _path = "v1/advanceAccount";
  20. headers = new Dictionary<string, string>();
  21. headers.Add("Content-Type", "application/json");
  22. _wwwForm = null;
  23. }
  24. public override WWWForm wwwForm
  25. {
  26. get
  27. {
  28. if (_wwwForm == null)
  29. {
  30. _wwwForm = GetWWWFrom<AdvanceAccountBody>(body);
  31. }
  32. return _wwwForm;
  33. }
  34. }
  35. public override string ToBodyString()
  36. {
  37. return Newtonsoft.Json.JsonConvert.SerializeObject(body);
  38. }
  39. }
  40. public struct AdvanceAccountBody
  41. {
  42. /// <summary>
  43. /// 账户
  44. /// </summary>
  45. public string account;
  46. /// <summary>
  47. /// 密码
  48. /// </summary>
  49. public string password;
  50. /// <summary>
  51. /// 设备id
  52. /// </summary>
  53. public string deviceID;
  54. /// <summary>
  55. /// 登陆设备来源
  56. /// </summary>
  57. public string source;
  58. }
  59. }