Json = Json or require("common.Json")
local lua_mongo = _G.lua_mongo

local AppId = "120"
local AppKey = "64ba80a7e327f3f334425d8a8d897117"
local ReqUrl = "https://sdk.87game1.com/cp/user/check"

-- 验证sdk账号
function CheckUserToken(account,userToken)   
    local api_param = {}
    api_param.app_id=AppId
    api_param.mem_id = account
    api_param.user_token = userToken
    api_param.sign = sign
    local ret, err = pcall(function() return _G.thread_http.send(ReqUrl,Json.Encode(api_param)) end)
    if not ret then
        print("请求sdk服务器错误", ret, err)
        return false
    end
    print(ReqUrl,ret,api_param)
    local data, err = pcall(function() return Json.Decode(ret) end)
    if not data then
        print("Json 解码错误", ret, err)
        return false
    end
    if (data.status == 1) then
        return true
    end
    print("请求sdk服务器错误",ret)
    return false    
end 
