Skip to content

Commit

Permalink
Use new api route
Browse files Browse the repository at this point in the history
  • Loading branch information
haimanman committed May 5, 2017
1 parent ca90347 commit 9ce28f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions HM_Love/HM_Love.lua
Expand Up @@ -556,7 +556,7 @@ end
-- 下载恢复情缘
_HM_Love.DownloadLover = function()
HM.GetJson(ROOT_URL .. "/api/data/lover/" .. GetClientPlayer().GetGlobalID()):done(function(res)
HM.GetJson(ROOT_URL .. "/api/jx3/lover/" .. GetClientPlayer().GetGlobalID()):done(function(res)
if not res or res.errcode ~= 0 then
HM.Alert(g_tStrings.tFellowshipErrorString[PLAYER_FELLOWSHIP_RESPOND.ERROR_INVALID_NAME])
else
Expand All @@ -574,7 +574,7 @@ end
-- 删除远程情缘 (post used)
_HM_Love.DeleteRemote = function()
HM.PostJson(ROOT_URL .. "/api/data/lovers", {
HM.PostJson(ROOT_URL .. "/api/jx3/lovers", {
gid = GetClientPlayer().GetGlobalID(),
__delete = 1,
__lang = CLIENT_LANG,
Expand All @@ -600,7 +600,7 @@ _HM_Love.UploadRemote = function(__qrcode)
nStartTime = _HM_Love.nStartTime,
})
end
HM.PostJson(ROOT_URL .. "/api/data/lovers", data):done(function(res)
HM.PostJson(ROOT_URL .. "/api/jx3/lovers", data):done(function(res)
if not res or res.errcode ~= 0 then
HM.Alert(res.errmsg)
elseif res.qrcode then
Expand Down
10 changes: 5 additions & 5 deletions HM_Secret/HM_Secret.lua
Expand Up @@ -492,7 +492,7 @@ _HM_Secret.PS.OnPanelActive = function(frame)
local data = {}
data.gid = GetClientPlayer().GetGlobalID()
data.isOpenVerify = "0"
HM.PostJson(ROOT_URL .. "/api/data/roles", data):done(function(res)
HM.PostJson(ROOT_URL .. "/api/jx3/roles", data):done(function(res)
HM_Secret.bAutoSync = false
HM.OpenPanel(_HM_Secret.szName)
end)
Expand All @@ -508,7 +508,7 @@ _HM_Secret.PS.OnPanelActive = function(frame)
if GetClientPlayer().nLevel < 95 then
return HM.Alert(g_tStrings.tCraftResultString[CRAFT_RESULT_CODE.TOO_LOW_LEVEL])
end
HM.PostJson(ROOT_URL .. "/api/data/roles", data):done(function(res)
HM.PostJson(ROOT_URL .. "/api/jx3/roles", data):done(function(res)
HM_Secret.bAutoSync = true
if not res then
-- unknown error
Expand All @@ -529,9 +529,9 @@ _HM_Secret.PS.OnPanelActive = function(frame)
btn:Enable(true)
end)
end):Pos_()
-- /api/data/roles/{gid}
-- /api/jx3/roles/{gid}
_HM_Secret.PS.active = true
HM.GetJson(ROOT_URL .. "/api/data/roles/" .. GetClientPlayer().GetGlobalID()):done(function(res)
HM.GetJson(ROOT_URL .. "/api/jx3/roles/" .. GetClientPlayer().GetGlobalID()):done(function(res)
if not _HM_Secret.PS.active then
return
end
Expand Down Expand Up @@ -658,7 +658,7 @@ end)
HM.RegisterEvent("FIRST_LOADING_END", function()
if HM_Secret.bAutoSync then
local data = HM_About.GetSyncData()
HM.PostJson(ROOT_URL .. "/api/data/roles", data)
HM.PostJson(ROOT_URL .. "/api/jx3/roles", data)
end
end)
Expand Down

0 comments on commit 9ce28f7

Please sign in to comment.