[C++] 纯文本查看 复制代码 string daoqishijian;
CString str;
CWnd* cwnd;
cwnd = GetDlgItem(IDC_EDIT1);
cwnd->GetWindowText(str);
string Stdstr(CW2A(str.GetString()));//Cstring 转换成string
Model::In_CardLoginArgs args;
args.maccode = Help::NetworkVerHelp::GetMac();//必填
args.timestamp = Help::NetworkVerHelp::GetTimeStamp();//必填
args.requestflag = to_string(args.timestamp);//必填
args.cardnum = Stdstr;//必填
//请求接口,获取登录结果
Model::Result result = Help::NetworkVerHelp::GetLoginByCard(args);
if (result.code==0)
{
Model::Out_Login LoginData = Help::NetworkVerHelp::ConvertLoginData(result.data);
daoqishijian = LoginData.endtime;
LPCSTR str= daoqishijian.c_str();
MessageBoxA(NULL,str, "到期时间:↓↓↓", MB_OK);
}
|