Browse Source

✨ feat(京东账号): 增加envstr参数

dodo hold 8 tháng trước cách đây
mục cha
commit
0c97b7c7bb

+ 2 - 1
molilian.api/Controllers/admin/JdUnionController.cs

@@ -364,6 +364,7 @@ namespace molilian.api.Controllers
 
             string cookie = form.Read<string>("cookie", string.Empty);
             string h5st = form.Read<string>("h5st", string.Empty);
+            string envStr = form.Read<string>("envStr", string.Empty);
             string user_agent = form.Read<string>("user_agent", string.Empty);
             cookie = cookie.Replace("\r", "").Replace("\n", "").Trim();
             if (!cookie.EndsWith(";")) cookie += ";";
@@ -378,7 +379,7 @@ namespace molilian.api.Controllers
 
 
             user_agent = user_agent.Trim();
-            var accountId = JdPoolCore.UpdateCookies(cookie, union_cookies, user_agent, h5st);
+            var accountId = JdPoolCore.UpdateCookies(cookie, union_cookies, user_agent, h5st, envStr);
             bool success = accountId > 0;
             if (success)
             {

+ 2 - 0
molilian.api/Controllers/public/TaskController.cs

@@ -470,6 +470,8 @@ namespace molilian.api.Controllers
 
                         sql = $"CREATE TABLE IF NOT EXISTS deeplink_parse_logs_{table_suffix} LIKE deeplink_parse_logs;";
                         DBContext.Execute(sql, null);
+                        sql = $"CREATE TABLE IF NOT EXISTS deeplink_parse_logs_fail_{table_suffix} LIKE deeplink_parse_logs_fail_template;";
+                        DBContext.Execute(sql, null);
                         sql = $"CREATE TABLE IF NOT EXISTS pdd_parse_logs_{table_suffix} LIKE pdd_parse_logs;";
                         DBContext.Execute(sql, null);
 

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
molilian.api/Properties/PublishProfiles/latest.pubxml.user


+ 2 - 0
molilian.core/Core/OverrideRuleCore.cs

@@ -130,6 +130,8 @@ namespace molilian.core
                 {
                     bool is_ignore = AlimamaPlus.ShouldIgnoreRequest(request.Ip, request.Oaid, request.RiskStrategy, request.LaunchScene, out _);
                     if (is_ignore) continue;
+                    is_ignore = AlimamaPlus.FlowControlIgnoreRequest(request.Ip, request.Oaid, request.RiskStrategy, request.LaunchScene, out _);
+                    if (is_ignore) continue;
                 }
 
                 // 每小时调用次数统计(无论是否设置限制都要记录)

+ 3 - 1
molilian.core/Core/jd/JdPoolCore.cs

@@ -293,7 +293,7 @@ namespace molilian.core
 
 
 
-        public static int UpdateCookies(string cookies, string union_cookies, string user_agent, string h5st)
+        public static int UpdateCookies(string cookies, string union_cookies, string user_agent, string h5st, string envStr)
         {
             if (string.IsNullOrEmpty(cookies)) return 0;
             string pin = cookies.GetContentPart("pin=", ";");
@@ -319,6 +319,7 @@ namespace molilian.core
                     .Where("pin=@pin", new { pin });
                 if (!string.IsNullOrEmpty(user_agent)) update.Add("user_agent", user_agent);
                 if (!string.IsNullOrEmpty(h5st)) update.Add("h5st", h5st);
+                if (!string.IsNullOrEmpty(envStr)) update.Add("envStr", envStr);
 
                 update.Update();
                 if (status) _ = ListAsync(true);
@@ -338,6 +339,7 @@ namespace molilian.core
                     .Add("status", 0);
                 if (!string.IsNullOrEmpty(user_agent)) update.Add("user_agent", user_agent);
                 if (!string.IsNullOrEmpty(h5st)) update.Add("h5st", h5st);
+                if (!string.IsNullOrEmpty(envStr)) update.Add("envStr", envStr);
                 accountId = update.Create();
             }
 

+ 2 - 1
molilian.core/Core/log/deeplink.cs

@@ -10,7 +10,7 @@ namespace molilian.core
     {
 
         static string queue_deeplink_parse_key = "queue:parse_logs:deeplink";
-        
+
         public static async Task<int> InsertDeeplinkLogAsync(int limit, YunhuiKit.RedisClient redis)
         {
             int total = 0;
@@ -47,6 +47,7 @@ namespace molilian.core
                         else
                         {
                             save_dp_parse_logs(data, "deeplink_parse_logs_fail", connection, transaction);
+                            save_dp_parse_logs(data, $"deeplink_parse_logs_fail_{data.create_time:yyyyMMdd}", connection, transaction);
                         }
                     }
                     total++;

+ 3 - 0
molilian.core/Core/log/taobao.cs

@@ -197,6 +197,9 @@ namespace molilian.core
 
                 .Add("create_time", data.create_time)
                 .Add("parse_type", data.parse_type)
+                .Add("remote_response", data.remote_response)
+                .Add("commercial", data.commercial)
+                .Add("with_landing_page", data.with_landing_page)
                 .Create(DBContext.InsertType.NORMAL, transaction);
         }
 

+ 5 - 0
molilian.core/Core/taoke/TkPoolCore.cs

@@ -83,6 +83,11 @@ namespace molilian.core
                 list = list.Where(item => "dp".Equals(item.parse_type)).ToList();
                 if (!list.Any()) return null;
             }
