Commit 6d0dd035 authored by 王雪伟's avatar 王雪伟

加入报错log

parent 93f53a69
......@@ -84,6 +84,7 @@ public class HttpTool : MonoBehaviour
private IEnumerator PostRequest<T>(string BaseURL, string methodName, string jsonString, Dictionary<string, object> postParas, Action<T> success, Action<string, string> failed)
{
string url = BaseURL + methodName + "?" + addParams(postParas);
Debug.unityLogger.Log(HttpLogTag, url);
using (UnityWebRequest webRequest = new UnityWebRequest(url, "POST"))
{
if (jsonString != null && jsonString.Length > 0)
......
......@@ -84,6 +84,7 @@ public class WxLoginUtil : MonoBehaviour
LoginParam login = new LoginParam();
login.pkg = Constant.Instance.Pkg;
login.device = Constant.Instance.device;
HttpTool.Instance._Post("app/v1/auth/tourist-login", JsonMapper.ToJson(login), null, new Action<LoginUserInfoBean>((bean) =>
{
AppConfig.Instance.setTokenAndUid(bean.token, bean.uid);
......@@ -93,6 +94,7 @@ public class WxLoginUtil : MonoBehaviour
}
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log("登录Error"+code +" msg "+ errMsg);
if (wxCallBack != null)
{
wxCallBack(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment