Dog_Client_Get_UnbindInfo_User

D_UnbindInfo Dog_Client_Get_UnbindInfo_User(const char* user);

接口描述

获取用户模式解绑信息

请求参数

参数名
类型
描述
必填
user
const char*
用户名
必填

返回值

参数名
类型
描述
必填
UnbindInfo
D_UnbindInfo
解绑信息
必填

说明 / 示例

[D_UnbindInfo](doc:dKZ7axh1).remainingTimes(剩余次数)为-1时则表示错误,需通过[Dog_Client_Get_Errorid](doc:WKBm5POy)获取错误信息 以下为C++例子: ``` // 获取解绑信息 auto cardinfo = Dog_Client_Get_UnbindInfo_User("208997573"); // 若剩余次数不等于-1则表示允许解绑或有解绑次数 if (cardinfo.remainingTimes != -1) { // 次数为0则表示没有次数 if (cardinfo.remainingTimes == 0) { std::cout << "没有解绑次数" << std::endl; return; } else { // 获取解绑信息 std::ostringstream textw; textw << "你确定要解绑吗\n"; textw << "剩余解绑次数: " << cardinfo.remainingTimes << "\n"; textw << "免费解绑次数: " << cardinfo.freeTimes << "\n"; textw << "解绑一次扣时: " << cardinfo.unbindDeductTime << "(单位 : 分钟)\n"; // 询问是否解绑 if (::MessageBoxA(NULL, textw.str().c_str(), NULL, MB_YESNO) == IDNO) return; // 调用解绑函数 if (Dog_Client_Unbind_User("208997573","123456") == TRUE) { std::cout << "解绑成功" << std::endl; return; } else { // 登录失败,返回错误码 auto errid = Dog_Client_Get_Errorid(); // 是否存在密码输错限制 if (g_SoftInfo.passwordAttemptLimit == true) { // 密码错误 if (errid == 6) { std::cout << "密码不正确,你还有" << Dog_Client_Get_ErrorPassCout(10) << "次机会" << std::endl; } // 次数已经用完 else if (errid == 43) { std::cout << "连续密码错误次数过多,请于" << Dog_Client_Get_ErrorPassCout(11) << "秒后在尝试" << std::endl; } // 其他错误信息.. else std::cout << "No! Errorid: " << errid << std::endl; } else { std::cout << "No! Errorid: " << errid << std::endl; } } } } // 获取错误信息.. std::cout << dog_client_error_str(Dog_Client_Get_Errorid()) << std::endl; ```