ClubScorePswLogon.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. cc.Class({
  2. extends: cc.BaseClass,
  3. properties: {
  4. },
  5. ctor:function () {
  6. this.m_ScoreCnt = 0;
  7. this.m_PoolCnt = 0;
  8. },
  9. OnShowView:function () {
  10. this.$('EdPsw1@EditBox').string = '';
  11. if(CLUB_SCORE_LOGON_PSW!=0) {
  12. this.HideView();
  13. this.m_Hook.OnBtShowDlg(null,'ClubScoreRecord');
  14. }
  15. },
  16. //登录
  17. OnClick_Logon:function(){
  18. cc.gSoundRes.PlaySound('Button');
  19. var Psw1 = this.$('EdPsw1@EditBox').string;
  20. if(Psw1.length!=6) return this.ShowTips('請輸入6位數密碼')
  21. var pGlobalUserData = g_GlobalUserInfo.GetGlobalUserData();
  22. var webUrl = window.PHP_HOME+'/League.php?GetMark=106&dwUserID='+pGlobalUserData.dwUserID;
  23. webUrl += '&LogonPsw='+pGlobalUserData.szPassword;
  24. webUrl += '&ClubID='+this.m_Hook.m_SelClubInfo.dwClubID;
  25. webUrl += '&Psw='+hex_md5(Psw1);
  26. WebCenter.GetData(webUrl, null, function (data) {
  27. var Info = JSON.parse(data);
  28. if(Info[0]==0) {
  29. CLUB_SCORE_LOGON_PSW = Psw1;
  30. this.m_Hook.ShowPrefabDLG('ClubScoreRecord');
  31. this.HideView();
  32. }
  33. else{
  34. this.ShowAlert(Info[1]);
  35. }
  36. }.bind(this));
  37. },
  38. OnClick_Forget:function(){
  39. // 检查绑定手机
  40. var pGlobalUserData = g_GlobalUserInfo.GetGlobalUserData();
  41. var webUrl = window.PHP_HOME + '/UserFunc.php?GetMark=19&dwUserID=' + pGlobalUserData.dwUserID;
  42. WebCenter.GetData(webUrl, 3, function (data) {
  43. if(data == ''){
  44. this.ShowAlert('請先綁定手機');
  45. return;
  46. }
  47. this.ShowPrefabDLG('ClubChangeInSurePsw', this.node, function (Js) {
  48. Js.OnShowView(1);
  49. }.bind(this));
  50. }.bind(this));
  51. },
  52. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  53. });