This commit is contained in:
老道 2022-10-26 23:01:01 +08:00
parent 348b29eca3
commit af26c32c73
3 changed files with 15 additions and 2 deletions

View File

@ -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},注:请重新登录拼多多");

View File

@ -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();
}
/// <summary>
/// 是否跳转到授权页面
/// </summary>

View File

@ -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;
}