手机验证码请求 新增第三方网络等待
parent
3ab78e42f8
commit
f560da3836
|
|
@ -78,7 +78,15 @@ public class WaitingForServer : Singlenton<WaitingForServer>, IInitable, IUpdata
|
|||
/// </summary>
|
||||
public enum EventName
|
||||
{
|
||||
/// <summary>
|
||||
/// 登录请求
|
||||
/// </summary>
|
||||
LoginRequest,
|
||||
|
||||
/// <summary>
|
||||
/// 验证码第三方请求
|
||||
/// </summary>
|
||||
PhoneCodeRequest,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -315,10 +315,12 @@ public class PhoneVerifyTool : Singlenton<PhoneVerifyTool>
|
|||
www.SetRequestHeader("signature", headData["signature"]);
|
||||
www.SetRequestHeader("timestamp", headData["timestamp"]);
|
||||
www.SetRequestHeader("accessKey", headData["accessKey"]);
|
||||
WaitingForServer.Instance.EventWaiting(WaitingForServer.EventName.PhoneCodeRequest);
|
||||
|
||||
try
|
||||
{
|
||||
await www.SendWebRequest();
|
||||
WaitingForServer.Instance.EventDone(WaitingForServer.EventName.PhoneCodeRequest);
|
||||
|
||||
if (www.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
|
|
@ -391,11 +393,11 @@ public class PhoneVerifyTool : Singlenton<PhoneVerifyTool>
|
|||
www.SetRequestHeader("signature", headData["signature"]);
|
||||
www.SetRequestHeader("timestamp", headData["timestamp"]);
|
||||
www.SetRequestHeader("accessKey", headData["accessKey"]);
|
||||
|
||||
WaitingForServer.Instance.EventWaiting(WaitingForServer.EventName.PhoneCodeRequest);
|
||||
try
|
||||
{
|
||||
await www.SendWebRequest();
|
||||
|
||||
WaitingForServer.Instance.EventDone(WaitingForServer.EventName.PhoneCodeRequest);
|
||||
if (www.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
DebugUtil.LogError(www.downloadHandler.text);
|
||||
|
|
|
|||
Loading…
Reference in New Issue