Administrator před 3 roky
rodič
revize
3fbd58e8ba

+ 7 - 2
Code/UC/UC.Api/Controllers/UsersController.cs

@@ -56,14 +56,19 @@ namespace UC.Api.Controllers
                         Accepted("验证码已过期,请重新获取!");
                     }
                     var pwdsalt = Md5Helper.CheckRandomCode();
-                    var password = Md5Helper.Md5(entity.Password, pwdsalt);
+                    var password = "";
+                    //h5注册来源,不需要密码
+                    if (entity.RegisteredSource != 7)
+                    {
+                        password = Md5Helper.Md5(entity.Password, pwdsalt);
+                    }
                     userModel = new Users_Login
                     {
                         PwdSalt = pwdsalt,
                         Password = password,
                         CreateTime = DateTime.Now,
                         UserName = entity.UserName,
-                        NickName = $"新用户" + entity.UserName.Substring(6, 4),//+ NewGetNickName(),
+                        NickName = $"新用户" + entity.UserName.Substring(6, 5),//NewGetNickName()
                         Phone = entity.UserName,
                         Logo = entity.Logo,
                         LoginCode = bll_user.LoginCode(entity.UserName),

+ 5 - 0
Code/UC/UC.Api/Models/Entity/RegisterEntity.cs

@@ -46,5 +46,10 @@ namespace UC.Api.Models.Entity
         /// 新增或者修改 1新增2修改
         /// </summary>
         public int IsAddUp { get; set; } = 1;
+
+        /// <summary>
+        /// 注册来源 0:Android 1:ios 3:m.55128.cn 5:kjh 7:H5
+        /// </summary>
+        public int RegisteredSource { get; set; }
     }
 }