From 73573fadc92bfc10fde57792a955dcf2a3e7b33b Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 04 九月 2018 18:43:19 +0800
Subject: [PATCH] 3226【前端】猫耳游戏数据对接文档

---
 Utility/LanguageVerify.cs |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Utility/LanguageVerify.cs b/Utility/LanguageVerify.cs
index b159bcc..26d64c7 100644
--- a/Utility/LanguageVerify.cs
+++ b/Utility/LanguageVerify.cs
@@ -20,7 +20,7 @@
 
     static StringBuilder s_StringBuilder = new StringBuilder();
 
-    const string VerifyPlayerNameUrl = "https://api.maoergame.com/game/role/response?";
+    const string VerifyPlayerNameUrl = "https://api.maoergame.com/game/role/response";
     /// <summary>
     /// 鏍¢獙鐜╁鍚�
     /// </summary>
@@ -52,7 +52,8 @@
         tables["sender_name"] = playerName;
         tables["sender_level"] = level.ToString();
         tables["sender_vip_level"] = vipLv.ToString();
-        tables["timestamp"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+        var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
+        tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
         tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
         HttpRequest.Instance.RequestHttpPost(VerifyPlayerNameUrl, tables, HttpRequest.defaultHttpContentType, 3,
             (bool ok, string result) =>
@@ -78,7 +79,7 @@
                });
     }
 
-    const string VerifyFairyUrl = "https://api.maoergame.com/game/sociaty/response?";
+    const string VerifyFairyUrl = "https://api.maoergame.com/game/sociaty/response";
     public void VerifyFairy(string verifyContent, int op_type, string fairyName, int title, Action<bool, string> callback)
     {
         if (!requireVerify)
@@ -115,7 +116,8 @@
         tables["edit_name"] = playerName;
 
         tables["notice"] = op_type == 2 ? string.Empty : verifyContent;
-        tables["timestamp"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+        var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
+        tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
         tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
 
         HttpRequest.Instance.RequestHttpPost(VerifyFairyUrl, tables, HttpRequest.defaultHttpContentType, 3,
@@ -144,7 +146,7 @@
     public static uint toPlayer = 0;
     public static string toPlayerName = string.Empty;
     public static int toPlayerLevel = 0;
-    const string VerifyChatUrl = "https://api.maoergame.com/game/chat/response?";
+    const string VerifyChatUrl = "https://api.maoergame.com/game/chat/response";
     public void VerifyChat(string content, ChatInfoType channelType, Action<bool, string> callback)
     {
         int channel = 0;
@@ -181,7 +183,8 @@
         tables["receiver_level"] = channel == 3 ? (toPlayerLevel == 0 ? string.Empty : toPlayerLevel.ToString()) : string.Empty;
         tables["receiver_vip_level"] = string.Empty;
 
-        tables["timestamp"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+        var ts = System.DateTime.UtcNow - new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
+        tables["timestamp"] = ((long)System.Convert.ToInt64(ts.TotalSeconds)).ToString();
         tables["key"] = ToMD5(StringUtility.Contact(Sercret, tables["timestamp"]));
 
         HttpRequest.Instance.RequestHttpPost(VerifyChatUrl, tables, HttpRequest.defaultHttpContentType, 3,

--
Gitblit v1.8.0