Browse Source

去除授权

DuGuYang 1 năm trước cách đây
mục cha
commit
1f58b0a224

+ 1 - 1
Areas/Api/Controllers/v1/MainServer/ConsumerOrdersController.cs

@@ -224,7 +224,7 @@ namespace MySystem.Areas.Api.Controllers.v1
 
 
 
 
         #region 消费者-支付接口
         #region 消费者-支付接口
-        [Authorize]
+        // [Authorize]
         public JsonResult Pay(string value)
         public JsonResult Pay(string value)
         {
         {
             if (string.IsNullOrEmpty(value))
             if (string.IsNullOrEmpty(value))

+ 20 - 20
Areas/Api/Controllers/v1/MainServer/ConsumersController.cs

@@ -78,12 +78,12 @@ namespace MySystem.Areas.Api.Controllers.v1
                 }).Entity;
                 }).Entity;
                 maindb.SaveChanges();
                 maindb.SaveChanges();
                 ConsumerId = check.Id;
                 ConsumerId = check.Id;
-                maindb.ConsumerOpenIds.Add(new ConsumerOpenIds()
-                {
-                    OpenId = openid,
-                    ConsumerId = ConsumerId,
-                });
-                maindb.SaveChanges();
+                // maindb.ConsumerOpenIds.Add(new ConsumerOpenIds()
+                // {
+                //     OpenId = openid,
+                //     ConsumerId = ConsumerId,
+                // });
+                // maindb.SaveChanges();
             }
             }
             else
             else
             {
             {
@@ -175,8 +175,8 @@ namespace MySystem.Areas.Api.Controllers.v1
         {
         {
             JsonData data = JsonMapper.ToObject(value);
             JsonData data = JsonMapper.ToObject(value);
             string code = data["code"].ToString(); //微信小程序获取的code
             string code = data["code"].ToString(); //微信小程序获取的code
-            // string nickName = data["nickName"].ToString(); //昵称
-            // string avatarUrl = data["avatarUrl"].ToString(); //头像地址
+            string nickName = data["nickName"].ToString(); //昵称
+            string avatarUrl = data["avatarUrl"].ToString(); //头像地址
             string encryptedData = data["encryptedData"].ToString(); //微信小程序获取手机号的数据包
             string encryptedData = data["encryptedData"].ToString(); //微信小程序获取手机号的数据包
             // string iv = data["iv"].ToString(); //微信小程序获取手机号的IV
             // string iv = data["iv"].ToString(); //微信小程序获取手机号的IV
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             Dictionary<string, object> Obj = new Dictionary<string, object>();
@@ -194,25 +194,25 @@ namespace MySystem.Areas.Api.Controllers.v1
                 check = maindb.Consumers.Add(new Consumers()
                 check = maindb.Consumers.Add(new Consumers()
                 {
                 {
                     CreateDate = DateTime.Now,
                     CreateDate = DateTime.Now,
-                    // NickName = filterEmoji(nickName),
-                    // HeadPhoto = avatarUrl,
-                    // Mobile = mobile,
+                    NickName = filterEmoji(nickName),
+                    HeadPhoto = avatarUrl,
+                    Mobile = mobile,
                     AlipayUserId = openid,
                     AlipayUserId = openid,
                 }).Entity;
                 }).Entity;
                 maindb.SaveChanges();
                 maindb.SaveChanges();
                 ConsumerId = check.Id;
                 ConsumerId = check.Id;
-                maindb.ConsumerOpenIds.Add(new ConsumerOpenIds()
-                {
-                    OpenId = openid,
-                    ConsumerId = ConsumerId,
-                });
-                maindb.SaveChanges();
+                // maindb.ConsumerOpenIds.Add(new ConsumerOpenIds()
+                // {
+                //     OpenId = openid,
+                //     ConsumerId = ConsumerId,
+                // });
+                // maindb.SaveChanges();
             }
             }
             else
             else
             {
             {
-                // check.NickName = filterEmoji(nickName);
-                // check.HeadPhoto = avatarUrl;
-                // check.Mobile = mobile;
+                check.NickName = filterEmoji(nickName);
+                check.HeadPhoto = avatarUrl;
+                check.Mobile = mobile;
                 ConsumerId = check.Id;
                 ConsumerId = check.Id;
                 maindb.SaveChanges();
                 maindb.SaveChanges();
             }
             }