public static bool ShortMsg_Send(Request_Head head, User_Register u, string v_code) { try { var prefix = head.Platform == 0 ? "[企业查询宝iOS版]" : "[企业查询宝android版]"; string msg = null; if (u.op_type == Verify_Code_Type.user_register) { msg = $"尊敬的{prefix}注册用户:您的手机注册验证码为{v_code},如不是本人操作请忽略。"; } else { msg = $"尊敬的{prefix}用户:您的手机验证码为{v_code},如不是本人操作请忽略。"; } var result = ShortMsg_Proxy.ShortMsg_Send("企业查询宝", "前瞻", u.u_tel, msg); return(result.Successed); } catch (Exception e) { #region debug Util.Log_Info(nameof(ShortMsg_Send), Location.Internal, e.Message, "failed to send message to user's phone"); #endregion return(false); } }
public static UserInfo To_UserInfo(Request_Head head, User_Register u) { var user = new UserInfo(); user.u_id = 0; user.u_uid = 0; user.u_type = (byte)Login_Type.Local; user.u_mobile = u.u_tel; user.u_status = (int)Users_State.Register; user.u_status_email = 0; // 表示未验证 user.u_status_mobile = 1; user.u_status_verify = 0; user.u_face = string.Empty; user.u_face2 = string.Empty; user.u_face3 = head.Platform == Platform.Android ? "android" : "ios"; // 存放标记 user.u_signature = string.Empty; user.u_signatureImg = string.Empty; user.u_regTime = DateTime.Now; user.u_prevLoginTime = string.Empty; user.u_curLoginTime = string.Empty; user.u_login_num = 0; user.u_login_duration = 0; user.u_total_money = 0; user.u_total_exp = 0; user.u_grade = (int)User_Level.normal; user.u_birthday = string.Empty; user.u_astro = string.Empty; user.u_profession = string.Empty; user.u_height = 0; user.u_weight = 0; user.u_live_country = string.Empty; user.u_live_city = string.Empty; user.u_home_country = string.Empty; user.u_home_city = string.Empty; user.u_interest = string.Empty; user.u_weibo = string.Empty; user.u_total_tiezi = 0; user.u_total_huifu = 0; user.u_total_shang = 0; user.u_total_shangQZ = 0; user.u_total_shangQF = 0; user.u_total_shangJY = 0; user.u_total_pinglun = 0; user.u_tableId = 0; user.u_today_shangF = 0; user.u_today_shangJY = 0; user.u_email = string.Empty; user.u_name = u.u_name; user.u_pwd = Cipher_Md5.Md5_16_1(u.u_pwd); user.u_regsex = 2;//默认性别保密 return(user); }
/// <summary> /// /// </summary> /// <param name="head"></param> /// <returns></returns> public static AppOrgCompanyLogInfo To_AppOrgCompanyLog(this Request_Head h) { var l = new AppOrgCompanyLogInfo(); l.cl_browser = UserAgentCache.CreateOrGetCacheItem(WebOperationContext.Current.IncomingRequest.UserAgent).GetBrowser(); l.cl_cookieId = h.Cookie; l.cl_date = DateTime.Now; l.cl_screenSize = h.Screen_Size; l.cl_appVer = h.App_Ver; if (h.Platform == Platform.Android) { l.cl_osName = "Android"; } else if (h.Platform == Platform.Iphone) { l.cl_osName = "IOS"; } return(l); }