活动报名逻辑优化

This commit is contained in:
wule committed 2025-09-26 09:23:05 +08:00
1 parent d01d3bc306
commit 8fb90422a2
15 files changed
+1736 -291

No files matched your search

+3
View File
@@ -189,6 +189,7 @@
<Compile Include="Model\Param\DyProductManage\ViolateRuleParam.cs" /> <Compile Include="Model\Param\DyProductManage\ViolateRuleParam.cs" />
<Compile Include="Model\Param\PDDProdParam\PDDActivityPriceCheckParam.cs" /> <Compile Include="Model\Param\PDDProdParam\PDDActivityPriceCheckParam.cs" />
<Compile Include="Model\Param\PDDProdParam\PDDActivitySubmitParam.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\PDDProdDecorationCommitParam.cs" />
<Compile Include="Model\Param\PDDProdParam\PDDProductUploadParam.cs" /> <Compile Include="Model\Param\PDDProdParam\PDDProductUploadParam.cs" />
<Compile Include="Model\Param\SalesManage\PromotionAddParam.cs" /> <Compile Include="Model\Param\SalesManage\PromotionAddParam.cs" />
@@ -197,6 +198,8 @@
<Compile Include="Model\Param\TemuProductManage\TemuProductWords.cs" /> <Compile Include="Model\Param\TemuProductManage\TemuProductWords.cs" />
<Compile Include="Model\Param\TemuProductManage\TemuSizeSpecParam.cs" /> <Compile Include="Model\Param\TemuProductManage\TemuSizeSpecParam.cs" />
<Compile Include="Model\Result\PDDResult\PDDActivitiInfo.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\PDDChanceProductInfo.cs" />
<Compile Include="Model\Result\PDDResult\PDDMaterialInfo.cs" /> <Compile Include="Model\Result\PDDResult\PDDMaterialInfo.cs" />
<Compile Include="Model\Result\PDDResult\PDDProductDecorationInfo.cs" /> <Compile Include="Model\Result\PDDResult\PDDProductDecorationInfo.cs" />
+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary> /// <summary>
/// 版本ID /// 版本ID
/// </summary> /// </summary>
public static int VersionCount = 601; public static int VersionCount = 605;
//public static int VersionCount = 599; //public static int VersionCount = 599;
/// <summary> /// <summary>
+4 -3
View File
@@ -676,13 +676,14 @@ namespace AllBase
/// <param name="html"></param> /// <param name="html"></param>
/// <param name="key"></param> /// <param name="key"></param>
/// <returns></returns> /// <returns></returns>
public static string GetStringQuery(ref string querString, string key) public static string GetStringQuery(ref string queryString, string key)
{ {
int nIndex = querString.IndexOf(key + "="); var queryStringTmp = "&" + queryString;
int nIndex = queryStringTmp.IndexOf(key + "=");
if (nIndex == -1) if (nIndex == -1)
return null; return null;
string temp = querString.Substring(nIndex).Replace(key + "=", ""); string temp = queryStringTmp.Substring(nIndex).Replace(key + "=", "");
nIndex = temp.IndexOf('&'); nIndex = temp.IndexOf('&');
if (nIndex > -1) if (nIndex > -1)
temp = temp.Substring(0, nIndex); temp = temp.Substring(0, nIndex);
@@ -8,19 +8,23 @@ namespace AllBase.Model.Param.PDDProdParam
{ {
public class PDDActivitySubmitParam public class PDDActivitySubmitParam
{ {
public long? activity_id { get; set; } = 20981; public long? activity_id { get; set; } = 20981; //23620 21365 15996
public List<goods_vo_param> goods_volist { get; set; } = new List<goods_vo_param>(); public List<goods_vo_param> goods_volist { get; set; } = new List<goods_vo_param>();
public create_protocol_vo_item create_protocol_vo { get; set; } = new create_protocol_vo_item(); public create_protocol_vo_item create_protocol_vo { get; set; } = new create_protocol_vo_item();
public object custom_ability_vo { get; set; } = new object();
public create_outer_activity_price_ratio_vo_item create_outer_activity_price_ratio_vo { get; set; } = new create_outer_activity_price_ratio_vo_item(); public create_outer_activity_price_ratio_vo_item create_outer_activity_price_ratio_vo { get; set; } = new create_outer_activity_price_ratio_vo_item();
public enroll_source_ctx_item enroll_source_ctx { get; set; } = new enroll_source_ctx_item(); public enroll_source_ctx_item enroll_source_ctx { get; set; } = new enroll_source_ctx_item();
public string behavior_collection_v1_cas_boost_factor { get; set; } = "dXlyaGxldXItNDkwOTQzMTM0LTE3NTgzNzMzNDQwMjE=";
// 15996 dXlyaGxldXItNDkwOTQzMTM0LTE3NTg2OTQxODA2MzE=
public string behavior_collection_v1_cas_boost_factor { get; set; } = "dXlyaGxldXItNDkwOTQzMTM0LTE3NTgzNzMzNDQwMjE=";
} }
public class enroll_source_ctx_item public class enroll_source_ctx_item
{ {
public int? enroll_type { get; set; } = 34; public int? enroll_type { get; set; } = 3; // 20981 34, 15996 3
public string scene_full_coverage { get; set; } = "mmsActQuickEnrollMultiActivityRealTableV1"; public string scene_full_coverage { get; set; } = "mmsActBatchEnrollV1"; // 20981 mmsActQuickEnrollMultiActivityRealTableV1, 15996 mmsActBatchEnrollV1
public string source_type { get; set; } = "PROMO-OwnHome_MultiActEnrollMMS"; public string source_type { get; set; } = "MMSActicon"; // 20981 PROMO-OwnHome_MultiActEnrollMMS, 15996 MMSActicon
public string scene_type { get; set; } = "ActivityCard"; // 10981 无, 15996 ActivityCard
} }
public class create_outer_activity_price_ratio_vo_item public class create_outer_activity_price_ratio_vo_item
@@ -30,27 +34,40 @@ namespace AllBase.Model.Param.PDDProdParam
public class create_protocol_vo_item public class create_protocol_vo_item
{ {
public bool? need_create_cost_template { get; set; } = true; public bool? need_create_cost_template { get; set; } = false; //如运费模板不满足要求,同意为您自动切换为活动适用的运费模板
} }
public class goods_vo_param public class goods_vo_param
{ {
public long? goods_id { get; set; } public long? goods_id { get; set; }
public object create_goods_coupon_vo { get; set; } = new object();
public object create_finance_cost_vo { get; set; } = new object();
public create_material_vo_param create_material_vo { get; set; } = new create_material_vo_param(); public create_material_vo_param create_material_vo { get; set; } = new create_material_vo_param();
public view_confirmed_goods_protocol_vo_item view_confirmed_goods_protocol_vo { get; set; } = new view_confirmed_goods_protocol_vo_item(); public view_confirmed_goods_protocol_vo_item view_confirmed_goods_protocol_vo { get; set; } = new view_confirmed_goods_protocol_vo_item();
public create_activity_price_vo_item create_activity_price_vo { get; set; } = new create_activity_price_vo_item(); public create_activity_price_vo_item create_activity_price_vo { get; set; } = new create_activity_price_vo_item();
public create_discount_vo_item create_discount_vo { get; set; }
}
public class create_discount_vo_item {
public int? multi_percent_discount { get; set; } = 99;
public bool? hit_multi_percent { get; set; } = true;
} }
public class create_activity_price_vo_item public class create_activity_price_vo_item
{ {
public List<create_sku_vo_item> create_sku_vos { get; set; } = new List<create_sku_vo_item>(); public List<create_sku_vo_item> create_sku_vos { get; set; } = new List<create_sku_vo_item>();
public create_traffic_protect_vo_item create_traffic_protect_vo { get; set; } = new create_traffic_protect_vo_item(); public create_traffic_protect_vo_item create_traffic_protect_vo { get; set; } = new create_traffic_protect_vo_item();
public object create_quantity_vo { get; set; } = new object(); public create_quantity_vo_item create_quantity_vo { get; set; } = new create_quantity_vo_item();
public object create_time_vo { get; set; } = new object();
}
public class create_quantity_vo_item {
public int? goods_activity_quantity { get; set; }
} }
public class create_traffic_protect_vo_item public class create_traffic_protect_vo_item
{ {
public int? max_cut_price_amount { get; set; } = 100; public int? max_cut_price_amount { get; set; } = 50; //任意规格当前价失效时,降价0.5元恢复活动权益 //可考虑转换为总价的百分比
} }
public class create_sku_vo_item public class create_sku_vo_item
@@ -65,16 +82,22 @@ namespace AllBase.Model.Param.PDDProdParam
public int? filling_sku_price { get; set; } public int? filling_sku_price { get; set; }
public int? gear_rule { get; set; } public int? gear_rule { get; set; }
public int? require_price { get; set; } public int? require_price { get; set; }
public int? filling_sku_price_gear_rule { get; set; } = 1001; // 1001
public object algorithm_decorate_sku_price { get; set; } // null
public object tags { get; set; } // null
} }
public class view_confirmed_goods_protocol_vo_item public class view_confirmed_goods_protocol_vo_item
{ {
public object confirm_hit_cut_price { get; set; } = null; public object confirm_hit_cut_price { get; set; } = null;
public bool? confirm_copy_goods_for_customer_num { get; set; } = false;
public bool? confirm_hit_high_commission { get; set; } = false;
} }
public class create_material_vo_param public class create_material_vo_param
{ {
public object create_goods_image_vo { get; set; } = new object(); public object create_goods_image_vo { get; set; } = new object();
public object create_goods_title_vo { get; set; } = new object();
} }
} }
@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.Param.PDDProdParam20981
{
public class PDDActivitySubmitParam20981
{
public long? activity_id { get; set; } = 20981;
public List<goods_vo_param> goods_volist { get; set; } = new List<goods_vo_param>();
public create_protocol_vo_item create_protocol_vo { get; set; } = new create_protocol_vo_item();
public create_outer_activity_price_ratio_vo_item create_outer_activity_price_ratio_vo { get; set; } = new create_outer_activity_price_ratio_vo_item();
public enroll_source_ctx_item enroll_source_ctx { get; set; } = new enroll_source_ctx_item();
public string behavior_collection_v1_cas_boost_factor { get; set; } = "dXlyaGxldXItNDkwOTQzMTM0LTE3NTgzNzMzNDQwMjE=";
}
public class enroll_source_ctx_item
{
public int? enroll_type { get; set; } = 34;
public string scene_full_coverage { get; set; } = "mmsActQuickEnrollMultiActivityRealTableV1";
public string source_type { get; set; } = "PROMO-OwnHome_MultiActEnrollMMS";
}
public class create_outer_activity_price_ratio_vo_item
{
public bool? merchant_confirm_outer_activity_price_ratio { get; set; } = true;
}
public class create_protocol_vo_item
{
public bool? need_create_cost_template { get; set; } = true;
}
public class goods_vo_param
{
public long? goods_id { get; set; }
public create_material_vo_param create_material_vo { get; set; } = new create_material_vo_param();
public view_confirmed_goods_protocol_vo_item view_confirmed_goods_protocol_vo { get; set; } = new view_confirmed_goods_protocol_vo_item();
public create_activity_price_vo_item create_activity_price_vo { get; set; } = new create_activity_price_vo_item();
}
public class create_activity_price_vo_item
{
public List<create_sku_vo_item> create_sku_vos { get; set; } = new List<create_sku_vo_item>();
public create_traffic_protect_vo_item create_traffic_protect_vo { get; set; } = new create_traffic_protect_vo_item();
public object create_quantity_vo { get; set; } = new object();
}
public class create_traffic_protect_vo_item
{
public int? max_cut_price_amount { get; set; } = 50;
}
public class create_sku_vo_item
{
public sku_front_ctx_vo_item sku_front_ctx_vo { get; set; }
public int? sku_activity_price { get; set; }
public long? sku_id { get; set; }
}
public class sku_front_ctx_vo_item
{
public int? filling_sku_price { get; set; }
public int? gear_rule { get; set; }
public int? require_price { get; set; }
}
public class view_confirmed_goods_protocol_vo_item
{
public object confirm_hit_cut_price { get; set; } = null;
}
public class create_material_vo_param
{
public object create_goods_image_vo { get; set; } = new object();
}
}
@@ -48,7 +48,7 @@ namespace AllBase.Model.Param.PDDProdParam
public int? third_type { get; set; } = 0; public int? third_type { get; set; } = 0;
public List<int?> cat_ids { get; set; } public List<int?> cat_ids { get; set; }
public int? bad_fruit_claim { get; set; } = 0; public int? bad_fruit_claim { get; set; } = 0;
public List<object> booking_notes { get; set; } = new List<object>(); public object booking_notes { get; set; } = new object();
public object instruction_template_id { get; set; } public object instruction_template_id { get; set; }
public bool? first_upload_carousel { get; set; } = true; public bool? first_upload_carousel { get; set; } = true;
@@ -57,7 +57,7 @@ namespace AllBase.Model.Result.PDDResult
public class GoodsTrafficProtectInfoItem public class GoodsTrafficProtectInfoItem
{ {
public bool? high_sensitive_goods { get; set; } //false, public bool? high_sensitive_goods { get; set; } //false,
public int? fill_max_cut_price_amount { get; set; } //100 public int? fill_max_cut_price_amount { get; set; } //100 //维持活动降价
} }
@@ -0,0 +1,130 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.Result.PDDResult
{
public class PDDActivityRuleInfo
{
public long? activity_id { get; set; }
public object activity_start_time { get; set; }
public object activity_end_time { get; set; }
public List<long?> goods_id_list { get; set; }
public List<object> enroll_goods_gear_discount_white_list { get; set; }
public Dictionary<string, enroll_rule_param_map_item> enroll_rule_param_map { get; set; } // key是goodsid
public object mall_enroll_rule_param_map { get; set; }
public bool? one_key_enroll { get; set; } // false
public string important_tips { get; set; } // "1. 报名秒杀活动的价格【不会被计入历史最低价】,下资源位后会回到正常售卖价左右,实际根据实时的全网最低价决定<br/>\n2. 若商家对回价后的价格不满意,请不要接受回价邀请!!即使不接受,秒杀价也不会计入最低价<br/>\n3. 晋升期间,不要报名其他同类型秒杀活动,否则晋升通路将会中断!<br/>\n4、请商家遵守平台规则,非真实购买产生的订单,将会直接中断晋升流程<br/>\n5、请确认保证金充足、线上库存充足,否则确认排期后,也会上线失败的哦!<br/>"
public long? system_time { get; set; } // 1758784633499
public object supply_tool_activity_introduction_list { get; set; }
public bool? return_price { get; set; }
public object comeback { get; set; }
public List<goods_cat_info_volist_item> goods_cat_info_volist { get; set; }
public bool? spring_festival_exclusive_activity { get; set; }
}
public class goods_cat_info_volist_item
{
public long? goods_id { get; set; } // 822826473337,
public long? cat_id1 { get; set; } //16989,
public bool? not_default_selection { get; set; } // false
}
public class enroll_rule_param_map_item
{
public enroll_mall_part_select_sku_item enroll_mall_part_select_sku { get; set; }
public Dictionary<string, enroll_sku_compute_min_quantity_by_sale_percent_item> enroll_sku_compute_min_quantity_by_sale_percent { get; set; } // key是skuid
public enroll_mall_sign_cut_price_compensation_item enroll_mall_sign_cut_price_compensation { get; set; }
public enroll_goods_activity_quantity_item enroll_goods_activity_quantity { get; set; }
public enroll_mall_sign_manfan_item enroll_mall_sign_manfan { get; set; }
public object enroll_goods_outer_activity_price_rule { get; set; }
public enroll_goods_resource_price_item enroll_goods_spike_price { get; set; }
public enroll_goods_restrict_activity_price_item enroll_goods_restrict_activity_price { get; set; }
public enroll_goods_activity_image_item enroll_goods_activity_image { get; set; }
public enroll_goods_shipping_config_item enroll_goods_shipping_config { get; set; }
public enroll_goods_free_return_new_item enroll_goods_free_return_new { get; set; }
}
public class enroll_goods_free_return_new_item
{
public bool? selected { get; set; } // true,
public object need_sign_free_return_protocol { get; set; } // null,
public object free_return_protocol_type { get; set; } // null,
public object need_open_free_return_service { get; set; } // null
}
public class enroll_goods_shipping_config_item
{
public object goods_id { get; set; } // null,
public bool? need_create_cost_template { get; set; } // false,
public bool? not_default_selection { get; set; } // false,
public object cost_template_id { get; set; } // null,
public object cost_template_name { get; set; } // null,
public object valuation { get; set; } // null,
public object delivery_region { get; set; } // null,
public object free_shipping_region { get; set; } // null,
public object not_free_shipping_region { get; set; } // null,
public object not_shipping_region { get; set; } // null
}
public class enroll_goods_activity_image_item
{
public object system_recommend { get; set; } // null,
public int? type { get; set; } // 0,
public int? special_image_type { get; set; } // 2,
public string template_image_url { get; set; } // "http://t00img.yangkeduo.com/goods/images/2018-10-08/d2fe9370d3706ad13bb4b5f066c8347a.jpeg",
public string template_file_url { get; set; } // "http://commoncdn.yangkeduo.com/pdd_oms/2018-10-11/9fb1cbead4b6f46945c0f205f8670dc7.psd",
public string image_comment { get; set; } // "此处图片更改、上传、删除操作同步商品素材-场景图",
public string goods_activity_image_url { get; set; } // null,
public string suggest_activity_image_url { get; set; } // null,
public int? check_status { get; set; } // 0,
public object graph_id { get; set; } // null,
public bool? required { get; set; } // true,
public int? default_sync_type { get; set; } // 2,
public object time_out_degrade_gray { get; set; } // null,
public bool? all_filled { get; set; } //false
}
public class enroll_mall_sign_manfan_item
{
public object need_sign_manfan_protocol { get; set; } // null,
public object time_out_degrade_gray { get; set; } // null,
public object need_join_manfan_act { get; set; } // null,
public object goods_join_manfan_act_info_content { get; set; } // null,
public object protocol_type { get; set; } // null
}
public class enroll_goods_activity_quantity_item
{
public int? min_activity_quantity { get; set; } // 110
public int? max_activity_quantity { get; set; } // 110
}
public class enroll_mall_sign_cut_price_compensation_item
{
public object need_pop { get; set; } // null,
public bool? hit_cut_price { get; set; } // true,
public int? protocol_type { get; set; } // 21,
public string enroll_popup_code { get; set; } // "cut_price_compensation",
public int? priority { get; set; } // 5
}
public class enroll_sku_compute_min_quantity_by_sale_percent_item
{
public long? sku_id { get; set; }
public int? min_quantity { get; set; }
}
public class enroll_mall_part_select_sku_item
{
public bool? can_part_select { get; set; }
public object max_sku_number { get; set; }
}
}
@@ -0,0 +1,132 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.Result.PDDResult
{
public class PDDActivitySuggestPriceInfo
{
public long? activity_id { get; set; }
public object activity_start_time { get; set; }
public object activity_end_time { get; set; }
public List<long?> goods_id_list { get; set; }
public object enroll_goods_gear_discount_white_list { get; set; }
public List<enroll_goods_rule_vo_item> enroll_goods_rule_vos { get; set; }
public object one_key_enroll { get; set; } //null,
public object important_tips { get; set; } //null,
public object is_split_suggest_price_grey { get; set; } //null,
public object supply_tool_activity_introduction_list { get; set; } //null
}
public class enroll_goods_rule_vo_item
{
public long? goods_id { get; set; }
public enroll_rule_item enroll_rule_param { get; set; }
public object all_information_filled { get; set; } //null,
public object ef_multi_activity_field { get; set; } //null,
public object ef_single_price_field { get; set; } //null
}
public class enroll_rule_item
{
public enroll_goods_resource_price_item enroll_goods_resource_price { get; set; }
public enroll_goods_resource_price_item enroll_goods_big_sale_price { get; set; }
public enroll_goods_restrict_activity_price_item enroll_goods_restrict_activity_price { get; set; }
}
public class enroll_goods_restrict_activity_price_item
{
public long? goods_id { get; set; } // 824814978521,
public object recent30_day_min_price { get; set; } // null,
public bool? not_must_less_than_restrict { get; set; } // true,
public bool? has_same_group_price_sort_restricted { get; set; } // false,
public bool? prohibit_mms_set_price { get; set; } // false,
public object discount_amount { get; set; } // null
}
public class enroll_goods_resource_price_item
{
public bool? hit_multi_percent { get; set; } // true
public int? multi_percent_discount_suggest { get; set; } // 99
public int? multi_percent_discount_weak_suggest { get; set; } // 95,
public int? multi_percent_discount_current { get; set; } // 95,
public int? multi_percent_discount { get; set; } // null,
public goods_traffic_protect_info_item goods_traffic_protect_info { get;set; }
public bool? time_out_degrade_gray { get; set; } // true,
public int? goods_on_sale_quantity { get; set; } // 2376,
public object not_daily_sale_start_time { get; set; } // null,
public object not_daily_sale_end_time { get; set; } // null,
public object session_start_time { get; set; } // null,
public object session_end_time { get; set; } // null,
public long? goods_id { get; set; } // 824814978521,
public List<sku_info_list_item> sku_info_list { get; set; }
public object can_equal { get; set; } // null,
public bool? need_goods_activity_quantity { get; set; } // false,
public object merchant_config_activity_price_time { get; set; } // null,
public object goods_activity_quantity { get; set; } // null,
public object parent_event_id { get; set; } // null,
public object bid_mock_enroll { get; set; } // null
}
public class sku_info_list_item
{
public long? activity_sku_id { get; set; }
public long? sku_id { get; set; }
public List<spec_info_list_item> spec_info_list { get; set; }
public string spec_info_str { get; set; } //5209黑色-升级款,36",
public object min_sale_price { get; set; } //null,
public int? group_price { get; set; } //5800,
public int? quantity { get; set; } //99,
public int? current_activity_price { get; set; } //5800,
public int? require_price { get; set; } //2544,
public int? gear_rule { get; set; } //23,
public int? filling_sku_price { get; set; } // 2540,
public int? filling_sku_price_gear_rule { get; set; } //1001,
public object algorithm_decorate_sku_price { get; set; } //null,
public List<suggest_price_expression_dtolist_item> suggest_price_expression_dtolist { get; set; }
public object cannot_change_price { get; set; } //null,
public int? multi_percent_suggest_price { get; set; } //2518,
public int? multi_percent_current_price { get; set; } //5742,
public object tags { get; set; } //null,
public object not_pre_fill_sku_price { get; set; } // null,
public object resource_price { get; set; } // null,
public object is_subsidize { get; set; } // null,
public object subsidize_cost_price { get; set; } //null
}
public class suggest_price_expression_dtolist_item
{
public int? price { get; set; }
public List<price_formula_item> price_formula { get; set; }
}
public class price_formula_item
{
public string field { get; set; } //"建议价",
public string value { get; set; } //"25.44 元",
public string desc { get; set; } //"平台综合优势价"
public object sim_goods_id { get; set; } //-8542661231593884883,
public object sim_sku_id { get; set; } // -8542660862743813332,
public string sim_sku_id_str { get; set; } //"-8542660862743813332",
public string sim_goods_id_str { get; set; } //-8542661231593884883",
public object sim_platform { get; set; } //null
}
public class spec_info_list_item
{
public long? spec_id { get; set; } //24714699485,
public string spec { get; set; } //颜色分类",
public object parent_id { get; set; } //null,
public string spec_value { get; set; } //5209黑色-升级款"
}
public class goods_traffic_protect_info_item
{
public bool? high_sensitive_goods { get; set; } //false,
public int? fill_max_cut_price_amount { get; set; } //100
}
}
@@ -88,8 +88,8 @@ namespace AllBase.Model.Result.PDDResult
public object song_huo_an_zhuang { get; set; } public object song_huo_an_zhuang { get; set; }
public object mai_jia_zi_ti { get; set; } public object mai_jia_zi_ti { get; set; }
public object sf_markup_template_sn { get; set; } public object sf_markup_template_sn { get; set; }
public int? min_group_price { get; set; } public long? min_group_price { get; set; }
public int? max_group_price { get; set; } public long? max_group_price { get; set; }
public int? must_check_type { get; set; } public int? must_check_type { get; set; }
public object goods_property_list { get; set; } public object goods_property_list { get; set; }
public object is_small_group { get; set; } public object is_small_group { get; set; }
File diff suppressed because it is too large. Load diff
+301 -39
View File
@@ -31,11 +31,25 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDShopLoginForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDShopLoginForm));
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnReturnPackage = new TemuKJD.UserControls.ButtonEx(); this.btnReturnPackage = new TemuKJD.UserControls.ButtonEx();
this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx();
this.pnlMultiLogin = new System.Windows.Forms.Panel(); this.pnlMultiLogin = new System.Windows.Forms.Panel();
this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx(); this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
this.btnDel = new DevComponents.DotNetBar.PanelEx(); this.btnDel = new DevComponents.DotNetBar.PanelEx();
this.pnlUploadOpBtns = new System.Windows.Forms.Panel();
this.numMinPrice = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.pictureBox8 = new System.Windows.Forms.PictureBox();
this.pictureBox7 = new System.Windows.Forms.PictureBox();
this.pictureBox6 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btnRestoreSkuImg = new DevComponents.DotNetBar.PanelEx();
this.btnSignActivity = new DevComponents.DotNetBar.PanelEx();
this.btnSaveSourceGoodsData = new DevComponents.DotNetBar.PanelEx();
this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.btnCopyPassword = new TemuKJD.UserControls.ButtonEx(); this.btnCopyPassword = new TemuKJD.UserControls.ButtonEx();
@@ -48,9 +62,20 @@
this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.txtAddress = new System.Windows.Forms.TextBox(); this.txtAddress = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
this.pnlMultiLogin.SuspendLayout(); this.pnlMultiLogin.SuspendLayout();
this.pnlUploadOpBtns.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMinPrice)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout();
@@ -67,12 +92,16 @@
this.splitContainer1.Name = "splitContainer1"; this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
// //
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnReturnPackage);
this.splitContainer1.Panel1.Controls.Add(this.pnlMultiLogin);
//
// splitContainer1.Panel2 // splitContainer1.Panel2
// //
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White; this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel2.Controls.Add(this.btnReturnPackage); this.splitContainer1.Panel2.Controls.Add(this.pnlUploadOpBtns);
this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain); this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain);
this.splitContainer1.Panel2.Controls.Add(this.pnlMultiLogin);
this.splitContainer1.Panel2.Controls.Add(this.label2); this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Panel2.Controls.Add(this.label1); this.splitContainer1.Panel2.Controls.Add(this.label1);
this.splitContainer1.Panel2.Controls.Add(this.btnCopyPassword); this.splitContainer1.Panel2.Controls.Add(this.btnCopyPassword);
@@ -82,8 +111,8 @@
this.splitContainer1.Panel2.Controls.Add(this.btnStop); this.splitContainer1.Panel2.Controls.Add(this.btnStop);
this.splitContainer1.Panel2.Controls.Add(this.btnReload); this.splitContainer1.Panel2.Controls.Add(this.btnReload);
this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin); this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin);
this.splitContainer1.Size = new System.Drawing.Size(1438, 755); this.splitContainer1.Size = new System.Drawing.Size(1438, 736);
this.splitContainer1.SplitterDistance = 690; this.splitContainer1.SplitterDistance = 671;
this.splitContainer1.SplitterWidth = 3; this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4; this.splitContainer1.TabIndex = 4;
// //
@@ -95,7 +124,7 @@
this.btnReturnPackage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnReturnPackage.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReturnPackage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnReturnPackage.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReturnPackage.ForeColor = System.Drawing.Color.White; this.btnReturnPackage.ForeColor = System.Drawing.Color.White;
this.btnReturnPackage.Location = new System.Drawing.Point(674, 30); this.btnReturnPackage.Location = new System.Drawing.Point(5, 605);
this.btnReturnPackage.Margin = new System.Windows.Forms.Padding(2); this.btnReturnPackage.Margin = new System.Windows.Forms.Padding(2);
this.btnReturnPackage.Name = "btnReturnPackage"; this.btnReturnPackage.Name = "btnReturnPackage";
this.btnReturnPackage.Size = new System.Drawing.Size(136, 25); this.btnReturnPackage.Size = new System.Drawing.Size(136, 25);
@@ -105,31 +134,14 @@
this.btnReturnPackage.Visible = false; this.btnReturnPackage.Visible = false;
this.btnReturnPackage.Click += new System.EventHandler(this.btnReturnPackage_Click); this.btnReturnPackage.Click += new System.EventHandler(this.btnReturnPackage_Click);
// //
// btnLoginAgain
//
this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginAgain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginAgain.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginAgain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginAgain.ForeColor = System.Drawing.Color.White;
this.btnLoginAgain.Location = new System.Drawing.Point(1137, 31);
this.btnLoginAgain.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginAgain.Name = "btnLoginAgain";
this.btnLoginAgain.Size = new System.Drawing.Size(91, 25);
this.btnLoginAgain.TabIndex = 462;
this.btnLoginAgain.Text = "重新登录";
this.btnLoginAgain.UseVisualStyleBackColor = false;
this.btnLoginAgain.Click += new System.EventHandler(this.btnLoginAgain_Click);
//
// pnlMultiLogin // pnlMultiLogin
// //
this.pnlMultiLogin.Controls.Add(this.cmbMultiCookieName); this.pnlMultiLogin.Controls.Add(this.cmbMultiCookieName);
this.pnlMultiLogin.Controls.Add(this.btnMultiLogin); this.pnlMultiLogin.Controls.Add(this.btnMultiLogin);
this.pnlMultiLogin.Controls.Add(this.btnDel); this.pnlMultiLogin.Controls.Add(this.btnDel);
this.pnlMultiLogin.Location = new System.Drawing.Point(357, 8); this.pnlMultiLogin.Location = new System.Drawing.Point(5, 634);
this.pnlMultiLogin.Name = "pnlMultiLogin"; this.pnlMultiLogin.Name = "pnlMultiLogin";
this.pnlMultiLogin.Size = new System.Drawing.Size(270, 33); this.pnlMultiLogin.Size = new System.Drawing.Size(251, 31);
this.pnlMultiLogin.TabIndex = 461; this.pnlMultiLogin.TabIndex = 461;
this.pnlMultiLogin.Visible = false; this.pnlMultiLogin.Visible = false;
// //
@@ -153,7 +165,7 @@
this.btnMultiLogin.Cursor = System.Windows.Forms.Cursors.Hand; this.btnMultiLogin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnMultiLogin.DisabledBackColor = System.Drawing.Color.Empty; this.btnMultiLogin.DisabledBackColor = System.Drawing.Color.Empty;
this.btnMultiLogin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnMultiLogin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMultiLogin.Location = new System.Drawing.Point(186, 3); this.btnMultiLogin.Location = new System.Drawing.Point(185, 3);
this.btnMultiLogin.Name = "btnMultiLogin"; this.btnMultiLogin.Name = "btnMultiLogin";
this.btnMultiLogin.Size = new System.Drawing.Size(60, 24); this.btnMultiLogin.Size = new System.Drawing.Size(60, 24);
this.btnMultiLogin.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnMultiLogin.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -177,7 +189,7 @@
this.btnDel.CanvasColor = System.Drawing.SystemColors.Control; this.btnDel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnDel.DisabledBackColor = System.Drawing.Color.Empty; this.btnDel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDel.Location = new System.Drawing.Point(161, 3); this.btnDel.Location = new System.Drawing.Point(163, 3);
this.btnDel.Name = "btnDel"; this.btnDel.Name = "btnDel";
this.btnDel.Size = new System.Drawing.Size(20, 24); this.btnDel.Size = new System.Drawing.Size(20, 24);
this.btnDel.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnDel.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -196,9 +208,233 @@
this.btnDel.Text = "删"; this.btnDel.Text = "删";
this.btnDel.Click += new System.EventHandler(this.btnDel_Click); this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
// //
// pnlUploadOpBtns
//
this.pnlUploadOpBtns.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pnlUploadOpBtns.Controls.Add(this.numMinPrice);
this.pnlUploadOpBtns.Controls.Add(this.label3);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox8);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox7);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox6);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox5);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox4);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox3);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox2);
this.pnlUploadOpBtns.Controls.Add(this.pictureBox1);
this.pnlUploadOpBtns.Controls.Add(this.btnRestoreSkuImg);
this.pnlUploadOpBtns.Controls.Add(this.btnSignActivity);
this.pnlUploadOpBtns.Controls.Add(this.btnSaveSourceGoodsData);
this.pnlUploadOpBtns.Location = new System.Drawing.Point(338, 3);
this.pnlUploadOpBtns.Name = "pnlUploadOpBtns";
this.pnlUploadOpBtns.Size = new System.Drawing.Size(812, 53);
this.pnlUploadOpBtns.TabIndex = 463;
//
// numMinPrice
//
this.numMinPrice.DecimalPlaces = 2;
this.numMinPrice.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.numMinPrice.Location = new System.Drawing.Point(372, 3);
this.numMinPrice.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.numMinPrice.Name = "numMinPrice";
this.numMinPrice.Size = new System.Drawing.Size(182, 23);
this.numMinPrice.TabIndex = 468;
this.numMinPrice.Value = new decimal(new int[] {
50,
0,
0,
0});
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(280, 6);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(92, 17);
this.label3.TabIndex = 467;
this.label3.Text = "报名活动最低价";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Click += new System.EventHandler(this.label3_Click);
//
// pictureBox8
//
this.pictureBox8.Location = new System.Drawing.Point(242, 17);
this.pictureBox8.Name = "pictureBox8";
this.pictureBox8.Size = new System.Drawing.Size(32, 32);
this.pictureBox8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox8.TabIndex = 456;
this.pictureBox8.TabStop = false;
this.pictureBox8.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox7
//
this.pictureBox7.Location = new System.Drawing.Point(209, 17);
this.pictureBox7.Name = "pictureBox7";
this.pictureBox7.Size = new System.Drawing.Size(32, 32);
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox7.TabIndex = 455;
this.pictureBox7.TabStop = false;
this.pictureBox7.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox6
//
this.pictureBox6.Location = new System.Drawing.Point(176, 17);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(32, 32);
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox6.TabIndex = 454;
this.pictureBox6.TabStop = false;
this.pictureBox6.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox5
//
this.pictureBox5.Location = new System.Drawing.Point(143, 17);
this.pictureBox5.Name = "pictureBox5";
this.pictureBox5.Size = new System.Drawing.Size(32, 32);
this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox5.TabIndex = 453;
this.pictureBox5.TabStop = false;
this.pictureBox5.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox4
//
this.pictureBox4.Location = new System.Drawing.Point(110, 17);
this.pictureBox4.Name = "pictureBox4";
this.pictureBox4.Size = new System.Drawing.Size(32, 32);
this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox4.TabIndex = 452;
this.pictureBox4.TabStop = false;
this.pictureBox4.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox3
//
this.pictureBox3.Location = new System.Drawing.Point(77, 17);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(32, 32);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox3.TabIndex = 451;
this.pictureBox3.TabStop = false;
this.pictureBox3.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox2
//
this.pictureBox2.Location = new System.Drawing.Point(44, 17);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(32, 32);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox2.TabIndex = 450;
this.pictureBox2.TabStop = false;
this.pictureBox2.Click += new System.EventHandler(this.pictureBox1_Click);
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(11, 17);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(32, 32);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 449;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// btnRestoreSkuImg
//
this.btnRestoreSkuImg.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRestoreSkuImg.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRestoreSkuImg.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRestoreSkuImg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRestoreSkuImg.Location = new System.Drawing.Point(464, 28);
this.btnRestoreSkuImg.Name = "btnRestoreSkuImg";
this.btnRestoreSkuImg.Size = new System.Drawing.Size(90, 23);
this.btnRestoreSkuImg.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRestoreSkuImg.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRestoreSkuImg.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRestoreSkuImg.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRestoreSkuImg.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRestoreSkuImg.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRestoreSkuImg.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRestoreSkuImg.Style.GradientAngle = 90;
this.btnRestoreSkuImg.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRestoreSkuImg.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRestoreSkuImg.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRestoreSkuImg.TabIndex = 439;
this.btnRestoreSkuImg.Text = "还原商品图片";
this.btnRestoreSkuImg.Click += new System.EventHandler(this.btnRestoreSkuImg_Click);
//
// btnSignActivity
//
this.btnSignActivity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSignActivity.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSignActivity.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSignActivity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSignActivity.Location = new System.Drawing.Point(372, 28);
this.btnSignActivity.Name = "btnSignActivity";
this.btnSignActivity.Size = new System.Drawing.Size(90, 23);
this.btnSignActivity.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSignActivity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSignActivity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSignActivity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSignActivity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSignActivity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSignActivity.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSignActivity.Style.GradientAngle = 90;
this.btnSignActivity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSignActivity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSignActivity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSignActivity.TabIndex = 435;
this.btnSignActivity.Text = "一键报名活动";
this.btnSignActivity.Click += new System.EventHandler(this.btnSignActivity_Click);
//
// btnSaveSourceGoodsData
//
this.btnSaveSourceGoodsData.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSaveSourceGoodsData.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSaveSourceGoodsData.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSaveSourceGoodsData.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveSourceGoodsData.Location = new System.Drawing.Point(280, 28);
this.btnSaveSourceGoodsData.Name = "btnSaveSourceGoodsData";
this.btnSaveSourceGoodsData.Size = new System.Drawing.Size(90, 23);
this.btnSaveSourceGoodsData.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveSourceGoodsData.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveSourceGoodsData.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveSourceGoodsData.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSaveSourceGoodsData.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSaveSourceGoodsData.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSaveSourceGoodsData.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSaveSourceGoodsData.Style.GradientAngle = 90;
this.btnSaveSourceGoodsData.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveSourceGoodsData.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveSourceGoodsData.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveSourceGoodsData.TabIndex = 431;
this.btnSaveSourceGoodsData.Text = "暂存商品图片";
this.btnSaveSourceGoodsData.Click += new System.EventHandler(this.btnSaveSourceGoodsData_Click);
//
// btnLoginAgain
//
this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginAgain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginAgain.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginAgain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginAgain.ForeColor = System.Drawing.Color.White;
this.btnLoginAgain.Location = new System.Drawing.Point(1155, 31);
this.btnLoginAgain.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginAgain.Name = "btnLoginAgain";
this.btnLoginAgain.Size = new System.Drawing.Size(91, 25);
this.btnLoginAgain.TabIndex = 462;
this.btnLoginAgain.Text = "重新登录";
this.btnLoginAgain.UseVisualStyleBackColor = false;
this.btnLoginAgain.Click += new System.EventHandler(this.btnLoginAgain_Click);
//
// label2 // label2
// //
this.label2.Location = new System.Drawing.Point(23, 35); this.label2.Location = new System.Drawing.Point(9, 35);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17); this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 378; this.label2.TabIndex = 378;
@@ -208,7 +444,7 @@
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 8); this.label1.Location = new System.Drawing.Point(9, 8);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 17); this.label1.Size = new System.Drawing.Size(44, 17);
this.label1.TabIndex = 377; this.label1.TabIndex = 377;
@@ -222,7 +458,7 @@
this.btnCopyPassword.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCopyPassword.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyPassword.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCopyPassword.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyPassword.ForeColor = System.Drawing.Color.White; this.btnCopyPassword.ForeColor = System.Drawing.Color.White;
this.btnCopyPassword.Location = new System.Drawing.Point(295, 31); this.btnCopyPassword.Location = new System.Drawing.Point(276, 31);
this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2); this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2);
this.btnCopyPassword.Name = "btnCopyPassword"; this.btnCopyPassword.Name = "btnCopyPassword";
this.btnCopyPassword.Size = new System.Drawing.Size(57, 25); this.btnCopyPassword.Size = new System.Drawing.Size(57, 25);
@@ -238,7 +474,7 @@
this.btnCopyUserName.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCopyUserName.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCopyUserName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCopyUserName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyUserName.ForeColor = System.Drawing.Color.White; this.btnCopyUserName.ForeColor = System.Drawing.Color.White;
this.btnCopyUserName.Location = new System.Drawing.Point(295, 4); this.btnCopyUserName.Location = new System.Drawing.Point(276, 4);
this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2); this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2);
this.btnCopyUserName.Name = "btnCopyUserName"; this.btnCopyUserName.Name = "btnCopyUserName";
this.btnCopyUserName.Size = new System.Drawing.Size(57, 25); this.btnCopyUserName.Size = new System.Drawing.Size(57, 25);
@@ -249,7 +485,7 @@
// //
// txtPassWord // txtPassWord
// //
this.txtPassWord.Location = new System.Drawing.Point(72, 32); this.txtPassWord.Location = new System.Drawing.Point(53, 32);
this.txtPassWord.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.txtPassWord.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtPassWord.Name = "txtPassWord"; this.txtPassWord.Name = "txtPassWord";
this.txtPassWord.PasswordChar = '●'; this.txtPassWord.PasswordChar = '●';
@@ -259,7 +495,7 @@
// //
// txtUserName // txtUserName
// //
this.txtUserName.Location = new System.Drawing.Point(72, 5); this.txtUserName.Location = new System.Drawing.Point(53, 5);
this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtUserName.Name = "txtUserName"; this.txtUserName.Name = "txtUserName";
this.txtUserName.ReadOnly = true; this.txtUserName.ReadOnly = true;
@@ -274,10 +510,10 @@
this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop.ForeColor = System.Drawing.Color.White; this.btnStop.ForeColor = System.Drawing.Color.White;
this.btnStop.Location = new System.Drawing.Point(1324, 31); this.btnStop.Location = new System.Drawing.Point(1342, 31);
this.btnStop.Margin = new System.Windows.Forms.Padding(2); this.btnStop.Margin = new System.Windows.Forms.Padding(2);
this.btnStop.Name = "btnStop"; this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(96, 25); this.btnStop.Size = new System.Drawing.Size(91, 25);
this.btnStop.TabIndex = 372; this.btnStop.TabIndex = 372;
this.btnStop.Text = "停止操作"; this.btnStop.Text = "停止操作";
this.btnStop.UseVisualStyleBackColor = false; this.btnStop.UseVisualStyleBackColor = false;
@@ -291,7 +527,7 @@
this.btnReload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnReload.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnReload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReload.ForeColor = System.Drawing.Color.White; this.btnReload.ForeColor = System.Drawing.Color.White;
this.btnReload.Location = new System.Drawing.Point(1231, 31); this.btnReload.Location = new System.Drawing.Point(1249, 31);
this.btnReload.Margin = new System.Windows.Forms.Padding(2); this.btnReload.Margin = new System.Windows.Forms.Padding(2);
this.btnReload.Name = "btnReload"; this.btnReload.Name = "btnReload";
this.btnReload.Size = new System.Drawing.Size(91, 25); this.btnReload.Size = new System.Drawing.Size(91, 25);
@@ -310,7 +546,7 @@
this.chkCloseAfterLogin.Checked = true; this.chkCloseAfterLogin.Checked = true;
this.chkCloseAfterLogin.CheckState = System.Windows.Forms.CheckState.Checked; this.chkCloseAfterLogin.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkCloseAfterLogin.CheckValue = "Y"; this.chkCloseAfterLogin.CheckValue = "Y";
this.chkCloseAfterLogin.Location = new System.Drawing.Point(997, 32); this.chkCloseAfterLogin.Location = new System.Drawing.Point(1306, 6);
this.chkCloseAfterLogin.Name = "chkCloseAfterLogin"; this.chkCloseAfterLogin.Name = "chkCloseAfterLogin";
this.chkCloseAfterLogin.Size = new System.Drawing.Size(135, 23); this.chkCloseAfterLogin.Size = new System.Drawing.Size(135, 23);
this.chkCloseAfterLogin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.chkCloseAfterLogin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -322,7 +558,7 @@
this.splitContainer2.BackColor = System.Drawing.Color.White; this.splitContainer2.BackColor = System.Drawing.Color.White;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(1, 14); this.splitContainer2.Location = new System.Drawing.Point(1, 33);
this.splitContainer2.Name = "splitContainer2"; this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
// //
@@ -333,7 +569,7 @@
// splitContainer2.Panel2 // splitContainer2.Panel2
// //
this.splitContainer2.Panel2.Controls.Add(this.splitContainer1); this.splitContainer2.Panel2.Controls.Add(this.splitContainer1);
this.splitContainer2.Size = new System.Drawing.Size(1438, 785); this.splitContainer2.Size = new System.Drawing.Size(1438, 766);
this.splitContainer2.SplitterDistance = 26; this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 5; this.splitContainer2.TabIndex = 5;
// //
@@ -362,11 +598,23 @@
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ShopLoginForm_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ShopLoginForm_FormClosed);
this.Load += new System.EventHandler(this.ShopLoginForm_Load); this.Load += new System.EventHandler(this.ShopLoginForm_Load);
this.Controls.SetChildIndex(this.splitContainer2, 0); this.Controls.SetChildIndex(this.splitContainer2, 0);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout(); this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false);
this.pnlMultiLogin.ResumeLayout(false); this.pnlMultiLogin.ResumeLayout(false);
this.pnlUploadOpBtns.ResumeLayout(false);
this.pnlUploadOpBtns.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numMinPrice)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel1.PerformLayout(); this.splitContainer2.Panel1.PerformLayout();
this.splitContainer2.Panel2.ResumeLayout(false); this.splitContainer2.Panel2.ResumeLayout(false);
@@ -396,5 +644,19 @@
private DevComponents.DotNetBar.PanelEx btnMultiLogin; private DevComponents.DotNetBar.PanelEx btnMultiLogin;
private DevComponents.DotNetBar.PanelEx btnDel; private DevComponents.DotNetBar.PanelEx btnDel;
private UserControls.ButtonEx btnReturnPackage; private UserControls.ButtonEx btnReturnPackage;
private System.Windows.Forms.Panel pnlUploadOpBtns;
private DevComponents.DotNetBar.PanelEx btnSaveSourceGoodsData;
private DevComponents.DotNetBar.PanelEx btnSignActivity;
private DevComponents.DotNetBar.PanelEx btnRestoreSkuImg;
private System.Windows.Forms.PictureBox pictureBox8;
private System.Windows.Forms.PictureBox pictureBox7;
private System.Windows.Forms.PictureBox pictureBox6;
private System.Windows.Forms.PictureBox pictureBox5;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown numMinPrice;
} }
} }
+307 -82
View File
@@ -36,6 +36,12 @@ namespace TemuKJD.PDDForms.ShopForms
public partial class PDDShopLoginForm : LRBaseForm public partial class PDDShopLoginForm : LRBaseForm
{ {
public static PDDShopLoginForm shopLoginInstance { get; set; } = null; public static PDDShopLoginForm shopLoginInstance { get; set; } = null;
public ProductSelectForms.PDDDBProdUserSelectForm prodUserSelectForm { get; set; } = null;
public static string pddUploadGoodsData = "";
//public static AllBase.Model.Param.PDDProdParam.PDDProductUploadParam prodParam = null;
public static string pddSourceGoodsData = "";
public static string pddSourceGoodsDataTemp = "";
//public static AllBase.Model.Result.PDDResult.PDDProductDetailInfo prodInfo = null;
public int CloseAfterSecond { get; set; } public int CloseAfterSecond { get; set; }
public EnumOpenType openType = EnumOpenType.manage; public EnumOpenType openType = EnumOpenType.manage;
@@ -43,14 +49,12 @@ namespace TemuKJD.PDDForms.ShopForms
public string MultiLoginCookieName = ""; public string MultiLoginCookieName = "";
public string InitUrl = ""; public string InitUrl = "";
private string shopCookieHead = "pinduoduo.com"; private string shopCookieHead = "pinduoduo.com";
private string shopCookieHead2 = "temu.com";
private string shopLoginUrl = "https://mms.pinduoduo.com/login"; private string shopLoginUrl = "https://mms.pinduoduo.com/login";
private string shopMainUrl = "https://mms.pinduoduo.com/home"; private string shopMainUrl = "https://mms.pinduoduo.com/home";
private ChromiumWebBrowser cefWebBrowser = null; private ChromiumWebBrowser cefWebBrowser = null;
private ShopLoginInfo shop = null; private ShopLoginInfo shop = null;
private List<ShopCompany> lstShopCompany = new List<ShopCompany>(); private List<ShopCompany> lstShopCompany = new List<ShopCompany>();
private string currentUrl = ""; private string currentUrl = "";
private long currentSupplierId = 0;
public PDDShopLoginForm(ShopLoginInfo shopInfo) public PDDShopLoginForm(ShopLoginInfo shopInfo)
{ {
@@ -70,6 +74,8 @@ namespace TemuKJD.PDDForms.ShopForms
private void ShopLoginForm_Load(object sender, EventArgs e) private void ShopLoginForm_Load(object sender, EventArgs e)
{ {
this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62; this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62;
this.pnlUploadOpBtns.Visible = this.prodUserSelectForm != null;
pddSourceGoodsDataTemp = "";
if (isMultiLogin && shop != null) if (isMultiLogin && shop != null)
{ {
@@ -433,27 +439,53 @@ namespace TemuKJD.PDDForms.ShopForms
private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e) private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e)
{ {
//if (!cefWebBrowser.IsBrowserInitialized) return;
//currentUrl = e.Url;
//if (currentUrl.StartsWith("https://fxg.jinritemai.com/ffa/multiShop"))
//{
// Thread.Sleep(Randomx.GetId(500, 800));
//}
//if (currentUrl.StartsWith("https://fxg.jinritemai.com/ffa/mshop/homepage/index"))
//{
// Task.Run(() =>
// {
//
// });
//}
//js绑定C#对象 html页面内声明绑定的C#对象 //js绑定C#对象 html页面内声明绑定的C#对象
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.Append("(function(){"); sb.Append("(function(){");
sb.Append("CefSharp.BindObjectAsync('shopObj');"); sb.Append("CefSharp.BindObjectAsync('shopObj');");
sb.Append("})();"); sb.Append("})();");
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString()); cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString());
// 库存上传按钮 pdd不需要
if (1 == 2 && currentUrl.StartsWith("https://mms.pinduoduo.com/goods/goods_list"))
{
Task.Run(() => {
string sAddInputJs = @"
document.addEventListener('wheel', function(event) {
// 检查滚动方向
//if (event.deltaY < 0) {
// console.log('向上滚动');
//} else {
// console.log('向下滚动');
//}
// 或者使用 event.deltaX 来检查水平滚动
//if (event.deltaX < 0) {
// console.log('向左滚动');
//} else if (event.deltaX > 0) {
// console.log('向右滚动');
//}
// 阻止默认的滚动行为(如果有需要)
//event.preventDefault();
addGetProdButton();
});
addGetProdButton();
function addGetProdButton() {
var productLst = document.getElementsByClassName('goods-id');
for(i=0; i<productLst.length; i++) {
var addBtnItem = productLst[i].parentElement.parentElement;
if (addBtnItem.parentElement.innerHTML.indexOf('库存上传') < 0 && addBtnItem.parentElement.innerHTML.indexOf('ID:') >= 0) {
var sSpuId = addBtnItem.innerText.replace('\r','').replace('\n','').replace('ID: ', '');
addBtnItem.outerHTML = addBtnItem.outerHTML.replace(""<section>"",""<section style=\""display:inline; float:left; \"">"")
.replace(""</section>"", ""</section><input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""库存上传\"" onclick=\""shopObj.getThirdProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">"");
}
}
}";
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs);
});
}
} }
static int GetAntiContentsTimes = 40; static int GetAntiContentsTimes = 40;
@@ -462,38 +494,20 @@ namespace TemuKJD.PDDForms.ShopForms
var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : ""; var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : "";
if (shop != null && !url.StartsWith("https://mms.pinduoduo.com/janus/api/userinfo") && !string.IsNullOrEmpty(antiContent)) if (shop != null && !url.StartsWith("https://mms.pinduoduo.com/janus/api/userinfo") && !string.IsNullOrEmpty(antiContent))
{ {
GetAntiContentsTimes++; Task.Run(() =>
Invoke(new Action(() => { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; }));
shop.AntiContents.Add(antiContent);
while (shop.AntiContents.Count > 50)
shop.AntiContents.RemoveAt(0);
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 500)
{ {
GetAntiContentsTimes = 0; GetAntiContentsTimes++;
Task.Run(() => Invoke(new Action(() => { try { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; } catch { return; } }));
shop.AntiContents.Add(antiContent);
while (shop.AntiContents.Count > 50)
shop.AntiContents.RemoveAt(0);
if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 500)
{ {
GetAntiContentsTimes = 0;
ShopBLL.MdyAntiContent(shop); ShopBLL.MdyAntiContent(shop);
}); }
} });
} }
Task.Run(() =>
{
var data = responseData;
if (data.Contains("\"validate_message\""))
{
}
//if (data.Contains("supplierId") && data.Contains("\"success\":true"))
//{
// var supplierIds = BaseRegex.GetMatchRegex(ref data, "\"supplierId\":\\d{5,20}");
// if (supplierIds.Count > 0 && supplierIds[0].Groups.Count > 0)
// {
// var supplierId = supplierIds[0].Groups[0].Value.Replace("\"supplierId\":", "").ParseToLong();
// if (supplierId > 0)
// this.currentSupplierId = supplierId;
// }
//}
});
if (url == "https://mms.pinduoduo.com/janus/api/userinfo") if (url == "https://mms.pinduoduo.com/janus/api/userinfo")
{ {
Task.Run(() => Task.Run(() =>
@@ -528,44 +542,35 @@ namespace TemuKJD.PDDForms.ShopForms
} }
}); });
} }
// 库存上传按钮 if (prodUserSelectForm != null && url.StartsWith("https://mms.pinduoduo.com/glide/mms/goodsCommit/action/edit"))
if (1 == 1 && currentUrl.StartsWith("https://mms.pinduoduo.com/goods/goods_list"))
{ {
Task.Run(() => { try
string sAddInputJs = @" {
document.addEventListener('wheel', function(event) { pddUploadGoodsData = System.Text.Encoding.UTF8.GetString(request.PostData.Elements[0].Bytes);
// 检查滚动方向 var prodParam = JsonHelper.DeserializeJsonToObject<AllBase.Model.Param.PDDProdParam.PDDProductUploadParam>(pddUploadGoodsData);
//if (event.deltaY < 0) { }
// console.log('向上滚动'); catch (Exception ex)
//} else { {
// console.log('向下滚动'); pddUploadGoodsData = "";
//} //prodParam = null;
// 或者使用 event.deltaX 来检查水平滚动 }
//if (event.deltaX < 0) { }
// console.log('向左滚动'); if (prodUserSelectForm != null && url.StartsWith("https://mms.pinduoduo.com/glide/v2/mms/query/commit/detail"))
//} else if (event.deltaX > 0) { {
// console.log('向右滚动'); Task.Run(() =>
//} {
pddSourceGoodsDataTemp = responseData;
// 阻止默认的滚动行为(如果有需要) try
//event.preventDefault(); {
JObject jObj = JObject.Parse(pddSourceGoodsDataTemp);
addGetProdButton(); var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
}); var prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
addGetProdButton(); }
catch (Exception ex)
function addGetProdButton() { {
var productLst = document.getElementsByClassName('goods-id0000000000'); pddSourceGoodsDataTemp = "";
for(i=0; i<productLst.length; i++) { //prodInfo = null;
var addBtnItem = productLst[i].parentElement.parentElement; }
if (addBtnItem.parentElement.innerHTML.indexOf('库存上传') < 0 && addBtnItem.parentElement.innerHTML.indexOf('ID:') >= 0) {
var sSpuId = addBtnItem.innerText.replace('\r','').replace('\n','').replace('ID: ', '');
addBtnItem.outerHTML = addBtnItem.outerHTML.replace(""<section>"",""<section style=\""display:inline; float:left; \"">"")
.replace(""</section>"", ""</section><input type=\""button\"" style=\""display:inline; width:60px; margin-left:10px; margin-top:0px; cursor:pointer; border:1px solid\"" value =\""库存上传\"" onclick=\""shopObj.getThirdProduct('"" + sSpuId + ""','" + this.shop.ShopId + @"')\"">"");
}
}
}";
cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs);
}); });
} }
} }
@@ -1011,5 +1016,225 @@ function getElementWithText(sText)
//ReturnPackageDetailForm form = new ReturnPackageDetailForm(this.shop); //ReturnPackageDetailForm form = new ReturnPackageDetailForm(this.shop);
//form.ShowDialog(); //form.ShowDialog();
} }
private void btnSaveSourceGoodsData_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(pddSourceGoodsDataTemp))
{
BaseMsgForm.ShowError("未捕获到商品详情!");
return;
}
pddSourceGoodsData = pddSourceGoodsDataTemp;
try
{
JObject jObj = JObject.Parse(pddSourceGoodsData);
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
var prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
var skuimgs = prodInfo.sku.Select(s => s.thumb_url).Distinct().ToList();
while (skuimgs.Count < 8)
skuimgs.Add("");
this.pictureBox1.ImageLocation = skuimgs[0].Replace("https://", "http://");
this.pictureBox2.ImageLocation = skuimgs[1].Replace("https://", "http://");
this.pictureBox3.ImageLocation = skuimgs[2].Replace("https://", "http://");
this.pictureBox4.ImageLocation = skuimgs[3].Replace("https://", "http://");
this.pictureBox5.ImageLocation = skuimgs[4].Replace("https://", "http://");
this.pictureBox6.ImageLocation = skuimgs[5].Replace("https://", "http://");
this.pictureBox7.ImageLocation = skuimgs[6].Replace("https://", "http://");
this.pictureBox8.ImageLocation = skuimgs[7].Replace("https://", "http://");
this.numMinPrice.Value = prodInfo.sku.Min(s => s.multi_price).ParseToDecimal() / 100m;
}
catch (Exception ex)
{
BaseMsgForm.ShowError("暂存图片失败:" + ex.Message);
return;
}
BaseMsgForm.ShowInfo("暂存图片成功!");
}
private void btnRestoreSkuImg_Click(object sender, EventArgs e)
{
var commitId = BaseRegex.GetStringQuery(ref currentUrl, "id");
var goodsId = BaseRegex.GetStringQuery(ref currentUrl, "goods_id");
AllBase.Model.Result.PDDResult.PDDProductDetailInfo prodInfo = null;
AllBase.Model.Param.PDDProdParam.PDDProductUploadParam prodParam = null;
if (string.IsNullOrEmpty(commitId) || string.IsNullOrEmpty(goodsId))
{
BaseMsgForm.ShowError("不是商品编辑页面!");
return;
}
if (prodUserSelectForm == null)
{
BaseMsgForm.ShowError("不是从上传界面进入!");
return;
}
if (string.IsNullOrEmpty(pddSourceGoodsData))
{
BaseMsgForm.ShowError("未捕获到商品详情!");
return;
}
if (string.IsNullOrEmpty(pddUploadGoodsData))
{
BaseMsgForm.ShowError("未捕获到商品上传记录!无法还原!");
return;
}
try
{
JObject jObj = JObject.Parse(pddSourceGoodsData);
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
prodParam = JsonHelper.DeserializeJsonToObject<AllBase.Model.Param.PDDProdParam.PDDProductUploadParam>(pddUploadGoodsData);
if (prodInfo.goods_id != prodParam.goods_id || prodInfo.goods_id != goodsId.ParseToLong())
{
BaseMsgForm.ShowError("来源商品和还原商品不一致!无法还原!");
return;
}
}
catch (Exception ex)
{
BaseMsgForm.ShowError("商品数据格式还原失败:" + ex.Message);
return;
}
var prodParamObj = JObject.Parse(pddUploadGoodsData);
prodParamObj["goods_commit_id"] = commitId;
foreach (var skuObj in prodParamObj["skus"])
{
var specNames = "";
foreach (var spec in skuObj["spec"])
{
specNames += spec["spec_name"] + ",";
}
specNames = specNames.TrimEnd(',');
var sourceSku = prodInfo.sku.FirstOrDefault(s => string.Join(",", s.spec.Select(sp => sp.spec_name)) == specNames);
if (sourceSku != null)
{
skuObj["thumb_url"] = sourceSku.thumb_url;
skuObj["thumb_url_file_id"] = sourceSku.thumb_url_file_id;
}
else
{
BaseMsgForm.ShowError("商品数据格式还原失败:有未能匹配的sku");
return;
}
}
var newData = JsonHelper.SerializeObject(prodParamObj);
var saveProdRst = prodUserSelectForm.save_goods_edit_data(shop, newData, goodsId, commitId, false, "edit");
if (!saveProdRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref saveProdRst, "error_msg");
if (string.IsNullOrEmpty(error))
error = saveProdRst;
BaseMsgForm.ShowError("保存失败 " + error);
return;
}
Thread.Sleep(Randomx.GetId(100, 600));
var submitProdRst = prodUserSelectForm.submit_goods_edit(shop, goodsId, commitId, false, "edit");
if (!submitProdRst.Contains("\"success\":true"))
{
var error = BaseRegex.GetStringJson(ref submitProdRst, "error_msg");
if (string.IsNullOrEmpty(error))
error = submitProdRst;
BaseMsgForm.ShowError("提交失败 " + error);
return;
}
cefWebBrowser.Load("https://mms.pinduoduo.com/goods/goods_list?msfrom=mms_sidenav");
BaseMsgForm.ShowInfo("还原并提交成功!");
}
private void btnSignActivity_Click(object sender, EventArgs e)
{
var commitId = BaseRegex.GetStringQuery(ref currentUrl, "id");
var goodsId = BaseRegex.GetStringQuery(ref currentUrl, "goods_id");
AllBase.Model.Result.PDDResult.PDDProductDetailInfo prodInfo = null;
AllBase.Model.Param.PDDProdParam.PDDProductUploadParam prodParam = null;
if (string.IsNullOrEmpty(commitId) || string.IsNullOrEmpty(goodsId))
{
BaseMsgForm.ShowError("不是商品编辑页面!");
return;
}
if (prodUserSelectForm == null)
{
BaseMsgForm.ShowError("不是从上传界面进入!");
return;
}
if (string.IsNullOrEmpty(pddSourceGoodsData))
{
BaseMsgForm.ShowError("未捕获到商品详情!");
return;
}
if (string.IsNullOrEmpty(pddUploadGoodsData))
{
BaseMsgForm.ShowError("未捕获到商品上传记录!无法报名!");
return;
}
try
{
JObject jObj = JObject.Parse(pddSourceGoodsData);
var prodInfoStr = JsonHelper.SerializeObject(jObj["result"]);
prodInfo = JsonHelper.DeserializeJsonToObject<AllBase.Model.Result.PDDResult.PDDProductDetailInfo>(prodInfoStr);
prodParam = JsonHelper.DeserializeJsonToObject<AllBase.Model.Param.PDDProdParam.PDDProductUploadParam>(pddUploadGoodsData);
if (prodInfo.goods_id != prodParam.goods_id || prodInfo.goods_id != goodsId.ParseToLong())
{
BaseMsgForm.ShowError("来源商品和还原商品不一致!无法报名!");
return;
}
}
catch (Exception ex)
{
BaseMsgForm.ShowError("一键报名活动失败:" + ex.Message);
return;
}
btnSignActivity.Text = "报名中请稍候";
Task.Run(() =>
{
try
{
foreach (var sku in prodParam.skus)
{
sku.multi_price = (numMinPrice.Value * 100).ParseToInt();
sku.price = sku.multi_price + 100;
}
var result = prodUserSelectForm.SignAcitvity(shop, prodParam);
Invoke(new Action(() =>
{
btnSignActivity.Text = "一键报名活动";
if (!string.IsNullOrEmpty(result))
{
BaseMsgForm.ShowError(result);
}
else
{
BaseMsgForm.ShowInfo("一键报名活动成功");
}
}));
}
catch (Exception ex)
{
}
});
}
private void pictureBox1_Click(object sender, EventArgs e)
{
var pb = sender as PictureBox;
if (!string.IsNullOrEmpty(pb?.ImageLocation))
{
ToolForms.ShowImgForm imgFrom = new ToolForms.ShowImgForm(pb.ImageLocation);
imgFrom.ShowDialog();
}
}
private void label3_Click(object sender, EventArgs e)
{
}
} }
} }
+37 -9
View File
@@ -34,6 +34,7 @@ namespace TemuKJD.ToolForms
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btnCopy = new DevComponents.DotNetBar.PanelEx(); this.btnCopy = new DevComponents.DotNetBar.PanelEx();
this.btnCopyUrl = new DevComponents.DotNetBar.PanelEx(); this.btnCopyUrl = new DevComponents.DotNetBar.PanelEx();
this.btnClose = new DevComponents.DotNetBar.PanelEx();
this.btnSave = new DevComponents.DotNetBar.PanelEx(); this.btnSave = new DevComponents.DotNetBar.PanelEx();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
@@ -57,9 +58,10 @@ namespace TemuKJD.ToolForms
// //
// splitContainer1.Panel2 // splitContainer1.Panel2
// //
this.splitContainer1.Panel2.Controls.Add(this.btnSave);
this.splitContainer1.Panel2.Controls.Add(this.btnCopy); this.splitContainer1.Panel2.Controls.Add(this.btnCopy);
this.splitContainer1.Panel2.Controls.Add(this.btnCopyUrl); this.splitContainer1.Panel2.Controls.Add(this.btnCopyUrl);
this.splitContainer1.Panel2.Controls.Add(this.btnSave); this.splitContainer1.Panel2.Controls.Add(this.btnClose);
this.splitContainer1.Size = new System.Drawing.Size(648, 686); this.splitContainer1.Size = new System.Drawing.Size(648, 686);
this.splitContainer1.SplitterDistance = 648; this.splitContainer1.SplitterDistance = 648;
this.splitContainer1.TabIndex = 1; this.splitContainer1.TabIndex = 1;
@@ -82,7 +84,7 @@ namespace TemuKJD.ToolForms
this.btnCopy.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCopy.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCopy.DisabledBackColor = System.Drawing.Color.Empty; this.btnCopy.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCopy.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCopy.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopy.Location = new System.Drawing.Point(338, 4); this.btnCopy.Location = new System.Drawing.Point(295, 4);
this.btnCopy.Name = "btnCopy"; this.btnCopy.Name = "btnCopy";
this.btnCopy.Size = new System.Drawing.Size(65, 26); this.btnCopy.Size = new System.Drawing.Size(65, 26);
this.btnCopy.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnCopy.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -107,7 +109,7 @@ namespace TemuKJD.ToolForms
this.btnCopyUrl.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCopyUrl.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCopyUrl.DisabledBackColor = System.Drawing.Color.Empty; this.btnCopyUrl.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCopyUrl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCopyUrl.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCopyUrl.Location = new System.Drawing.Point(237, 4); this.btnCopyUrl.Location = new System.Drawing.Point(194, 4);
this.btnCopyUrl.Name = "btnCopyUrl"; this.btnCopyUrl.Name = "btnCopyUrl";
this.btnCopyUrl.Size = new System.Drawing.Size(94, 26); this.btnCopyUrl.Size = new System.Drawing.Size(94, 26);
this.btnCopyUrl.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnCopyUrl.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -125,6 +127,31 @@ namespace TemuKJD.ToolForms
this.btnCopyUrl.Text = "复制图片地址"; this.btnCopyUrl.Text = "复制图片地址";
this.btnCopyUrl.Click += new System.EventHandler(this.btnCopyUrl_Click); this.btnCopyUrl.Click += new System.EventHandler(this.btnCopyUrl_Click);
// //
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClose.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClose.Location = new System.Drawing.Point(584, 3);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(56, 26);
this.btnClose.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClose.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClose.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClose.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClose.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClose.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClose.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClose.Style.GradientAngle = 90;
this.btnClose.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClose.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClose.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClose.TabIndex = 481;
this.btnClose.Text = "关闭";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnSave // btnSave
// //
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -132,9 +159,9 @@ namespace TemuKJD.ToolForms
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty; this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(584, 3); this.btnSave.Location = new System.Drawing.Point(366, 4);
this.btnSave.Name = "btnSave"; this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(56, 26); this.btnSave.Size = new System.Drawing.Size(65, 26);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
@@ -146,9 +173,9 @@ namespace TemuKJD.ToolForms
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 481; this.btnSave.TabIndex = 505;
this.btnSave.Text = "关闭"; this.btnSave.Text = "保存本地";
this.btnSave.Click += new System.EventHandler(this.btnClose_Click); this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
// //
// ShowImgForm // ShowImgForm
// //
@@ -177,8 +204,9 @@ namespace TemuKJD.ToolForms
private System.Windows.Forms.SplitContainer splitContainer1; private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
private DevComponents.DotNetBar.PanelEx btnSave; private DevComponents.DotNetBar.PanelEx btnClose;
private DevComponents.DotNetBar.PanelEx btnCopy; private DevComponents.DotNetBar.PanelEx btnCopy;
private DevComponents.DotNetBar.PanelEx btnCopyUrl; private DevComponents.DotNetBar.PanelEx btnCopyUrl;
private DevComponents.DotNetBar.PanelEx btnSave;
} }
} }
+23
View File
@@ -80,5 +80,28 @@ namespace TemuKJD.ToolForms
BaseMsgForm.ShowError("复制图片到剪贴板失败: " + ex.Message); BaseMsgForm.ShowError("复制图片到剪贴板失败: " + ex.Message);
} }
} }
private void btnSave_Click(object sender, EventArgs e)
{
if(this.pictureBox1.Image == null)
{
BaseMsgForm.ShowError("图片为空!");
return;
}
string fileName = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss") + ".jpg";
if (!string.IsNullOrEmpty(this.pictureBox1.ImageLocation))
{
fileName = this.pictureBox1.ImageLocation.Replace("://",".").Replace('/', '.');
}
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "JPeg Image|*.jpg;*.jpeg";
sfd.Title = "保存图片";
sfd.FileName = fileName;
if ( sfd.ShowDialog() ==DialogResult.OK)
{
pictureBox1.Image.Save(sfd.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
}
}
} }
} }