|
|
@@ -699,17 +699,19 @@ LoginFinish:
|
|
|
End Sub
|
|
|
Private Sub McLoginRequestRefresh(ByRef Data As LoaderTask(Of McLoginServer, McLoginResult), RequestUser As Boolean)
|
|
|
McLaunchLog("刷新登录开始(Refresh, " & Data.Input.Token & ")")
|
|
|
+
|
|
|
+ Dim RefreshInfo As JObject = New JObject
|
|
|
+ Dim SelectProfile As JObject = New JObject()
|
|
|
+ SelectProfile.Add(New JProperty("name", Setup.Get("Cache" & Data.Input.Token & "Name")))
|
|
|
+ SelectProfile.Add(New JProperty("id", Setup.Get("Cache" & Data.Input.Token & "Uuid")))
|
|
|
+ RefreshInfo.Add("selectedProfile", SelectProfile)
|
|
|
+ RefreshInfo.Add(New JProperty("accessToken", Setup.Get("Cache" & Data.Input.Token & "Access")))
|
|
|
+ RefreshInfo.Add(New JProperty("requestUser", True))
|
|
|
+
|
|
|
Dim LoginJson As JObject = GetJson(NetRequestRetry(
|
|
|
Url:=Data.Input.BaseUrl & "/refresh",
|
|
|
Method:="POST",
|
|
|
- Data:="{" &
|
|
|
- If(RequestUser, "
|
|
|
- ""requestUser"": true,
|
|
|
- ""selectedProfile"": {
|
|
|
- ""id"":""" & Setup.Get("Cache" & Data.Input.Token & "Uuid") & """,
|
|
|
- ""name"":""" & Setup.Get("Cache" & Data.Input.Token & "Name") & """},", "") & "
|
|
|
- ""accessToken"":""" & Setup.Get("Cache" & Data.Input.Token & "Access") & """,
|
|
|
- ""clientToken"":""" & Setup.Get("Cache" & Data.Input.Token & "Client") & """}",
|
|
|
+ Data:=RefreshInfo.ToString(0),
|
|
|
Headers:=New Dictionary(Of String, String) From {{"Accept-Language", "zh-CN"}},
|
|
|
ContentType:="application/json; charset=utf-8"))
|
|
|
'将登录结果输出
|