/// <summary> /// 业务逻辑处理 /// </summary> /// <returns>false:中断后面的方式执行并返回Error</returns> public override bool TakeAction() { //Console.WriteLine(SnsManager.RegisterPassport(_password)); //_relu = SnsManager.QuickRegisterPassport(_account, _password); //_relu = 1; //Console.WriteLine(SnsManager.CheckPassport(_account)); //SnsManager.RegisterPassportTest(_account, _password); if (SnsManager.Register(_account, _password, "")) { _relu = 0; Console.WriteLine("注册成功 账号:{0} 密码:{1}", _account, _password); } else { Console.WriteLine("注册失败"); _relu = 1; } return(true); }
/// <summary> /// 业务逻辑处理 /// </summary> /// <returns>false:中断后面的方式执行并返回Error</returns> public override bool TakeAction() { try { if (_openid != "") { var q = SnsManager.Register(_openid, "123456", "", true); var s = SnsManager.RegisterWeixin(_openid, "123456", "", _openid); SnsUser _tempu = SnsManager.LoginByWeixin(_openid); passport = _tempu.PassportId; password = _tempu.Password; _tempu.RetailUser = _openid; _tempu.RetailID = retailID; _tempu.WeixinCode = _openid; SnsManager.ChangeUserInfo(passport, _tempu); } else { string[] userList = SnsManager.GetRegPassport(deviceID); passport = userList[0]; password = userList[1]; } sc_device _scd = new sc_device() { fn = "sc_device", result = 1 }; _scd.passportid = passport; _scd.password = password; _senddata = JsonUtils.Serialize(_scd); return(true); } catch (Exception ex) { this.SaveLog(ex); this.ErrorCode = Language.Instance.ErrorCode; this.ErrorInfo = Language.Instance.St1002_GetRegisterPassportIDError; return(false); } }