CHuiyuanAddWnd.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. #include "../pch/pch.h"
  2. #include "CHuiyuanAddWnd.h"
  3. #include "../helper/MD5.h"
  4. LRESULT CHuiyuanAddWnd::OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  5. {
  6. POINT pt;
  7. pt.x = GET_X_LPARAM(lParam);
  8. pt.y = GET_Y_LPARAM(lParam);
  9. ::ScreenToClient(*this, &pt);
  10. RECT rcClient;
  11. ::GetClientRect(*this, &rcClient);
  12. RECT rcCaption = m_pm.GetCaptionRect();
  13. if (pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \
  14. && pt.y >= rcCaption.top && pt.y < rcCaption.bottom)
  15. {
  16. CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(pt));
  17. if (pControl && _tcscmp(pControl->GetClass(), DUI_CTR_BUTTON) != 0)
  18. {
  19. return HTCAPTION;
  20. }
  21. }
  22. return HTCLIENT;
  23. }
  24. LRESULT CHuiyuanAddWnd::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  25. {
  26. SIZE szRoundCorner = m_pm.GetRoundCorner();
  27. if (!::IsIconic(*this) && (szRoundCorner.cx != 0 || szRoundCorner.cy != 0))
  28. {
  29. CDuiRect rcWnd;
  30. ::GetWindowRect(*this, &rcWnd);
  31. rcWnd.Offset(-rcWnd.left, -rcWnd.top);
  32. rcWnd.right++;
  33. rcWnd.bottom++;
  34. HRGN hRgn = ::CreateRoundRectRgn(rcWnd.left, rcWnd.top, rcWnd.right, rcWnd.bottom, szRoundCorner.cx, szRoundCorner.cy);
  35. ::SetWindowRgn(*this, hRgn, TRUE);
  36. ::DeleteObject(hRgn);
  37. }
  38. bHandled = FALSE;
  39. return 0;
  40. }
  41. LRESULT CHuiyuanAddWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
  42. {
  43. LRESULT lRes = 0;
  44. BOOL bHandled = TRUE;
  45. switch (uMsg)
  46. {
  47. case WM_CREATE:
  48. lRes = OnCreate(uMsg, wParam, lParam, bHandled);
  49. break;
  50. case WM_NCACTIVATE:
  51. lRes = OnNcActivate(uMsg, wParam, lParam, bHandled);
  52. break;
  53. case WM_NCCALCSIZE:
  54. lRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled);
  55. break;
  56. case WM_NCPAINT:
  57. lRes = OnNcPaint(uMsg, wParam, lParam, bHandled);
  58. break;
  59. case WM_NCHITTEST:
  60. lRes = OnNcHitTest(uMsg, wParam, lParam, bHandled);
  61. break;
  62. case WM_SIZE:
  63. lRes = OnSize(uMsg, wParam, lParam, bHandled);
  64. break;
  65. default:
  66. bHandled = FALSE;
  67. }
  68. if (bHandled)
  69. {
  70. return lRes;
  71. }
  72. if (m_pm.MessageHandler(uMsg, wParam, lParam, lRes))
  73. {
  74. return lRes;
  75. }
  76. return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
  77. }
  78. LRESULT CHuiyuanAddWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
  79. {
  80. if (uMsg == WM_KEYDOWN)
  81. {
  82. if (wParam == VK_RETURN)
  83. {
  84. StartYanzheng();
  85. return true;
  86. }
  87. else if (wParam == VK_ESCAPE)
  88. {
  89. if (m_is_qingqiu == false)
  90. {
  91. Close(IDCANCEL);
  92. }
  93. return true;
  94. }
  95. }
  96. else if (uMsg == WM_MEMBER_CHECK_SUCCESS)
  97. {
  98. m_qingqiu_mutex.lock();
  99. m_is_qingqiu = false;
  100. m_qingqiu_mutex.unlock();
  101. //验证成功了
  102. Close(IDOK);
  103. return true;
  104. }
  105. else if (uMsg == WM_MEMBER_CHECK_FAIL)
  106. {
  107. //验证失败了
  108. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  109. pPhone->SetEnabled(true);
  110. CCheckBoxUI* pOpen = static_cast<CCheckBoxUI*>(m_pm.FindControl((L"password_pay_open")));
  111. pOpen->SetEnabled(true);
  112. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  113. pPassword->SetEnabled(true);
  114. CButtonUI* pSave = static_cast<CButtonUI*>(m_pm.FindControl(_T("save")));
  115. pSave->SetEnabled(true);
  116. //失败原因
  117. CLabelUI* pErrorInfo = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
  118. pErrorInfo->SetText(m_errorInfo.c_str());
  119. pErrorInfo->SetVisible(true);
  120. m_qingqiu_mutex.lock();
  121. m_is_qingqiu = false;
  122. m_qingqiu_mutex.unlock();
  123. return true;
  124. }
  125. return false;
  126. }
  127. LRESULT CHuiyuanAddWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
  128. {
  129. LONG styleValue = ::GetWindowLong(*this, GWL_STYLE);
  130. styleValue &= ~WS_CAPTION;
  131. ::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
  132. // 把自己的窗口句柄与窗口绘制管理器挂接在一起
  133. m_pm.Init(m_hWnd);
  134. m_pm.AddPreMessageFilter(this);
  135. CDialogBuilder builder;
  136. CControlUI* pRoot = builder.Create(_T("huiyuan_add_wnd.xml"), (UINT)0, NULL, &m_pm);
  137. ASSERT(pRoot && "Failed to parse XML");
  138. // 把这些控件绘制到本窗口上
  139. m_pm.AttachDialog(pRoot);
  140. // 把自己加入到CPaintManagerUI的m_aNotifiers数组中,用于处理Notify函数
  141. m_pm.AddNotifier(this);
  142. Init();
  143. return 0;
  144. }
  145. void CHuiyuanAddWnd::Notify(TNotifyUI& msg)
  146. {
  147. DuiLib::CDuiString senderName = msg.pSender->GetName();
  148. if (msg.sType == _T("click"))
  149. {
  150. DuiLib::CDuiString senderName = msg.pSender->GetName();
  151. if (senderName == _T("closebtn"))
  152. {
  153. if (m_is_qingqiu == false)
  154. {
  155. Close(IDCANCEL);
  156. }
  157. return;
  158. }
  159. else if (senderName == _T("save"))
  160. {
  161. StartYanzheng();
  162. }
  163. else if (senderName == L"jianpan_1")
  164. {
  165. CEditUI* curEdit;
  166. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  167. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  168. if (m_inputType == 1)
  169. {
  170. curEdit = pPhone;
  171. }
  172. else if (m_inputType == 2)
  173. {
  174. curEdit = pPassword;
  175. }
  176. else
  177. {
  178. return;
  179. }
  180. std::wstring wsReason = curEdit->GetText();
  181. wsReason += L"1";
  182. curEdit->SetText(wsReason.c_str());
  183. curEdit->SetFocus();
  184. }
  185. else if (senderName == L"jianpan_2")
  186. {
  187. CEditUI* curEdit;
  188. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  189. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  190. if (m_inputType == 1)
  191. {
  192. curEdit = pPhone;
  193. }
  194. else if (m_inputType == 2)
  195. {
  196. curEdit = pPassword;
  197. }
  198. else
  199. {
  200. return;
  201. }
  202. std::wstring wsReason = curEdit->GetText();
  203. wsReason += L"2";
  204. curEdit->SetText(wsReason.c_str());
  205. curEdit->SetFocus();
  206. }
  207. else if (senderName == L"jianpan_3")
  208. {
  209. CEditUI* curEdit;
  210. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  211. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  212. if (m_inputType == 1)
  213. {
  214. curEdit = pPhone;
  215. }
  216. else if (m_inputType == 2)
  217. {
  218. curEdit = pPassword;
  219. }
  220. else
  221. {
  222. return;
  223. }
  224. std::wstring wsReason = curEdit->GetText();
  225. wsReason += L"3";
  226. curEdit->SetText(wsReason.c_str());
  227. curEdit->SetFocus();
  228. }
  229. else if (senderName == L"jianpan_4")
  230. {
  231. CEditUI* curEdit;
  232. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  233. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  234. if (m_inputType == 1)
  235. {
  236. curEdit = pPhone;
  237. }
  238. else if (m_inputType == 2)
  239. {
  240. curEdit = pPassword;
  241. }
  242. else
  243. {
  244. return;
  245. }
  246. std::wstring wsReason = curEdit->GetText();
  247. wsReason += L"4";
  248. curEdit->SetText(wsReason.c_str());
  249. curEdit->SetFocus();
  250. }
  251. else if (senderName == L"jianpan_5")
  252. {
  253. CEditUI* curEdit;
  254. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  255. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  256. if (m_inputType == 1)
  257. {
  258. curEdit = pPhone;
  259. }
  260. else if (m_inputType == 2)
  261. {
  262. curEdit = pPassword;
  263. }
  264. else
  265. {
  266. return;
  267. }
  268. std::wstring wsReason = curEdit->GetText();
  269. wsReason += L"5";
  270. curEdit->SetText(wsReason.c_str());
  271. curEdit->SetFocus();
  272. }
  273. else if (senderName == L"jianpan_6")
  274. {
  275. CEditUI* curEdit;
  276. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  277. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  278. if (m_inputType == 1)
  279. {
  280. curEdit = pPhone;
  281. }
  282. else if (m_inputType == 2)
  283. {
  284. curEdit = pPassword;
  285. }
  286. else
  287. {
  288. return;
  289. }
  290. std::wstring wsReason = curEdit->GetText();
  291. wsReason += L"6";
  292. curEdit->SetText(wsReason.c_str());
  293. curEdit->SetFocus();
  294. }
  295. else if (senderName == L"jianpan_7")
  296. {
  297. CEditUI* curEdit;
  298. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  299. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  300. if (m_inputType == 1)
  301. {
  302. curEdit = pPhone;
  303. }
  304. else if (m_inputType == 2)
  305. {
  306. curEdit = pPassword;
  307. }
  308. else
  309. {
  310. return;
  311. }
  312. std::wstring wsReason = curEdit->GetText();
  313. wsReason += L"7";
  314. curEdit->SetText(wsReason.c_str());
  315. curEdit->SetFocus();
  316. }
  317. else if (senderName == L"jianpan_8")
  318. {
  319. CEditUI* curEdit;
  320. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  321. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  322. if (m_inputType == 1)
  323. {
  324. curEdit = pPhone;
  325. }
  326. else if (m_inputType == 2)
  327. {
  328. curEdit = pPassword;
  329. }
  330. else
  331. {
  332. return;
  333. }
  334. std::wstring wsReason = curEdit->GetText();
  335. wsReason += L"8";
  336. curEdit->SetText(wsReason.c_str());
  337. curEdit->SetFocus();
  338. }
  339. else if (senderName == L"jianpan_9")
  340. {
  341. CEditUI* curEdit;
  342. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  343. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  344. if (m_inputType == 1)
  345. {
  346. curEdit = pPhone;
  347. }
  348. else if (m_inputType == 2)
  349. {
  350. curEdit = pPassword;
  351. }
  352. else
  353. {
  354. return;
  355. }
  356. std::wstring wsReason = curEdit->GetText();
  357. wsReason += L"9";
  358. curEdit->SetText(wsReason.c_str());
  359. curEdit->SetFocus();
  360. }
  361. else if (senderName == L"jianpan_0")
  362. {
  363. CEditUI* curEdit;
  364. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  365. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  366. if (m_inputType == 1)
  367. {
  368. curEdit = pPhone;
  369. }
  370. else if (m_inputType == 2)
  371. {
  372. curEdit = pPassword;
  373. }
  374. else
  375. {
  376. return;
  377. }
  378. std::wstring wsReason = curEdit->GetText();
  379. wsReason += L"0";
  380. curEdit->SetText(wsReason.c_str());
  381. curEdit->SetFocus();
  382. }
  383. else if (senderName == L"jianpan_x")
  384. {
  385. CEditUI* curEdit;
  386. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  387. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  388. if (m_inputType == 1)
  389. {
  390. curEdit = pPhone;
  391. }
  392. else if (m_inputType == 2)
  393. {
  394. curEdit = pPassword;
  395. }
  396. else
  397. {
  398. return;
  399. }
  400. std::wstring wsReason = curEdit->GetText();
  401. wsReason = wsReason.substr(0, wsReason.length() - 1);
  402. curEdit->SetText(wsReason.c_str());
  403. curEdit->SetFocus();
  404. }
  405. else if (senderName == L"jianpan_qingkong")
  406. {
  407. CEditUI* curEdit;
  408. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  409. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  410. if (m_inputType == 1)
  411. {
  412. curEdit = pPhone;
  413. }
  414. else if (m_inputType == 2)
  415. {
  416. curEdit = pPassword;
  417. }
  418. else
  419. {
  420. return;
  421. }
  422. std::wstring wsReason = curEdit->GetText();
  423. wsReason.clear();
  424. curEdit->SetText(wsReason.c_str());
  425. curEdit->SetFocus();
  426. }
  427. }
  428. else if (msg.sType == _T("textchanged"))
  429. {
  430. if (senderName == L"phone_edit")
  431. {
  432. //只能输入数字,其他的全部删除
  433. CEditUI* m_pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  434. if (!m_pEdit->GetText().IsEmpty())
  435. {
  436. std::wstring ws_Value = m_pEdit->GetText();
  437. std::string strValue = CLewaimaiString::UnicodeToUTF8(ws_Value);
  438. for (size_t nIndex = 0; nIndex < strValue.length(); nIndex++)
  439. {
  440. unsigned char tmp = strValue.at(nIndex);
  441. if (tmp > 57 || tmp < 48)
  442. {
  443. //ASCII码不是数字的都过滤掉
  444. strValue = strValue.substr(0, nIndex);
  445. m_pEdit->SetText(CLewaimaiString::UTF8ToUnicode(strValue).c_str());
  446. m_pEdit->SetSel(strValue.length(), strValue.length());//重设给光标设置位置
  447. break;
  448. }
  449. }
  450. }
  451. }
  452. if (senderName == L"password_edit")
  453. {
  454. //只能输入数字,其他的全部删除
  455. CEditUI* m_pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  456. if (!m_pEdit->GetText().IsEmpty())
  457. {
  458. std::wstring ws_Value = m_pEdit->GetText();
  459. std::string strValue = CLewaimaiString::UnicodeToUTF8(ws_Value);
  460. for (size_t nIndex = 0; nIndex < strValue.length(); nIndex++)
  461. {
  462. unsigned char tmp = strValue.at(nIndex);
  463. if (tmp > 57 || tmp < 48)
  464. {
  465. //ASCII码不是数字的都过滤掉
  466. strValue = strValue.substr(0, nIndex);
  467. m_pEdit->SetText(CLewaimaiString::UTF8ToUnicode(strValue).c_str());
  468. m_pEdit->SetSel(strValue.length(), strValue.length());//重设给光标设置位置
  469. break;
  470. }
  471. }
  472. }
  473. }
  474. }
  475. else if (msg.sType == L"windowinit")
  476. {
  477. m_pm.SetNextTabControl(false);
  478. CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  479. pFukuanEdit->SetFocus();
  480. }
  481. else if (msg.sType == _T("setfocus"))
  482. {
  483. if (senderName == L"phone_edit")
  484. {
  485. m_inputType = 1;
  486. }
  487. else if (senderName == L"password_edit")
  488. {
  489. m_inputType = 2;
  490. }
  491. }
  492. }
  493. void CHuiyuanAddWnd::Init()
  494. {
  495. }
  496. void CHuiyuanAddWnd::StartYanzheng()
  497. {
  498. CEditUI* pPhone = static_cast<CEditUI*>(m_pm.FindControl(_T("phone_edit")));
  499. std::wstring wsPhone = pPhone->GetText();
  500. m_phone = CLewaimaiString::UnicodeToUTF8(wsPhone);
  501. if (wsPhone.length() == 0)
  502. {
  503. m_errorInfo = _T("手机号不能为空");
  504. PostMessage(WM_MEMBER_CHECK_FAIL);
  505. return;
  506. }
  507. if (wsPhone.length() != 11)
  508. {
  509. m_errorInfo = _T("手机号格式不对");
  510. PostMessage(WM_MEMBER_CHECK_FAIL);
  511. return;
  512. }
  513. pPhone->SetEnabled(false);
  514. CCheckBoxUI* pOpen = static_cast<CCheckBoxUI*>(m_pm.FindControl((L"password_pay_open")));
  515. if (pOpen->IsSelected())
  516. {
  517. m_is_open_pay_password = "1";
  518. }
  519. else
  520. {
  521. m_is_open_pay_password = "0";
  522. }
  523. pOpen->SetEnabled(false);
  524. CEditUI* pPassword = static_cast<CEditUI*>(m_pm.FindControl(_T("password_edit")));
  525. std::wstring wsPassword = pPassword->GetText();
  526. m_password = CLewaimaiString::UnicodeToUTF8(wsPassword);
  527. if (wsPassword.length() == 0)
  528. {
  529. m_errorInfo = _T("登录密码不能为空");
  530. PostMessage(WM_MEMBER_CHECK_FAIL);
  531. return;
  532. }
  533. if (wsPassword.length() != 6)
  534. {
  535. m_errorInfo = _T("登录密码只能为6位数字");
  536. PostMessage(WM_MEMBER_CHECK_FAIL);
  537. return;
  538. }
  539. pPassword->SetEnabled(false);
  540. CButtonUI* pSave = static_cast<CButtonUI*>(m_pm.FindControl(_T("save")));
  541. pSave->SetEnabled(false);
  542. m_qingqiu_mutex.lock();
  543. m_is_qingqiu = true;
  544. m_qingqiu_mutex.unlock();
  545. //开始处理
  546. std::thread(&CHuiyuanAddWnd::ConfirmMember, this).detach();
  547. }
  548. void CHuiyuanAddWnd::ConfirmMember()
  549. {
  550. std::map<std::string, std::string> params;
  551. params["phone"] = m_phone;
  552. params["name"] = "";
  553. params["pay_password"] = md5(m_password);
  554. params["open_no_card_payment"] = m_is_open_pay_password;
  555. params["is_no_card"] = "1";
  556. std::string response;
  557. bool ret = CZhipuziHttpClient::GetInstance()->Request("/member/add", params, response);
  558. if (!ret)
  559. {
  560. m_errorInfo = _T("网络请求出错");
  561. PostMessage(WM_MEMBER_CHECK_FAIL);
  562. return;
  563. }
  564. rapidjson::Document document;
  565. document.Parse(response.c_str());
  566. if (document.HasParseError())
  567. {
  568. m_errorInfo = _T("服务器返回数据格式错误");
  569. PostMessage(WM_MEMBER_CHECK_FAIL);
  570. return;
  571. }
  572. else
  573. {
  574. if (!document.HasMember("errcode") || !document.HasMember("errmsg"))
  575. {
  576. m_errorInfo = _T("服务器返回数据格式错误");
  577. PostMessage(WM_MEMBER_CHECK_FAIL);
  578. return;
  579. }
  580. rapidjson::Value& v_errcode = document["errcode"];
  581. int errcode = v_errcode.GetInt();
  582. if (errcode != 0)
  583. {
  584. std::string errmsg = CLewaimaiString::UnicodeToUTF8(L"添加会员失败:") + std::string(document["errmsg"].GetString());
  585. m_errorInfo = CLewaimaiString::UTF8ToUnicode(errmsg);
  586. PostMessage(WM_MEMBER_CHECK_FAIL);
  587. return;
  588. }
  589. PostMessage(WM_MEMBER_CHECK_SUCCESS);
  590. }
  591. }