+            else if ("ym".Equals(parse_type))
+            {
+                list = list.Where(item => "ym".Equals(item.parse_type)).ToList();
+                if (!list.Any()) return null;
+            }
             else
             {
                 list = list.Where(item => string.IsNullOrEmpty(item.parse_type)).ToList();

+ 160 - 0
molilian.core/Core/taoke/UnionParseCore/UnionParseCore.cs

@@ -3,6 +3,7 @@ using dodohold.core;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.AspNetCore.SignalR.Protocol;
 using System.Diagnostics;
+using System.Net;
 using System.Security.Cryptography;
 using System.Text.RegularExpressions;
 using System.Threading.Channels;
@@ -33,6 +34,11 @@ namespace molilian.core
                         "pdd" => await DeeplinkPddParseAsync(request),
                         "tb" => await DeeplinkTaobaoParseAsync(request),
                     };
+                case "ym":
+                    return request.Channel switch
+                    {
+                        "tb" => await DeepleaperParseAsync(request),
+                    };
                 case "goods":
                     return request.Channel switch
                     {
@@ -165,6 +171,151 @@ namespace molilian.core
         }
 
 
+        public static async Task<APIResult> DeepleaperParseAsync(UnionParseRequest request)
+        {
+            //content = content.UrlDecode();
+            var result = AlimamaPlus.GetFormattedObject(request);
+            result.shortLinkurl = string.Empty;
+            result.deeplink_url = string.Empty;
+
+            result.riskStrategy = request.RiskStrategy;
+            result.launchScene = request.LaunchScene;
+            result.rawContent = request.Content;
+
+            Dictionary<string, long> swData = new();
+            swData.Add("StartNew", 0);
+            Stopwatch stopwatch = Stopwatch.StartNew();
+
+            try
+            {
+                TkPoolDTO? account = await TkPoolCore.GetOneAsync(TkPoolCore.TkAction.parse, true, string.Empty, -1, "ym", string.Empty);
+                if (account == null)
+                {
+                    result.success = false;
+                    result.message = "放弃转链";
+                    result.reason = "没有匹配账号";
+                    result.subCode = TkSubCodeEnum.Other;
+                    result.itemName = "点击打开淘宝APP";
+
+                    _ = TkLogCore.ParseLogAsync(result);
+                    return TaobaoParseOutput(result, swData, new
+                    {
+                        result.success,
+                        result.commercial,
+                        result.with_landing_page,
+                        result.message,
+                        result.content,
+                        sub_message = result.reason,
+                        home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
+                        result.couponAmount,
+                        result.taoToken,
+                        result.shortLinkurl,
+                        result.deeplink_url,
+                    });
+                }
+
+
+                string reason = string.Empty;
+
+                result.accountId = account.id;
+                result.accountName = account.name;
+
+
+                int timeout = 5000;
+#if DEBUG
+                timeout = 5000;
+#endif
+                using var cts = new CancellationTokenSource();
+                cts.CancelAfter(timeout);
+
+                DeepleaperPlus deepleaperPlus = new(account.nodeName);
+
+                var requestTask = Task.Run(async () => result = await deepleaperPlus.UnionParseAsync(result), cts.Token);
+                var delayTask = Task.Delay(timeout, cts.Token);
+                var completedTask = await Task.WhenAny(requestTask, delayTask);
+                if (completedTask == requestTask)
+                {
+                    result = await requestTask;
+                }
+                else
+                {
+                    //============================== 放弃转链-请求超时 ==============================
+                    cts.Cancel();
+                    result.success = false;
+                    result.message = "放弃转链";
+                    result.reason = "请求超时";
+                    result.subCode = TkSubCodeEnum.Other;
+                    result.itemName = "点击打开淘宝APP";
+                }
+            }
+            catch (Exception ex)
+            {
+                //============================== 放弃转链-请求超时 ==============================
+                if (ex.Message.Contains("was canceled"))
+                {
+                    result.success = false;
+                    result.message = "放弃转链";
+                    result.reason = "请求超时";
+                    result.subCode = TkSubCodeEnum.Other;
+                    result.itemName = "点击打开淘宝APP";
+                }
+                else
+                {
+                    //============================== 转链接口异常 ==============================
+                    _ = new LoggerLibrary("unionParse", "tb_error")
+                        .Info(request.Ip, request.Oaid)
+                        .Info(request.Content)
+                        .Info(ex.Message, ex.StackTrace)
+                        .SaveAsync();
+
+                    NotifyCore.Notify(new NifyMessage
+                    {
+                        message = $"【转链异常TB】\n{request.Content}\n\n{ex.Message}\n{ex.StackTrace}",
+                        priority = NifyMessagePriority.high,
+                        tags = ["red_circle"]
+                    });
+                    result.success = false;
+                    result.subCode = TkSubCodeEnum.Other;
+                    result.message = "转链接口异常";
+                    result.itemName = "点击打开淘宝APP";
+                }
+            }
+
+            var now = DateTime.Now;
+            var ts = now - result.create_time;
+            result.elapsedTime = (int)ts.TotalMilliseconds;
+
+
+            _ = TkLogCore.ParseLogAsync(result);
+
+            return TaobaoParseOutput(result, swData, new
+            {
+                result.success,
+                result.commercial,
+                result.with_landing_page,
+                result.message,
+                sub_message = result.reason,
+                home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
+                link_type = result.link_type.ToString(),
+                channel = result?.channel.ToString(),
+                result.channel_type,
+                result.itemId,
+                result.itemName,
+                result.pic,
+                result.promotionPrice,
+                result.couponAmount,
+                result.couponEffectiveStartTime,
+                result?.couponEffectiveEndTime,
+                result.shortLinkurl,
+                result.deeplink_url,
+                result.riskStrategy,
+                result.launchScene,
+                result.content,
+                result.taoToken,
+            });
+        }
+
+
         public static async Task<APIResult> TaobaoParseAsync(UnionParseRequest request)
         {
             bool other_aff = false;
@@ -216,6 +367,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -243,6 +395,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -271,6 +424,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -314,6 +468,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -354,6 +509,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -383,6 +539,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -410,6 +567,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -439,6 +597,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         result.content,
                         sub_message = result.reason,
@@ -532,6 +691,7 @@ namespace molilian.core
             {
                 result.success,
                 result.commercial,
+                result.with_landing_page,
                 result.message,
                 sub_message = result.reason,
                 home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),

+ 12 - 1
molilian.core/Core/taoke/UnionParseCore/dp2dp.cs

@@ -47,6 +47,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -77,6 +78,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -108,6 +110,7 @@ namespace molilian.core
                         {
                             result.success,
                             result.commercial,
+                            result.with_landing_page,
                             result.message,
                             sub_message = result.reason,
                             home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -166,6 +169,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -194,6 +198,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -243,6 +248,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -287,6 +293,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -320,6 +327,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -351,6 +359,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -384,6 +393,7 @@ namespace molilian.core
                     {
                         result.success,
                         result.commercial,
+                        result.with_landing_page,
                         result.message,
                         sub_message = result.reason,
                         home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -481,6 +491,7 @@ namespace molilian.core
             {
                 result.success,
                 result.commercial,
+                result.with_landing_page,
                 result.message,
                 sub_message = result.reason,
                 home_page = "tbopen://m.taobao.com/tbopen/index.html".Equals(result.deeplink_url),
@@ -803,7 +814,7 @@ namespace molilian.core
         private static ParseDeeplinkResust parseJdDeeplinkInput(string content)
         {
             ParseDeeplinkResust resust = new();
-            if (!content.StartsWith("openapp.jdmobile://")&& !content.StartsWith("openjd://"))
+            if (!content.StartsWith("openapp.jdmobile://") && !content.StartsWith("openjd://"))
             {
                 resust.success = false;
                 resust.reason = "不是有效DP";

+ 2 - 0
molilian.core/DTO/alimama/TkDataDTO.cs

@@ -91,6 +91,7 @@ namespace molilian.core
         public string rawContent2 { get; set; } = string.Empty;
         public string shortLinkurl { get; set; } = string.Empty;
         public string deeplink_url { get; set; } = string.Empty;
+        public int with_landing_page { get; set; } = 0;
         public int elapsedTime { get; set; } = 0;
         public int elapsedTime2 { get; set; } = 0;
         public int elapsedTime3 { get; set; } = 0;
@@ -125,6 +126,7 @@ namespace molilian.core
         public string parse_type { get; set; } = string.Empty;
         public string item_url { get; set; } = string.Empty;
         public string item_deeplink_url { get; set; } = string.Empty;
+        public string remote_response { get; set; } = string.Empty;
 
     }
 

+ 1 - 0
molilian.core/DTO/jd/JdPoolDTO.cs

@@ -33,6 +33,7 @@ namespace molilian.core
         public string riskCookie { get; set; } = string.Empty;
         public string union_cookies { get; set; } = string.Empty;
         public string h5st { get; set; } = string.Empty;
+        public string envStr { get; set; } = string.Empty;
 
         public string nodeName { get; set; } = string.Empty;
         public string end_point { get; set; } = string.Empty;

+ 5 - 5
molilian.core/Plus/Alimama/parse.cs

@@ -535,8 +535,8 @@ namespace molilian.core
         public static bool ShouldIgnoreRequest(string ip, string oaid, string riskStrategy, int launchScene, out string reason)
         {
             reason = string.Empty;
-            //2025-05-11 brw不做风控
-            if (!string.IsNullOrEmpty(riskStrategy) && !"os".Equals(riskStrategy) && launchScene != -1) return false;
+            ////2025-05-11 brw不做风控
+            //if (!string.IsNullOrEmpty(riskStrategy) && !"os".Equals(riskStrategy) && launchScene != -1) return false;
 
             try
             {
@@ -587,10 +587,10 @@ namespace molilian.core
         public static bool FlowControlIgnoreRequest(string ip, string oaid, string riskStrategy, int launchScene, out string reason)
         {
             reason = string.Empty;
-            //2025-05-11 brw不做风控
-            if (!string.IsNullOrEmpty(riskStrategy) && !"os".Equals(riskStrategy) && launchScene != -1) return false;
+            ////2025-05-11 brw不做风控
+            //if (!string.IsNullOrEmpty(riskStrategy) && !"os".Equals(riskStrategy) && launchScene != -1) return false;
 
-            if (!TestParseCore.InWhitelist(ip, oaid)) return false;
+            if (TestParseCore.InWhitelist(ip, oaid)) return false;
 
             try
             {

+ 171 - 0
molilian.core/Plus/DeepleaperPlus.cs

@@ -0,0 +1,171 @@
+using dodohold.core;
+using Google.Protobuf.WellKnownTypes;
+using Org.BouncyCastle.Ocsp;
+using Quartz;
+using System.Net;
+using System.Security.Cryptography;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Xml.Linq;
+using TencentCloud.Trtc.V20190722.Models;
+
+
+namespace molilian.core
+{
+    public partial class DeepleaperPlus
+    {
+        private const string SERVER_URL = "https://qianxun.deepleaper.com/v1";
+        private string _accessKey;
+        private string _secretKey;
+
+        WebProxy? _proxy;
+        string _proxyName;
+        public DeepleaperPlus(string nodeName = "", string accessKey = "", string secretKey = "")
+        {
+            if (!string.IsNullOrEmpty(nodeName))
+            {
+                _proxyName = ProxyNodesCore.GetSelectOne(nodeName);
+                _proxy = ProxyNodesCore.GetOne(_proxyName);
+            }
+
+            accessKey = "qx-stvlJ2u6M7xsY6az";
+            secretKey = "MDQ1ZTliZDczODdhNDkzZDk4N2U1YmVjMmNkNDE4NjRscENHWnZ2UA==";
+            _accessKey = accessKey;
+            _secretKey = secretKey;
+        }
+
+        private static string GenerateSign(string secretKey, long ts)
+        {
+            try
+            {
+                string message = ts.ToString();
+
+                using (var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(secretKey)))
+                {
+                    byte[] hashBytes = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
+                    return Convert.ToBase64String(hashBytes);
+                }
+            }
+            catch (Exception ex)
+            {
+                throw new Exception("生成签名失败", ex);
+            }
+        }
+
+        public async Task<TkDataDTO> UnionParseAsync(TkDataDTO result)
+        {
+            long ts = DateTime.Now.Convert2UnixTimestamp(true);
+
+            var args = new
+            {
+                version = "1.0",
+                endpoint = new
+                {
+                    device = new
+                    {
+                        oaid = result.oaid,
+                        location = new
+                        {
+                            locationSystem = "BD09LL",
+                            latitude = "",
+                            longitude = ""
+                        }
+                    },
+                },
+                header = new
+                {
+                    type = "IntentRequest",
+                    timestamp = $"{ts}"
+                },
+                inquire = new
+                {
+                    inquireId = $"shopping-shareCodeTkl-{ts}",
+                    intent = new
+                    {
+                        apiKey = "shopping-shareCodeTkl",
+                        slots = new
+                        {
+                            shareCodeTkl = new
+                            {
+                                name = "shareCodeTkl",
+                                values = new[] {
+                                        new
+                                        {
+                                            real = result.content
+                                        }
+                                    }
+                            }
+                        }
+                    }
+                }
+            };
+            string post = args.Convert2Json();
+            string sign = GenerateSign(_secretKey, ts);
+            var client = new WebClientUtility();
+            client.AddHeaders("accessKey", _accessKey);
+            client.AddHeaders("ts", $"{ts}");
+            client.AddHeaders("sign", sign);
+            client.SetContentType("application/json");
+            client.Post(post);
+#if DEBUG
+#else
+            client.Proxy = _proxy;
+#endif
+            var response = await client.RequestAsync(SERVER_URL);
+
+            var body = response.Body();
+            result.remote_response = body;
+            var root = body.Convert2JsonElement();
+
+
+            var now = DateTime.Now;
+            var ts2 = now - result.create_time;
+            result.elapsedTime2 = (int)ts2.TotalMilliseconds;
+
+
+            int error = root.Read<int>("errorCode", 0);
+            bool success = error == 0;
+            string message = root.Read("errorMessage", string.Empty);
+            result.success = false;
+            //if (message.Contains("该url暂不支持解析"))
+            //{
+            //    message = "该url暂不支持解析";
+            //}
+
+            //	"message": "淘宝口令解析服务异常: Cannot deserialize value of type `java.lang.Integer` from String \"该卖家ID暂不支持\": not a valid `java.lang.Integer` value\n at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: com.deepleaper.qianxun.model.taobao.QXTbGeneralLinkParseResponse[\"data\"]->com.deepleaper.qianxun.model.taobao.QXTbGeneralLinkParseResponse$Result[\"material_url_list\"]->java.util.ArrayList[0]->com.deepleaper.qianxun.model.taobao.QXTbGeneralLinkParseResponse$Material[\"msg\"])",
+
+            result.reason = message;
+            result.message = "转链失败";
+            if (error != 0) return result;
+            try
+            {
+                var shoppingInfoItems = root.ElementRead("reply").ElementRead("commands")[0].ElementRead("body").ElementRead("templateContent").ElementRead("items")[0].ElementRead("shoppingInfoItems");
+
+                result.itemName = shoppingInfoItems[0].PathRead<string>("name");
+                result.pic = shoppingInfoItems[0].PathRead<string>("mainImage.large.url");
+                result.shopTitle = shoppingInfoItems[0].PathRead<string>("storeName");
+                result.couponAmount = shoppingInfoItems[0].PathRead<int>("couponInfo[0].amount.url");
+                result.shortLinkurl = shoppingInfoItems[0].PathRead<string>("detailUrl.webURL");
+                result.deeplink_url = shoppingInfoItems[0].PathRead<string>("detailUrl.deepLink.url");
+                result.with_landing_page = shoppingInfoItems[0].PathRead<int>("detailUrl.type");
+                if (result.with_landing_page == 1) { result.commercial = true; }
+
+
+                result.channel = TkChannelEnum.tb;
+                result.success = success;
+                result.message = message;
+                //result.content = content;
+                return result;
+            }
+            catch (Exception ex)
+            {
+                result.reason = "undefined";
+                result.message = "转链失败";
+                return result;
+            }
+        }
+
+
+    }
+
+}

+ 1 - 1
molilian.core/Plus/JDUnion/H5stHack.cs

@@ -20,12 +20,12 @@ namespace molilian.core
                 version = _config.jd_h5st_sign_version,
                 body = querystring,
                 pin = _account.pin,
+                envStr = _account.envStr,
                 ua = _account.user_agent,
                 //h5st = _account.h5st,
                 appId = "586ae",
             };
 
-
             try
             {
                 string data = args.Convert2Json();

+ 2 - 2
molilian.core/Plus/JDUnion/base.cs

@@ -112,7 +112,7 @@ namespace molilian.core
         {
             reason = string.Empty;
             //2025-06-24 brw不做风控
-            if (!string.IsNullOrEmpty(riskStrategy) && !"os".Equals(riskStrategy) && launchScene != -1) return false;
+            //if (!string.IsNullOrEmpty(riskStrategy) && !"os".Equals(riskStrategy) && launchScene != -1) return false;
 
             try
             {
@@ -162,7 +162,7 @@ namespace molilian.core
         public static bool FlowControlIgnoreRequest(TkConfigDTO config, string riskStrategy, int launchScene, out string reason)
         {
             reason = string.Empty;
-            if (!string.IsNullOrEmpty(riskStrategy) && !"os".Equals(riskStrategy) && launchScene != -1) return false;
+            //if (!string.IsNullOrEmpty(riskStrategy) && !"os".Equals(riskStrategy) && launchScene != -1) return false;
 
             try
             {

+ 1 - 0
molilian.core/Plus/pdd/PddUnionPlus.cs

@@ -175,6 +175,7 @@ namespace molilian.core
                 result.accountId = 0;
                 result.accountName = string.Empty;
                 result.content = content;
+                result.deeplink_url = GetDeeplink(result.shortLinkurl);
                 return result;
             }
 

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác