From 1fc520e4dd190a01d7c6a78c3e027ffee7110923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=C2=B7=C3=A6?= <279202647@qq.com> Date: Sat, 4 Sep 2021 17:35:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=8D=E7=88=AC=E8=99=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JdShopListener/JdShopListener/MainWindowViewModel.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/JdShopListener/JdShopListener/MainWindowViewModel.cs b/JdShopListener/JdShopListener/MainWindowViewModel.cs index 3dd0867..3688b73 100644 --- a/JdShopListener/JdShopListener/MainWindowViewModel.cs +++ b/JdShopListener/JdShopListener/MainWindowViewModel.cs @@ -717,7 +717,7 @@ namespace JdShopListener string html = http.GetStringAsync($"https://item.jd.com/{skuId}.html").Result; - if (html.Contains("passport.jd.com/new/login.aspx")) + if (html.Contains("passport.jd.com/new/login.aspx")|| html.Contains("//item.jd.com/html/token.html?returnUrl=")) { AddLog("登录失效,触发验证!!重新尝试获取登录状态"); InitLoginCookie(); @@ -741,6 +741,7 @@ namespace JdShopListener } catch (Exception ex) { + AddLog("获取sku详情信息失败:" + ex.Message); return null; } } @@ -1053,7 +1054,7 @@ namespace JdShopListener JDCookie += $"{c.Name}={c.Value};"; }); - + AddLog("获取到Cookie" + JDCookie); } }