update
This commit is contained in:
@@ -8,6 +8,8 @@ using System.Net;
|
|||||||
|
|
||||||
public class ECLUpgradeBindingServer : EditorWindow
|
public class ECLUpgradeBindingServer : EditorWindow
|
||||||
{
|
{
|
||||||
|
Hashtable content;
|
||||||
|
|
||||||
Hashtable servers;
|
Hashtable servers;
|
||||||
Hashtable server;
|
Hashtable server;
|
||||||
Vector2 scrollPos = Vector2.zero;
|
Vector2 scrollPos = Vector2.zero;
|
||||||
@@ -15,6 +17,27 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
bool isSelectAll = false;
|
bool isSelectAll = false;
|
||||||
static int selectedServerIndex = 0;
|
static int selectedServerIndex = 0;
|
||||||
HotUpgradeServerInfor selectedServer = null;
|
HotUpgradeServerInfor selectedServer = null;
|
||||||
|
static bool uploadResult = false;
|
||||||
|
static bool isFinishUpload = false;
|
||||||
|
|
||||||
|
void OnUpdate()
|
||||||
|
{
|
||||||
|
if (isFinishUpload)
|
||||||
|
{
|
||||||
|
isFinishUpload = false;
|
||||||
|
//TODO:
|
||||||
|
Debug.Log("finished");
|
||||||
|
if (uploadResult)
|
||||||
|
{
|
||||||
|
// success
|
||||||
|
EditorUtility.DisplayDialog("Success", "Success !", "Okey");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Fail", "Failed !", "Okey");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnGUI ()
|
void OnGUI ()
|
||||||
{
|
{
|
||||||
@@ -150,12 +173,12 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
GUI.color = Color.white;
|
GUI.color = Color.white;
|
||||||
}
|
}
|
||||||
EditorGUILayout.TextField (MapEx.getString (server, "idx"), GUILayout.Width (80));
|
EditorGUILayout.TextField (MapEx.getString (server, "idx"), GUILayout.Width (80));
|
||||||
EditorGUILayout.TextField (MapEx.getString (server, "servername"), GUILayout.Width (100));
|
EditorGUILayout.TextField (MapEx.getString (server, "name"), GUILayout.Width (100));
|
||||||
GUI.color = Color.yellow;
|
GUI.color = Color.yellow;
|
||||||
#if UNITY_ANDROID
|
#if UNITY_ANDROID
|
||||||
EditorGUILayout.TextField (MapEx.getString (server, "androidversion"), GUILayout.Width (250));
|
EditorGUILayout.TextField (MapEx.getString (server, "androidVer"), GUILayout.Width (250));
|
||||||
#elif UNITY_IPHONE || UNITY_IOS
|
#elif UNITY_IPHONE || UNITY_IOS
|
||||||
EditorGUILayout.TextField (MapEx.getString (server, "iosversion"), GUILayout.Width (250));
|
EditorGUILayout.TextField (MapEx.getString (server, "iosVer"), GUILayout.Width (250));
|
||||||
#elif UNITY_STANDALONE_WIN
|
#elif UNITY_STANDALONE_WIN
|
||||||
EditorGUILayout.TextField (MapEx.getString (server, "winversion"), GUILayout.Width (250));
|
EditorGUILayout.TextField (MapEx.getString (server, "winversion"), GUILayout.Width (250));
|
||||||
#elif UNITY_STANDALONE_OSX
|
#elif UNITY_STANDALONE_OSX
|
||||||
@@ -208,11 +231,11 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
string verKey = "";
|
string verKey = "";
|
||||||
string vetType = "1";
|
string vetType = "1";
|
||||||
if (platform.Equals ("ios")) {
|
if (platform.Equals ("ios")) {
|
||||||
verKey = "iosversion";
|
verKey = "iosVer";
|
||||||
vetType = "1";
|
vetType = "1";
|
||||||
} else if(platform.Equals("Android"))
|
} else if(platform.Equals("Android"))
|
||||||
{
|
{
|
||||||
verKey = "androidversion";
|
verKey = "androidVer";
|
||||||
vetType = "2";
|
vetType = "2";
|
||||||
}
|
}
|
||||||
else if (platform.Equals("win"))
|
else if (platform.Equals("win"))
|
||||||
@@ -268,12 +291,12 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
string verKey = "";
|
string verKey = "";
|
||||||
string vetType = "1";
|
string vetType = "1";
|
||||||
if (platform.Equals ("ios")) {
|
if (platform.Equals ("ios")) {
|
||||||
verKey = "iosversion";
|
verKey = "iosVer";
|
||||||
vetType = "1";
|
vetType = "1";
|
||||||
}
|
}
|
||||||
else if (platform.Equals("Android"))
|
else if (platform.Equals("Android"))
|
||||||
{
|
{
|
||||||
verKey = "androidversion";
|
verKey = "androidVer";
|
||||||
vetType = "2";
|
vetType = "2";
|
||||||
}
|
}
|
||||||
else if (platform.Equals("win"))
|
else if (platform.Equals("win"))
|
||||||
@@ -292,7 +315,7 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
server [verKey] = newMd5;
|
server [verKey] = newMd5;
|
||||||
server ["pkgName"] = MapEx.getString (d, "name");
|
server ["pkgName"] = MapEx.getString (d, "name");
|
||||||
server ["pkgRemark"] = MapEx.getString (d, "remark");
|
server ["pkgRemark"] = MapEx.getString (d, "remark");
|
||||||
saveData (MapEx.getString (server, "idx"), newMd5, vetType);
|
saveData (MapEx.getString (server, "id"), newMd5, verKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -326,10 +349,9 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveData (string serverID, string version, string verType)
|
public void saveData (string serverID, string version, string verKey)
|
||||||
{
|
{
|
||||||
// string __httpBaseUrl = PStr.b ().a ("http://").a (Net.self.gateHost).a (":").a (Net.self.gatePort).e ();
|
/*
|
||||||
// string url = PStr.b ().a (__httpBaseUrl).a ("/KokDirServer/UpdateVerServlet").e ();
|
|
||||||
string url = selectedServer.setServerPkgMd5Url;
|
string url = selectedServer.setServerPkgMd5Url;
|
||||||
Dictionary<string,object> paras = new Dictionary<string, object> ();
|
Dictionary<string,object> paras = new Dictionary<string, object> ();
|
||||||
paras ["serverid"] = serverID;
|
paras ["serverid"] = serverID;
|
||||||
@@ -339,6 +361,62 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
if (response == null)
|
if (response == null)
|
||||||
return;
|
return;
|
||||||
response.Close ();
|
response.Close ();
|
||||||
|
*/
|
||||||
|
Hashtable server = servers[serverID] as Hashtable;
|
||||||
|
server[verKey] = version;
|
||||||
|
string str = JSON.JsonEncode(content);
|
||||||
|
Debug.Log(str);
|
||||||
|
string path = Path.Combine(Application.dataPath, CLPathCfg.self.basePath, "serversCfg/servers.json");
|
||||||
|
File.WriteAllText(path, str);
|
||||||
|
|
||||||
|
ThreadEx.exec(new System.Threading.ParameterizedThreadStart(doUploadServers), path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void doUploadServers(object serversFilePath)
|
||||||
|
{
|
||||||
|
if (selectedServer == null)
|
||||||
|
{
|
||||||
|
Debug.LogError("Please select a server!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
isFinishUpload = false;
|
||||||
|
if (selectedServer.useSFTP)
|
||||||
|
{
|
||||||
|
RenciSFTPHelper sftp = new RenciSFTPHelper(
|
||||||
|
selectedServer.host4UploadUpgradePackage,
|
||||||
|
selectedServer.port4UploadUpgradePackage,
|
||||||
|
selectedServer.ftpUser,
|
||||||
|
selectedServer.ftpPassword);
|
||||||
|
if (sftp.connect())
|
||||||
|
{
|
||||||
|
sftp.put(serversFilePath.ToString(), selectedServer.RemoteBaseDir, (Callback)onftpFinish);
|
||||||
|
sftp.disConnect();
|
||||||
|
sftp = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Utl.doCallback((Callback)onftpFinish, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float progress = 0;
|
||||||
|
FTP ftp = new FTP(
|
||||||
|
selectedServer.host4UploadUpgradePackage,
|
||||||
|
selectedServer.ftpUser,
|
||||||
|
selectedServer.ftpPassword);
|
||||||
|
bool ret = ftp.Upload(serversFilePath.ToString(),
|
||||||
|
selectedServer.RemoteBaseDir);
|
||||||
|
Utl.doCallback((Callback)onftpFinish, ret);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void onftpFinish(params object[] pars)
|
||||||
|
{
|
||||||
|
isFinishUpload = true;
|
||||||
|
bool ret = (bool)(pars[0]);
|
||||||
|
ECLUpgradeBindingServer.uploadResult = ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshData ()
|
public void refreshData ()
|
||||||
@@ -350,13 +428,13 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
}
|
}
|
||||||
// string __httpBaseUrl = PStr.b ().a ("http://").a (Net.self.gateHost).a (":").a (Net.self.gatePort).e ();
|
// string __httpBaseUrl = PStr.b ().a ("http://").a (Net.self.gateHost).a (":").a (Net.self.gatePort).e ();
|
||||||
// string url = PStr.b ().a (__httpBaseUrl).a ("/KokDirServer/ServerServlet").e ();
|
// string url = PStr.b ().a (__httpBaseUrl).a ("/KokDirServer/ServerServlet").e ();
|
||||||
string url = selectedServer.getServerListUrl;
|
string url = Utl.urlAddTimes(selectedServer.getServerListUrl);
|
||||||
if (string.IsNullOrEmpty (url)) {
|
if (string.IsNullOrEmpty (url)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Dictionary<string,object> paras = new Dictionary<string, object> ();
|
Dictionary<string,object> paras = new Dictionary<string, object> ();
|
||||||
paras ["serverType"] = 1;
|
//paras ["serverType"] = 1;
|
||||||
HttpWebResponse response = HttpEx.CreatePostHttpResponse (url, paras, 10000, System.Text.Encoding.UTF8);
|
HttpWebResponse response = HttpEx.CreateGetHttpResponse(url, 10000);
|
||||||
if (response == null)
|
if (response == null)
|
||||||
return;
|
return;
|
||||||
string str = HttpEx.readString (response);
|
string str = HttpEx.readString (response);
|
||||||
@@ -364,13 +442,31 @@ public class ECLUpgradeBindingServer : EditorWindow
|
|||||||
// Debug.Log (url);
|
// Debug.Log (url);
|
||||||
// string str = HttpEx.readString (url, null);
|
// string str = HttpEx.readString (url, null);
|
||||||
Debug.Log (str);
|
Debug.Log (str);
|
||||||
servers = JSON.DecodeMap (str);
|
content = JSON.DecodeMap(str);
|
||||||
|
servers = MapEx.getMap(content, CLCfgBase.self.appUniqueID);
|
||||||
Hashtable server = null;
|
Hashtable server = null;
|
||||||
Hashtable pkg = null;
|
Hashtable pkg = null;
|
||||||
if (servers != null) {
|
if (servers != null) {
|
||||||
|
string verKey = "";
|
||||||
foreach (DictionaryEntry cell in servers) {
|
foreach (DictionaryEntry cell in servers) {
|
||||||
server = cell.Value as Hashtable;
|
server = cell.Value as Hashtable;
|
||||||
pkg = getUpgradePkgByMd5 (MapEx.getString (server, "version"));
|
if (CLPathCfg.self.platform.Equals("ios"))
|
||||||
|
{
|
||||||
|
verKey = "iosVer";
|
||||||
|
}
|
||||||
|
else if (CLPathCfg.self.platform.Equals("Android"))
|
||||||
|
{
|
||||||
|
verKey = "androidVer";
|
||||||
|
}
|
||||||
|
else if (CLPathCfg.self.platform.Equals("win"))
|
||||||
|
{
|
||||||
|
verKey = "winversion";
|
||||||
|
}
|
||||||
|
else if (CLPathCfg.self.platform.Equals("osx"))
|
||||||
|
{
|
||||||
|
verKey = "osxversion";
|
||||||
|
}
|
||||||
|
pkg = getUpgradePkgByMd5 (MapEx.getString (server, verKey));
|
||||||
server ["pkgName"] = MapEx.getString (pkg, "name");
|
server ["pkgName"] = MapEx.getString (pkg, "name");
|
||||||
server ["pkgRemark"] = MapEx.getString (pkg, "remark");
|
server ["pkgRemark"] = MapEx.getString (pkg, "remark");
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -1668,7 +1668,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 5e28cad2f718f443db7bef1ef8b01221, type: 3}
|
m_Script: {fileID: 11500000, guid: 5e28cad2f718f443db7bef1ef8b01221, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
appUniqueID: 0
|
appUniqueID: 1000
|
||||||
isContBorrowSpriteTimes: 0
|
isContBorrowSpriteTimes: 0
|
||||||
isNotEditorMode: 0
|
isNotEditorMode: 0
|
||||||
isEncodeLua: 1
|
isEncodeLua: 1
|
||||||
|
|||||||
8
Assets/trCRM/serversCfg.meta
Normal file
8
Assets/trCRM/serversCfg.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5fd029f572e644f84a572d1a6a556ff1
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
32
Assets/trCRM/serversCfg/servers.json
Normal file
32
Assets/trCRM/serversCfg/servers.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"appid": "2020158",
|
||||||
|
"servers": {
|
||||||
|
"1": {
|
||||||
|
"id": "1",
|
||||||
|
"name": "正式服",
|
||||||
|
"host": "app.ttf-cti.com",
|
||||||
|
"port": 29004,
|
||||||
|
"isDev": 0,
|
||||||
|
"iosVer": "",
|
||||||
|
"androidVer": ""
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"id": "2",
|
||||||
|
"name": "测试服",
|
||||||
|
"host": "app.ttf-cti.com",
|
||||||
|
"port": 29004,
|
||||||
|
"isDev": 1,
|
||||||
|
"iosVer": "",
|
||||||
|
"androidVer": ""
|
||||||
|
},
|
||||||
|
"3": {
|
||||||
|
"id": "3",
|
||||||
|
"name": "本地测试",
|
||||||
|
"host": "192.168.1.11",
|
||||||
|
"port": 29000,
|
||||||
|
"isDev": 1,
|
||||||
|
"iosVer": "",
|
||||||
|
"androidVer": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
Assets/trCRM/serversCfg/servers.json.meta
Normal file
7
Assets/trCRM/serversCfg/servers.json.meta
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5c43957f94ee14dd7b78de24712d9c6c
|
||||||
|
TextScriptImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -13,23 +13,10 @@ local port = 29004
|
|||||||
local baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
local baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
||||||
local socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
local socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
||||||
|
|
||||||
NetProto.setSeverPublish = function()
|
|
||||||
host = "app.ttf-cti.com"
|
|
||||||
port = 29004
|
|
||||||
baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
|
||||||
socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
|
||||||
end
|
|
||||||
|
|
||||||
NetProto.setSeverDev = function()
|
NetProto.setSever = function(_host, _port)
|
||||||
host = "app.ttf-cti.com"
|
host = _host
|
||||||
port = 29000
|
port = _port
|
||||||
baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
|
||||||
socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
|
||||||
end
|
|
||||||
|
|
||||||
NetProto.setSeverLocal = function()
|
|
||||||
host = "192.168.1.11"
|
|
||||||
port = 29000
|
|
||||||
baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
baseUrl = joinStr("http://", host, ":", port, "/open_api/")
|
||||||
socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
socketUrl = joinStr("ws://", host, ":", port, "/tr_socket/websocket/")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,48 +1,36 @@
|
|||||||
-- xx单元
|
-- xx单元
|
||||||
do
|
|
||||||
local _cell = {}
|
local _cell = {}
|
||||||
local csSelf = nil;
|
local csSelf = nil
|
||||||
local transform = nil;
|
local transform = nil
|
||||||
local mData = nil;
|
local mData = nil
|
||||||
local uiobjs = {}
|
local uiobjs = {}
|
||||||
|
|
||||||
-- 初始化,只调用一次
|
-- 初始化,只调用一次
|
||||||
function _cell.init(csObj)
|
function _cell.init(csObj)
|
||||||
csSelf = csObj;
|
csSelf = csObj
|
||||||
transform = csSelf.transform;
|
transform = csSelf.transform
|
||||||
--[[
|
--[[
|
||||||
上的组件:getChild(transform, "offset", "Progress BarHong"):GetComponent("UISlider");
|
上的组件:getChild(transform, "offset", "Progress BarHong"):GetComponent("UISlider");
|
||||||
--]]
|
--]]
|
||||||
uiobjs.Background = getCC(transform, "Background", "UISprite")
|
|
||||||
uiobjs.Label = getCC(transform, "Label", "UILabel")
|
uiobjs.Label = getCC(transform, "Label", "UILabel")
|
||||||
uiobjs.LabelStat = getCC(transform, "LabelStat", "UILabel")
|
|
||||||
uiobjs.LabelNew = getCC(transform, "LabelNew", "UILabel")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 显示,
|
-- 显示,
|
||||||
-- 注意,c#侧不会在调用show时,调用refresh
|
-- 注意,c#侧不会在调用show时,调用refresh
|
||||||
function _cell.show(go, data)
|
function _cell.show(go, data)
|
||||||
mData = data;
|
mData = data
|
||||||
uiobjs.Label.text = mData.name
|
uiobjs.Label.text = mData.name
|
||||||
local stateDesc = ""
|
if mData.isDev == 1 then
|
||||||
local status = bio2number(mData.status)
|
uiobjs.Label.color = Color.red
|
||||||
if status == 2 then
|
|
||||||
stateDesc = joinStr("[00ffff]", LGet("StateCrowded"),"[-]")
|
|
||||||
elseif status == 3 then
|
|
||||||
stateDesc = LGet("StateMaintain")
|
|
||||||
stateDesc = joinStr("[ff0000]", LGet("StateMaintain"),"[-]")
|
|
||||||
else
|
else
|
||||||
stateDesc = joinStr("[00ff00]", LGet("StateNomal"),"[-]")
|
uiobjs.Label.color = Color.white
|
||||||
end
|
end
|
||||||
uiobjs.LabelStat.text = stateDesc
|
|
||||||
SetActive(uiobjs.LabelNew.gameObject, mData.isnew and true or false)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 取得数据
|
-- 取得数据
|
||||||
function _cell.getData()
|
function _cell.getData()
|
||||||
return mData;
|
return mData
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
return _cell;
|
return _cell
|
||||||
end
|
|
||||||
|
|||||||
@@ -190,9 +190,13 @@ function CLLPSplash.updateRes()
|
|||||||
CLLPSplash.selectServer(
|
CLLPSplash.selectServer(
|
||||||
function(result)
|
function(result)
|
||||||
server = result
|
server = result
|
||||||
|
if server == nil then
|
||||||
|
CLUIUtl.showConfirm("未取得服务器,请联系管理员!", nil)
|
||||||
|
else
|
||||||
Prefs.setCurrServer(json.encode(server))
|
Prefs.setCurrServer(json.encode(server))
|
||||||
CLLPSplash.checkHotUpgrade()
|
CLLPSplash.checkHotUpgrade()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -201,23 +205,29 @@ end
|
|||||||
CLLPSplash.selectServer = function(callback)
|
CLLPSplash.selectServer = function(callback)
|
||||||
local onGetServers = function(content, orgs)
|
local onGetServers = function(content, orgs)
|
||||||
local content = json.decode(content)
|
local content = json.decode(content)
|
||||||
|
local servers = content[CLCfgBase.self.appUniqueID] or {}
|
||||||
local userName = Prefs.getUserName()
|
local userName = Prefs.getUserName()
|
||||||
DBUser.isWhiteUser(
|
DBUser.isWhiteUser(
|
||||||
userName,
|
userName,
|
||||||
function(iswhite)
|
function(iswhite)
|
||||||
if iswhite then
|
if iswhite then
|
||||||
getPanelAsy("PanelSelectServer", onLoadedPanelTT, {servers = content.data, callback = callback})
|
getPanelAsy("PanelSelectServer", onLoadedPanelTT, {servers = servers, callback = callback})
|
||||||
else
|
else
|
||||||
--//TODO:取得正式环境的信息
|
--取得正式环境的信息
|
||||||
Utl.doCallback(callback)
|
local server
|
||||||
|
for key, v in pairs(servers) do
|
||||||
|
if v.isDev == 0 then
|
||||||
|
server = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Utl.doCallback(callback, server)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
local url = "" --//TODO:不要token验证,传appid,以便可以区分服务器
|
local url = joinStr(CLVerManager.self.baseUrl, "/servers.json")
|
||||||
WWWEx.get(
|
WWWEx.get(
|
||||||
url,
|
Utl.urlAddTimes(url),
|
||||||
nil,
|
nil,
|
||||||
CLAssetType.text,
|
CLAssetType.text,
|
||||||
onGetServers,
|
onGetServers,
|
||||||
@@ -408,7 +418,7 @@ function CLLPSplash.goNext()
|
|||||||
if CLCfgBase.self.isDirectEntry then
|
if CLCfgBase.self.isDirectEntry then
|
||||||
CLCfgBase.self.isDirectEntry = false
|
CLCfgBase.self.isDirectEntry = false
|
||||||
end
|
end
|
||||||
CLPanelManager.getPanelAsy("PanelStart", onLoadedPanel, {user, server})
|
CLPanelManager.getPanelAsy("PanelStart", onLoadedPanel, {server = server})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 当按了返回键时,关闭自己(返值为true时关闭)
|
-- 当按了返回键时,关闭自己(返值为true时关闭)
|
||||||
|
|||||||
@@ -90,12 +90,11 @@ function CLLPStart.setLuasAtBegainning()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function CLLPStart.setData(pars)
|
function CLLPStart.setData(pars)
|
||||||
user = pars[1]
|
selectedServer = pars.server
|
||||||
selectedServer = pars[2]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function CLLPStart.show()
|
function CLLPStart.show()
|
||||||
--CLLPStart.createPanel()
|
NetProto.setSever(selectedServer.host, selectedServer.port)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 刷新页面
|
-- 刷新页面
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ GameObject:
|
|||||||
- component: {fileID: 630664255065274416}
|
- component: {fileID: 630664255065274416}
|
||||||
- component: {fileID: 2706568950277189029}
|
- component: {fileID: 2706568950277189029}
|
||||||
- component: {fileID: 5016178426459801864}
|
- component: {fileID: 5016178426459801864}
|
||||||
|
- component: {fileID: 5182567377838306484}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: 00000
|
m_Name: 00000
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@@ -288,6 +289,21 @@ MonoBehaviour:
|
|||||||
mSpriteName: public_button
|
mSpriteName: public_button
|
||||||
mFillCenter: 1
|
mFillCenter: 1
|
||||||
isGrayMode: 0
|
isGrayMode: 0
|
||||||
|
--- !u!114 &5182567377838306484
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6320771060119039048}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 575f113ee96624a30ab2ca1af1303112, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
isPause: 0
|
||||||
|
luaPath: trCRM/upgradeRes/priority/lua/ui/cell/CLLCellServer.lua
|
||||||
|
isNeedResetAtlase: 1
|
||||||
--- !u!1 &8005951734287196268
|
--- !u!1 &8005951734287196268
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user