Commit e2c8af77 authored by LiLiuZhou's avatar LiLiuZhou

Merge branch 'master' of gitlab.huolea.com:wangxuewei/musicbigwatermelon

parents 56181193 6d0dd035
...@@ -84,6 +84,7 @@ public class HttpTool : MonoBehaviour ...@@ -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) 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); string url = BaseURL + methodName + "?" + addParams(postParas);
Debug.unityLogger.Log(HttpLogTag, url);
using (UnityWebRequest webRequest = new UnityWebRequest(url, "POST")) using (UnityWebRequest webRequest = new UnityWebRequest(url, "POST"))
{ {
if (jsonString != null && jsonString.Length > 0) if (jsonString != null && jsonString.Length > 0)
......
...@@ -84,6 +84,7 @@ public class WxLoginUtil : MonoBehaviour ...@@ -84,6 +84,7 @@ public class WxLoginUtil : MonoBehaviour
LoginParam login = new LoginParam(); LoginParam login = new LoginParam();
login.pkg = Constant.Instance.Pkg; login.pkg = Constant.Instance.Pkg;
login.device = Constant.Instance.device; login.device = Constant.Instance.device;
HttpTool.Instance._Post("app/v1/auth/tourist-login", JsonMapper.ToJson(login), null, new Action<LoginUserInfoBean>((bean) => HttpTool.Instance._Post("app/v1/auth/tourist-login", JsonMapper.ToJson(login), null, new Action<LoginUserInfoBean>((bean) =>
{ {
AppConfig.Instance.setTokenAndUid(bean.token, bean.uid); AppConfig.Instance.setTokenAndUid(bean.token, bean.uid);
...@@ -93,6 +94,7 @@ public class WxLoginUtil : MonoBehaviour ...@@ -93,6 +94,7 @@ public class WxLoginUtil : MonoBehaviour
} }
}), new Action<string, string>((code, errMsg) => }), new Action<string, string>((code, errMsg) =>
{ {
Debug.unityLogger.Log("登录Error"+code +" msg "+ errMsg);
if (wxCallBack != null) if (wxCallBack != null)
{ {
wxCallBack(false); 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