修改项目模板改为 SDK模式
This commit is contained in:
1 parent
bdf87cf0dd
commit
6e995a5bdb
19 files changed
+442
-19306
No files matched your search
+321
@@ -0,0 +1,321 @@
|
|||||||
|
# Remove the line below if you want to inherit .editorconfig settings from higher directories
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# C# files
|
||||||
|
[*.cs]
|
||||||
|
|
||||||
|
|
||||||
|
# Default severity for analyzer diagnostics with category 'Interoperability'
|
||||||
|
dotnet_analyzer_diagnostic.category-Interoperability.severity = none
|
||||||
|
|
||||||
|
#### Core EditorConfig Options ####
|
||||||
|
|
||||||
|
# Indentation and spacing
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = tab
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
end_of_line = crlf
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
#### .NET Code Actions ####
|
||||||
|
|
||||||
|
# Type members
|
||||||
|
dotnet_hide_advanced_members = false
|
||||||
|
dotnet_member_insertion_location = with_other_members_of_the_same_kind
|
||||||
|
dotnet_property_generation_behavior = prefer_throwing_properties
|
||||||
|
|
||||||
|
# Symbol search
|
||||||
|
dotnet_search_reference_assemblies = true
|
||||||
|
|
||||||
|
#### .NET Coding Conventions ####
|
||||||
|
|
||||||
|
# Organize usings
|
||||||
|
dotnet_separate_import_directive_groups = false
|
||||||
|
dotnet_sort_system_directives_first = false
|
||||||
|
file_header_template = unset
|
||||||
|
|
||||||
|
# this. and Me. preferences
|
||||||
|
dotnet_style_qualification_for_event = false
|
||||||
|
dotnet_style_qualification_for_field = false
|
||||||
|
dotnet_style_qualification_for_method = false
|
||||||
|
dotnet_style_qualification_for_property = false
|
||||||
|
|
||||||
|
# Language keywords vs BCL types preferences
|
||||||
|
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||||
|
dotnet_style_predefined_type_for_member_access = true
|
||||||
|
|
||||||
|
# Parentheses preferences
|
||||||
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
||||||
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||||
|
|
||||||
|
# Modifier preferences
|
||||||
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||||
|
|
||||||
|
# Expression-level preferences
|
||||||
|
dotnet_prefer_system_hash_code = true
|
||||||
|
dotnet_style_coalesce_expression = true
|
||||||
|
dotnet_style_collection_initializer = true
|
||||||
|
dotnet_style_explicit_tuple_names = true
|
||||||
|
dotnet_style_namespace_match_folder = true
|
||||||
|
dotnet_style_null_propagation = true
|
||||||
|
dotnet_style_object_initializer = true
|
||||||
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||||
|
dotnet_style_prefer_auto_properties = true
|
||||||
|
dotnet_style_prefer_collection_expression = when_types_loosely_match
|
||||||
|
dotnet_style_prefer_compound_assignment = true
|
||||||
|
dotnet_style_prefer_conditional_expression_over_assignment = true
|
||||||
|
dotnet_style_prefer_conditional_expression_over_return = true
|
||||||
|
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true
|
||||||
|
dotnet_style_prefer_inferred_tuple_names = true
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
|
||||||
|
dotnet_style_prefer_simplified_boolean_expressions = true
|
||||||
|
dotnet_style_prefer_simplified_interpolation = true
|
||||||
|
|
||||||
|
# Field preferences
|
||||||
|
dotnet_style_readonly_field = true
|
||||||
|
|
||||||
|
# Parameter preferences
|
||||||
|
dotnet_code_quality_unused_parameters = all
|
||||||
|
|
||||||
|
# Suppression preferences
|
||||||
|
dotnet_remove_unnecessary_suppression_exclusions = none
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
dotnet_style_allow_multiple_blank_lines_experimental = true
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
||||||
|
|
||||||
|
#### C# Coding Conventions ####
|
||||||
|
|
||||||
|
# var preferences
|
||||||
|
csharp_style_var_elsewhere = false:silent
|
||||||
|
csharp_style_var_for_built_in_types = false:silent
|
||||||
|
csharp_style_var_when_type_is_apparent = false:silent
|
||||||
|
|
||||||
|
# Expression-bodied members
|
||||||
|
csharp_style_expression_bodied_accessors = true:silent
|
||||||
|
csharp_style_expression_bodied_constructors = false:silent
|
||||||
|
csharp_style_expression_bodied_indexers = true:silent
|
||||||
|
csharp_style_expression_bodied_lambdas = true:silent
|
||||||
|
csharp_style_expression_bodied_local_functions = false:silent
|
||||||
|
csharp_style_expression_bodied_methods = false:silent
|
||||||
|
csharp_style_expression_bodied_operators = false:silent
|
||||||
|
csharp_style_expression_bodied_properties = true:silent
|
||||||
|
|
||||||
|
# Pattern matching preferences
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true
|
||||||
|
csharp_style_prefer_extended_property_pattern = true
|
||||||
|
csharp_style_prefer_not_pattern = true
|
||||||
|
csharp_style_prefer_pattern_matching = true
|
||||||
|
csharp_style_prefer_switch_expression = true
|
||||||
|
|
||||||
|
# Null-checking preferences
|
||||||
|
csharp_style_conditional_delegate_call = true:suggestion
|
||||||
|
|
||||||
|
|
||||||
|
csharp_using_directive_placement = outside_namespace:silent
|
||||||
|
csharp_prefer_simple_using_statement = true:suggestion
|
||||||
|
# Modifier preferences
|
||||||
|
csharp_prefer_static_anonymous_function = true
|
||||||
|
csharp_prefer_static_local_function = true
|
||||||
|
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
|
||||||
|
csharp_style_prefer_readonly_struct = true
|
||||||
|
csharp_style_prefer_readonly_struct_member = true
|
||||||
|
|
||||||
|
# Code-block preferences
|
||||||
|
csharp_prefer_braces = true:silent
|
||||||
|
csharp_prefer_simple_using_statement = true:suggestion
|
||||||
|
csharp_prefer_system_threading_lock = true:suggestion
|
||||||
|
csharp_style_namespace_declarations = file_scoped:silent
|
||||||
|
csharp_style_prefer_method_group_conversion = true:silent
|
||||||
|
csharp_style_prefer_primary_constructors = true:suggestion
|
||||||
|
csharp_style_prefer_top_level_statements = true:silent
|
||||||
|
csharp_style_prefer_primary_constructors = true:suggestion
|
||||||
|
csharp_prefer_system_threading_lock = true:suggestion
|
||||||
|
csharp_style_expression_bodied_methods = false:silent
|
||||||
|
csharp_style_expression_bodied_constructors = false:silent
|
||||||
|
csharp_style_expression_bodied_operators = false:silent
|
||||||
|
csharp_style_expression_bodied_properties = true:silent
|
||||||
|
csharp_style_expression_bodied_indexers = true:silent
|
||||||
|
csharp_style_expression_bodied_accessors = true:silent
|
||||||
|
csharp_style_expression_bodied_lambdas = true:silent
|
||||||
|
csharp_style_expression_bodied_local_functions = false:silent
|
||||||
|
|
||||||
|
# Expression-level preferences
|
||||||
|
csharp_prefer_simple_default_expression = true:suggestion
|
||||||
|
csharp_style_deconstructed_variable_declaration = true
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
|
||||||
|
csharp_style_inlined_variable_declaration = true
|
||||||
|
csharp_style_prefer_index_operator = true:suggestion
|
||||||
|
csharp_style_prefer_local_over_anonymous_function = true:suggestion
|
||||||
|
csharp_style_prefer_null_check_over_type_check = true:suggestion
|
||||||
|
csharp_style_prefer_range_operator = true:suggestion
|
||||||
|
csharp_style_prefer_tuple_swap = true
|
||||||
|
csharp_style_prefer_unbound_generic_type_in_nameof = true
|
||||||
|
csharp_style_prefer_utf8_string_literals = true
|
||||||
|
csharp_style_throw_expression = true:suggestion
|
||||||
|
csharp_style_unused_value_assignment_preference = discard_variable
|
||||||
|
csharp_style_unused_value_expression_statement_preference = discard_variable
|
||||||
|
|
||||||
|
# 'using' directive preferences
|
||||||
|
csharp_using_directive_placement = outside_namespace:silent
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||||
|
|
||||||
|
#### C# Formatting Rules ####
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
csharp_new_line_before_catch = true
|
||||||
|
csharp_new_line_before_else = true
|
||||||
|
csharp_new_line_before_finally = true
|
||||||
|
csharp_new_line_before_members_in_anonymous_types = true
|
||||||
|
csharp_new_line_before_members_in_object_initializers = true
|
||||||
|
csharp_new_line_before_open_brace = all
|
||||||
|
csharp_new_line_between_query_expression_clauses = true
|
||||||
|
|
||||||
|
# Indentation preferences
|
||||||
|
csharp_indent_block_contents = true
|
||||||
|
csharp_indent_braces = false
|
||||||
|
csharp_indent_case_contents = true
|
||||||
|
csharp_indent_case_contents_when_block = false
|
||||||
|
csharp_indent_labels = no_change
|
||||||
|
csharp_indent_switch_labels = true
|
||||||
|
|
||||||
|
# Space preferences
|
||||||
|
csharp_space_after_cast = false
|
||||||
|
csharp_space_after_colon_in_inheritance_clause = true
|
||||||
|
csharp_space_after_comma = true
|
||||||
|
csharp_space_after_dot = false
|
||||||
|
csharp_space_after_keywords_in_control_flow_statements = true
|
||||||
|
csharp_space_after_semicolon_in_for_statement = true
|
||||||
|
csharp_space_around_binary_operators = before_and_after
|
||||||
|
csharp_space_around_declaration_statements = false
|
||||||
|
csharp_space_before_colon_in_inheritance_clause = true
|
||||||
|
csharp_space_before_comma = false
|
||||||
|
csharp_space_before_dot = false
|
||||||
|
csharp_space_before_open_square_brackets = false
|
||||||
|
csharp_space_before_semicolon_in_for_statement = false
|
||||||
|
csharp_space_between_empty_square_brackets = false
|
||||||
|
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||||
|
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||||
|
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_parentheses = false
|
||||||
|
csharp_space_between_square_brackets = false
|
||||||
|
|
||||||
|
# Wrapping preferences
|
||||||
|
csharp_preserve_single_line_blocks = true
|
||||||
|
csharp_preserve_single_line_statements = true
|
||||||
|
|
||||||
|
[*.{cs,vb}]
|
||||||
|
#### Naming styles ####
|
||||||
|
|
||||||
|
# Naming rules
|
||||||
|
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||||
|
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
# Symbol specifications
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be__开头.severity = suggestion
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be__开头.symbols = private_or_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be__开头.style = _开头
|
||||||
|
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be__开头.severity = none
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be__开头.symbols = private_or_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be__开头.style = _开头
|
||||||
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.interface.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
|
||||||
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.types.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||||
|
|
||||||
|
# Naming styles
|
||||||
|
dotnet_naming_style._开头.required_prefix = _
|
||||||
|
dotnet_naming_style._开头.required_suffix =
|
||||||
|
dotnet_naming_style._开头.word_separator =
|
||||||
|
dotnet_naming_style._开头.capitalization = camel_case
|
||||||
|
|
||||||
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||||
|
dotnet_naming_style.begins_with_i.required_suffix =
|
||||||
|
dotnet_naming_style.begins_with_i.word_separator =
|
||||||
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.pascal_case.required_prefix =
|
||||||
|
dotnet_naming_style.pascal_case.required_suffix =
|
||||||
|
dotnet_naming_style.pascal_case.word_separator =
|
||||||
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_style_coalesce_expression = true:suggestion
|
||||||
|
dotnet_style_null_propagation = true:suggestion
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
|
||||||
|
dotnet_style_prefer_auto_properties = true:silent
|
||||||
|
dotnet_style_object_initializer = true:suggestion
|
||||||
|
dotnet_style_collection_initializer = true:suggestion
|
||||||
|
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
||||||
|
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
|
||||||
|
dotnet_style_prefer_conditional_expression_over_return = true:silent
|
||||||
|
dotnet_style_explicit_tuple_names = true:suggestion
|
||||||
|
dotnet_style_prefer_inferred_tuple_names = true:silent
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true:silent
|
||||||
|
dotnet_style_prefer_compound_assignment = true:suggestion
|
||||||
|
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
||||||
|
|
||||||
|
|
||||||
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||||
|
tab_width = 4
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = crlf
|
||||||
|
|
||||||
|
# IDE0305: Simplify collection initialization
|
||||||
|
# dotnet_style_prefer_collection_expression = when_types_exactly_match
|
||||||
|
# dotnet_style_prefer_collection_expression = when_types_loosely_match
|
||||||
|
|
||||||
|
dotnet_diagnostic.IDE0305.severity = silent
|
||||||
|
|
||||||
|
dotnet_style_qualification_for_field = false:silent
|
||||||
|
dotnet_style_qualification_for_property = false:silent
|
||||||
|
dotnet_style_qualification_for_method = false:silent
|
||||||
|
dotnet_style_qualification_for_event = false:silent
|
||||||
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||||
|
|
||||||
|
# IDE1006: Naming Styles
|
||||||
|
dotnet_diagnostic.IDE1006.severity = none
|
||||||
|
|
||||||
|
# IDE0059: Unnecessary assignment of a value
|
||||||
|
dotnet_diagnostic.IDE0059.severity = silent
|
||||||
|
|
||||||
|
# CS0168: Variable is declared but never used
|
||||||
|
dotnet_diagnostic.CS0168.severity = silent
|
||||||
|
|
||||||
|
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
|
||||||
|
dotnet_style_namespace_match_folder = true:suggestion
|
||||||
+62
-387
@@ -1,388 +1,63 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.props')" />
|
<PropertyGroup>
|
||||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x86.138.0.34\build\chromiumembeddedframework.runtime.win-x86.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x86.138.0.34\build\chromiumembeddedframework.runtime.win-x86.props')" />
|
<TargetFramework>net462</TargetFramework>
|
||||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x64.138.0.34\build\chromiumembeddedframework.runtime.win-x64.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x64.138.0.34\build\chromiumembeddedframework.runtime.win-x64.props')" />
|
<OutputType>Library</OutputType>
|
||||||
<PropertyGroup>
|
<RootNamespace>AllBase</RootNamespace>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<AssemblyName>AllBase</AssemblyName>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<LangVersion>12.0</LangVersion>
|
||||||
<ProductVersion>8.0.30703</ProductVersion>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<!--<OutputPath>..\bin\</OutputPath>-->
|
||||||
<ProjectGuid>{6461D807-B1C8-45F0-B388-E0CA1A418DE0}</ProjectGuid>
|
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||||
<OutputType>Library</OutputType>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<RootNamespace>AllBase</RootNamespace>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
<AssemblyName>AllBase</AssemblyName>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<FileAlignment>512</FileAlignment>
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
<TargetFrameworkProfile>
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
</TargetFrameworkProfile>
|
</PropertyGroup>
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
</PropertyGroup>
|
<ItemGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
<!-- NuGet 包引用 -->
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<PackageReference Include="CefSharp.Common" Version="138.0.340" />
|
||||||
<OutputPath>..\bin\</OutputPath>
|
<PackageReference Include="CefSharp.WinForms" Version="138.0.340" />
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<PackageReference Include="chromiumembeddedframework.runtime.win-x86" Version="138.0.34" />
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<PackageReference Include="chromiumembeddedframework.runtime.win-x64" Version="138.0.34" />
|
||||||
<DebugType>full</DebugType>
|
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
</ItemGroup>
|
||||||
<CodeAnalysisLogFile>..\bin\AllBase.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
<ItemGroup>
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
<!-- 本地 DLL 引用(不在 NuGet 上,保留 HintPath) -->
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<Reference Include="NaiBa.Util">
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<HintPath>..\DllReference\NaiBa.Util.dll</HintPath>
|
||||||
<CodeAnalysisRuleSetDirectories>;D:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<CodeAnalysisRuleDirectories>;D:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
</Reference>
|
||||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
<Reference Include="System.Data.SQLite">
|
||||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
<HintPath>..\DllReference\System.Data.SQLite.DLL</HintPath>
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
</Reference>
|
||||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
|
<Reference Include="zxing">
|
||||||
</PropertyGroup>
|
<HintPath>..\DllReference\zxing.dll</HintPath>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<OutputPath>..\bin\</OutputPath>
|
</Reference>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
</ItemGroup>
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
<ItemGroup>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<!-- 框架引用 -->
|
||||||
<CodeAnalysisLogFile>..\bin\AllBase.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
|
<Reference Include="PresentationCore" />
|
||||||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
|
<Reference Include="System" />
|
||||||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
|
<Reference Include="System.Data" />
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<Reference Include="System.Drawing" />
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
<Reference Include="System.Management" />
|
||||||
<CodeAnalysisRuleSetDirectories>;D:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
|
<Reference Include="System.Net.Http" />
|
||||||
<CodeAnalysisRuleDirectories>;D:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
|
<Reference Include="System.Web" />
|
||||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
<Reference Include="System.Web.Extensions" />
|
||||||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
|
<Reference Include="System.Web.Services" />
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Reference Include="System.Xml" />
|
||||||
<DefineConstants>
|
<Reference Include="WindowsBase" />
|
||||||
</DefineConstants>
|
</ItemGroup>
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
|
||||||
<LangVersion>12.0</LangVersion>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
|
||||||
<LangVersion>12.0</LangVersion>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="CefSharp, Version=138.0.340.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\CefSharp.Common.138.0.340\lib\net462\CefSharp.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="CefSharp.Core, Version=138.0.340.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\CefSharp.Common.138.0.340\lib\net462\CefSharp.Core.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="CefSharp.WinForms, Version=138.0.340.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\CefSharp.WinForms.138.0.340\lib\net462\CefSharp.WinForms.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NaiBa.Util, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\DllReference\NaiBa.Util.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="PresentationCore" />
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\DllReference\System.Data.SQLite.DLL</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Management" />
|
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Web" />
|
|
||||||
<Reference Include="System.Web.Extensions" />
|
|
||||||
<Reference Include="System.Web.Services" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="WindowsBase" />
|
|
||||||
<Reference Include="zxing, Version=0.12.0.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\DllReference\zxing.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="AdslHelper.cs" />
|
|
||||||
<Compile Include="AutoSizeFormClass.cs" />
|
|
||||||
<Compile Include="Base64Encode.cs" />
|
|
||||||
<Compile Include="BaseClass.cs">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="BaseEncrypt.cs" />
|
|
||||||
<Compile Include="BaseRegex.cs" />
|
|
||||||
<Compile Include="BaseWork.cs" />
|
|
||||||
<Compile Include="BindableBase.cs" />
|
|
||||||
<Compile Include="CacheHelper.cs" />
|
|
||||||
<Compile Include="CollectBase.cs" />
|
|
||||||
<Compile Include="CommonPassword.cs" />
|
|
||||||
<Compile Include="ConvertExtension.cs" />
|
|
||||||
<Compile Include="EnumHelper.cs" />
|
|
||||||
<Compile Include="Extension\Extensions.cs" />
|
|
||||||
<Compile Include="Extension\JTokenExtension.cs" />
|
|
||||||
<Compile Include="Extension\LinqExtension.cs" />
|
|
||||||
<Compile Include="FileBase.cs" />
|
|
||||||
<Compile Include="GetHtml.cs" />
|
|
||||||
<Compile Include="GetProxyHtml.cs" />
|
|
||||||
<Compile Include="Helper\CommonSimRequest.cs" />
|
|
||||||
<Compile Include="Helper\DataOpenSSL.cs" />
|
|
||||||
<Compile Include="Helper\EnvironmentHelper.cs" />
|
|
||||||
<Compile Include="Helper\FissionDataBaseConfig.cs" />
|
|
||||||
<Compile Include="Helper\GB18030EncodingProvider.cs" />
|
|
||||||
<Compile Include="Helper\GlobalConfig.cs" />
|
|
||||||
<Compile Include="Helper\UDE.cs" />
|
|
||||||
<Compile Include="HttpUtility.cs" />
|
|
||||||
<Compile Include="IECookies.cs" />
|
|
||||||
<Compile Include="ImageBuild.cs" />
|
|
||||||
<Compile Include="ImageCut.cs" />
|
|
||||||
<Compile Include="ImageErWeiMa.cs" />
|
|
||||||
<Compile Include="IPLocationSearch.cs" />
|
|
||||||
<Compile Include="JsonHelper.cs" />
|
|
||||||
<Compile Include="LogSave.cs" />
|
|
||||||
<Compile Include="Md5Base.cs" />
|
|
||||||
<Compile Include="Model\Config\WxTalkFormShopMainInfo.cs" />
|
|
||||||
<Compile Include="Model\Config\WxShopKfStatistics.cs" />
|
|
||||||
<Compile Include="Model\Config\WxShopMainStatistics.cs" />
|
|
||||||
<Compile Include="Model\Config\WxShopUploadInfo.cs" />
|
|
||||||
<Compile Include="Model\Data\ProductLatestOutAmountInfo.cs" />
|
|
||||||
<Compile Include="Model\Data\WXBuyUrlNotesInfo.cs" />
|
|
||||||
<Compile Include="Model\Data\WXOrderDecryptAddressInfo.cs" />
|
|
||||||
<Compile Include="Model\DBModel\oem.cs" />
|
|
||||||
<Compile Include="Model\DBModel\oms_wei_external_procurement_log.cs" />
|
|
||||||
<Compile Include="Model\DBModel\oms_wei_order.cs" />
|
|
||||||
<Compile Include="Model\DBModel\user_payment_record.cs" />
|
|
||||||
<Compile Include="Model\DBModel\user_points_record_info.cs" />
|
|
||||||
<Compile Include="Model\DBModel\wx_qualification_image_info.cs" />
|
|
||||||
<Compile Include="Model\Param\CollectManage\FissionSettingParam.cs" />
|
|
||||||
<Compile Include="Model\Param\OrderManage\FreightTemplateParam.cs" />
|
|
||||||
<Compile Include="Model\Param\DyProductManage\DyCategoryParam.cs" />
|
|
||||||
<Compile Include="Model\Param\FissionManage\FissionData.cs" />
|
|
||||||
<Compile Include="Model\Param\FissionManage\FissionDataModel.cs" />
|
|
||||||
<Compile Include="Model\Param\FissionManage\FissionRoot.cs" />
|
|
||||||
<Compile Include="Model\Param\DyProductManage\SameProductCheckParam.cs" />
|
|
||||||
<Compile Include="Model\Param\DyProductManage\ViolateParam.cs" />
|
|
||||||
<Compile Include="Model\Param\DyProductManage\QualificationConfig.cs" />
|
|
||||||
<Compile Include="Model\Param\DyProductManage\ViolateRuleParam.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDCouponParam\PDDActivityMarketingParam.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDCouponParam\PDDCouponParam.cs" />
|
|
||||||
<Compile Include="Model\Param\OutServerGoodsParam.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDProdParam\PDDActivitySubmitParamV2.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDProdParam\PddEditProdStockQuantity.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDProdParam\PddRelationParam.cs" />
|
|
||||||
<Compile Include="Model\Param\ToolsManage\ADSLAccountParam.cs" />
|
|
||||||
<Compile Include="Model\Param\ToolsManage\ProductMappingExportInfo.cs" />
|
|
||||||
<Compile Include="Model\Param\ToolsManage\ProductMappingImportParam.cs" />
|
|
||||||
<Compile Include="Model\Param\VDianManage\VDianParam.cs" />
|
|
||||||
<Compile Include="Model\Param\VDianManage\VDianUploadSettingParam.cs" />
|
|
||||||
<Compile Include="Model\Param\WXParam\WXCateAuthParam.cs" />
|
|
||||||
<Compile Include="Model\Param\WXParam\WXCoupon.cs" />
|
|
||||||
<Compile Include="Model\Param\WXParam\WXPreCreateOrderWaybillOnlineParam.cs" />
|
|
||||||
<Compile Include="Model\Param\WXParam\WXUploadProductInfoRecommendParam.cs" />
|
|
||||||
<Compile Include="Model\Result\1688\_1688ClientProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\1688\_1688OneProductListInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\1688\_1688OutProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\BuyerLoginInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\JST\JSTOrderInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\JST\JSTListProductSkuInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\ApiPddGoodsCatRuleInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDActivityResult\ActivityListProdInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDActivityResult\ActEnrollV3GoodsRuleInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PddBuyerAfterSaleLiteInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PddBuyerOrderLiteInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PddCatInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PddClientInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDFrontProductInfo2.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDFrontProductInfo3.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDFrontProductInfo5.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDFrontProductInfo4.cs" />
|
|
||||||
<Compile Include="Model\Result\PlatformType.cs" />
|
|
||||||
<Compile Include="Model\Result\Result.cs" />
|
|
||||||
<Compile Include="Model\Result\VDianShopLoginInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\DSRShopScoreInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxActivityData.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WXAddressInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WXClientProductInfoLite.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxConsignmentOrderInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WXFinderTalentInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WXGetEditProductInfoLite.cs" />
|
|
||||||
<Compile Include="Model\Param\WXParam\WXGetShortTitleParam.cs" />
|
|
||||||
<Compile Include="Model\Param\WXParam\WXUploadProductInitParam.cs" />
|
|
||||||
<Compile Include="Model\Param\WXParam\WXUploadProductParam.cs" />
|
|
||||||
<Compile Include="Model\Result\JitCardCodeInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\JSTDownProdSkuInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\JSTListProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDCouponResult\PDDActivityToolGoodsListInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDCouponResult\PDDActivityToolSkuDiscountListInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDCouponResult\PDDActivityToolGoodsSkuListInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDCouponResult\PDDCouponGoodsListInfo.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDProdParam\PDDActivityPriceCheckParam.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDProdParam\PDDActivitySubmitParam.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDProdParam\PDDActivitySubmitParam20981.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDProdParam\PDDProdDecorationCommitParam.cs" />
|
|
||||||
<Compile Include="Model\Param\PDDProdParam\PDDProductUploadParam.cs" />
|
|
||||||
<Compile Include="Model\Param\SalesManage\PromotionAddParam.cs" />
|
|
||||||
<Compile Include="Model\Param\SalesManage\TemuActivityParam.cs" />
|
|
||||||
<Compile Include="Model\Param\ShopManage\TemuShopSettingParam.cs" />
|
|
||||||
<Compile Include="Model\Param\TemuProductManage\TemuProductWords.cs" />
|
|
||||||
<Compile Include="Model\Param\TemuProductManage\TemuSizeSpecParam.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDActivitiInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDActivityRuleInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDActivitySuggestPriceInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDChanceProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDFrontProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDPropRefPidNameMap.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDShopListProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDMaterialInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDProductDecorationInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDProductDetailInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDProductPropertyInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDProductTemplateInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\PDDResult\PDDSizeSpecInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuActivityInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuActivityMatchProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuCategoryTemplateInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuDBProdMapResult.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuForChainProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuDBExtCodePriceInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuDBProductPurchasePriceInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuDBProductSelect.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuGoodsQualityInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuListProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuDBOrderInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuPriceAdjustInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuDetailProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Param\TemuProductManage\TemuProductParam.cs" />
|
|
||||||
<Compile Include="Model\Result\KJDDBProduct.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuResult\AdsDetailInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuResult\AdsMallGoodsInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuResult\AiSkuImgInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuResult\TemuSizeConfigResult\TemuSizeConfigInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuResult\TemuWebClientProductInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuReturnPackageDetailInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\TemuStockInfo.cs" />
|
|
||||||
<Compile Include="Model\Param\UploadManage\UploadCommissionParam.cs" />
|
|
||||||
<Compile Include="Model\Param\UploadManage\UploadErrorParam.cs" />
|
|
||||||
<Compile Include="Model\Result\AddressAreaInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\ShopLoginInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\CatePropertyResponseInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\FreightTemplateInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\ViolateInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\GetCateOnShelfInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\GetProdCateInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxCatInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WXLiveObjectInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WXOemWithdrawalInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOnlineWaybillDeliveryInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOptimizeExpressInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOptimizeFeedbackOrderInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOptimizeOrderAfterSaleInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOptimizeProductEvaluationInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOptimizeLinerCgiInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOrderExpressInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOrderInfoLite.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxOptimizeOrderWayBillInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WXShopDefaultAddressInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WXShopTokenInfo.cs" />
|
|
||||||
<Compile Include="Model\Result\WXResult\WxTaxMoneyInfo.cs" />
|
|
||||||
<Compile Include="MultiThreadClient.cs" />
|
|
||||||
<Compile Include="OutExcel.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DesignTime>True</DesignTime>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Randomx.cs" />
|
|
||||||
<Compile Include="RsaBase.cs" />
|
|
||||||
<Compile Include="Segment.cs" />
|
|
||||||
<Compile Include="ShopInfo.cs" />
|
|
||||||
<Compile Include="SignHelper.cs" />
|
|
||||||
<Compile Include="BaseSpecialConfig.cs" />
|
|
||||||
<Compile Include="SqlHelper.cs" />
|
|
||||||
<Compile Include="SqliteHelper.cs" />
|
|
||||||
<Compile Include="TempFileReadWrite.cs" />
|
|
||||||
<Compile Include="Threadx.cs" />
|
|
||||||
<Compile Include="TreadTime.cs" />
|
|
||||||
<Compile Include="WebClientx.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="ZipHelper.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup />
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x64.138.0.34\build\chromiumembeddedframework.runtime.win-x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x64.138.0.34\build\chromiumembeddedframework.runtime.win-x64.props'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x86.138.0.34\build\chromiumembeddedframework.runtime.win-x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x86.138.0.34\build\chromiumembeddedframework.runtime.win-x86.props'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.props'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<Import Project="..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.targets')" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -6,4 +6,9 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectView>ProjectFiles</ProjectView>
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="WebClientx.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,340 +0,0 @@
|
|||||||
using CefSharp;
|
|
||||||
using NaiBa.Util.Extension;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.Specialized;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Security.Cryptography.X509Certificates;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AllBase
|
|
||||||
{
|
|
||||||
public class RequestHandler : IRequestHandler
|
|
||||||
{
|
|
||||||
public List<string> IgnoreList = new List<string>();
|
|
||||||
public List<string> NotIgnoreList = new List<string>();
|
|
||||||
public string UserAgent = string.Empty;
|
|
||||||
public List<Cookie> CookieList = new List<Cookie>(); // 留作测试使用
|
|
||||||
|
|
||||||
public event Action<string, string, string> ResourceLoadComplete; // requestUrl, postData, responseData
|
|
||||||
public event Action<string, string, string> ResourceRedirect; // requestUrl, postData, redirectUrl
|
|
||||||
|
|
||||||
bool IRequestHandler.OnBeforeBrowse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, bool isRedirect)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IRequestHandler.OnOpenUrlFromTab(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture)
|
|
||||||
{
|
|
||||||
return OnOpenUrlFromTab(browserControl, browser, frame, targetUrl, targetDisposition, userGesture);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual bool OnOpenUrlFromTab(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, WindowOpenDisposition targetDisposition, bool userGesture)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IRequestHandler.OnCertificateError(IWebBrowser browserControl, IBrowser browser, CefErrorCode errorCode, string requestUrl, ISslInfo sslInfo, IRequestCallback callback)
|
|
||||||
{
|
|
||||||
//NOTE: If you do not wish to implement this method returning false is the default behaviour
|
|
||||||
// We also suggest you explicitly Dispose of the callback as it wraps an unmanaged resource.
|
|
||||||
//callback.Dispose();
|
|
||||||
//return false;
|
|
||||||
|
|
||||||
//NOTE: When executing the callback in an async fashion need to check to see if it's disposed
|
|
||||||
if (!callback.IsDisposed)
|
|
||||||
{
|
|
||||||
using (callback)
|
|
||||||
{
|
|
||||||
//To allow certificate
|
|
||||||
//callback.Continue(true);
|
|
||||||
//return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IRequestHandler.OnPluginCrashed(IWebBrowser browserControl, IBrowser browser, string pluginPath)
|
|
||||||
{
|
|
||||||
// TODO: Add your own code here for handling scenarios where a plugin crashed, for one reason or another.
|
|
||||||
}
|
|
||||||
|
|
||||||
CefReturnValue IRequestHandler.OnBeforeResourceLoad(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IRequestCallback callback)
|
|
||||||
{
|
|
||||||
if (NotIgnoreList.Any())
|
|
||||||
{
|
|
||||||
if (NotIgnoreList.Where(p => request.Url.Contains(p)).Any())
|
|
||||||
{
|
|
||||||
return CefReturnValue.Continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (IgnoreList.Any())
|
|
||||||
{
|
|
||||||
if (IgnoreList.Where(p => request.Url.Contains(p)).Any())
|
|
||||||
{
|
|
||||||
return CefReturnValue.Cancel;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
NameValueCollection headers = request.Headers;
|
|
||||||
if (!string.IsNullOrEmpty(UserAgent))
|
|
||||||
{
|
|
||||||
headers["User-Agent"] = UserAgent;
|
|
||||||
}
|
|
||||||
request.Headers = headers;
|
|
||||||
return CefReturnValue.Continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IRequestHandler.GetAuthCredentials(IWebBrowser browserControl, IBrowser browser, IFrame frame, bool isProxy, string host, int port, string realm, string scheme, IAuthCallback callback)
|
|
||||||
{
|
|
||||||
//NOTE: If you do not wish to implement this method returning false is the default behaviour
|
|
||||||
// We also suggest you explicitly Dispose of the callback as it wraps an unmanaged resource.
|
|
||||||
|
|
||||||
callback.Dispose();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IRequestHandler.OnSelectClientCertificate(IWebBrowser browserControl, IBrowser browser, bool isProxy, string host, int port, X509Certificate2Collection certificates, ISelectClientCertificateCallback callback)
|
|
||||||
{
|
|
||||||
//NOTE: If you do not wish to implement this method returning false is the default behaviour
|
|
||||||
// We also suggest you explicitly Dispose of the callback as it wraps an unmanaged resource.
|
|
||||||
|
|
||||||
return OnSelectClientCertificate(browserControl, browser, isProxy, host, port, certificates, callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual bool OnSelectClientCertificate(IWebBrowser browserControl, IBrowser browser, bool isProxy, string host, int port, X509Certificate2Collection certificates, ISelectClientCertificateCallback callback)
|
|
||||||
{
|
|
||||||
callback.Dispose();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IRequestHandler.OnRenderProcessTerminated(IWebBrowser browserControl, IBrowser browser, CefTerminationStatus status)
|
|
||||||
{
|
|
||||||
// TODO: Add your own code here for handling scenarios where the Render Process terminated for one reason or another.
|
|
||||||
// browserControl.Load(CefExample.RenderProcessCrashedUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IRequestHandler.OnQuotaRequest(IWebBrowser browserControl, IBrowser browser, string originUrl, long newSize, IRequestCallback callback)
|
|
||||||
{
|
|
||||||
//NOTE: If you do not wish to implement this method returning false is the default behaviour
|
|
||||||
// We also suggest you explicitly Dispose of the callback as it wraps an unmanaged resource.
|
|
||||||
//callback.Dispose();
|
|
||||||
//return false;
|
|
||||||
|
|
||||||
//NOTE: When executing the callback in an async fashion need to check to see if it's disposed
|
|
||||||
if (!callback.IsDisposed)
|
|
||||||
{
|
|
||||||
using (callback)
|
|
||||||
{
|
|
||||||
//Accept Request to raise Quota
|
|
||||||
//callback.Continue(true);
|
|
||||||
//return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IRequestHandler.OnResourceRedirect(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, ref string newUrl)
|
|
||||||
{
|
|
||||||
if (ResourceRedirect != null)
|
|
||||||
{
|
|
||||||
string postData = GetPostData(request);
|
|
||||||
ResourceRedirect.Invoke(request.Url, postData, newUrl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IRequestHandler.OnProtocolExecution(IWebBrowser browserControl, IBrowser browser, string url)
|
|
||||||
{
|
|
||||||
return url.StartsWith("mailto");
|
|
||||||
}
|
|
||||||
|
|
||||||
void IRequestHandler.OnRenderViewReady(IWebBrowser browserControl, IBrowser browser)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IRequestHandler.OnResourceResponse(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response)
|
|
||||||
{
|
|
||||||
//NOTE: You cannot modify the response, only the request
|
|
||||||
// You can now access the headers
|
|
||||||
//var headers = response.ResponseHeaders;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
IResponseFilter IRequestHandler.GetResourceResponseFilter(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response)
|
|
||||||
{
|
|
||||||
string cookie = response.ResponseHeaders["Set-Cookie"].ParseToString();
|
|
||||||
if (!string.IsNullOrEmpty(cookie))
|
|
||||||
{
|
|
||||||
SetCookie(cookie);
|
|
||||||
}
|
|
||||||
string contentType = response.ResponseHeaders["Content-Type"];
|
|
||||||
if (string.IsNullOrEmpty(contentType))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (contentType.Contains("application/json") || contentType.Contains("text/javascript"))
|
|
||||||
{
|
|
||||||
if (ResourceLoadComplete != null)
|
|
||||||
{
|
|
||||||
IResponseFilter filter = FilterManager.CreateFilter(request.Identifier.ToString());
|
|
||||||
return filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IRequestHandler.OnResourceLoadComplete(IWebBrowser browserControl, IBrowser browser, IFrame frame, IRequest request, IResponse response, UrlRequestStatus status, long receivedContentLength)
|
|
||||||
{
|
|
||||||
string contentType = response.ResponseHeaders["Content-Type"];
|
|
||||||
if (string.IsNullOrEmpty(contentType))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (contentType.Contains("application/json") || contentType.Contains("text/javascript"))
|
|
||||||
{
|
|
||||||
if (ResourceLoadComplete != null)
|
|
||||||
{
|
|
||||||
JsonFilter jsonFilter = FilterManager.GetFileter(request.Identifier.ToString()) as JsonFilter;
|
|
||||||
if (jsonFilter != null)
|
|
||||||
{
|
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
|
||||||
string responseData = encoding.GetString(jsonFilter.DataAll.ToArray());
|
|
||||||
string postData = GetPostData(request);
|
|
||||||
ResourceLoadComplete.Invoke(request.Url, postData, responseData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetCookie(string cookie)
|
|
||||||
{
|
|
||||||
string[] commaArr = cookie.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
foreach (string comma in commaArr)
|
|
||||||
{
|
|
||||||
string[] semicolonArr = comma.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
foreach (string semicolon in semicolonArr)
|
|
||||||
{
|
|
||||||
string temp = semicolon.ParseToString().Trim();
|
|
||||||
if (string.IsNullOrEmpty(temp))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!temp.Contains("="))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (temp.ToLower().StartsWith("path=") || temp.ToLower().StartsWith("expires=") || temp.ToLower().StartsWith("domain="))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
string[] keyValue = temp.Split('=');
|
|
||||||
Cookie cookieObj = CookieList.Where(p => p.Name == keyValue[0]).FirstOrDefault();
|
|
||||||
if (cookieObj == null)
|
|
||||||
{
|
|
||||||
cookieObj = new Cookie
|
|
||||||
{
|
|
||||||
Name = keyValue[0],
|
|
||||||
Value = keyValue[1]
|
|
||||||
};
|
|
||||||
CookieList.Add(cookieObj);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cookieObj.Value = keyValue[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetPostData(IRequest request)
|
|
||||||
{
|
|
||||||
string postData = string.Empty;
|
|
||||||
if (request.PostData != null && request.PostData.Elements.Any())
|
|
||||||
{
|
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
|
||||||
postData = encoding.GetString(request.PostData.Elements[0].Bytes);
|
|
||||||
postData = GetHtml.UrlDecode(postData);
|
|
||||||
}
|
|
||||||
return postData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class JsonFilter : IResponseFilter
|
|
||||||
{
|
|
||||||
public List<byte> DataAll = new List<byte>();
|
|
||||||
|
|
||||||
public FilterStatus Filter(Stream dataIn, out long dataInRead, Stream dataOut, out long dataOutWritten)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (dataIn == null || dataIn.Length == 0)
|
|
||||||
{
|
|
||||||
dataInRead = 0;
|
|
||||||
dataOutWritten = 0;
|
|
||||||
|
|
||||||
return FilterStatus.Done;
|
|
||||||
}
|
|
||||||
|
|
||||||
dataInRead = dataIn.Length;
|
|
||||||
dataOutWritten = Math.Min(dataInRead, dataOut.Length);
|
|
||||||
|
|
||||||
dataIn.CopyTo(dataOut);
|
|
||||||
dataIn.Seek(0, SeekOrigin.Begin);
|
|
||||||
byte[] bs = new byte[dataIn.Length];
|
|
||||||
dataIn.Read(bs, 0, bs.Length);
|
|
||||||
DataAll.AddRange(bs);
|
|
||||||
|
|
||||||
dataInRead = dataIn.Length;
|
|
||||||
dataOutWritten = dataIn.Length;
|
|
||||||
|
|
||||||
return FilterStatus.NeedMoreData;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
dataInRead = dataIn.Length;
|
|
||||||
dataOutWritten = dataIn.Length;
|
|
||||||
|
|
||||||
return FilterStatus.Done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool InitFilter()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class FilterManager
|
|
||||||
{
|
|
||||||
private static Dictionary<string, IResponseFilter> dataList = new Dictionary<string, IResponseFilter>();
|
|
||||||
|
|
||||||
public static IResponseFilter CreateFilter(string guid)
|
|
||||||
{
|
|
||||||
lock (dataList)
|
|
||||||
{
|
|
||||||
var filter = new JsonFilter();
|
|
||||||
dataList.Add(guid, filter);
|
|
||||||
|
|
||||||
return filter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IResponseFilter GetFileter(string guid)
|
|
||||||
{
|
|
||||||
lock (dataList)
|
|
||||||
{
|
|
||||||
return dataList[guid];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="CefSharp.Common" version="138.0.340" targetFramework="net462" />
|
|
||||||
<package id="CefSharp.WinForms" version="138.0.340" targetFramework="net462" />
|
|
||||||
<package id="chromiumembeddedframework.runtime.win-x64" version="138.0.34" targetFramework="net462" />
|
|
||||||
<package id="chromiumembeddedframework.runtime.win-x86" version="138.0.34" targetFramework="net462" />
|
|
||||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
|
|
||||||
</packages>
|
|
||||||
+8
-2
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 18
|
||||||
VisualStudioVersion = 17.14.36221.1 d17.14
|
VisualStudioVersion = 18.9.12120.119 stable
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AllBase", "AllBase\AllBase.csproj", "{6461D807-B1C8-45F0-B388-E0CA1A418DE0}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AllBase", "AllBase\AllBase.csproj", "{6461D807-B1C8-45F0-B388-E0CA1A418DE0}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -13,6 +13,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".test", ".test", "{CE81E85E
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KJD.Test", "test\KJD.Test\KJD.Test.csproj", "{9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KJD.Test", "test\KJD.Test\KJD.Test.csproj", "{9BCF10B0-85A2-4F0A-9D44-2C0555D28FBD}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{872CAD69-5B07-4A3C-B284-935BA1645AE3}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
.editorconfig = .editorconfig
|
||||||
|
.gitignore = .gitignore
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|||||||
@@ -1,129 +0,0 @@
|
|||||||
using AllBase;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using Work.Api;
|
|
||||||
|
|
||||||
namespace Work.Business
|
|
||||||
{
|
|
||||||
public class CatBLL
|
|
||||||
{
|
|
||||||
Dictionary<string, List<int>> dicCat = new Dictionary<string, List<int>>();
|
|
||||||
public static List<CatInfo> lstCatInfo = new List<CatInfo>();
|
|
||||||
public void GetCat1()
|
|
||||||
{
|
|
||||||
var Shop = GetShopLoginInfo.Shops.Find(s => s.ShopName == "pdd49094313446");
|
|
||||||
string url = "https://mms.pinduoduo.com/vodka/v2/mms/cat1List";
|
|
||||||
string refere = "https://mms.pinduoduo.com/goods/category";
|
|
||||||
string htmlx = GetPostTaobaoHtml.UploadTaobaoPost(url, refere, true, "", Shop.Cookies);
|
|
||||||
var mc = BaseRegex.GetMatchRegex(ref htmlx, @"\{[^}]+?""stapleName"":\[([\w\W]+?)\]\}");
|
|
||||||
dicCat.Clear();
|
|
||||||
for (int i = 0; mc != null && i < mc.Count; i++)
|
|
||||||
{
|
|
||||||
var item = mc[i].Groups[0].Value;
|
|
||||||
int catid = BaseRegex.GetIntJson(ref item, "id");//商品ID
|
|
||||||
string stapleName = mc[i].Groups[1].Value;//商品ID
|
|
||||||
if (dicCat.ContainsKey(stapleName))
|
|
||||||
{
|
|
||||||
dicCat[stapleName].Add(catid);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
List<int> lst = new List<int>();
|
|
||||||
lst.Add(catid);
|
|
||||||
dicCat.Add(stapleName, lst);
|
|
||||||
}
|
|
||||||
string name = BaseRegex.GetStringJson(ref item, "name");//商品ID
|
|
||||||
CatInfo cat = new CatInfo();
|
|
||||||
cat.CatId = catid;
|
|
||||||
cat.CatName = name;
|
|
||||||
lstCatInfo.Add(cat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GetAllCat()
|
|
||||||
{
|
|
||||||
var Shop = GetShopLoginInfo.Shops.Find(s => s.ShopName == "pdd49094313446");
|
|
||||||
if (Shop == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
lstCatInfo.Clear();
|
|
||||||
if (File.Exists("full_cat_json.txt"))
|
|
||||||
{
|
|
||||||
lstCatInfo = JsonHelper.DeserializeJsonToObject<List<CatInfo>>(FileBase.ReadAllText("full_cat_json.txt"));
|
|
||||||
}
|
|
||||||
|
|
||||||
var catNotGetChild = new CatInfo { CatId = 0, CatLevel = 0, CatName = "", ParentCatId = 0 };
|
|
||||||
string refere = "https://mms.pinduoduo.com/Pdd.html";
|
|
||||||
while (catNotGetChild != null)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
System.Threading.Thread.Sleep(2000 + Randomx.GetId(2000));
|
|
||||||
string url = "https://mms.pinduoduo.com/vodka/v2/mms/categories?parentId=" + catNotGetChild.CatId;
|
|
||||||
string html = GetPostTaobaoHtml.GetJsonPost(url, refere, true, "", Shop.Cookies);
|
|
||||||
|
|
||||||
JObject jObj = JObject.Parse(html);
|
|
||||||
JArray jArr = jObj["result"] as JArray;
|
|
||||||
foreach (var item in jArr)
|
|
||||||
{
|
|
||||||
var itemStr = item.ToString();
|
|
||||||
int level = BaseRegex.GetIntJson(ref itemStr, "level");
|
|
||||||
int catId = BaseRegex.GetIntJson(ref itemStr, "id");
|
|
||||||
bool isLeaf = BaseRegex.GetIntJson(ref itemStr, "leaf") == 1;
|
|
||||||
int parentCatId = BaseRegex.GetIntJson(ref itemStr, "parent_id");
|
|
||||||
string catName = BaseRegex.GetStringJson(ref itemStr, "cat_name");
|
|
||||||
CatInfo c = new CatInfo
|
|
||||||
{
|
|
||||||
CatId = catId,
|
|
||||||
CatLevel = level,
|
|
||||||
CatName = catName,
|
|
||||||
ParentCatId = parentCatId,
|
|
||||||
IsLeaf = isLeaf,
|
|
||||||
cat_id_1 = BaseRegex.GetIntJson(ref itemStr, "cat_id_1"),
|
|
||||||
cat_id_2 = BaseRegex.GetIntJson(ref itemStr, "cat_id_2"),
|
|
||||||
cat_id_3 = BaseRegex.GetIntJson(ref itemStr, "cat_id_3"),
|
|
||||||
cat_id_4 = BaseRegex.GetIntJson(ref itemStr, "cat_id_4"),
|
|
||||||
};
|
|
||||||
if (!lstCatInfo.Any(lc => lc.CatId == c.CatId))
|
|
||||||
lstCatInfo.Add(c);
|
|
||||||
}
|
|
||||||
catNotGetChild.IsGet = true;
|
|
||||||
FileBase.WriteAllText("full_cat_json.txt", JsonHelper.SerializeObject(lstCatInfo));
|
|
||||||
catNotGetChild = lstCatInfo.FirstOrDefault(lc => lc.IsGet == false && lc.CatLevel < 4 && !lc.IsLeaf);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (lstCatInfo.Count > 0)
|
|
||||||
{
|
|
||||||
string catstr = "";
|
|
||||||
foreach (var item in lstCatInfo)
|
|
||||||
{
|
|
||||||
catstr += item.CatId + "," + item.cat_id_1 + "," + item.cat_id_2 + "," + item.cat_id_3 + "," + item.cat_id_4 + "\r\n";
|
|
||||||
}
|
|
||||||
FileBase.WriteAllText("full_cat.txt", catstr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CatInfo
|
|
||||||
{
|
|
||||||
public int CatId { get; set; }
|
|
||||||
public int CatLevel { get; set; }
|
|
||||||
public int ParentCatId { get; set; }
|
|
||||||
public string CatName { get; set; }
|
|
||||||
public bool IsGet { get; set; }
|
|
||||||
public bool IsLeaf { get; set; }
|
|
||||||
public int cat_id_1 { get; set; }
|
|
||||||
public int cat_id_2 { get; set; }
|
|
||||||
public int cat_id_3 { get; set; }
|
|
||||||
public int cat_id_4 { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
using AllBase;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Work.Api;
|
|
||||||
|
|
||||||
namespace Work.Business
|
|
||||||
{
|
|
||||||
public class CpsApiBLL
|
|
||||||
{
|
|
||||||
public string Name = "";
|
|
||||||
|
|
||||||
public CpsApiBLL(string name = "")
|
|
||||||
{
|
|
||||||
Name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GetCpsMall(List<ShopChatBase> shops)
|
|
||||||
{
|
|
||||||
foreach (var shop in shops)
|
|
||||||
{
|
|
||||||
Thread.Sleep(250 + Randomx.GetId(500));
|
|
||||||
GetCpsMallRate(shop);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GetCpsMallRate(ShopChatBase shop)
|
|
||||||
{
|
|
||||||
PinduoduoApiGetProduct api = new PinduoduoApiGetProduct(shop);
|
|
||||||
string html = api.GetCpsShopSet();
|
|
||||||
if (html.Contains("goods_cps_mall_unit_query_response"))
|
|
||||||
{
|
|
||||||
int rate = BaseRegex.GetIntJson(ref html, "rate");
|
|
||||||
int status = BaseRegex.GetIntJson(ref html, "status");
|
|
||||||
shop.CpsShop.Percent = (rate / 10m) + "%";
|
|
||||||
shop.CpsShop.Message = status == 1 ? "全店推广中" + shop.CpsShop.Percent : "未开启全店推广";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LogSave.Add(Name, "店铺" + shop.ShopName + "(" + shop.Name + ")" + "读取推广数据失败。");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Work.Business.ProductMappingBLL
|
|
||||||
{
|
|
||||||
public class MappingTaoBaoBLL
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="prodList"></param>
|
|
||||||
/// <param name="minPrice"></param>
|
|
||||||
/// <param name="maxPrice"></param>
|
|
||||||
/// <param name="isGetTitle">如果是标题搜索,则放宽限制</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static List<Tuple<string, int, int,string>> FilterItems(List<Tuple<string, int, int,string>> prodList, int minPrice, int maxPrice = 0, bool isGetTitle = false, decimal multiple = 20M)
|
|
||||||
{
|
|
||||||
if (prodList == null || prodList.Count == 0)
|
|
||||||
return new List<Tuple<string, int, int,string>>();
|
|
||||||
|
|
||||||
var result = prodList.Where(p => !string.IsNullOrEmpty(p.Item1) && p.Item2 >= minPrice && p.Item3 >= maxPrice && p.Item3 < (maxPrice * 3.5M + 3000)).ToList();
|
|
||||||
var resultx = result.Where(r => r.Item2 != r.Item3).ToList();
|
|
||||||
if (resultx.Count > 0)
|
|
||||||
return resultx;
|
|
||||||
if (result.Count > 0)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
if (isGetTitle)
|
|
||||||
{
|
|
||||||
result = prodList.Where(p => !string.IsNullOrEmpty(p.Item1) && p.Item2 >= minPrice && p.Item3 < (maxPrice * multiple + 3000)).ToList();
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
using AllBase;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Work.Business.ProductMappingBLL
|
|
||||||
{
|
|
||||||
public class MappingVDianApiBLL
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 0上货缓存 1标题缓存 2标题搜索 3接口上货 4接口上货失败 5模拟上货 6微店群控接口上货 7标题分词缓存 8标题分词搜索 9类目搜索 10随机数据 11全文检索成功 12全文检索无满足条件 13全文检索失败 14淘宝搜索 15阿里图片搜索 16京喜搜索
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="resultNumber">0上货缓存 1标题缓存 2标题搜索 3接口上货 4接口上货失败 5模拟上货 6微店群控接口上货 7标题分词缓存 8标题分词搜索 9类目搜索 10随机数据 11全文检索成功 12全文检索无满足条件 13全文检索失败</param>
|
|
||||||
public static void UpDateMappingResultToStatistics(string resultNumber)
|
|
||||||
{
|
|
||||||
|
|
||||||
var html = GetHtml.GetUtf8("http://cache.aigio.cn/?type=" + resultNumber, "", 6);
|
|
||||||
if (html != "ok")
|
|
||||||
{
|
|
||||||
html = GetHtml.GetUtf8("http://cache.aigio.cn/?type=" + resultNumber, "", 10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,317 +0,0 @@
|
|||||||
using AllBase;
|
|
||||||
using AllBase.Model.Param.ToolsManage;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Work;
|
|
||||||
using Work.Api;
|
|
||||||
|
|
||||||
namespace Work.Business.ProductMappingBLL
|
|
||||||
{
|
|
||||||
public class MappingVDianCacheBLL
|
|
||||||
{
|
|
||||||
public static List<Tuple<string, int, int,string>> GetFakeCacheVDianTitle(string productTitle, ref string mappingFrom, string tid = "")
|
|
||||||
{
|
|
||||||
return GetFakeCacheVDianTitleSub(productTitle, ref mappingFrom, tid);
|
|
||||||
}
|
|
||||||
public static void GetFakeCacheQueueVDianTitle(List<ProductMappingImportParam> prod, ref string mappingFrom, string tid = "")
|
|
||||||
{
|
|
||||||
GetFakeCacheVDianQueueTitleSub(prod, ref mappingFrom, tid);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<Tuple<string, int, int,string>> GetFakeCacheVDianFissionTitle(string productTitle, ref string mappingFrom, string tid = "")
|
|
||||||
{
|
|
||||||
return GetFakeCacheVDianTitleSub(productTitle, ref mappingFrom, tid, "get_cache_fission_title");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<Tuple<string, int, int,string>> GetFakeCacheVDianFissionTitleList(string productTitle, ref string mappingFrom)
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int,string>>();
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(productTitle) || productTitle.Length <= 14)
|
|
||||||
return result;
|
|
||||||
|
|
||||||
var title0_14 = productTitle.Substring(0, 14);
|
|
||||||
var title0_7 = productTitle.Substring(0, 7);
|
|
||||||
var title7_7 = productTitle.Substring(7, 7);
|
|
||||||
var title0_5 = productTitle.Substring(0, 5);
|
|
||||||
var title4_5 = productTitle.Substring(4, 5);
|
|
||||||
var title8_5 = productTitle.Substring(8, 5);
|
|
||||||
var title0_3 = productTitle.Substring(0, 3);
|
|
||||||
var title3_3 = productTitle.Substring(3, 3);
|
|
||||||
var title6_3 = productTitle.Substring(6, 3);
|
|
||||||
var title9_3 = productTitle.Substring(9, 3);
|
|
||||||
var title12_3 = productTitle.Substring(12, 3);
|
|
||||||
string[] titleArr = new string[] { title0_14, title0_7, title7_7, title0_5, title4_5, title8_5, title0_3, title3_3, title6_3, title9_3, title12_3 };
|
|
||||||
|
|
||||||
var html = "";
|
|
||||||
string url = BaseClass.BuildObjString("data_change&act=get_cache_fission_title_list");
|
|
||||||
string data = "&data=";
|
|
||||||
foreach (var t in titleArr)
|
|
||||||
{
|
|
||||||
var md5id = Md5Base.GetMd5(t).Substring(8, 16);
|
|
||||||
data += md5id + "," + Math.Abs(BaseClass.GetLong(md5id)) % 1024 + ";";
|
|
||||||
}
|
|
||||||
data += "&" + UserLogin.GetSignaturex();
|
|
||||||
// 根据商品标题查找缓存
|
|
||||||
html = GetHtml.PostUtf8(url, data);
|
|
||||||
if (string.IsNullOrEmpty(html))
|
|
||||||
html = GetHtml.PostUtf8(url, data);
|
|
||||||
|
|
||||||
// 读取缓存成功
|
|
||||||
if (!string.IsNullOrEmpty(html) && !html.ToLower().Contains("error"))
|
|
||||||
{
|
|
||||||
mappingFrom = "微店";
|
|
||||||
var contents = BaseRegex.GetMatchRegex(html, "\"content\":\"([\\s\\S]+?)\"");
|
|
||||||
|
|
||||||
foreach (System.Text.RegularExpressions.Match m in contents)
|
|
||||||
{
|
|
||||||
var content = m.Groups[1]?.ToString();
|
|
||||||
if (content == null)
|
|
||||||
content = "";
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var tupleItems = content.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
foreach (var tupleItem in tupleItems)
|
|
||||||
{
|
|
||||||
var items = tupleItem.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
if (items.Length >= 2 && items[0].Length > 5)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var item1 = items[0];
|
|
||||||
var item2 = items[1];
|
|
||||||
var item3 = items.Length >= 3 ? items[2] : items[1];
|
|
||||||
var item4 = items.Length >= 4 ? items[3] : "";
|
|
||||||
result.Add(new Tuple<string, int, int,string>(item1, Convert.ToInt32(item2), Convert.ToInt32(item3),item4));
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 根据商品标题寻找微店商品缓存
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="prod">导入商品</param>
|
|
||||||
/// <param name="mappingFrom"></param>
|
|
||||||
/// <param name="isVDian"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static List<Tuple<string, int, int,string>> GetFakeCacheVDianTitleSub(string productTitle, ref string mappingFrom, string tid = "", string act = "get_cache_title")
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int,string>>();
|
|
||||||
var html = "";
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(productTitle))
|
|
||||||
return result;
|
|
||||||
|
|
||||||
string url = BaseClass.BuildObjString("data_change&act=" + act);
|
|
||||||
string data = "";
|
|
||||||
// 根据商品标题查找缓存
|
|
||||||
if (string.IsNullOrEmpty(html) || html.ToLower().Contains("error"))
|
|
||||||
{
|
|
||||||
if (tid == "")
|
|
||||||
tid = Md5Base.GetMd5(productTitle).Substring(8, 16);
|
|
||||||
long suffix = Math.Abs(BaseClass.GetLong(tid)) % 1024;
|
|
||||||
data = "&tid=" + tid
|
|
||||||
+ "&suffix=" + suffix
|
|
||||||
+ "&" + UserLogin.GetSignaturex();
|
|
||||||
|
|
||||||
html = GetHtml.PostUtf8(url, data);
|
|
||||||
if (string.IsNullOrEmpty(html))
|
|
||||||
html = GetHtml.PostUtf8(url, data);
|
|
||||||
}
|
|
||||||
// 读取缓存成功
|
|
||||||
if (!string.IsNullOrEmpty(html) && !html.ToLower().Contains("error"))
|
|
||||||
{
|
|
||||||
mappingFrom = "微店";
|
|
||||||
string content = BaseRegex.GetMatchRegexString(html, "\"content\":\"([\\s\\S]+?)(])\"");
|
|
||||||
if (content != null)
|
|
||||||
{
|
|
||||||
content = content.Replace("\\", "") + "]";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
content = BaseRegex.GetMatchRegexString(html, "\"content\":\"([\\s\\S]+?)\"");
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var tupleItems = content.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
foreach (var tupleItem in tupleItems)
|
|
||||||
{
|
|
||||||
var items = tupleItem.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
if (items.Length >= 2 && items[0].Length > 5)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var item1 = items[0];
|
|
||||||
var item2 = items[1];
|
|
||||||
var item3 = items.Length >= 3 ? items[2] : items[1];
|
|
||||||
var item4 = items.Length >= 4? items[3] : "";
|
|
||||||
result.Add(new Tuple<string, int, int,string>(item1, Convert.ToInt32(item2), Convert.ToInt32(item3),item4));
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void GetFakeCacheVDianQueueTitleSub(List<ProductMappingImportParam> prods, ref string mappingFrom, string tid = "", string act = "get_cache_title")
|
|
||||||
{
|
|
||||||
//var result = new List<Tuple<string, int, int, string>>();
|
|
||||||
var html = "";
|
|
||||||
string url = BaseClass.BuildObjString("data_change&act=get_cache_title_list");
|
|
||||||
string temp = "";
|
|
||||||
for (int i = 0; i < prods.Count; i++)
|
|
||||||
{
|
|
||||||
var prod = prods[i];
|
|
||||||
|
|
||||||
// 根据商品标题查找缓存
|
|
||||||
if (string.IsNullOrEmpty(html) || html.ToLower().Contains("error"))
|
|
||||||
{
|
|
||||||
|
|
||||||
tid = Md5Base.GetMd5(prod.ProductTitle).Substring(8, 16);
|
|
||||||
long suffix = Math.Abs(BaseClass.GetLong(tid)) % 1024;
|
|
||||||
if (!string.IsNullOrEmpty(temp))
|
|
||||||
temp += ";";
|
|
||||||
temp += suffix + "," + tid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
string data = "&tids=" + temp+ "&" + UserLogin.GetSignaturex();
|
|
||||||
html = GetHtml.PostUtf8(url, data);
|
|
||||||
if (string.IsNullOrEmpty(html))
|
|
||||||
html = GetHtml.PostUtf8(url, data);
|
|
||||||
// 读取缓存成功
|
|
||||||
if (!string.IsNullOrEmpty(html) && !html.ToLower().Contains("error"))
|
|
||||||
{
|
|
||||||
var m = BaseRegex.GetMatchRegex(ref html, @"\{([^\]]+?)\}");
|
|
||||||
for (int i = 0; i < m.Count; i++)
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int, string>>();
|
|
||||||
var proStr = m[i].Groups[0].Value;
|
|
||||||
mappingFrom = "微店";
|
|
||||||
string title =GetHtml.UrlDecode(BaseRegex.GetStringJson(ref proStr, @"title"));
|
|
||||||
var prod = prods.Find(s => title.Contains(s.ProductTitle));
|
|
||||||
if (prod == null) continue;
|
|
||||||
string content = BaseRegex.GetMatchRegexString(proStr, "\"content\":\"([\\s\\S]+?)\"");
|
|
||||||
if (content != null)
|
|
||||||
{
|
|
||||||
content = content.Replace("\\", "") ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
content = BaseRegex.GetMatchRegexString(proStr, "\"content\":\"([\\s\\S]+?)\"");
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var tupleItems = content.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
foreach (var tupleItem in tupleItems)
|
|
||||||
{
|
|
||||||
var items = tupleItem.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
|
|
||||||
if (items.Length >= 2 && items[0].Length > 5)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var item1 = items[0];
|
|
||||||
var item2 = items[1];
|
|
||||||
var item3 = items.Length >= 3 ? items[2] : items[1];
|
|
||||||
var item4 = items.Length >= 4 ? items[3] : "";
|
|
||||||
result.Add(new Tuple<string, int, int, string>(item1, Convert.ToInt32(item2), Convert.ToInt32(item3), item4));
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
}
|
|
||||||
UploadPinduoduoMain.goodCacheContent[long.Parse(prod.ProductId)] = result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (int i = 0; i < prods.Count; i++)
|
|
||||||
{
|
|
||||||
var prod = prods[i];
|
|
||||||
if (!UploadPinduoduoMain.goodCacheContent.ContainsKey(long.Parse(prod.ProductId)))
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int, string>>();
|
|
||||||
UploadPinduoduoMain.goodCacheContent[long.Parse(prod.ProductId)] = result;
|
|
||||||
}
|
|
||||||
//UploadPinduoduoMain.goodCacheContent.Add(long.Parse(prod.ProductId), null);
|
|
||||||
if(UploadPinduoduoMain.goodCacheContent[long.Parse(prod.ProductId)]== null)
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int, string>>();
|
|
||||||
UploadPinduoduoMain.goodCacheContent[long.Parse(prod.ProductId)]=result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string SaveFakeCacheVDianTitle(List<Tuple<string, int, int,string>> MappingResult, string productTitle, string mappingFrom, bool isAdd = true)
|
|
||||||
{
|
|
||||||
var content = "";
|
|
||||||
foreach (var item in MappingResult)
|
|
||||||
{
|
|
||||||
content += item.Item1 + "," + item.Item2 + "," + item.Item3 + "," + item.Item4 + ";";
|
|
||||||
}
|
|
||||||
|
|
||||||
string url = BaseClass.BuildObjString("data_change&act=add_cache_title");
|
|
||||||
//if (!isAdd)
|
|
||||||
// url = BaseClass.BuildObjString("data_change&act=update");
|
|
||||||
content = content.Length > 0 ? content.Trim(';') + ";" : content;
|
|
||||||
var tid = Md5Base.GetMd5(productTitle).Substring(8, 16);
|
|
||||||
var suffix = Math.Abs(BaseClass.GetLong(tid)) % 1024;
|
|
||||||
string data = "&tid=" + tid
|
|
||||||
+ "&suffix=" + suffix
|
|
||||||
+ "&content=" + content
|
|
||||||
+ "&title=" + HttpUtility.UrlEncode(productTitle, Encoding.UTF8)
|
|
||||||
+ "&" + UserLogin.GetSignaturex();
|
|
||||||
string result = GetHtml.PostUtf8(url, data);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string SaveFakeCacheVDianFissionTitle(List<Tuple<string, int, int,string>> MappingResult, string productFissionTitle, string mappingFrom, bool isAdd = true)
|
|
||||||
{
|
|
||||||
var content = "";
|
|
||||||
foreach (var item in MappingResult)
|
|
||||||
{
|
|
||||||
content += item.Item1 + "," + item.Item2 + "," + item.Item3 + "," + item.Item4 + ";";
|
|
||||||
}
|
|
||||||
content = content.Length > 0 ? content.Trim(';') + ";" : content;
|
|
||||||
string url = BaseClass.BuildObjString("data_change&act=add_cache_fission_title");
|
|
||||||
|
|
||||||
var tid = Md5Base.GetMd5(productFissionTitle).Substring(8, 16);
|
|
||||||
var suffix = Math.Abs(BaseClass.GetLong(tid)) % 1024;
|
|
||||||
string data = "&tid=" + tid
|
|
||||||
+ "&suffix=" + suffix
|
|
||||||
+ "&content=" + content
|
|
||||||
+ "&title=" + HttpUtility.UrlEncode(productFissionTitle, Encoding.UTF8)
|
|
||||||
+ "&" + UserLogin.GetSignaturex();
|
|
||||||
string result = GetHtml.PostUtf8(url, data);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,277 +0,0 @@
|
|||||||
using AllBase;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Work.Business.ProductMappingBLL
|
|
||||||
{
|
|
||||||
public class MappingVDianTitleSearchBLL
|
|
||||||
{
|
|
||||||
public static List<Tuple<string, int, int,string>> GetTupleListData(string title,string weidianGetTitleResult)
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int,string>>();
|
|
||||||
if (weidianGetTitleResult == null)
|
|
||||||
return result;
|
|
||||||
if (weidianGetTitleResult.Contains("\\\"message\\\":\\\"OK\\\""))
|
|
||||||
{
|
|
||||||
Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
weidianGetTitleResult = jObj["data"].ToString();
|
|
||||||
}
|
|
||||||
Newtonsoft.Json.Linq.JArray jArr = new Newtonsoft.Json.Linq.JArray();
|
|
||||||
if (weidianGetTitleResult.Contains("\"message\":\"OK\""))
|
|
||||||
{
|
|
||||||
Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
jArr = jObj["result"]["viewContainer"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
}
|
|
||||||
else if (weidianGetTitleResult.Contains("\"data\":["))
|
|
||||||
{
|
|
||||||
Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
jArr = jObj["data"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
}
|
|
||||||
foreach (var item in jArr)
|
|
||||||
{
|
|
||||||
var str = item.ToString();
|
|
||||||
var id = BaseRegex.GetStringJson(ref str, "itemId");
|
|
||||||
var name = BaseRegex.GetStringJson(ref str, "itemName");
|
|
||||||
if (string.IsNullOrEmpty(name))
|
|
||||||
continue;
|
|
||||||
bool compare = CompareTitle(title, name);
|
|
||||||
if (!compare)
|
|
||||||
continue;
|
|
||||||
var price = BaseRegex.GetIntJson(ref str, "itemPrice");
|
|
||||||
if (!string.IsNullOrEmpty(id) && price > 0)
|
|
||||||
result.Add(new Tuple<string, int, int,string>(id, price, price, DateTime.Now.ToString("yyyy-MM-dd")));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
public static List<Tuple<string, int, int,string>> GetTupleTaoBaoListData(string weidianGetTitleResult)
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int,string>>();
|
|
||||||
if (weidianGetTitleResult == null)
|
|
||||||
return result;
|
|
||||||
//if (weidianGetTitleResult.Contains("\\\"message\\\":\\\"OK\\\""))
|
|
||||||
//{
|
|
||||||
// Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
// weidianGetTitleResult = jObj["data"].ToString();
|
|
||||||
//}
|
|
||||||
Newtonsoft.Json.Linq.JArray jArr = new Newtonsoft.Json.Linq.JArray();
|
|
||||||
//if (weidianGetTitleResult.Contains("\"message\":\"OK\""))
|
|
||||||
//{
|
|
||||||
// Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
// jArr = jObj["result"]["viewContainer"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
//}
|
|
||||||
if (weidianGetTitleResult.Contains("mtopjsonp2("))
|
|
||||||
weidianGetTitleResult = BaseRegex.GetMatchRegexString(ref weidianGetTitleResult, @"mtopjsonp2\(({[\w\W]+?})\)");
|
|
||||||
if (weidianGetTitleResult.Contains("\"data\":{"))
|
|
||||||
{
|
|
||||||
Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
jArr = jObj["data"]?["recommend"]?["resultList"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
//var lst = jObj["data"]["resultList"].ToList();
|
|
||||||
//var ss = JArray.Parse(jObj["data"]?["recommend"]?["resultList"]?.ToString())?.ToObject<List<Object>>();
|
|
||||||
}
|
|
||||||
if (jArr == null)
|
|
||||||
return result;
|
|
||||||
foreach (var item in jArr)
|
|
||||||
{
|
|
||||||
var str = item.ToString();
|
|
||||||
var id = BaseRegex.GetStringJson(ref str, "itemId");
|
|
||||||
int price = 0;
|
|
||||||
var pricetemp = BaseRegex.GetDecimalJson(ref str, "promotionPrice");
|
|
||||||
price =(int)(pricetemp * 100);
|
|
||||||
if (!string.IsNullOrEmpty(id) && price > 0)
|
|
||||||
result.Add(new Tuple<string, int, int,string>("tb-"+id, price, price, DateTime.Now.ToString("yyyy-MM-dd")));
|
|
||||||
if (result.Count >= 10)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<Tuple<string, int, int,string>> GetTupleTaoBaoListV2Data(string title,string weidianGetTitleResult)
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int,string>>();
|
|
||||||
if (weidianGetTitleResult == null)
|
|
||||||
return result;
|
|
||||||
//if (weidianGetTitleResult.Contains("\\\"message\\\":\\\"OK\\\""))
|
|
||||||
//{
|
|
||||||
// Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
// weidianGetTitleResult = jObj["data"].ToString();
|
|
||||||
//}
|
|
||||||
Newtonsoft.Json.Linq.JArray jArr = new Newtonsoft.Json.Linq.JArray();
|
|
||||||
//if (weidianGetTitleResult.Contains("\"message\":\"OK\""))
|
|
||||||
//{
|
|
||||||
// Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
// jArr = jObj["result"]["viewContainer"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
//}
|
|
||||||
if (weidianGetTitleResult.Contains("mtopjsonp17("))
|
|
||||||
weidianGetTitleResult = BaseRegex.GetMatchRegexString(ref weidianGetTitleResult, @"mtopjsonp17\(({[\w\W]+?})\)");
|
|
||||||
if (weidianGetTitleResult.Contains("\"data\":{"))
|
|
||||||
{
|
|
||||||
Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
jArr = jObj["data"]?["itemsArray"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
//var lst = jObj["data"]["resultList"].ToList();
|
|
||||||
//var ss = JArray.Parse(jObj["data"]?["recommend"]?["resultList"]?.ToString())?.ToObject<List<Object>>();
|
|
||||||
}
|
|
||||||
if (jArr == null)
|
|
||||||
return result;
|
|
||||||
var resultx = new List<Tuple<string, int, int, double,string>>();
|
|
||||||
foreach (var item in jArr)
|
|
||||||
{
|
|
||||||
var str = item.ToString();
|
|
||||||
var id = BaseRegex.GetStringJson(ref str, "x_object_id");
|
|
||||||
if (id == null)
|
|
||||||
continue;
|
|
||||||
string name = BaseRegex.GetStringJson(ref str, "title");
|
|
||||||
double simu = BaseClass.GetSimularityBetween2Text(title, name);
|
|
||||||
if (simu < 0.8)
|
|
||||||
continue;
|
|
||||||
bool compare = CompareTitle(title, name);
|
|
||||||
if (!compare)
|
|
||||||
continue;
|
|
||||||
int price = 0;
|
|
||||||
var pricetemp = BaseRegex.GetDecimalJson(ref str, "item_price");
|
|
||||||
price = (int)(pricetemp * 100);
|
|
||||||
if (!string.IsNullOrEmpty(id) && price > 0)
|
|
||||||
resultx.Add(new Tuple<string, int, int, double,string>("tb-" + id, price, price,simu, DateTime.Now.ToString("yyyy-MM-dd")));
|
|
||||||
if (resultx.Count >= 10)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
resultx = resultx.OrderByDescending(o => o.Item4).ToList();
|
|
||||||
for (int i = 0; i < resultx.Count; i++)
|
|
||||||
{
|
|
||||||
var obj = resultx[i];
|
|
||||||
result.Add(new Tuple<string, int, int, string>(obj.Item1, obj.Item2, obj.Item3, obj.Item5));
|
|
||||||
}
|
|
||||||
//foreach (var item in jArr)
|
|
||||||
//{
|
|
||||||
// var str = item.ToString();
|
|
||||||
// var id = BaseRegex.GetStringJson(ref str, "x_object_id");
|
|
||||||
// if (id == null)
|
|
||||||
// continue;
|
|
||||||
// string name= BaseRegex.GetStringJson(ref str, "title");
|
|
||||||
// double simu= BaseClass.GetSimularityBetween2Text(title, name);
|
|
||||||
// if (simu < 0.85)
|
|
||||||
// continue;
|
|
||||||
// bool compare = CompareTitle(title, name);
|
|
||||||
// if (!compare)
|
|
||||||
// continue;
|
|
||||||
// int price = 0;
|
|
||||||
// var pricetemp = BaseRegex.GetDecimalJson(ref str, "item_price");
|
|
||||||
// price = (int)(pricetemp * 100);
|
|
||||||
// if (!string.IsNullOrEmpty(id) && price > 0)
|
|
||||||
// result.Add(new Tuple<string, int, int,string>("tb-" + id, price, price, DateTime.Now.ToString("yyyy-MM-dd")));
|
|
||||||
// if (result.Count >= 10)
|
|
||||||
// break;
|
|
||||||
//}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<Tuple<string, int, int, string>> GetTuplejingxiListV2Data(string title, string weidianGetTitleResult)
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int, string>>();
|
|
||||||
if (weidianGetTitleResult == null)
|
|
||||||
return result;
|
|
||||||
Newtonsoft.Json.Linq.JArray jArr = new Newtonsoft.Json.Linq.JArray();
|
|
||||||
Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
jArr = jObj["wareInfo"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
if (jArr == null)
|
|
||||||
return result;
|
|
||||||
var resultx = new List<Tuple<string, int, int, double, string>>();
|
|
||||||
foreach (var item in jArr)
|
|
||||||
{
|
|
||||||
var str = item.ToString();
|
|
||||||
var id = BaseRegex.GetStringJson(ref str, "wareId");
|
|
||||||
if (id == null)
|
|
||||||
continue;
|
|
||||||
string name = BaseRegex.GetStringJson(ref str, "wname");
|
|
||||||
double simu = BaseClass.GetSimularityBetween2Text(title, name);
|
|
||||||
if (simu < 0.8)
|
|
||||||
continue;
|
|
||||||
//bool compare = CompareTitle(title, name);
|
|
||||||
//if (!compare)
|
|
||||||
// continue;
|
|
||||||
int price = 0;
|
|
||||||
var pricetemp = BaseRegex.GetDecimalJson(ref str, "jdPrice");
|
|
||||||
price = (int)(pricetemp * 100);
|
|
||||||
if (!string.IsNullOrEmpty(id) && price > 0)
|
|
||||||
resultx.Add(new Tuple<string, int, int,double,string>("jx-" + id, price, price,simu, DateTime.Now.ToString("yyyy-MM-dd")));
|
|
||||||
if (resultx.Count >= 10)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
resultx = resultx.OrderByDescending(o => o.Item4).ToList();
|
|
||||||
for (int i = 0; i < resultx.Count; i++)
|
|
||||||
{
|
|
||||||
var obj = resultx[i];
|
|
||||||
result.Add(new Tuple<string, int, int, string>(obj.Item1, obj.Item2, obj.Item3, obj.Item5));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<Tuple<string, int, int,string>> GetTuple1688ListData(string title,string weidianGetTitleResult)
|
|
||||||
{
|
|
||||||
var result = new List<Tuple<string, int, int,string>>();
|
|
||||||
if (weidianGetTitleResult == null)
|
|
||||||
return result;
|
|
||||||
//if (weidianGetTitleResult.Contains("\\\"message\\\":\\\"OK\\\""))
|
|
||||||
//{
|
|
||||||
// Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
// weidianGetTitleResult = jObj["data"].ToString();
|
|
||||||
//}
|
|
||||||
Newtonsoft.Json.Linq.JArray jArr = new Newtonsoft.Json.Linq.JArray();
|
|
||||||
//if (weidianGetTitleResult.Contains("\"message\":\"OK\""))
|
|
||||||
//{
|
|
||||||
// Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
// jArr = jObj["result"]["viewContainer"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
//}
|
|
||||||
if (weidianGetTitleResult.Contains("mtopjsonp17("))
|
|
||||||
weidianGetTitleResult = BaseRegex.GetMatchRegexString(ref weidianGetTitleResult, @"mtopjsonp17\(({[\w\W]+?})\)");
|
|
||||||
if (weidianGetTitleResult.Contains("\"data\":{"))
|
|
||||||
{
|
|
||||||
Newtonsoft.Json.Linq.JObject jObj = Newtonsoft.Json.Linq.JObject.Parse(weidianGetTitleResult);
|
|
||||||
jArr = jObj["data"]?["offerList"] as Newtonsoft.Json.Linq.JArray;
|
|
||||||
//var lst = jObj["data"]["resultList"].ToList();
|
|
||||||
//var ss = JArray.Parse(jObj["data"]?["recommend"]?["resultList"]?.ToString())?.ToObject<List<Object>>();
|
|
||||||
}
|
|
||||||
if (jArr == null)
|
|
||||||
return result;
|
|
||||||
var resultx = new List<Tuple<string, int, int, double, string>>();
|
|
||||||
foreach (var item in jArr)
|
|
||||||
{
|
|
||||||
var str = item.ToString();
|
|
||||||
var id = BaseRegex.GetStringJson(ref str, "infoId");
|
|
||||||
string name = BaseRegex.GetStringJson(ref str, "simpleSubject");
|
|
||||||
double simu = BaseClass.GetSimularityBetween2Text(title, name);
|
|
||||||
if (simu < 0.5)
|
|
||||||
continue;
|
|
||||||
bool compare = CompareTitle(title, name);
|
|
||||||
if (!compare)
|
|
||||||
continue;
|
|
||||||
int price = 0;
|
|
||||||
var pricetemp = BaseRegex.GetDecimalJson(ref str, "price");
|
|
||||||
price = (int)(pricetemp * 100);
|
|
||||||
if (!string.IsNullOrEmpty(id) && price > 0)
|
|
||||||
resultx.Add(new Tuple<string, int, int,double,string>("al-" + id, price, price,simu,DateTime.Now.ToString("yyyy-MM-dd")));
|
|
||||||
if (resultx.Count >= 10)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
resultx = resultx.OrderByDescending(o => o.Item4).ToList();
|
|
||||||
for (int i = 0; i < resultx.Count; i++)
|
|
||||||
{
|
|
||||||
var obj = resultx[i];
|
|
||||||
result.Add(new Tuple<string, int, int, string>(obj.Item1, obj.Item2, obj.Item3, obj.Item5));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool CompareTitle(string title,string name)
|
|
||||||
{
|
|
||||||
if ((name.Length < title.Length + 10) || name.Length <= 30)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,782 +0,0 @@
|
|||||||
using AllBase;
|
|
||||||
using AllBase.Helper;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.IO.Compression;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Net;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Work.Api;
|
|
||||||
|
|
||||||
namespace Work.Business.ProductMappingBLL
|
|
||||||
{
|
|
||||||
|
|
||||||
public class WeiDianCollectBLL
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 微店采集是否进行
|
|
||||||
/// </summary>
|
|
||||||
public static bool WdCollecting { get; set; } = false;
|
|
||||||
|
|
||||||
//伪装成百度蜘蛛访问
|
|
||||||
private static string sUserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 微店采集进行中
|
|
||||||
/// </summary>
|
|
||||||
internal static bool BWDCollecting;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 微店店铺ID
|
|
||||||
/// </summary>
|
|
||||||
private static long lWdShopId;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 同行店铺Ids
|
|
||||||
/// </summary>
|
|
||||||
private static List<string> lstColleagueShopId = new List<string>();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 采集区号
|
|
||||||
/// </summary>
|
|
||||||
private static int SectionNo;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 采集客户端的公网IP
|
|
||||||
/// </summary>
|
|
||||||
private static string PubIp;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 服务调用时间间隔基准(实际时间以此为基本随机上下浮动)
|
|
||||||
/// </summary>
|
|
||||||
private static int iTimeSpan;
|
|
||||||
|
|
||||||
private static readonly object _locker = new object();
|
|
||||||
|
|
||||||
public static void StartWeiDianCollect()
|
|
||||||
{
|
|
||||||
//读取服务端的采集设置 1-功能开关; 2-请求间隔(s)
|
|
||||||
string sServerCfg = ArchiveWdCollectionConfigFromServer();
|
|
||||||
if (string.IsNullOrEmpty(sServerCfg)) return;
|
|
||||||
string[] sConfig = sServerCfg.Split(',');
|
|
||||||
if (sConfig.Length != 2) return;
|
|
||||||
if (sConfig[0].Equals("0")) return;
|
|
||||||
iTimeSpan = int.Parse(sConfig[1]);
|
|
||||||
|
|
||||||
//获取公网IP
|
|
||||||
PubIp = GetPublicIp();
|
|
||||||
if (string.IsNullOrEmpty(PubIp)) return;
|
|
||||||
|
|
||||||
//根据公网IP去服务端取采集区号(1-20亿,分2000段,每段100万笔采集量)
|
|
||||||
string sSecNoAndCollectCount = GetCollectSectionNoFromServer();
|
|
||||||
if (string.IsNullOrEmpty(sSecNoAndCollectCount)) return;
|
|
||||||
string[] sRes = sSecNoAndCollectCount.Split(',');
|
|
||||||
SectionNo = int.Parse(sRes[0]);
|
|
||||||
//如果此公网IP采集状态为1-采集中 2-限制或已经采集完毕,则返回
|
|
||||||
if (SectionNo < 0)
|
|
||||||
{
|
|
||||||
//MessageBox.Show(PubIp + " 不可进行采集!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (sRes.Length != 2) return;
|
|
||||||
WdCollecting = true;
|
|
||||||
int iCollectedCount = int.Parse(sRes[1]);
|
|
||||||
if (iCollectedCount >= 1000000)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
iTimeSpanMin = iTimeSpan;
|
|
||||||
iTimeSpanMax = iTimeSpan + 3;
|
|
||||||
Thread thread = new Thread(AutoUpdateCollectInfo)
|
|
||||||
{
|
|
||||||
IsBackground = true
|
|
||||||
};
|
|
||||||
thread.Start();
|
|
||||||
|
|
||||||
Task.Factory.StartNew(() =>
|
|
||||||
{
|
|
||||||
Random random = new Random();
|
|
||||||
string sWdRes = string.Empty;
|
|
||||||
|
|
||||||
//MessageBox.Show("已开启微店采集,将从" + (SectionNo * 1000000 + iCollectedCount + 1) + "开始");
|
|
||||||
for (lWdShopId = SectionNo * 1000000 + iCollectedCount + 1; lWdShopId <= (SectionNo + 1) * 1000000 && WdCollecting; lWdShopId++)
|
|
||||||
{
|
|
||||||
int iRetryCnt = 0;
|
|
||||||
MakeReq:
|
|
||||||
Thread.Sleep(Randomx.GetId(iTimeSpanMin, iTimeSpanMax) * 100);
|
|
||||||
sWdRes = MakeRequestWd4GetColleagueShops(lWdShopId);
|
|
||||||
if (sWdRes.Length == 0)
|
|
||||||
{
|
|
||||||
//此IP被限制,更新服务端采集状态为2
|
|
||||||
UpdateCollectStatusFromServer(2);
|
|
||||||
WdCollecting = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!sWdRes.Contains("shopItems\""))
|
|
||||||
{
|
|
||||||
if (sWdRes.Contains("请稍后重试"))
|
|
||||||
{
|
|
||||||
sUserAgent = GetHtml.UserAgent.Split('\n')[new Random(Guid.NewGuid().GetHashCode()).Next(GetHtml.UserAgent.Split('\n').Length)].Trim();
|
|
||||||
}
|
|
||||||
iRetryCnt++;
|
|
||||||
if (iRetryCnt > 10)
|
|
||||||
{
|
|
||||||
//此IP被限制,更新服务端采集状态为2
|
|
||||||
UpdateCollectStatusFromServer(2);
|
|
||||||
WdCollecting = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Thread.Sleep(Randomx.GetId(iTimeSpanMin, iTimeSpanMax) * 100);
|
|
||||||
goto MakeReq;
|
|
||||||
}
|
|
||||||
if (!sWdRes.Contains("shopItems\":{\"items\":[{\""))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
lock (_locker)
|
|
||||||
{
|
|
||||||
lstColleagueShopId.Add(lWdShopId.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
WdCollecting = false;
|
|
||||||
UpdateCollectStatusFromServer(0);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private static int iTimeSpanMin;
|
|
||||||
private static int iTimeSpanMax;
|
|
||||||
private static void AutoUpdateCollectInfo()
|
|
||||||
{
|
|
||||||
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
if (lstColleagueShopId.Count == 0 && !WdCollecting)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (lWdShopId > 0)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
UpdateColleagueShopIdsAndCollectCountFromServer();
|
|
||||||
lock (_locker)
|
|
||||||
{
|
|
||||||
lstColleagueShopId.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Thread.Sleep(Randomx.GetId(5, 10) * 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新服务端的同行店铺Ids以及已采集数量
|
|
||||||
/// </summary>
|
|
||||||
private static void UpdateColleagueShopIdsAndCollectCountFromServer()
|
|
||||||
{
|
|
||||||
string requestData = "shopIds=" + GetHtml.UrlEncodeUtf8(string.Join(",", lstColleagueShopId)) + "&collect_ip=" + PubIp + "&collect_number=" + (lWdShopId - SectionNo * 1000000);
|
|
||||||
string url = BaseClass.LoginApiUrl + "?obj=product/collect&act=add_collect_data";
|
|
||||||
GoAheadSupportRetry(url, requestData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新服务端的同行店铺Ids以及已采集数量
|
|
||||||
/// </summary>
|
|
||||||
private static string ArchiveWdCollectionConfigFromServer()
|
|
||||||
{
|
|
||||||
string url = BaseClass.LoginApiUrl + "?obj=product/collect&act=get_collect_config";
|
|
||||||
return GoAheadSupportRetry(url, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 更新指定IP的采集状态
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sPubIp">公网IP</param>
|
|
||||||
/// <param name="iStatus">采集状态</param>
|
|
||||||
public static void UpdateCollectStatusFromServer(int iStatus)
|
|
||||||
{
|
|
||||||
//调用php后台更新指定IP的采集状态
|
|
||||||
string requestData = "collect_ip=" + PubIp + "&collect_status=" + iStatus;
|
|
||||||
string url = BaseClass.LoginApiUrl + "?obj=product/collect&act=update_collect";
|
|
||||||
GoAheadSupportRetry(url, requestData);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetCollectSectionNoFromServer()
|
|
||||||
{
|
|
||||||
//调用php后台获取指定IP的采集区号
|
|
||||||
string requestData = "collect_ip=" + PubIp;
|
|
||||||
string url = BaseClass.LoginApiUrl + "?obj=product/collect&act=get_collect_code";
|
|
||||||
return GoAheadSupportRetry(url, requestData);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GoAheadSupportRetry(string sUrl, string sReqData, int iRetryMax = 3)
|
|
||||||
{
|
|
||||||
int iRetryCnt = 0;
|
|
||||||
string result;
|
|
||||||
GoAhead:
|
|
||||||
result = GetHtml.PostUtf8(sUrl, sReqData);
|
|
||||||
if (string.IsNullOrEmpty(result) && iRetryCnt < iRetryMax)
|
|
||||||
{
|
|
||||||
iRetryCnt++;
|
|
||||||
Thread.Sleep(Randomx.GetId(50, 500));
|
|
||||||
goto GoAhead;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取公网IP
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>公网IP地址</returns>
|
|
||||||
private static string GetPublicIp()
|
|
||||||
{
|
|
||||||
HttpWebResponse response;
|
|
||||||
string sRes = string.Empty;
|
|
||||||
if (Request_2000019_ip138_com(out response))
|
|
||||||
{
|
|
||||||
sRes = ReadResponse(response);
|
|
||||||
if (sRes.Length > 0)
|
|
||||||
{
|
|
||||||
Match mh = Regex.Match(sRes, "您的IP地址是:([\\w\\W]+?)</title>");
|
|
||||||
if (mh.Length > 0)
|
|
||||||
{
|
|
||||||
sRes = mh.Groups[1].Value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sRes = string.Empty;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
response.Close();
|
|
||||||
}
|
|
||||||
return sRes;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string ReadResponse(HttpWebResponse response)
|
|
||||||
{
|
|
||||||
using (Stream responseStream = response.GetResponseStream())
|
|
||||||
{
|
|
||||||
Stream streamToRead = responseStream;
|
|
||||||
if (response.ContentEncoding.ToLower().Contains("gzip"))
|
|
||||||
{
|
|
||||||
streamToRead = new GZipStream(streamToRead, CompressionMode.Decompress);
|
|
||||||
}
|
|
||||||
else if (response.ContentEncoding.ToLower().Contains("deflate"))
|
|
||||||
{
|
|
||||||
streamToRead = new DeflateStream(streamToRead, CompressionMode.Decompress);
|
|
||||||
}
|
|
||||||
|
|
||||||
using (StreamReader streamReader = new StreamReader(streamToRead, Encoding.UTF8))
|
|
||||||
{
|
|
||||||
return streamReader.ReadToEnd();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool Request_2000019_ip138_com(out HttpWebResponse response)
|
|
||||||
{
|
|
||||||
response = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://2000019.ip138.com/");
|
|
||||||
|
|
||||||
request.KeepAlive = true;
|
|
||||||
request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
|
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", @"1");
|
|
||||||
request.UserAgent = sUserAgent;
|
|
||||||
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9";
|
|
||||||
request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate");
|
|
||||||
request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9,en;q=0.8");
|
|
||||||
request.Headers.Set(HttpRequestHeader.Cookie, @"PHPSESSID=gouadr6cgch4h4st8pdi1gavp3; ASPSESSIONIDASBCSTBS=JOPDALEBHONGIBJHJPPJFPDJ");
|
|
||||||
|
|
||||||
response = (HttpWebResponse)request.GetResponse();
|
|
||||||
}
|
|
||||||
catch (WebException e)
|
|
||||||
{
|
|
||||||
if (e.Status == WebExceptionStatus.ProtocolError) response = (HttpWebResponse)e.Response;
|
|
||||||
else return false;
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
if (response != null) response.Close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string MakeRequestWd4GetColleagueShops(long lShopId)
|
|
||||||
{
|
|
||||||
HttpWebResponse response;
|
|
||||||
var v = "";
|
|
||||||
if (Request_weidian_com(lShopId, out response))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
using (StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
|
|
||||||
{
|
|
||||||
v = sr.ReadToEnd();
|
|
||||||
}
|
|
||||||
response.Close();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool Request_weidian_com(long lShopId, out HttpWebResponse response)
|
|
||||||
{
|
|
||||||
response = null;
|
|
||||||
MakeRequestWd:
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//获取店铺第1000+商品信息
|
|
||||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://thor.weidian.com/ares/shop.getItemsInShop/1.0?param={\"shopId\":\"" + lShopId + "\",\"page\":11,\"limit\":100}");
|
|
||||||
request.KeepAlive = true;
|
|
||||||
request.Timeout = 15000;
|
|
||||||
request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0");
|
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", @"1");
|
|
||||||
request.UserAgent = sUserAgent;
|
|
||||||
request.Headers.Add("Sec-Fetch-User", @"?1");
|
|
||||||
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9";
|
|
||||||
request.Headers.Add("Sec-Fetch-Site", @"none");
|
|
||||||
request.Headers.Add("Sec-Fetch-Mode", @"navigate");
|
|
||||||
request.Headers.Set(HttpRequestHeader.AcceptEncoding, "deflate, br");
|
|
||||||
request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9,en;q=0.8");
|
|
||||||
//request.Headers.Set(HttpRequestHeader.Cookie, @"__spider__visitorid=99847ca38c8d6d84; vc_fpcookie=d09a621b-a4c6-d905-0177-9da2ce436be1; vc_device_id=d496a1adb4f8b88d65cb30de7264031a; login_token=_EwWqqVIQEOZk3K4Xlw_Jg9LlPshZBhdbAvfITT9_RjRD4NcDyFJyjJbYfnhizpflOAvHfG7PSMovzOj4ejBjwzfzrKMKMUcsDhgsUlZEVouSxvo1LW0VS9eKDZ828OLKQsajaJG78ddJmfGxxrUPHJEU84juJHaEPl_TuzFNJSLgN9_LqOI; is_login=true; login_type=LOGIN_USER_TYPE_MASTER; login_source=LOGIN_USER_SOURCE_MASTER; uid=316846450; sid=316846450; token=; isLogin=; loginUserType=; loginUserSource=; WD_b_wduss=; WD_s_wduss=; WD_b_id=; WD_s_id=; WD_b_country=; WD_b_tele=; WD_s_tele=; WD_seller=; vc_token_id=8903a2e4-00d2-220c-8967-a4acf4fbcce1-16f6563b2b8-3a46; WD_wfr=shop; unreadMsg=0; WD_guid=1577962261222_1977684674589264; v-components/cpn-coupon-dialog@iwdDefault=1; CartreferrerURl=shopid_212239496; __spider__sessionid=455f3f04f7aaf1bb; wdtoken=c511ac4f; is_follow_mp=0; cart_inner_item_count=0");
|
|
||||||
|
|
||||||
response = (HttpWebResponse)request.GetResponse();
|
|
||||||
}
|
|
||||||
catch (WebException e)
|
|
||||||
{
|
|
||||||
if (e.Message.Contains("超时"))
|
|
||||||
{
|
|
||||||
Thread.Sleep(Randomx.GetId(1, 5) * 1000);
|
|
||||||
goto MakeRequestWd;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
if (ex.Message.Contains("超时"))
|
|
||||||
{
|
|
||||||
Thread.Sleep(Randomx.GetId(1, 5) * 1000);
|
|
||||||
goto MakeRequestWd;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Random random = new Random();
|
|
||||||
public static string[] arrSignSvrWeidian;
|
|
||||||
//private static string[] arrSignSvrWeidian = "26t606j345.zicp.vip:48932;2664638a6k.qicp.vip;2664638a6k.qicp.vip:12393".Split(';');
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// WeiDian Context集合
|
|
||||||
/// </summary>
|
|
||||||
private static string[] arrWeiDianContext = null;
|
|
||||||
/// <summary>
|
|
||||||
/// 微店app接口api版本
|
|
||||||
/// </summary>
|
|
||||||
private static List<string> thorVers = "2.4,2.6".Split(',').ToList();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 通过关键词(或标题)搜索微店商品
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sSearchKeyword">搜索关键词或标题</param>
|
|
||||||
/// <param name="dPriceMin">价格最低价,不限制传0</param>
|
|
||||||
/// <param name="dPriceMax">价格最高价,不限制传0</param>
|
|
||||||
/// <param name="iPage">搜索页数,从1开始</param>
|
|
||||||
/// <param name="bEncryptResponse">是否调用加密接口</param>
|
|
||||||
/// <param name="bHookMode">是否通过hook方式</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static string SearchWdProductsByKeywords(string sSearchKeyword, double dPriceMin = 0, double dPriceMax = 0, int iPage = 1, bool bEncryptResponse = false, bool bHookMode = false)
|
|
||||||
{
|
|
||||||
#region Random params Prevent being restricted
|
|
||||||
long lTimeStampMilli = BaseClass.ConvertDateTimeLong();
|
|
||||||
string sSign = Md5Base.GetMd5(lTimeStampMilli / 1000 + "nbytht");
|
|
||||||
int index = random.Next(0, arrSignSvrWeidian.Length);
|
|
||||||
string sSignSvrWeidian = arrSignSvrWeidian[index];
|
|
||||||
//随机参数全部移至hook App端完成以节省传输带宽
|
|
||||||
//string sAndroidId = BaseClass.GetRandomAlphanumeric(16).ToLower();
|
|
||||||
//string sBrand = "Huawei,HONOR,Xiaomi,Meizu,samsung,Lenovo,zte,htc,nubia".Split(',')[random.Next(0, 9)];
|
|
||||||
string sCuid = Guid.NewGuid().ToString().Replace("-", "");
|
|
||||||
//string sImei = BaseClass.GetRandromNumeral(15);
|
|
||||||
//经纬度随机
|
|
||||||
//string sLat = (random.NextDouble() * (53.550000 - 3.860000) + 3.860000).ToString("f6");
|
|
||||||
//string sLon = (random.NextDouble() * (135.050000 - 73.660000) + 73.660000).ToString("f6");
|
|
||||||
//string sMac = BaseClass.RandomMacAddress().ToUpper();
|
|
||||||
//string sWmac = BaseClass.RandomMacAddress().ToLower();
|
|
||||||
string sFootprintId = sCuid + "_" + lTimeStampMilli;
|
|
||||||
string sChoicePrices = string.Empty;
|
|
||||||
if (dPriceMax > 0 || dPriceMin > 0)
|
|
||||||
{
|
|
||||||
sChoicePrices = (dPriceMin > 0 ? dPriceMin.ToString() : " ") + "-" + (dPriceMax > 0 ? dPriceMax.ToString() : " ");
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 构造PostData原文并通过hook得到PostData密文
|
|
||||||
//先从后台获取WdContext集合
|
|
||||||
if (arrWeiDianContext == null)
|
|
||||||
{
|
|
||||||
arrWeiDianContext = GetWdContextService();
|
|
||||||
}
|
|
||||||
int iTryTimes = 0;
|
|
||||||
LbHookPostData:
|
|
||||||
index++;
|
|
||||||
if (index > 2)
|
|
||||||
index = 0;
|
|
||||||
sSignSvrWeidian = arrSignSvrWeidian[index];
|
|
||||||
string sContext = arrWeiDianContext[Randomx.GetId(arrWeiDianContext.Length)];
|
|
||||||
string sParam = @"{""area"":"""",""brands"":[],""chosePoints"":"""",""chosePrices"":""" + sChoicePrices + @""",""coreWord"":"""",""footprintId"":""" + sFootprintId + @""",""id"":""" + sSearchKeyword + @""",""increServices"":[],""keyword"":""" + sSearchKeyword + @""",""limit"":16,""order"":""desc"",""page"":" + iPage + @",""remind"":1,""search_wfr"":""search_input"",""sortKey"":""price"",""source"":""1"",""tab"":""all"",""tags"":[],""wdServices"":[]}";
|
|
||||||
string sPostData = @"v=2.0×tamp=" + lTimeStampMilli + @"&appkey=06475281&context=" + HttpHelper.UrlEncode(sContext) + "¶m=" + HttpHelper.UrlEncode(sParam);
|
|
||||||
|
|
||||||
//不走hook方式,走直调接口方式
|
|
||||||
if (!bHookMode)
|
|
||||||
{
|
|
||||||
string platForm = new string[] { "ios", "android" }.ToList()[random.Next(2)];
|
|
||||||
string thorVer = thorVers[random.Next(thorVers.Count)];
|
|
||||||
string userAgent = $"{platForm.ToUpper()}/{random.Next(5, 8)}.{random.Next(0, 3)}.{random.Next(5)} WDAPP(WDBuyer/{random.Next(5, 8)}.{random.Next(0, 3)}.{random.Next(5)}) Thor/{thorVer}.6.6";
|
|
||||||
return HttpHelper.Post(new AllBase.Helper.HttpParam() { Url = $"http://thor.weidian.com/faith/search.item/{thorVer}", Method = "POST", PostData = sPostData, Referer = $"https://{platForm}.weidian.com", UserAgent = userAgent });
|
|
||||||
}
|
|
||||||
|
|
||||||
//走hook方式
|
|
||||||
AllBase.Helper.HttpParam httpParamRequest = new AllBase.Helper.HttpParam
|
|
||||||
{
|
|
||||||
Url = $"http://{sSignSvrWeidian}/sign/do.json?action=request&nb_timestamp={lTimeStampMilli / 1000}&nb_sign={sSign}&mode=0",
|
|
||||||
PostData = sPostData,
|
|
||||||
Timeout = 10,
|
|
||||||
ContentType = "application/x-www-form-urlencoded; charset=utf-8"
|
|
||||||
};
|
|
||||||
string requestResult = string.Empty;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Thread.Sleep(random.Next(1, 3) * 1000);
|
|
||||||
requestResult = HttpHelper.Post(httpParamRequest);
|
|
||||||
if (string.IsNullOrEmpty(requestResult) )
|
|
||||||
{
|
|
||||||
if (ProductMapping.ischeck)
|
|
||||||
UploadPinduoduoMain.CheckSearch = false;
|
|
||||||
LogSave.Add("标题搜索sign为空"+ sSignSvrWeidian);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogSave.Add("微店标题搜索接口请求异常:" + ex.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!requestResult.Contains("data") && iTryTimes < 1)
|
|
||||||
{
|
|
||||||
Thread.Sleep(random.Next(2, 3) * 1000);
|
|
||||||
iTryTimes++;
|
|
||||||
goto LbHookPostData;
|
|
||||||
}
|
|
||||||
if (!requestResult.Contains("data")) return "";
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 发送PostData密文去请求微店接口 可得到ResponseData明文,也可得到ResponseData密文
|
|
||||||
AllBase.Helper.HttpParam httpParamWeiDian = new AllBase.Helper.HttpParam
|
|
||||||
{
|
|
||||||
Url = "http://thor.weidian.com/faith/search.item/2.4",
|
|
||||||
UserAgent = "Android/6.0.1 WDAPP(WDBuyer/6.0.3) Thor/2.3.6.3",
|
|
||||||
Timeout = 6,
|
|
||||||
Referer = "https://android.weidian.com",
|
|
||||||
ContentType = "application/x-www-form-urlencoded; charset=utf-8",
|
|
||||||
Header = new Dictionary<string, string>()
|
|
||||||
};
|
|
||||||
httpParamWeiDian.Header.Add("accept-encoding", bEncryptResponse ? "GLZip" : "Deflate");
|
|
||||||
httpParamWeiDian.Header.Add("x-origin", "thor");
|
|
||||||
httpParamWeiDian.Header.Add("x-schema", "https");
|
|
||||||
httpParamWeiDian.Header.Add("x-encrypt", bEncryptResponse ? "1" : "0");
|
|
||||||
httpParamWeiDian.Header.Add("origin", "android.weidian.com");
|
|
||||||
httpParamWeiDian.PostData = HtmlHelper.Resove(requestResult, "\"data\":\"", "\"");
|
|
||||||
if (!bEncryptResponse)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Thread.Sleep(random.Next(1, 6) * 1000);
|
|
||||||
requestResult = HttpHelper.Post(httpParamWeiDian);
|
|
||||||
if (string.IsNullOrEmpty(requestResult))
|
|
||||||
{
|
|
||||||
if (ProductMapping.ischeck)
|
|
||||||
UploadPinduoduoMain.CheckSearch = false;
|
|
||||||
LogSave.Add("标题搜索返回数据为空");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (ProductMapping.ischeck)
|
|
||||||
UploadPinduoduoMain.CheckSearch = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogSave.Add("微店标题搜索接口请求异常:" + ex.Message);
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return requestResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
var result = PostByte(httpParamWeiDian);
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 将ResponseData密文通过hook得到ResponseData原文
|
|
||||||
string base64 = Convert.ToBase64String(result);
|
|
||||||
AllBase.Helper.HttpParam httpParamResponse = new AllBase.Helper.HttpParam
|
|
||||||
{
|
|
||||||
Url = $"http://{sSignSvrWeidian}/sign/do.json?action=response&nb_timestamp={lTimeStampMilli / 1000}&nb_sign={sSign}",
|
|
||||||
PostData = "data=" + HttpHelper.UrlEncode(base64),
|
|
||||||
ContentType = "application/x-www-form-urlencoded; charset=utf-8"
|
|
||||||
};
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Thread.Sleep(random.Next(1, 3) * 1000);
|
|
||||||
requestResult = HttpHelper.Post(httpParamResponse);
|
|
||||||
if (string.IsNullOrEmpty(requestResult))
|
|
||||||
LogSave.Add("标题搜索返回数据为空");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogSave.Add("微店标题搜索接口请求异常:" + ex.Message);
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return requestResult;
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
//微店不加密接口已失效
|
|
||||||
//return HttpHelper.PostUtf8(new HttpParam() { Url = "http://thor.weidian.com/faith/search.item/2.6", Method = "POST", PostData = sPostData, Referer = "https://android.weidian.com", UserAgent = "Android/6.0.1 WDAPP(WDBuyer/6.0.6) Thor/2.3.6.6"});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取WeiDian Context集合
|
|
||||||
/// </summary>
|
|
||||||
private static string[] GetWdContextService()
|
|
||||||
{
|
|
||||||
string url = BaseClass.LoginApiUrl + "/?obj=api/config&act=wd_context_v2";
|
|
||||||
string res = GetHtml.PostUtf8(url, UserLogin.GetSignaturex());
|
|
||||||
if (!string.IsNullOrEmpty(res))
|
|
||||||
{
|
|
||||||
return res.Split(';');
|
|
||||||
}
|
|
||||||
else //默认值
|
|
||||||
{
|
|
||||||
return "{\"appid\":\"wxbuyer\",\"platform\":\"windows\",\"token\":\"_EwWqqVIQEyZKqM2PZUQcHsBRwE4X41-sxHF1SqJBMKW2-Ep2_ZxzVdoS3mvrvYTCcedcJUxCdAZgIkypkz3F811inqWCXWSaHf0yZytHxQQPF0aHUeF769XwaWw9YTrae-VxRE3RW69O6yqFWrj5qamlgfD3SpACdiOJvjxUfdXWKNPP75I\",\"duid\":\"1315506113\",\"uss\":\"_EwWqqVIQEyZKqM2PZUQcHsBRwE4X41-sxHF1SqJBMKW2-Ep2_ZxzVdoS3mvrvYTCcedcJUxCdAZgIkypkz3F811inqWCXWSaHf0yZytHxQQPF0aHUeF769XwaWw9YTrae-VxRE3RW69O6yqFWrj5qamlgfD3SpACdiOJvjxUfdXWKNPP75I\",\"anonymousId\":\"0b40d738ec8016f5ef0e833bf66b8aa87099dfb6\",\"userID\":\"1315506113\",\"wduserID\":\"1315506113\",\"wxappid\":\"wx4b74228baa15489a\"};{\"appid\":\"wxbuyer\",\"platform\":\"windows\",\"token\":\"_EwWqqVIQImnSvEqukYADvVMSBDbMsIttEmXS8YwnHdmlBEG8kLxGxWInk0EXrYqljlRQ5lp2uJUhT0NPcSWsHqVVElpJmXUqiopvGs2HmBWjtr678V0yprAkS9OP3pVsdutyQgzbmYIUhl6PFs7VUEeFM0pNqHBYf_G7TYDljpjFRRG_Cbc\",\"duid\":\"1613253916\",\"uss\":\"_EwWqqVIQImnSvEqukYADvVMSBDbMsIttEmXS8YwnHdmlBEG8kLxGxWInk0EXrYqljlRQ5lp2uJUhT0NPcSWsHqVVElpJmXUqiopvGs2HmBWjtr678V0yprAkS9OP3pVsdutyQgzbmYIUhl6PFs7VUEeFM0pNqHBYf_G7TYDljpjFRRG_Cbc\",\"anonymousId\":\"1b28adc9e6113131422488e3a97f7d0f6df2c833\",\"userID\":\"1613253916\",\"wduserID\":\"1823050762\",\"wxappid\":\"wx4b74228baa15489a\"};{\"appid\":\"wxbuyer\",\"platform\":\"windows\",\"token\":\"_EwWqqVIQa4fD09LpoVv8vECPm18ebpjpxNzDXTBQV2dzCBTLwDU6B8KhNZFIsNJg2Mi5AZxMWSnQkfQvLaPodjEYfXVnXjwBIjKff_iD4TiuEQF6gObB1Dx12jkBLQ2Ztfuz_Wys_n9m0_gDsBfb_QLJp8f9jd8pbx_-6oxm4kMQkq9vaxs\",\"duid\":\"1590515991\",\"uss\":\"_EwWqqVIQa4fD09LpoVv8vECPm18ebpjpxNzDXTBQV2dzCBTLwDU6B8KhNZFIsNJg2Mi5AZxMWSnQkfQvLaPodjEYfXVnXjwBIjKff_iD4TiuEQF6gObB1Dx12jkBLQ2Ztfuz_Wys_n9m0_gDsBfb_QLJp8f9jd8pbx_-6oxm4kMQkq9vaxs\",\"anonymousId\":\"fe0168956c78bc160aa51cadeab4fbf0e841b88a\",\"userID\":\"1590515991\",\"wduserID\":\"1720909970\",\"wxappid\":\"wx4b74228baa15489a\"};{\"appid\":\"wxbuyer\",\"platform\":\"windows\",\"token\":\"_EwWqqVIQWKgZwEXoPyaPyTxVrRnpBvbA4ub2vlaYOIf3sQutH5kaxt5C-eV-srUxI-hDSV5WjqoZc_hAIy7v6KAWaCr1r0SGB91ysDkKLNdqNao-aP9j0P4IZ4m7kBrc4vr0TCOVUi8L_JpEZ32v-HH6ONT6oHd--aAfOqF6JmJAR3J-OZI\",\"duid\":\"1458041550\",\"uss\":\"_EwWqqVIQWKgZwEXoPyaPyTxVrRnpBvbA4ub2vlaYOIf3sQutH5kaxt5C-eV-srUxI-hDSV5WjqoZc_hAIy7v6KAWaCr1r0SGB91ysDkKLNdqNao-aP9j0P4IZ4m7kBrc4vr0TCOVUi8L_JpEZ32v-HH6ONT6oHd--aAfOqF6JmJAR3J-OZI\",\"anonymousId\":\"9740e2814bdda65f15fe00b6baaa20516a6b9ebb\",\"userID\":\"1458041550\",\"wduserID\":\"1775289160\",\"wxappid\":\"wx4b74228baa15489a\"};{\"appid\":\"wxbuyer\",\"platform\":\"windows\",\"token\":\"_EwWqqVIQAbBHv33Hb8h4BTk6D3xDuZ2xb3M_3Qx9BwNiUgBZD5YU_sN-Z5WxWqifRhJpnIBo02A4a0Gd9BhKGlQXVHrjhlqIzWU3t7gOvfAtTkF6zY7lV_hULG3jZ-XxkgmV8m9jKYQMdGw8jw_XqRvUuHZeTW3o1ZifXyPwEp0w1DIYBjo\",\"duid\":\"1457886926\",\"uss\":\"_EwWqqVIQAbBHv33Hb8h4BTk6D3xDuZ2xb3M_3Qx9BwNiUgBZD5YU_sN-Z5WxWqifRhJpnIBo02A4a0Gd9BhKGlQXVHrjhlqIzWU3t7gOvfAtTkF6zY7lV_hULG3jZ-XxkgmV8m9jKYQMdGw8jw_XqRvUuHZeTW3o1ZifXyPwEp0w1DIYBjo\",\"anonymousId\":\"c946abdbbf6d2b176c5dafc115ccfa4407cc9b96\",\"userID\":\"1457886926\",\"wduserID\":\"1728949064\",\"wxappid\":\"wx4b74228baa15489a\"};{\"appid\":\"wxbuyer\",\"platform\":\"windows\",\"token\":\"_EwWqqVIQW0SLhMjMF--dXY8z4sLNA3i5yMCTOiAPdb8FGVrzqA_AxJ5aE-DtSbMhMEDgz2Pp59KBt26jK9WkaJPGfGtc8kRu8s40RdEhBk2i4rIKIPBAXSl6-jS-4NH0PZe00q3ppBYuvjfFfoeZeBfCdiA4K4G5G4NvExeEm1RXBLeGz8c\",\"duid\":\"1457941037\",\"uss\":\"_EwWqqVIQW0SLhMjMF--dXY8z4sLNA3i5yMCTOiAPdb8FGVrzqA_AxJ5aE-DtSbMhMEDgz2Pp59KBt26jK9WkaJPGfGtc8kRu8s40RdEhBk2i4rIKIPBAXSl6-jS-4NH0PZe00q3ppBYuvjfFfoeZeBfCdiA4K4G5G4NvExeEm1RXBLeGz8c\",\"anonymousId\":\"ef346e978e0e576758509467fadbc4d7a8c3c7d0\",\"userID\":\"1457941037\",\"wduserID\":\"1746010952\",\"wxappid\":\"wx4b74228baa15489a\"};{\"appid\":\"wxbuyer\",\"platform\":\"windows\",\"token\":\"_EwWqqVIQfrm41rMjm-1cmkdyFH2WD0Rd8omOQkZMWyMXqTTIzXPGF_kh1kdAGULBIQn6IM_82tKHzxCpzQvpTpVpNPBY5xBrrc04ZmKq4lgi3f-hs16Nlay9KHB5x4AmHES3zNHL2NrHODzriqgnQrMN-tp1m0k-aU4SzIjjrIrWhvvKx48\",\"duid\":\"1457948637\",\"uss\":\"_EwWqqVIQfrm41rMjm-1cmkdyFH2WD0Rd8omOQkZMWyMXqTTIzXPGF_kh1kdAGULBIQn6IM_82tKHzxCpzQvpTpVpNPBY5xBrrc04ZmKq4lgi3f-hs16Nlay9KHB5x4AmHES3zNHL2NrHODzriqgnQrMN-tp1m0k-aU4SzIjjrIrWhvvKx48\",\"anonymousId\":\"d5e95317c5e65351a64b4cffd9af0d51b60f7102\",\"userID\":\"1457948637\",\"wduserID\":\"1716544328\",\"wxappid\":\"wx4b74228baa15489a\"};{\"appid\":\"wxbuyer\",\"platform\":\"windows\",\"token\":\"_EwWqqVIQIx4ntFzDm50GX5WS1aWQuasH1x-Epv5HAlG60iSG6OdlnxQ_FspOnIq4FFQXgCtMoOCDzuTPFLZ3l0oLQ2ewticmOLLd90KgCkt0cUNELEen2nrrT06kmvij2yjFAWGiHqZRp2aGXAVm_OTW40ktzSFEShdjZIvgM02mS00ZDlI\",\"duid\":\"1613513032\",\"uss\":\"_EwWqqVIQIx4ntFzDm50GX5WS1aWQuasH1x-Epv5HAlG60iSG6OdlnxQ_FspOnIq4FFQXgCtMoOCDzuTPFLZ3l0oLQ2ewticmOLLd90KgCkt0cUNELEen2nrrT06kmvij2yjFAWGiHqZRp2aGXAVm_OTW40ktzSFEShdjZIvgM02mS00ZDlI\",\"anonymousId\":\"f0cd1119c8cf0cecce0fa6af90531a7ffc258e6f\",\"userID\":\"1613513032\",\"wduserID\":\"1794619402\",\"wxappid\":\"wx4b74228baa15489a\"}".Split(';'); ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string userAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36";
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取指定微店商品标题_商品网页获取模式(目前暂未遇到采集限制,故无法确切做限制过滤)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="itemId">微店商品id</param>
|
|
||||||
/// <param name="iMaxTryTimes">最大重试次数</param>
|
|
||||||
/// <returns>商品标题(为空则表示商品不存在)</returns>
|
|
||||||
public static string GetProductTitleByHtml(string itemId, int iMaxTryTimes = 1)
|
|
||||||
{
|
|
||||||
int iTryTimes = 0;
|
|
||||||
while(iTryTimes++ < iMaxTryTimes)
|
|
||||||
{
|
|
||||||
string wdToken = BaseClass.GetRandomAlphanumeric(8).ToLower(); //随机参数 wdtoken=f1565ee9
|
|
||||||
AllBase.Helper.HttpParam httpParam = new AllBase.Helper.HttpParam
|
|
||||||
{
|
|
||||||
Url = $"https://weidian.com/item.html?itemID={itemId}",
|
|
||||||
Referer = $"https://weidian.com/item.html?itemID={itemId}&spider_token={BaseClass.GetRandomAlphanumeric(4).ToLower()}",
|
|
||||||
UserAgent = GetProxyHtml.UserAgentList?.Count > 0
|
|
||||||
? GetProxyHtml.UserAgentList[Randomx.GetId(GetProxyHtml.UserAgentList.Count)]
|
|
||||||
: userAgent,
|
|
||||||
Timeout = 10,
|
|
||||||
Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
|
|
||||||
Cookie = $"wdtoken={wdToken}; __spider__visitorid={BaseClass.GetRandomAlphanumeric(16).ToLower()}; visitor_id={BaseClass.GetRandomAlphanumeric(8).ToLower()}-{BaseClass.GetRandomAlphanumeric(4).ToLower()}-{BaseClass.GetRandomAlphanumeric(4).ToLower()}-{BaseClass.GetRandomAlphanumeric(4).ToLower()}-{BaseClass.GetRandomAlphanumeric(12).ToLower()}"
|
|
||||||
};
|
|
||||||
string res = HttpHelper.Get(httpParam);
|
|
||||||
string itemTitle = BaseRegex.GetMatchMaxRegexString(ref res, "<span[\\s]*class=\"item-name\">([\\w\\W]+?)</span>");
|
|
||||||
if(!string.IsNullOrEmpty(itemTitle))
|
|
||||||
{
|
|
||||||
return itemTitle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取指定微店商品标题_商品Api获取模式(目前暂未遇到采集限制,故无法确切做限制过滤)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="itemId">微店商品id</param>
|
|
||||||
/// <returns>商品详情数据</returns>
|
|
||||||
public static string GetProductDetailByApi(string itemId)
|
|
||||||
{
|
|
||||||
string wdToken = BaseClass.GetRandomAlphanumeric(8).ToLower(); //随机参数 wdtoken=f1565ee9
|
|
||||||
AllBase.Helper.HttpParam httpParam = new AllBase.Helper.HttpParam
|
|
||||||
{
|
|
||||||
Url = $"https://thor.weidian.com/detail/getItemSkuInfo/1.0?param=%7B%22itemId%22%3A%22{itemId}%22%7D&wdtoken={wdToken}&_={BaseClass.ConvertDateTimeLong()}",
|
|
||||||
Referer = $"https://weidian.com/item.html?itemID={itemId}&spider_token=9d2e",
|
|
||||||
UserAgent = GetProxyHtml.UserAgentList?.Count > 0
|
|
||||||
? GetProxyHtml.UserAgentList[Randomx.GetId(GetProxyHtml.UserAgentList.Count)]
|
|
||||||
: userAgent,
|
|
||||||
Timeout = 10,
|
|
||||||
Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
|
|
||||||
Cookie = $"wdtoken={wdToken}; __spider__visitorid={BaseClass.GetRandomAlphanumeric(16).ToLower()}; visitor_id={BaseClass.GetRandomAlphanumeric(8).ToLower()}-{BaseClass.GetRandomAlphanumeric(4).ToLower()}-{BaseClass.GetRandomAlphanumeric(4).ToLower()}-{BaseClass.GetRandomAlphanumeric(4).ToLower()}-{BaseClass.GetRandomAlphanumeric(12).ToLower()}"
|
|
||||||
};
|
|
||||||
return HttpHelper.Get(httpParam);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static byte[] PostByte(AllBase.Helper.HttpParam httpParam, bool throwException = false)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(httpParam.Url))
|
|
||||||
{
|
|
||||||
return default(byte[]);
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
HttpWebRequest request = GetHttpWebRequest(httpParam);
|
|
||||||
request.Method = "Post";
|
|
||||||
SetPostData(request, httpParam.PostData);
|
|
||||||
return ReadResponseByte(request);
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteWithTime(ex);
|
|
||||||
if (!ex.Message.Contains("404"))
|
|
||||||
{
|
|
||||||
LogHelper.WriteWithTime(ex);
|
|
||||||
if (httpParam.TryTimes > 0 && httpParam.ActualTryTimes < httpParam.TryTimes)
|
|
||||||
{
|
|
||||||
httpParam.ActualTryTimes++;
|
|
||||||
PostByte(httpParam, throwException);
|
|
||||||
}
|
|
||||||
if (throwException)
|
|
||||||
{
|
|
||||||
throw ex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return default(byte[]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SetPostData(HttpWebRequest request, string postData)
|
|
||||||
{
|
|
||||||
request.ServicePoint.Expect100Continue = false;
|
|
||||||
byte[] postDataByte = Encoding.UTF8.GetBytes(postData);
|
|
||||||
request.ContentLength = postDataByte.Length;
|
|
||||||
request.AllowAutoRedirect = false;
|
|
||||||
using (Stream requestStream = request.GetRequestStream())
|
|
||||||
{
|
|
||||||
requestStream.Write(postDataByte, 0, postDataByte.Length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static byte[] ReadResponseByte(HttpWebRequest request)
|
|
||||||
{
|
|
||||||
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
|
|
||||||
{
|
|
||||||
using (BinaryReader binaryReader = new BinaryReader(response.GetResponseStream()))
|
|
||||||
{
|
|
||||||
using (MemoryStream ms = new MemoryStream())
|
|
||||||
{
|
|
||||||
byte[] buffer = binaryReader.ReadBytes(1024);
|
|
||||||
while (buffer.Length > 0)
|
|
||||||
{
|
|
||||||
ms.Write(buffer, 0, buffer.Length);
|
|
||||||
buffer = binaryReader.ReadBytes(1024);
|
|
||||||
}
|
|
||||||
byte[] fileByte = new byte[ms.Length];
|
|
||||||
ms.Position = 0;
|
|
||||||
ms.Read(fileByte, 0, fileByte.Length);
|
|
||||||
return fileByte;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static HttpWebRequest GetHttpWebRequest(AllBase.Helper.HttpParam param)
|
|
||||||
{
|
|
||||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(param.Url);
|
|
||||||
if (param.Proxy != null)
|
|
||||||
{
|
|
||||||
request.Proxy = param.Proxy;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
request.Proxy = NaiBaGlobalConfig.GetDevelopProxy();
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(param.UserAgent))
|
|
||||||
{
|
|
||||||
request.UserAgent = param.UserAgent;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
request.UserAgent = "";
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(param.Accept))
|
|
||||||
{
|
|
||||||
request.Accept = param.Accept;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
|
|
||||||
}
|
|
||||||
if (string.IsNullOrEmpty(param.AcceptLanguage))
|
|
||||||
{
|
|
||||||
request.Headers.Add("Accept-Language", "zh-CN,zh;q=0.9,en;q=0.8");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
request.Headers.Add("Accept-Language", param.AcceptLanguage);
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(param.ContentType))
|
|
||||||
{
|
|
||||||
request.ContentType = param.ContentType;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
request.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(param.Referer))
|
|
||||||
{
|
|
||||||
request.Referer = param.Referer;
|
|
||||||
}
|
|
||||||
request.Headers.Remove("Cookie");
|
|
||||||
if (!string.IsNullOrEmpty(param.Cookie))
|
|
||||||
{
|
|
||||||
request.Headers.Add("Cookie", param.Cookie);
|
|
||||||
}
|
|
||||||
if (param.Header != null)
|
|
||||||
{
|
|
||||||
foreach (KeyValuePair<string, string> header in param.Header)
|
|
||||||
{
|
|
||||||
request.Headers.Add(header.Key, header.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (param.Timeout > 0)
|
|
||||||
{
|
|
||||||
request.Timeout = param.Timeout * 1000;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
request.Timeout = 60 * 1000;
|
|
||||||
}
|
|
||||||
return request;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+44
-209
@@ -1,121 +1,71 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.props')" />
|
|
||||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x86.138.0.34\build\chromiumembeddedframework.runtime.win-x86.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x86.138.0.34\build\chromiumembeddedframework.runtime.win-x86.props')" />
|
|
||||||
<Import Project="..\packages\chromiumembeddedframework.runtime.win-x64.138.0.34\build\chromiumembeddedframework.runtime.win-x64.props" Condition="Exists('..\packages\chromiumembeddedframework.runtime.win-x64.138.0.34\build\chromiumembeddedframework.runtime.win-x64.props')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<TargetFramework>net462</TargetFramework>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{38E74D4C-2D8D-47D2-8A23-417C3C57ADE5}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>Work</RootNamespace>
|
<RootNamespace>Work</RootNamespace>
|
||||||
<AssemblyName>Work</AssemblyName>
|
<AssemblyName>Work</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
<NuGetPackageImportStamp>
|
|
||||||
</NuGetPackageImportStamp>
|
|
||||||
<TargetFrameworkProfile />
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<LangVersion>12.0</LangVersion>
|
<LangVersion>12.0</LangVersion>
|
||||||
<OutputPath>..\bin\</OutputPath>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<!--<OutputPath>..\bin\</OutputPath>-->
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
|
<Platforms>AnyCPU;x64</Platforms>
|
||||||
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<LangVersion>12.0</LangVersion>
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<LangVersion>12.0</LangVersion>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<LangVersion>12.0</LangVersion>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<LangVersion>12.0</LangVersion>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
|
||||||
<OutputPath>..\bin\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<LangVersion>12.0</LangVersion>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="CefSharp, Version=138.0.340.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
<!-- NuGet 包引用 -->
|
||||||
<HintPath>..\packages\CefSharp.Common.138.0.340\lib\net462\CefSharp.dll</HintPath>
|
<PackageReference Include="CefSharp.Common" Version="138.0.340" />
|
||||||
|
<PackageReference Include="CefSharp.WinForms" Version="138.0.340" />
|
||||||
|
<PackageReference Include="chromiumembeddedframework.runtime.win-x86" Version="138.0.34" />
|
||||||
|
<PackageReference Include="chromiumembeddedframework.runtime.win-x64" Version="138.0.34" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\AllBase\AllBase.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- 本地 DLL 引用 -->
|
||||||
|
<Reference Include="DevComponents.DotNetBar2">
|
||||||
|
<HintPath>..\DllReference\DevComponents.DotNetBar2.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="CefSharp.Core, Version=138.0.340.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
<Reference Include="Interop.MSScriptControl">
|
||||||
<HintPath>..\packages\CefSharp.Common.138.0.340\lib\net462\CefSharp.Core.dll</HintPath>
|
<HintPath>..\DllReference\Interop.MSScriptControl.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<Reference Include="CefSharp.WinForms, Version=138.0.340.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\CefSharp.WinForms.138.0.340\lib\net462\CefSharp.WinForms.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DevComponents.DotNetBar2, Version=14.0.0.3, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL" />
|
|
||||||
<Reference Include="Interop.MSScriptControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
<HintPath>..\DllReference\Interop.MSScriptControl.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NaiBa.Util, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="NaiBa.Util">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\DllReference\NaiBa.Util.dll</HintPath>
|
<HintPath>..\DllReference\NaiBa.Util.dll</HintPath>
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="NaiBa.Util.Winform">
|
<Reference Include="NaiBa.Util.Winform">
|
||||||
<HintPath>..\DllReference\NaiBa.Util.Winform.dll</HintPath>
|
<HintPath>..\DllReference\NaiBa.Util.Winform.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="System.Data.SQLite">
|
||||||
|
<HintPath>..\DllReference\System.Data.SQLite.DLL</HintPath>
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="websocket-sharp">
|
||||||
|
<HintPath>..\DllReference\websocket-sharp.dll</HintPath>
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<!-- 框架引用 -->
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.configuration" />
|
<Reference Include="System.configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\DllReference\System.Data.SQLite.DLL</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.IO.Compression.FileSystem" />
|
<Reference Include="System.IO.Compression.FileSystem" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
@@ -126,120 +76,5 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="websocket-sharp, Version=1.0.2.27972, Culture=neutral, PublicKeyToken=5660b08a1845a91e, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\DllReference\websocket-sharp.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="AfterSaleSet.cs" />
|
|
||||||
<Compile Include="Api\AlibabaProductGet.cs" />
|
|
||||||
<Compile Include="Api\AutoConfirmExpress.cs" />
|
|
||||||
<Compile Include="Api\BigDataCenter.cs" />
|
|
||||||
<Compile Include="Api\BuildNewTitle.cs" />
|
|
||||||
<Compile Include="Api\CatListPinduoduo.cs" />
|
|
||||||
<Compile Include="Api\CatTemplateBase.cs" />
|
|
||||||
<Compile Include="Api\DeleteRejectProduct.cs" />
|
|
||||||
<Compile Include="Api\FromTitleToCatTaobao.cs" />
|
|
||||||
<Compile Include="BLL\Collect\PddSameScreeningBLL.cs" />
|
|
||||||
<Compile Include="CollectClass\CollectDoyin.cs" />
|
|
||||||
<Compile Include="CollectClass\DetailMobileCollect.cs" />
|
|
||||||
<Compile Include="Api\DownUpProductExploder.cs" />
|
|
||||||
<Compile Include="Api\EncryptionCode.cs" />
|
|
||||||
<Compile Include="Api\FromTitleToCat.cs" />
|
|
||||||
<Compile Include="Api\GetEditDetail.cs" />
|
|
||||||
<Compile Include="Api\GetNewTaobaoUpId.cs" />
|
|
||||||
<Compile Include="Api\GetProductDetail.cs" />
|
|
||||||
<Compile Include="Api\GetShopLoginInfo.cs" />
|
|
||||||
<Compile Include="Api\GetVisitProduct.cs" />
|
|
||||||
<Compile Include="Api\MobileDetail.cs" />
|
|
||||||
<Compile Include="Api\PinduoduoApiGetProduct.cs" />
|
|
||||||
<Compile Include="Api\PinduoduoApiPropId.cs" />
|
|
||||||
<Compile Include="Api\PinduoduoAuth.cs" />
|
|
||||||
<Compile Include="Api\ShopChatBase.cs" />
|
|
||||||
<Compile Include="CollectClass\TaobaoMobileCollect.cs" />
|
|
||||||
<Compile Include="Api\TaoJiJiProductGet.cs" />
|
|
||||||
<Compile Include="Api\UpdatePinduoduoExpressSet.cs" />
|
|
||||||
<Compile Include="Api\UploadPinduoduoDeleteSku.cs" />
|
|
||||||
<Compile Include="Api\UploadPinduoduoMain.cs" />
|
|
||||||
<Compile Include="Api\UploadPinduoduoProperties.cs" />
|
|
||||||
<Compile Include="Api\UploadPinduoduoSet.cs" />
|
|
||||||
<Compile Include="BLL\Tools\Base64ChangeImgUrl.cs" />
|
|
||||||
<Compile Include="CollectClass\BankWithDraw.cs" />
|
|
||||||
<Compile Include="CollectClass\BigDataBuild.cs" />
|
|
||||||
<Compile Include="CollectClass\CheckHecker.cs" />
|
|
||||||
<Compile Include="CollectClass\CollectKeywordByTaobao.cs" />
|
|
||||||
<Compile Include="CollectClass\GetProductOnlineClass.cs" />
|
|
||||||
<Compile Include="CollectClass\GetVisitProductNew.cs" />
|
|
||||||
<Compile Include="CollectClass\JinBaoSpread.cs" />
|
|
||||||
<Compile Include="CollectClass\JingXiCollect.cs" />
|
|
||||||
<Compile Include="CollectClass\LoadCloudData.cs" />
|
|
||||||
<Compile Include="CollectClass\OrderControl.cs" />
|
|
||||||
<Compile Include="CollectClass\PermissionBLL.cs" />
|
|
||||||
<Compile Include="CollectClass\PinduoduoRelation.cs" />
|
|
||||||
<Compile Include="CollectClass\PinduoduoCatList.cs" />
|
|
||||||
<Compile Include="CollectClass\PinduoduoProductCollect.cs" />
|
|
||||||
<Compile Include="CollectClass\ProductCheckControl.cs" />
|
|
||||||
<Compile Include="CollectClass\SearchKeywordByAlibaba.cs" />
|
|
||||||
<Compile Include="CollectClass\ServerTemp.cs" />
|
|
||||||
<Compile Include="CollectClass\SetCookiesUserInfo.cs" />
|
|
||||||
<Compile Include="CollectClass\ShopAccountControl.cs" />
|
|
||||||
<Compile Include="CollectClass\ShopDetailGet.cs" />
|
|
||||||
<Compile Include="CollectClass\WeiDianProductCollect.cs" />
|
|
||||||
<Compile Include="CollectClass\WhiteBaseMap.cs" />
|
|
||||||
<Compile Include="CollectClass\WithDrawAmount.cs" />
|
|
||||||
<Compile Include="CostTemplateSet.cs" />
|
|
||||||
<Compile Include="GetPostTaobaoHtml.cs" />
|
|
||||||
<Compile Include="GoodDetail\GoodDetail.cs" />
|
|
||||||
<Compile Include="GoodInfo.cs" />
|
|
||||||
<Compile Include="IdFessionTaobao.cs" />
|
|
||||||
<Compile Include="Initialization.cs" />
|
|
||||||
<Compile Include="JumpUpProductNew.cs" />
|
|
||||||
<Compile Include="ManageClass\UpPinduoduoProductSet.cs" />
|
|
||||||
<Compile Include="ManageClass\AddressSetIni.cs" />
|
|
||||||
<Compile Include="ManageClass\AdvanceSale.cs" />
|
|
||||||
<Compile Include="ManageClass\AlibabaShop.cs" />
|
|
||||||
<Compile Include="ManageClass\AutoQuestion.cs" />
|
|
||||||
<Compile Include="ManageClass\ClearProductGroup.cs" />
|
|
||||||
<Compile Include="ManageClass\CpsShopNew.cs" />
|
|
||||||
<Compile Include="ManageClass\ShopSingleUpload.cs" />
|
|
||||||
<Compile Include="ManageClass\UploadProductAllShop.cs" />
|
|
||||||
<Compile Include="ManageClass\UpPinduoduoProduct.cs" />
|
|
||||||
<Compile Include="ManageClass\VioProductGroup.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="RSA.cs" />
|
|
||||||
<Compile Include="RSA_PEM.cs" />
|
|
||||||
<Compile Include="RSA_Unit.cs" />
|
|
||||||
<Compile Include="Services\CloudGoodsService.cs" />
|
|
||||||
<Compile Include="UpShopIdFromServer.cs" />
|
|
||||||
<Compile Include="UserLogin.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="app.config" />
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\AllBase\AllBase.csproj">
|
|
||||||
<Project>{6461d807-b1c8-45f0-b388-e0ca1a418de0}</Project>
|
|
||||||
<Name>AllBase</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x64.138.0.34\build\chromiumembeddedframework.runtime.win-x64.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x64.138.0.34\build\chromiumembeddedframework.runtime.win-x64.props'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\chromiumembeddedframework.runtime.win-x86.138.0.34\build\chromiumembeddedframework.runtime.win-x86.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\chromiumembeddedframework.runtime.win-x86.138.0.34\build\chromiumembeddedframework.runtime.win-x86.props'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.props'))" />
|
|
||||||
<Error Condition="!Exists('..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.targets'))" />
|
|
||||||
</Target>
|
|
||||||
<Import Project="..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.138.0.340\build\CefSharp.Common.targets')" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectView>ShowAllFiles</ProjectView>
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="CefSharp.Core" publicKeyToken="40c4b6fc221f4138" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-138.0.170.0" newVersion="138.0.170.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="CefSharp" publicKeyToken="40c4b6fc221f4138" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-138.0.170.0" newVersion="138.0.170.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="CefSharp.Common" version="138.0.340" targetFramework="net462" />
|
|
||||||
<package id="CefSharp.WinForms" version="138.0.340" targetFramework="net462" />
|
|
||||||
<package id="chromiumembeddedframework.runtime.win-x64" version="138.0.34" targetFramework="net462" />
|
|
||||||
<package id="chromiumembeddedframework.runtime.win-x86" version="138.0.34" targetFramework="net462" />
|
|
||||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
|
|
||||||
</packages>
|
|
||||||
Reference in new issue
Block a user