From 44d703088b569886cfd746e5bb998dbeda3520c3 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 27 九月 2018 11:09:30 +0800
Subject: [PATCH] Merge branch 'master' into 3687天赋功能
---
System/ClientVersion/VersionUtility.cs | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/System/ClientVersion/VersionUtility.cs b/System/ClientVersion/VersionUtility.cs
index 3b16c88..ba10111 100644
--- a/System/ClientVersion/VersionUtility.cs
+++ b/System/ClientVersion/VersionUtility.cs
@@ -10,6 +10,7 @@
using LitJson;
using System.IO;
using Snxxz.UI;
+using System.Text;
public class VersionUtility : Singleton<VersionUtility>
{
@@ -67,7 +68,7 @@
if (_ok)
{
versionInfo = JsonMapper.ToObject<VersionInfo>(_result);
- if (NeedUpdate())
+ if (NeedNormalUpdate())
{
switch (Application.platform)
{
@@ -110,7 +111,7 @@
}
}
- public bool NeedUpdate()
+ public bool NeedMaoErUpdate()
{
if (IsMaoErGame())
{
@@ -118,8 +119,13 @@
}
else
{
- return versionInfo.downAsset == 1 && versionInfo.VersionCount > 0;
+ return false;
}
+ }
+
+ public bool NeedNormalUpdate()
+ {
+ return versionInfo.downAsset == 1 && versionInfo.VersionCount > 0;
}
public string GetApkLocalUrl()
@@ -229,15 +235,19 @@
step = Step.None;
var tables = new Dictionary<string, string>();
tables["uid"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
- var url = StringUtility.Contact("https://api.maoergame.com/update/download/url?", HttpRequest.HashtablaToString(tables));
- Debug.Log("鐚�冲己鏇磚rl锛�" + url);
- HttpRequest.Instance.RequestHttpPost(url, string.Empty, HttpRequest.defaultHttpContentType, 1, OnMaoErVersionCheckResult);
+ var url = "https://api.maoergame.com/update/download/url";
+ Debug.LogFormat("鐚�冲己鏇磚rl锛歿0} uid锛歿1} ", url, ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account);
+ HttpRequest.Instance.RequestHttpPost(url, tables, HttpRequest.defaultHttpContentType, 1, OnMaoErVersionCheckResult);
}
}
private void OnMaoErVersionCheckResult(bool ok, string result)
{
- Debug.Log("鐚�冲己鏇� result锛�" + result);
+ UTF8Encoding utf8 = new UTF8Encoding();
+ Byte[] encodedBytes = utf8.GetBytes(result);
+ String decodedString = utf8.GetString(encodedBytes);
+
+ Debug.LogFormat("鐚�冲己鏇磋姹傝繑鍥炵粨鏋� result锛歿0}", decodedString);
if (ok)
{
try
--
Gitblit v1.8.0