|
|
@@ -97,9 +97,9 @@ func init() {
|
|
|
// } else {
|
|
|
// LoginRet(ev, int32(serverproto.ErrorCode_ERROR_SDK_LOGIN_FAILED))
|
|
|
// }
|
|
|
- case model.SDKPlatform_Ru_Ios:
|
|
|
+ case model.SDKPlatform_Dn_Ios:
|
|
|
fallthrough
|
|
|
- case model.SDKPlatform_Ru_Android:
|
|
|
+ case model.SDKPlatform_Dn_Android:
|
|
|
LoginVerifyRUSign(cliId.SessID, cliId.ServiceID, msg.Platform, msg.PlatformToken, msg.OpenId)
|
|
|
}
|
|
|
return
|
|
|
@@ -602,6 +602,68 @@ func LoginVerifyRUSign(clientId uint64, GateServiceNode string, platform string,
|
|
|
}()
|
|
|
}
|
|
|
|
|
|
+// 东南亚登录sdk
|
|
|
+func LoginVerifyDNSign(clientId uint64, GateServiceNode string, platform string, token string, openId string) {
|
|
|
+ //authHttpAddr := ""
|
|
|
+ urlPath := ""
|
|
|
+ go func() {
|
|
|
+ defer func() {
|
|
|
+ //打印奔溃信息
|
|
|
+ if err := recover(); err != nil {
|
|
|
+ util.InfoF("onError data=%v \n%s\n", err, string(debug.Stack()))
|
|
|
+ }
|
|
|
+ }()
|
|
|
+
|
|
|
+ //tmpRequest := &rocommon.HTTPRequest{}
|
|
|
+ //tmpRequest.ReqCodecName = "httpjson"
|
|
|
+ //为海外quick做适配
|
|
|
+ // if platform == model.SDKPlatform_Hw_Quick {
|
|
|
+ gameserctKey := "80c648e7df8aaa72"
|
|
|
+ param := "productId=" + "&userId=" + openId + "&sessionid=" + token
|
|
|
+ hash := md5.Sum([]byte(param + gameserctKey))
|
|
|
+ sign := hex.EncodeToString(hash[:])
|
|
|
+ //authHttpAddr = ""
|
|
|
+ //authHttpAddr = "http://pxqg.hkhappygame.com"
|
|
|
+ urlPath = "http://sdk.szmsbdmy.com:8083/loginvalid.php?" + param + "&sign=" + sign
|
|
|
+ //tmpRequest.ResMsg = ""
|
|
|
+ util.InfoF("urlPath=%v", urlPath)
|
|
|
+
|
|
|
+ //parm := GetHttpNodeParam()
|
|
|
+ //parm.LisAddr = authHttpAddr
|
|
|
+ //httpNode := baseserver.CreateHttpConnector(parm)
|
|
|
+ resp, err := http.Get(urlPath)
|
|
|
+ if err != nil {
|
|
|
+ util.ErrorF("login sdk check error:%v", err)
|
|
|
+ }
|
|
|
+ defer resp.Body.Close() // 确保关闭响应体
|
|
|
+
|
|
|
+ // 读取响应体
|
|
|
+ body, err2 := io.ReadAll(resp.Body)
|
|
|
+ res := string(body)
|
|
|
+ //err := httpNode.(rocommon.HTTPConnector).Request("GET", urlPath, tmpRequest)
|
|
|
+ util.InfoF("tmpRequest.ResMsg:%v", res)
|
|
|
+ tmpResMsg := &SDKHwQuickLoginAuthCheckResp{
|
|
|
+ Status: true,
|
|
|
+ }
|
|
|
+ var resRu ResponseRu
|
|
|
+ err = json.Unmarshal(body, &resRu)
|
|
|
+ if err != nil {
|
|
|
+ util.ErrorF("auth login json Unmarshal err:%v", err)
|
|
|
+ }
|
|
|
+ tmpResMsg.Message = resRu.Code
|
|
|
+ tmpResMsg.ClientId = clientId
|
|
|
+ tmpResMsg.ServiceId = GateServiceNode
|
|
|
+ tmpResMsg.OpenId = openId
|
|
|
+ tmpResMsg.Platform = platform
|
|
|
+ if err2 != nil || tmpResMsg.Message != "0" {
|
|
|
+ tmpResMsg.Status = false
|
|
|
+ util.ErrorF("uid=%v http Request openid=%v err=%v", clientId, openId, err2)
|
|
|
+ util.ErrorF("uid=%v http Request2 openid=%v err=%v", clientId, openId, resRu.Msg)
|
|
|
+ }
|
|
|
+ GetAuthCheckMag().AddCheckList(tmpResMsg)
|
|
|
+ }()
|
|
|
+}
|
|
|
+
|
|
|
type ResponseRu struct {
|
|
|
Code string `json:"code"`
|
|
|
Msg string `json:"msg"`
|