using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using Newtonsoft.Json.Linq;
///
/// 检查更新
///
class CheckUpdate
{
/////
///// 检查方法
/////
///// 客户端当前版本号
///// 平台字符串 Android/IOS
/////
// public static void Check(int myVer=1,string plat="Android", Action callback=null) {
// WWWForm para= new WWWForm();
// para.headers.Add("clientVer", myVer.ToString());
// para.headers.Add("plat",plat);
// try
// {
// WWW w3 = new WWW(Check_URL, para);
// while(w3.isDone)
// {
// }
// CheckResult ret = JObject.Parse(w3.text).ToObject();
// callback?.Invoke(ret);
// }
// catch (Exception e) {
// // Error
// }
// }
#region ' CDN '
///
/// 资源CDN服务器地址
///
public static string Check_URL => Config_URL.CND_CheckURL;
#endregion
///
/// 检查页面返回值结构
///
public class CheckResult
{
///
/// 错误码: 0: 平安无事, 1031: 强更, 1032: 有更新,非强制, 1033: 打印信息,并且退出.
///
public int err = 0;
///
/// 附带消息: 1033时提取此消息并显示
///
public string msg = "";
///
/// CDN上的最新版本号
///
public int newVer = 0;
///
/// CDN地址
///
public string cdn = "";
/////
///// 该版本的信息
/////
//public VersionInfo versionInfo;
///
/// 整包更新地址
///
public string fullDownloadPage = "";
}
public class VersionInfo
{
///
/// 版本号 default(0)
///
public String ver { get; set; }
///
/// 发布时间 default(0)
///
public String releaseTime { get; set; }
///
/// 版本说明 default(0)
///
public String description { get; set; }
}
}