diff --git a/类库/Api.Framework/Cps/PinduoduoApi.cs b/类库/Api.Framework/Cps/PinduoduoApi.cs index ce5ac59..6de2458 100644 --- a/类库/Api.Framework/Cps/PinduoduoApi.cs +++ b/类库/Api.Framework/Cps/PinduoduoApi.cs @@ -167,6 +167,7 @@ namespace Api.Framework.Cps //Member.online = false; //ApiClient.GetSession().SaveOrUpdate(Member); Member.is_valid = false; + ApiClient.GetSession().SaveOrUpdate(Member); EventClient.OnEvent(this, $@"拼多多异常:{this.Member.username}({this.Member.usernick}),{ex.Message} - {ex.StackTrace} ,注:请重新登录拼多多,{api}"); throw new Exception($"{this.Member.username}({this.Member.usernick}),{ex.Message},注:请重新登录拼多多"); diff --git a/类库/Api.Framework/Cps/douyin_form_login.cs b/类库/Api.Framework/Cps/douyin_form_login.cs index 345b37e..88de60c 100644 --- a/类库/Api.Framework/Cps/douyin_form_login.cs +++ b/类库/Api.Framework/Cps/douyin_form_login.cs @@ -61,6 +61,9 @@ namespace Api.Framework.Cps engine.Options.CachePath = HttpExtend.MapPath($"Cache\\Cookies\\{accountName}"); webControl1.WebView.Engine = engine; + this.webView1.CertificateError += WebView1_CertificateError; + + EO.Base.Runtime.EnableEOWP = true; EO.Base.Runtime.Exception += Runtime_Exception; webControl1.WebView.LoadUrl(loginUrl); @@ -72,6 +75,11 @@ namespace Api.Framework.Cps webControl1.WebView.RegisterResourceHandler(sHandler);//注册自定义资源处理程序 } + private void WebView1_CertificateError(object sender, CertificateErrorEventArgs e) + { + e.Continue(); + } + /// /// 是否跳转到授权页面 /// diff --git a/类库/Api.Framework/CpsClient.cs b/类库/Api.Framework/CpsClient.cs index dd2dfd1..587e651 100644 --- a/类库/Api.Framework/CpsClient.cs +++ b/类库/Api.Framework/CpsClient.cs @@ -368,10 +368,14 @@ namespace Api.Framework internal static string _key { get; set; } internal static int _appid { get; set; } - internal static string _host { get; set; } + internal static string _host + { + get { return ApiClient.Setting.SystemConfig.cps_server_api; } + //set; + } internal static void SetEnckey(int appid, string host, string key) { - _host = host; + //_host = host; _appid = appid; _key = key; }