diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index 5bff925..28b92a5 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -189,6 +189,9 @@ + + + @@ -249,6 +252,8 @@ + + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 74fe0b1..f472895 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 779; + public static int VersionCount = 781; //public static int VersionCount = 613; /// @@ -733,6 +733,10 @@ namespace AllBase { return LoginApiUrl + "/dyxd_" + file + "?obj=" + BaseClass.MainPath + "/dyxd_" + file; } + if (BaseClass.MainPath == "weixin") + { + return LoginApiUrl + "/wxxd_" + file + "?obj=" + BaseClass.MainPath + "/wxxd_" + file; + } return LoginApiUrl + "/" + file+ "?obj=" + BaseClass.MainPath + "/" + file; } diff --git a/AllBase/Model/Param/WXParam/WXGetShortTitleParam.cs b/AllBase/Model/Param/WXParam/WXGetShortTitleParam.cs new file mode 100644 index 0000000..b4ced44 --- /dev/null +++ b/AllBase/Model/Param/WXParam/WXGetShortTitleParam.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Param.WXParam +{ + public class WXGetShortTitleParam + { + public string productTitle { get; set; } // "大码妈妈女装裤子阔口裤保暖", + public List headImgUrls { get; set; } // ["https://wst.wxapp.tc.qq.com/160/20304/snscosdownload/SH/reserved/6xykWLEnztLdv6DMZticK1qOlvspjA8N5W55WGAEBK65jk1c864AV1iblCuiat3cgEx7v6vAnfhZIBWzrZY66Akkw", ...] + public List categories { get; set; } + } + + public class categorieParam + { + public string catId { get; set; } // "10000111", + public string catName { get; set; } // "服饰内衣" + + } +} diff --git a/AllBase/Model/Param/WXParam/WXUploadProductInitParam.cs b/AllBase/Model/Param/WXParam/WXUploadProductInitParam.cs new file mode 100644 index 0000000..124ffd6 --- /dev/null +++ b/AllBase/Model/Param/WXParam/WXUploadProductInitParam.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Param.WXParam +{ + public class WXUploadProductInitParam + { + public productInitParam product { get; set; } = new productInitParam(); + } + + public class productInitParam + { + public productInitInfoParam info { get; set; } = new productInitInfoParam(); + public object productKey { get; set; } = new object(); + public List checkTypes { get; set; } = new List() { 2, 4 }; + /// + /// 毫秒时间戳 + "-" + guid // "1767870757369-3d462d80-3b2b-4887-89a0-0a21164d27b7" + /// + public string sessionId { get; set; } = + (long)(DateTime.Now - TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1))).TotalMilliseconds + "-" + Guid.NewGuid().ToString(); + } + public class productInitInfoParam + { + public int? releaseMode { get; set; } = 0; + /// + /// 商品标题 + /// + public string title { get; set; } // "妈妈长裤老年人2025冬季新款阔脚裤", + public string model { get; set; } = ""; + public string subTitle { get; set; } = ""; + public List headImg { get; set; } = new List(); // ["https://wst.wxapp.tc.qq.com/160/20304/snscosdownload/SH/reserved/6xykWLEnztJH3jib01ZGXYJxkMWM9ogXvSq8VfZicnzPUghvTukFPwicsRnR3EJff480Rvxot7Vz0jIBb7K4B7hUw?token=x5Y29zUxcibCKICN3RTcFCqUzn2FoG05oBlhD1Kd3Jp8kNIMa7uiawVyJ8GdTAZ0D7&idx=1&expire=1768130066", ...] + public productInitDetailParam detail { get; set; } = new productInitDetailParam(); + public List param { get; set; } = new List(); + public object expressInfo { get; set; } = new object(); + public object serviceDesc { get; set; } = new object(); + public List qualificationUrl { get; set; } = new List(); + public List qualificationList { get; set; } = new List(); + public object sizeChartInfo { get; set; } = new object(); + public string brandId { get; set; } = ""; + public List category { get; set; } = new List(); + public int? categoryType { get; set; } = 2; + public List shopcatId { get; set; } = new List(); + public spuLimitedInitParam spuLimited { get; set; } + public int? productType { get; set; } = 1; + public couponcodeInfoParam couponcodeInfo { get; set; } = new couponcodeInfoParam(); + public string spuCode { get; set; } = ""; + public int? consumeStockType { get; set; } = 0; + public int? deliverMethod { get; set; } = 0; + public List deliverAcctType { get; set; } = new List(); + public object extraService { get; set; } = new object(); + public List productSaleAttrs { get; set; } = new List(); + public object afterSaleInfo { get; set; } = new object(); + public bool? hideInWindow { get; set; } = false; + public object displayGeographyCert { get; set; } = new object(); + public object leagueItemInfo { get; set; } = new object(); + public timingOnsaleInfoInitParam timingOnsaleInfo { get; set; } + public givePresentInfoInitParam givePresentInfo { get; set; } + } + public class givePresentInfoInitParam + { + public int? usePresentHeadImg { get; set; } = 0; + } + + public class timingOnsaleInfoInitParam + { + public int? status { get; set; } = 0; + public int? onsaleTime { get; set; } = 0; + public int? isHidePrice { get; set; } = 0; + public int? isHideParam { get; set; } = 0; + + } + + public class couponcodeInfoParam + { + public int? verifyType { get; set; } = 0; + public validInfoParam validInfo { get; set; } = new validInfoParam(); + } + public class validInfoParam + { + public int? validType { get; set; } = 2; + public int? validDayNum { get; set; } = 0; + public string startTime { get; set; } = ""; + public string endTime { get; set; } = ""; + + } + public class spuLimitedInitParam + { + public int? periodType { get; set; } = 0; + public string limitedBuyNum { get; set; } = ""; + + } + + public class productInitDetailParam + { + public string desc { get; set; } = ""; + public List detailImg { get; set; } = new List(); + } +} \ No newline at end of file diff --git a/AllBase/Model/Param/WXParam/WXUploadProductParam.cs b/AllBase/Model/Param/WXParam/WXUploadProductParam.cs new file mode 100644 index 0000000..f6115b7 --- /dev/null +++ b/AllBase/Model/Param/WXParam/WXUploadProductParam.cs @@ -0,0 +1,755 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Param.WXParam +{ + public class WXUploadProductParam + { + public int? from { get; set; } = 2; // 2, + public WXProductParam product { get; set; } = new WXProductParam(); + public int? type { get; set; } = 0; + public bool? listingFlag { get; set; } = true; + public bool? skipCheckAttr { get; set; } = true; + public sessionInfoParam sessionInfo { get; set; } = new sessionInfoParam(); + } + + public class sessionInfoParam + { + //"1767692870470-ea4c0227-4579-4647-813b-7f4e8a190ad6" + public string sessionId { get; set; } = + (long)(DateTime.Now - TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1))).TotalMilliseconds + "-" + Guid.NewGuid().ToString(); + } + + public class WXProductParam + { + public productKeyParam productKey { get; set; } = new productKeyParam(); + public int? status { get; set; } // 5, + public int? editStatus { get; set; } // 4, + public string auditReason { get; set; } = ""; + public auditResultInfoParam auditResultInfo { get; set; } = new auditResultInfoParam(); + public productInfoParam info { get; set; } = new productInfoParam(); + public List productSkus { get; set; } = new List(); + public int? categoryType { get; set; } = 2; + public bool? isGoodsSpecialCategory { get; set; } = true; + } + + public class productSkuParam + { + public string __skuKey { get; set; } // "尺码.M_颜色.蓝色", + public string __skuTitle { get; set; } // "蓝色 M", + public bool? __skuSelected { get; set; } = true; + public skuKeyParam skuKey { get; set; } = new skuKeyParam(); + public string skuId { get; set; } // "6134573242", + public productSkuInfoParam productSkuInfo { get; set; } = new productSkuInfoParam(); + public int? status { get; set; } = 5; + } + + public class productSkuInfoParam + { + public string thumbImg { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c85e9000a3bff29d22878fedda00b000000a000004f50", + public int? salePrice { get; set; } // 10000, + public string skuCode { get; set; } = ""; + public string barCode { get; set; } = ""; + public stockInfoParam stockInfo { get; set; } = new stockInfoParam(); + public saleParamParam saleParam { get; set; } = new saleParamParam(); + public skuDeliverInfoParam skuDeliverInfo { get; set; } = new skuDeliverInfoParam(); + } + + public class skuDeliverInfoParam + { + public int? stockType { get; set; } = 0; + public int? fullPaymentPresaleDeliveryType { get; set; } = 0; + public string presaleBeginTime { get; set; } = "0"; + public string presaleEndTime { get; set; } = "0"; + public int? spotDeliveryTime { get; set; } = 1; + public string fullPaymentPresaleDeliveryTime { get; set; } = "0"; + public int? spotAfterPresaleEnd { get; set; } = 0; + + } + + public class saleParamParam + { + /// + /// 第一个参数为sku spec类别 categoryKeyParam + /// 第二个参数为sku spec数值 categoryValueParam + /// + public List categorys { get; set; } + } + + public class categoryKeyParam + { + public bool? isCustomize { get; set; } // true, + public bool? isMainSale { get; set; } // true, + public string name { get; set; } // "颜色", + public int? id { get; set; } // 3, + public string catId { get; set; } // "颜色", + public int? value { get; set; } // 0, + public string label { get; set; } // "自定义规格", + public int? priority { get; set; } // 1, + public skuCatInfoParam catInfo { get; set; } // { "isCustomize": 1 }, // 自定义属性才有 + public int? catType { get; set; } // 8 //自定义属性才有 + + //以下自定义属性没有 + public string type { get; set; } // "select_one", + public string hint { get; set; } // "", + public string remark { get; set; } // "", + public bool? appendAllowed { get; set; } // true, + public releaseParam normalRelease { get; set; } // { "ruleType": 2 }, + public releaseParam quickRelease { get; set; } // { "ruleType": 0 }, + public bool? isRequired { get; set; } // false, + public bool? display { get; set; } // true, + public string data { get; set; } // "", + public int? weight { get; set; } // 0, + public decimal? key { get; set; } // 0.3529221028790839, + public List selectList { get; set; } + public string unit { get; set; } // "", + public string unitValue { get; set; } // "", + public bool? show { get; set; } // false, + public string initData { get; set; } // "" + } + public class categoryValueParam + { + public string catId { get; set; } // "1767670333303", + public string name { get; set; } // "黑色", + public string fCatId { get; set; } // "2000000000006", + public string catType { get; set; } // 0, + public string brandCat { get; set; } // "0", + public categoryValueCatInfo catInfo { get; set; } + + public string desc { get; set; } = ""; + public int? priority { get; set; } = 1; + public string createTime { get; set; } = "0"; + public string updateTime { get; set; } = "0"; + public int? version { get; set; } = 0; + public string auditId { get; set; } = "0"; + public bool? leaf { get; set; } = false; + public int? state { get; set; } = 0; + public string tips { get; set; } = ""; + public string detail { get; set; } = ""; + public string thumbImg { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c85e9000a3bff29d22878fedda00b000000a000004f50", + public string skuNameValue { get; set; } = "黑色"; + + } + + public class categoryValueCatInfo + { + public List businessInfoList { get; set; } = new List(); + public int? isCustomize { get; set; } = 0; + public int? editByUser { get; set; } = 1; + public int? isRequired { get; set; } = 0; + public int? specType { get; set; } = 0; + public string specTypeDesc { get; set; } = ""; + public string attrTemplateId { get; set; } = "0"; + public string attrTemplateName { get; set; } = ""; + public int? maxAttrNum { get; set; } = 0; + public int? catLevel { get; set; } = 0; + public int? highestPriceFixing { get; set; } = 0; + public string wording { get; set; } = ""; + public string description { get; set; } = ""; + public int? maxProductNum { get; set; } = 0; + public string qualification { get; set; } = ""; + public string productQualification { get; set; } = ""; + public string quaNeedAudit { get; set; } = ""; + public int? maxQualificationImg { get; set; } = 0; + public long? catGroup { get; set; } // 4294967295, + public string qualificationId { get; set; } = "0"; + public int? qualificationType { get; set; } = 0; + public int? productQualificationType { get; set; } = 0; + public string productQualificationId { get; set; } = "0"; + public bool? isVirtualGoods { get; set; } = false; + public string limit { get; set; } = "0"; + public int? inputType { get; set; } = 0; + public int? componentCatGroup { get; set; } = 0; + public int? isHide { get; set; } = 0; + public bool? onlyWriteOffInShop { get; set; } = false; + + } + + public class skuSelectParam + { + public string label { get; set; } // "XS", + public string value { get; set; } // "XS" + } + + public class skuCatInfoParam + { + public int? isCustomize { get; set; } // 1 + } + + public class stockInfoParam + { + public int? stockNum { get; set; } // 5 + } + + public class skuKeyParam + { + public string skuId { get; set; } // "6134573242" + public productKeyDetailParam productKey { get; set; } + } + + public class productKeyDetailParam + { + public string productId { get; set; } // "10000408181873", + public string outProductId { get; set; } = ""; + public string appid { get; set; } = ""; + public string originProductId { get; set; } = "0"; + public int? productKeyType { get; set; } = 0; + public int? stockType { get; set; } = 0; + public string stockTypeId { get; set; } = ""; + public string promoterKey { get; set; } = ""; + } + + public class productInfoParam // info + { + public List headImg { get; set; } = new List(); // [ "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c7f5f000d23e709f79176079a1715000000a000004f50" ...], + public List category { get; set; } = new List(); + public List param { get; set; } = new List(); + public List productSaleAttrs { get; set; } = new List(); + public List shopcatId { get; set; } = new List(); + public List qualificationUrl { get; set; } = new List(); + public List thirdCategoryHistories { get; set; } = new List(); + public List headVideoInfo { get; set; } = new List(); + public List labels { get; set; } = new List(); + public List qualificationList { get; set; } = new List(); + public List productHeadimgInfo { get; set; } + public List deliverAcctType { get; set; } = new List(); + public List headImgInfos { get; set; } + public List iconTags { get; set; } = new List(); + public List orderIconTags { get; set; } = new List(); + public string title { get; set; } // "中老年妈妈牛仔阔腿裤2025秋冬季新款女士显瘦高腰宽松直筒牛仔裤", + public string subTitle { get; set; } = ""; // "", + public string brand { get; set; } // "", + public string model { get; set; } = ""; // "", + public productDetailParam detail { get; set; } + /// + /// 品牌编号 + /// + //public string brandId { get; set; } = "2100000000"; // + public long? brandId { get; set; } = 2100000000; + public skuIdListParam skuIdList { get; set; } + public skuListParam skuList { get; set; } + public recommendCategoryParam recommendCategory { get; set; } + public string listingTime { get; set; } // "1767693374", + public string totalStockNum { get; set; } // "0", + public serviceDescParam serviceDesc { get; set; } + /// + /// 运费信息 + /// + public expressInfoParam expressInfo { get; set; } + public string totalSoldNum { get; set; } = "0"; + public string qualificationWording { get; set; } = ""; + public string appidForMedia { get; set; } = ""; + public snapshotInfoParam snapshotInfo { get; set; } + public int? shopcatVersion { get; set; } = 0; + public string totalOrderNum { get; set; } = "0"; + public string totalVisitNum { get; set; } = "0"; + public int? uploadSource { get; set; } = 6; + public spuLimitedParam spuLimited { get; set; } + public int? originUploadSource { get; set; } = 6; + public int? virtualType { get; set; } = 2; + public int? productType { get; set; } = 1; + /// + /// extCode 货号 + /// + public string spuCode { get; set; } = ""; + public int? asyncUpproductRet { get; set; } = 0; + public int? illegalRecordId { get; set; } = 0; + public string headImage { get; set; } = ""; + public string componentUin { get; set; } = "0"; + public string copyFromSpuId { get; set; } = "0"; + public int? deliverMethod { get; set; } = 0; + public int? presaleTag { get; set; } = 0; + public int? presaleTagType { get; set; } = 0; + public int? maxPresaleEndTime { get; set; } = 0; + public extraServiceParam extraService { get; set; } + /// + /// 售后信息 + /// + public afterSaleInfoParam afterSaleInfo { get; set; } + public int? lastRefundOrderDays { get; set; } = 0; + public string nodeCatId { get; set; } // "547705", + public sizeChartInfoParam sizeChartInfo { get; set; } = new sizeChartInfoParam(); + public string lastEditDraftTime { get; set; } // "1767693275"; + public customConfigParam customConfig { get; set; } = new customConfigParam(); + public string updateStatusTime { get; set; } = "0"; + /// + /// 短标题 + /// + public string shortTitle { get; set; } // "显瘦高腰中老年宽松牛仔裤", + public int? barCodeType { get; set; } = 0; + public string originNodeCatId { get; set; } // "547705", + public int? changeCatLevel { get; set; } = 0; + public int? releaseMode { get; set; } = 0; + public bool? isDuplicatedInShop { get; set; } = false; + /// + /// ai短标题 + /// + public string aiGenShortTitle { get; set; } // "显瘦高腰中老年宽松牛仔裤", + public bool? empty { get; set; } = false; + public string uniqueId { get; set; } // "4330209544501837823", + public string titleUtf8Token { get; set; } = ""; + public bool? hideInWindow { get; set; } = false; + public bool? canGivePresent { get; set; } = false; + public bool? canGenOrder { get; set; } = false; + public int? presentPriceLimit { get; set; } = 0; + public bool? showPresentBtn { get; set; } = false; + public string canntGivePresnetMsg { get; set; } = ""; + public string canntGenOrderMsg { get; set; } = ""; + public bool? canAddShopBag { get; set; } = false; + public bool? canGiveGroupPresent { get; set; } = false; + public bool? presentNeedSelectSku { get; set; } = true; + public givePresentInfoParam givePresentInfo { get; set; } = new givePresentInfoParam(); + public bool? hideBottomBar { get; set; } = false; + public bool? canAddUserFavory { get; set; } = false; + public string extendAuditData { get; set; } = ""; + public int? consumeStockType { get; set; } = 0; + public int? auditFromPersonalTrans { get; set; } = 0; + public bool? isClipEditGray { get; set; } = false; + public List promotingVideoInfos { get; set; } = new List(); + public timingOnsaleInfoParam timingOnsaleInfo { get; set; } + public leagueItemInfoParam leagueItemInfo { get; set; } + } + + public class timingOnsaleInfoParam + { + public int? status { get; set; } = 0; + public int? isHidePrice { get; set; } = 0; + + } + + public class leagueItemInfoParam + { + public int? itemSwitch { get; set; } = 0; + public int? itemRatio { get; set; } = 0; + public int? headSupplierPublicItemSwitch { get; set; } = 0; + public int? headSupplierPublicItemServiceRatio { get; set; } = 0; + } + + public class givePresentInfoParam + { + public bool? supportPresentCard { get; set; } = false; + public bool? canChangeSkus { get; set; } = false; + public int? usePresentHeadImg { get; set; } = 0; + } + + public class customConfigParam + { + public List customType { get; set; } = new List(); + public List customTextInputTypes { get; set; } = new List(); + public List descImgList { get; set; } = new List(); + public int? customTextMaxLength { get; set; } = 0; + public int? customTextInputType { get; set; } = 0; + public int? customTextDirection { get; set; } = 0; + public int? customTextFontSize { get; set; } = 0; + public string customTextColor { get; set; } = ""; + public bool? openCustom { get; set; } = false; + public string deliveryTime { get; set; } = "0"; + public int? previewType { get; set; } = 0; + + } + + public class sizeChartInfoParam + { + public List specificationList { get; set; } = new List(); + public bool? enable { get; set; } = false; + public string templateId { get; set; } = "0"; + public string title { get; set; } = ""; + public string comment { get; set; } = ""; + + } + + public class afterSaleInfoParam + { + /// + /// 售后服务地址Id + /// + public string afterSaleAddressId { get; set; } // "56417904002" + } + + public class extraServiceParam + { + public int? sevenDayReturn { get; set; } = 1; + public int? payAfterUse { get; set; } = 1; + public int? freightInsurance { get; set; } = 1; // 运费险 + public int? fastRefund { get; set; } = 1; // 快速退款 + public int? damageGuarantee { get; set; } = 0; + public int? fakeOnePayFour { get; set; } = 0; + public int? refundOrderTime { get; set; } = 0; + public int? deliverAfterCheck { get; set; } = 0; + public int? exchangeSupport { get; set; } = 1; + public int? buyWithConfidence { get; set; } = 0; + public int? seniorFastRefund { get; set; } = 0; + public int? seniorCustomerService { get; set; } = 0; + public int? seniorFreeReturn { get; set; } = 0; + public int? seniorPlatformSupport { get; set; } = 0; + public int? seniorFastExchange { get; set; } = 0; + public int? elderlyUserFastRefund { get; set; } = 0; + public int? elderlyUserCustomerService { get; set; } = 0; + public int? elderlyUserFreeReturn { get; set; } = 0; + public int? elderlyUserPlatformSupport { get; set; } = 0; + public int? elderlyUserFastExchange { get; set; } = 0; + public int? newUserFastRefund { get; set; } = 0; + public int? newUserCustomerService { get; set; } = 0; + public int? newUserFreeReturn { get; set; } = 0; + public int? newUserPlatformSupport { get; set; } = 0; + public int? newUserFastExchange { get; set; } = 0; + } + + public class spuLimitedParam + { + public int periodType { get; set; } = 0; + public int limitedBuyNum { get; set; } = 0; + public int createTime { get; set; } = 0; + public int updateTime { get; set; } = 0; + } + + public class snapshotInfoParam + { + public string snapshotId { get; set; } // "1115465280", + public string auditId { get; set; } // "8248460949" + + } + + public class expressInfoParam + { + /// + /// 运费模板 + /// + public string templateId { get; set; } // "763996138004", + //public string weight { get; set; } = "0"; + } + + public class serviceDescParam + { + public List serviceList { get; set; } = new List(); + public string desc { get; set; } = ""; + } + + /// + /// 是否使用ai推荐类目信息,新建商品进入的照抄 + /// + public class recommendCategoryParam + { + public bool? isAccepted { get; set; } = false; + public List categoryNames { get; set; } = new List(); + public string recommendSource { get; set; } = "none"; + public string interfaceName { get; set; } = ""; + public int? useNewInterface { get; set; } = 0; + } + + public class skuListParam + { + public skuInfoParam skuInfo { get; set; } + public int? minPrice { get; set; } // 10000, + public int? maxPrice { get; set; } // 10000, + public int? discountedPrice { get; set; } = 0; + public bool? isDiscounted { get; set; } = false; + public int? estimatePrice { get; set; } = 0; + public int? leagueDiscountedPrice { get; set; } = 0; + public string estimateCouponId { get; set; } = "0"; + public string minPriceWording { get; set; } = ""; + public string buyButtonWording { get; set; } = ""; + public string microMemberDiscountedPrice { get; set; } = "0"; + public int? estimatePricePriceType { get; set; } = 0; + public string withoutMicroMemberPriceWording{ get; set; } = ""; + public int? originPrice { get; set; } = 0; + public int? discountRate { get; set; } = 0; + public string estimateBatchId{ get; set; } = ""; + public int? estimateCouponPromoteType { get; set; } = 0; + public string estimatePlatformDiscountCouponId{ get; set; } = "0"; + public int? estimatePlatformDiscountCouponPromoteType { get; set; } = 0; + public int? referencePrice { get; set; } = 0; + public int? originMaxPrice { get; set; } = 0; + public string bulkbuyDiscountedPrice{ get; set; } = "0"; + public string bulkbuyActivityId{ get; set; } = "0"; + public string estimateCashCouponDiscountCouponId{ get; set; } = ""; + public int? subsidyQualificationStatus { get; set; } = 0; + public int? subsidyStatus { get; set; } = 0; + public string subsidySubPriceWording{ get; set; } = ""; + public string subsidyBannerWording{ get; set; } = ""; + public string estimateSubsidyRuleId{ get; set; } = "0"; + public string subsidyLocationWording{ get; set; } = ""; + public string subsidyDetailWording{ get; set; } = ""; + public string preEstimatePrice{ get; set; } = "0"; + public string bulkbuyNeedGap{ get; set; } = "0"; + public int? bulkbuyNeedProductCnt { get; set; } = 0; + public bool? canUseSubsidy{ get; set; } = false; + public string bulkbuyQuotaId{ get; set; } = ""; + public int? estimateCashCouponPromoteType { get; set; } = 0; + public string minPriceSkuId{ get; set; } = "0"; + public int? bulkbuyNeedPeopleCnt { get; set; } = 0; + public int? minPriceType { get; set; } = 0; + public string canSubsidyLocationWording{ get; set; } = ""; + public int? subsidyType { get; set; } = 0; + public int? estimateCashCouponSecondBusinessScene { get; set; } = 0; + public string estimateActivityDiscountedPrice{ get; set; } = "0"; + public string estimateActivityId{ get; set; } = "0"; + public string estimateCashCouponDiscountPrice{ get; set; } = "0"; + public string estimateFavorCouponId{ get; set; } = "0"; + public string defaultSelectedSkuId{ get; set; } = "0"; + public int? detailTagType { get; set; } = 0; + + } + + public class skuInfoParam + { + public List skuActivityInfos { get; set; } = new List(); + public string skuId { get; set; } // "6134651417", + public int? price { get; set; } // 10000, + public string skuSnapId { get; set; } = "0"; // "0", + public bool? isDiscounted { get; set; } = false; // false, + public int? discountedPrice { get; set; } = 0; // 0, + public int? estimatePrice { get; set; } = 0; // 0, + public string estimateCouponId { get; set; } = "0"; // "0", + public bool? canUseCoupon { get; set; } = false; // false, + public int? marketPrice { get; set; } = 0; // 0, + public int? priceType { get; set; } = 0; // 0, + public string microMemberDiscountedPrice { get; set; } = "0"; // "0", + public bool? runOutStock { get; set; } = false; // false, + public int? originPrice { get; set; } = 0 ;// 0, + public int? discountRate { get; set; } = 0; // 0, + public string estimateBatchId { get; set; } = ""; // "", + public int? estimateCouponPromoteType { get; set; } = 0;// 0, + public string estimatePlatformDiscountCouponId { get; set; } = "0"; // "0", + public int? estimatePlatformDiscountCouponPromoteType { get; set; } = 0;// 0, + public int? referencePrice { get; set; } = 0; // 0, + public string priceWording { get; set; } = ""; // "", + public string bulkbuyDiscountedPrice { get; set; } = "0"; // "0", + public string bulkbuyActivityId { get; set; } = "0"; // "0", + public string estimateCashCouponDiscountCouponId { get; set; } = ""; // "", + public string estimateActivityDiscountedPrice { get; set; } = "0"; // "0", + public string estimateActivityId { get; set; } = "0"; // "0", + public string estimateCashCouponDiscountPrice { get; set; } = "0"; // "0", + public string estimateSubsidyRuleId { get; set; } = "0"; // "0", + public string barCode { get; set; } = ""; // "", + public string preEstimatePrice { get; set; } = "0"; // "0", + public bool? canUseSubsidy { get; set; } = false; // false, + public int? estimateCashCouponPromoteType { get; set; } = 0; // 0, + public int? estimatePriceType { get; set; } = 0; // 0, + public int? subsidyType { get; set; } = 0; // 0, + public bool? isNewBulkbuy { get; set; } = false; // false, + public int? estimateCashCouponSecondBusinessScene { get; set; } = 0; // 0, + public string estimateFavorCouponId { get; set; } = "0"; // "0", + public int? detailTagType { get; set; } = 0; // 0, + public bool? limitedDiscountNeedReplaceStock { get; set; } = false; // false, + public string limitedDiscountStock { get; set; } = "0"; // "0" + } + + public class skuIdListParam + { + public List skuIds { get; set; } // [ "6134651417", "6134573242" ] + } + + public class productDetailParam + { + public List detailImg { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c863e00022b1f09b35b0e7ad91715000000a000004f50", ...] + public List detailVideos { get; set; } = new List(); + public List detailVideoInfo { get; set; } = new List(); + public List carouselImg { get; set; } = new List(); + public string desc { get; set; } = ""; // "" + } + + public class headImgInfoParam + { + public string imgUrl { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c7f5f000d23e709f79176079a1715000000a000004f50", + public int? imgWidth { get; set; } // 800, + public int? imgHeight { get; set; } // 800 + } + + public class productHeadimgInfoParam + { + public List colors { get; set; } = new List(); + public string imgUrl { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c7f5f000d23e709f79176079a1715000000a000004f50", + public mainColorParam mainColors { get; set; } + } + + public class mainColorParam + { + public int? red { get; set; } // 80, + public int? green { get; set; } // 78, + public int? blue { get; set; } // 77 + + } + + public class productSaleAttrParam + { + public string key { get; set; } // "颜色", + public List items { get; set; } // 最后要补一个空的 + public bool hasImg { get; set; } + } + + public class productSaleAttrItemParam + { + public string value { get; set; } // "蓝色", + public string imgUrl { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c85e5000dea52198a3d9c98a71715000000a000004f50" + + } + + public class propParam + { + public List categorys { get; set; } + } + + public class categoryPropParam + { + public string auditId { get; set; } // "0", + public string bizuin { get; set; } // "0", + public string brandCat { get; set; } // "0", + public string catId { get; set; } // "0", + public int? catType { get; set; } // 7, + public string createTime { get; set; } // "0", + public string desc { get; set; } // "", + public string fCatId { get; set; } // "0", + public string name { get; set; } // "款式", + public int? priority { get; set; } // 0, + public string updateTime { get; set; } // "0", + public int? version { get; set; } // 0, + public catInfoParam catInfo { get; set; } // { "inputType": 1, "isRequired": 1, "isCustomize": 0 } + } + + public class catInfoParam + { + public int? inputType { get; set; } // 1, + public int? isRequired { get; set; } // 1, + public int? isCustomize { get; set; } // 0 + + } + + public class categoryParam + { + public string id { get; set; } // "10000672", + public string name { get; set; } // "裤子", + public string fId { get; set; } // "10000113", + public int? level { get; set; } // 3, + public int? disableScene { get; set; } // 0, + public bool? leaf { get; set; } // false, + public int? state { get; set; } // 0, + public string tips { get; set; } // "", + public string detail { get; set; } // "", + public string catId { get; set; } // "10000672", + public string fCatId { get; set; } // "10000113" + public bool? catAuth { get; set; } // true + public categoryInfoParam catInfo { get; set; } + } + + public class categoryInfoParam + { + public int? catLevel { get; set; } // 3, + public bool? onlyWriteOffInShop { get; set; } // false, + public bool? isVirtualGoods { get; set; } // false, + public long? highestPriceFixing { get; set; } // 250000, + public enterpriseAuditInfoParam enterpriseAuditInfo { get; set; } + public allAttrParam productAttr { get; set; } + public allAttrParam saleAttr { get; set; } + public allAttrParam sizeAttr { get; set; } + public presaleDataParam presaleData { get; set; } + public List confirmReceiptOptions { get; set; } + } + + public class presaleDataParam + { + public bool? presaleSwitch { get; set; } // true, + public deliveryParam deliveryAfterPresale { get; set; } // { "presaleCycleSpan": 15, "minDelayDay": 2, "maxDelayDay": 3 }, + public deliveryParam deliveryAfterPay { get; set; } // { "minDelayDay": 3, "maxDelayDay": 15 }, + public int? dsrThreshold { get; set; } // 400, + public int? productPriceThreshold { get; set; } // 1500, + public int? dsrLogisticsExperienceThreshold { get; set; } // 400, + public bool? hasHotBrand { get; set; } // false + + } + + public class deliveryParam + { + public int? presaleCycleSpan { get; set; } // 15, + public int? minDelayDay { get; set; } // 2, + public int? maxDelayDay { get; set; } // 3 + } + + public class allAttrParam + { + public List attr { get; set; } + public bool? enable { get; set; } // false + } + + public class attrParam + { + public string name { get; set; } // "弹力", // "面料材质成分含量" + public string type { get; set; } // "select_one", // "decimal4_unit" + public string value { get; set; } // "无弹性;有弹性;微弹力;中弹力;高弹力", // "%" + public bool? isRequired { get; set; } // true, + public string hint { get; set; } // "", + public string remark { get; set; } // "", + public bool? appendAllowed { get; set; } // false, + public attractFactorDisplayParam attractFactorDisplay { get; set; } + public releaseParam normalRelease { get; set; } // { "ruleType": 2 }, // { "ruleType": 1 }, + public releaseParam quickRelease { get; set; } // { "ruleType": 0 } + } + + public class attractFactorDisplayParam + { + public string prefix { get; set; } // "", + public string postfix { get; set; } // "" + } + + public class enterpriseAuditInfoParam + { + public int? maxQualificationImg { get; set; } // 10, + public int? productQualificationType { get; set; } // 2, + public int? qualificationType { get; set; } // 2, + public int? productTitleQualificationType { get; set; } // 2, + public int? productImgQualificationType { get; set; } // 2, + public int? productDescQualificationType { get; set; } // 2, + public List productQualificationList { get; set; } + } + + public class productQualificationParam + { + public bool? needToApply { get; set; } // true, + public string id { get; set; } // "50000043", + public string tips { get; set; } // "当商品信息涉及特殊材质:真丝、蚕丝、香云纱、羊绒、羊毛、羊羔毛、羽绒、皮草等,需上传含CMA/CNAS认证标识的特殊材质质检报告或商品吊牌实拍图(二选一在相应资质入口上传)", + public int? type { get; set; } // 2, + public string name { get; set; } // "特殊材质质检报告", + public int? showCertForProduct { get; set; } // 0, + public releaseParam normalRelease { get; set; } // { "ruleType": 2 }, + public releaseParam quickRelease { get; set; } // { "ruleType": 0 } + } + + public class releaseParam + { + public int? ruleType { get; set; } // 2 // 0 + } + + public class auditResultInfoParam + { + public string auditId { get; set; } // "8248460949", + public int? auditStatus { get; set; } // 3, + public auditResultReasonParam auditResultReason { get; set; } + public long? auditTimestamp { get; set; } // 1767693373, + public long? submitTimestamp { get; set; } // 1767693275, + public string quaInspectId { get; set; } // "0", + public long? quaInspectTimestamp { get; set; } // 0, + public string quaInspectStatus { get; set; } // "0" + } + + public class auditResultReasonParam + { + public List itemList { get; set; } + } + + public class ReasonItemParam + { + public string key { get; set; } // "reason" + public string value { get; set; } // "" + } + + public class productKeyParam + { + /// + /// 商品id(保存草稿箱的时候才能获取到,提交上架的时候需要填写) + /// + public string productId { get; set; } // "10000408181873" + } +} diff --git a/AllBase/Model/Result/ShopLoginInfo.cs b/AllBase/Model/Result/ShopLoginInfo.cs index 132fc18..9e8d9dc 100644 --- a/AllBase/Model/Result/ShopLoginInfo.cs +++ b/AllBase/Model/Result/ShopLoginInfo.cs @@ -33,6 +33,7 @@ namespace AllBase.Model.Result public string Cookies2 { get; set; } = ""; public string pddid { get; set; } public ConcurrentList AntiContents { get; set; } = new ConcurrentList(); + public string openid { get; set; } public Dictionary DictMultiCookies { get; set; } = new Dictionary(); public string LoginStatus { get; set; } public string LoginStatus2 { get; set; } @@ -274,7 +275,14 @@ namespace AllBase.Model.Result public string AccountId { get; set; } public string AccountName { get; set; } public string LoginStatus { get; set; } + /// + /// 拼多多校验数据列表 + /// public string AntiContent { get; set; } + /// + /// 微信小店开放Id信息 + /// + public string openid { get; set; } } public class ShopOrderStatisticsInfo diff --git a/AllBase/Model/Result/WXResult/GetCateOnShelfInfo.cs b/AllBase/Model/Result/WXResult/GetCateOnShelfInfo.cs new file mode 100644 index 0000000..27c3097 --- /dev/null +++ b/AllBase/Model/Result/WXResult/GetCateOnShelfInfo.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.WXResult +{ + /// + /// 根据类目获取的类目属性信息 + /// + public class GetCateOnShelfInfo + { + public int? ret { get; set; } // 0, + public int? code { get; set; } // 0, + public int? success { get; set; } // true, + public int? onShelf { get; set; } // true, + public List category { get; set; } + public brandResult brand { get; set; } + public int? categoryType { get; set; } // 2, + public int? categoryCatAuthType { get; set; } // 2, + public int? isGoodsSpecialCategory { get; set; } // true + + } + + public class brandResult + { + public long? brandId { get; set; } // 2100000000, + public long? catId { get; set; } // 547705, + public string name { get; set; } // "无品牌" + } + + public class categoryResult + { + public string id { get; set; } // "547705", + public string name { get; set; } // "牛仔裤", + public string fId { get; set; } // "10000672", + public int? level { get; set; } // 4, + public int? disableScene { get; set; } // 0, + public bool? leaf { get; set; } // true, + public int? state { get; set; } // 0, + public string tips { get; set; } // "", + public string detail { get; set; } // "", + public string catId { get; set; } // "547705", + public string fCatId { get; set; } // "10000672" + public bool? catAuth { get; set; } // true + public catInfoResult catInfo { get; set; } + } + + public class catInfoResult + { + public int? catLevel { get; set; } // 3, + public bool? onlyWriteOffInShop { get; set; } // false, + public bool? isVirtualGoods { get; set; } // false, + public int? highestPriceFixing { get; set; } // 250000, + public enterpriseAuditInfoResult enterpriseAuditInfo { get; set; } + public productAttrResult productAttr { get; set; } + public productAttrResult saleAttr { get; set; } + public productAttrResult sizeAttr { get; set; } + public presaleDataResult presaleData { get; set; } + public List confirmReceiptOptions { get; set; } + } + + public class presaleDataResult + { + public bool? presaleSwitch { get; set; } // true, + public deliveryResult deliveryAfterPresale { get; set; } + public deliveryResult deliveryAfterPay { get; set; } + public int? dsrThreshold { get; set; } // 400, + public int? productPriceThreshold { get; set; } // 1500, + public int? dsrLogisticsExperienceThreshold { get; set; } // 400, + public bool? hasHotBrand { get; set; } // false + + } + public class deliveryResult + { + public int? presaleCycleSpan { get; set; } // 15, + public int? minDelayDay { get; set; } // 2, + public int? maxDelayDay { get; set; } // 3 + } + + public class productAttrResult + { + public List attr { get; set; } + public bool? enable { get; set; } // false + } + + public class attrResult + { + public string name { get; set; } // "款式", + public string type { get; set; } // "select_one", + public string value { get; set; } // "哈伦裤;垮裤;阔脚裤;工装裤;微喇裤;铅笔裤;直筒裤;连衣裤;背带裤;灯笼裤;束脚裤;裙裤;短裤;锥形裤;香蕉裤;做旧款;喇叭裤;其他;烟管裤", + public bool? isRequired { get; set; } // true, + public string hint { get; set; } // "", + public string remark { get; set; } // "", + public bool? appendAllowed { get; set; } // false, + public attractFactorDisplayResult attractFactorDisplay { get; set; } + public ReleaseResult normalRelease { get; set; } // { "ruleType": 1 }, + public ReleaseResult quickRelease { get; set; } // { "ruleType": 0 } + } + public class attractFactorDisplayResult + { + public string prefix { get; set; } // "", + public string postfix { get; set; } // "" + } + + public class enterpriseAuditInfoResult + { + public int? maxQualificationImg { get; set; } // 10, + public int? productQualificationType { get; set; } // 2, + public int? qualificationType { get; set; } // 2, + public int? productTitleQualificationType { get; set; } // 2, + public int? productImgQualificationType { get; set; } // 2, + public int? productDescQualificationType { get; set; } // 2, + public List productQualificationList { get; set; } + } + + public class productQualificationResult + { + public bool? needToApply { get; set; } // true, + public string id { get; set; } // "50000044", + public string tips { get; set; } // "当商品信息宣传(抗菌、防菌、抑菌、除菌)时,需上传含CMA/CNAS认证标识的除菌相关检验项目合格的质检报告。", + public int? type { get; set; } // 2, + public string name { get; set; } // "抑菌质检报告", + public int? showCertForProduct { get; set; } // 0, + public ReleaseResult normalRelease { get; set; } + public ReleaseResult quickRelease { get; set; } + } + + public class ReleaseResult + { + public int? ruleType { get; set; } // 2 + } +} diff --git a/AllBase/Model/Result/WXResult/GetProdCateInfo.cs b/AllBase/Model/Result/WXResult/GetProdCateInfo.cs new file mode 100644 index 0000000..f5d62f5 --- /dev/null +++ b/AllBase/Model/Result/WXResult/GetProdCateInfo.cs @@ -0,0 +1,71 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.WXResult +{ + public class WXGetProdCateInfo + { + public predInfoResult predInfo { get; set; } + public List aiCategoryList { get; set; } + public string version { get; set; } // "ProductClsRAG", + public List noQualificationCatIds { get; set; } // [ 547705, 547704, 547701 ], + public List depositCatInfos { get; set; } + public string visionCallMethod { get; set; } // "ProductClsRAG" + } + + public class depositCatInfoResult + { + public long? catId { get; set; } // 547705, + public int? amountToPay { get; set; } // 0, + public bool? error { get; set; } // false + } + + public class aiCategoryResult + { + public long? id { get; set; } // 547705, + public List paths { get; set; } + + public int? depositAmount { get; set; } // 0, + public bool? catAuth { get; set; } // true, + public List limitSubjectTypes { get; set; } // [ ] + } + + public class aiCatePathResult + { + public string id { get; set; } // "10000111", + public string name { get; set; } // "服饰内衣", + public List sonIdList { get; set; } // [ "10000397", "10000115", "10000112", "10000113", "10000114" ], + /// + /// 父类目ID + /// + public string fId { get; set; } // "0", + public int? level { get; set; } // 1, + public bool? leaf { get; set; } // false + public int? state { get; set; } // 0, + public bool? hasTrialCategory { get; set; } // false, + public bool? isTrialCategory { get; set; } // false, + public bool? isLocalLife { get; set; } // false + + } + + public class predInfoResult + { + public List firstCatRes { get; set; } + public List secondCatRes { get; set; } + public List thirdCatRes { get; set; } + public List singleSecondCatRes { get; set; } + public List singleFirstCatRes { get; set; } + public int? isSupportedCate { get; set; } // 1 + } + + public class CatResResult + { + public long? catId { get; set; } // 10000111, + public string catName { get; set; } // "服饰内衣", + public int? level { get; set; } // 1 + public string modelVersion { get; set; } // "商品标题含'加绒加厚、保暖'等关键词,这表示裤子具备加绒保暖功能。主图展示了加绒内衬,也符合【服饰内衣:女装:裤子:加绒裤】类目特征。" + } +} diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs new file mode 100644 index 0000000..5897690 --- /dev/null +++ b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs @@ -0,0 +1,411 @@ +using KJD_Web.Model; +using KJD_Web.Model.ShopModel; +using KJD_Web.Utils; +using MySql.Data.MySqlClient; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.Security; + +namespace KJD_Web.BLL.WXXD +{ + public class WXProductManage + { + public string WXGetPDDProductList(string inputData, bool isDetail = false) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'","\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var search_spu = RegexUtils.GetStringQuery(ref inputData, "search_spu")?.Replace("'", "\\'"); + var search_skc = RegexUtils.GetStringQuery(ref inputData, "search_skc")?.Replace("'", "\\'"); + var search_cat = RegexUtils.GetStringQuery(ref inputData, "search_cat")?.Replace("'", "\\'"); + var search_ext_code = RegexUtils.GetStringQuery(ref inputData, "search_ext_code")?.Replace("'", "\\'"); + var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'"); + var search_group = RegexUtils.GetStringQuery(ref inputData, "search_group")?.Replace("'", "\\'"); + var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes")?.Replace("'", "\\'"); + var search_db_ids = RegexUtils.GetStringQuery(ref inputData, "search_db_ids")?.Replace("'", "\\'"); + var get_select_count = RegexUtils.GetStringQuery(ref inputData, "get_select_count")?.Replace("'", "\\'"); + var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'"); + var from_shop_id = RegexUtils.GetStringQuery(ref inputData, "from_shop_id")?.Replace("'", "\\'"); + var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'"); + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size= RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "select count(id) from bxx.product p where p.is_del=0"; + + string where = ""; + if (!string.IsNullOrWhiteSpace(search_spu)) + where += " and p.spu_id like '%" + search_spu + "%'"; + if (!string.IsNullOrWhiteSpace(search_skc)) + where += " and p.skc_id like '%" + search_skc + "%'"; + if (!string.IsNullOrWhiteSpace(search_cat)) + where += " and p.cat_name like '%" + search_cat + "%'"; + if (!string.IsNullOrWhiteSpace(search_ext_code)) + where += " and p.ext_code like '%" + search_ext_code + "%'"; + if (!string.IsNullOrWhiteSpace(search_prod_name)) + where += " and p.product_name like '%" + search_prod_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_group)) + where += " and p.group like '%" + search_group + "%'"; + if (!string.IsNullOrWhiteSpace(search_notes)) + where += " and p.notes like '%" + search_notes + "%'"; + if (!string.IsNullOrEmpty(from_shop_id)) + where += " and p.from_shop_id ='" + from_shop_id + "'"; + if (!string.IsNullOrEmpty(search_db_ids)) + where += " and p.id in (" + search_db_ids + ")"; + sql += where; + + var count = mySql.ExecuteRowCount(sql); + + DataTable dt; + if (count == 0) + { + dt = new DataTable(); + } + else + { + if (isDetail) + sql = "select p.*,s.img_base64,s.img_url,e.ext_code_price from bxx.product p" + + " left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" + + " LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" + + " where p.is_del=0"; + else if (string.IsNullOrEmpty(get_select_count)) + sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name,p.main_img,p.notes," + + " p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group,p.product_get_type,s.img_url,e.ext_code_price" + + " FROM bxx.product p " + + " left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id" + + " LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" + + " where p.is_del=0"; + else + sql = "SELECT p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code,p.product_name,p.main_img,p.notes," + + " p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.sku_img_replace_id,p.group,p.product_get_type,s.img_url,COUNT(se.id) AS select_count," + + " e.ext_code_price" + + " FROM bxx.product p left join bxx.sku_img_replace s ON p.sku_img_replace_id=s.id LEFT JOIN bxx.product_select se ON p.id=se.out_product_id AND se.shop_id='" + select_shop_id + "' " + + " LEFT JOIN bxx.ext_code_price e ON p.ext_code=e.ext_code" + + " WHERE p.is_del=0"; + + //where子句 + sql += where; + + if (!isDetail && !string.IsNullOrEmpty(get_select_count)) + sql += " group by p.id"; + if (sort_field == "select_total_count") + sql += " order by p.select_total_count desc, p.id desc"; + else + sql += " order by p.id desc"; + sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; + dt = mySql.ExecuteDataTable(sql); + } + + mySql.Close(); + if (dt != null) + { + try + { + List productLst = new List(); + foreach (DataRow row in dt.Rows) + { + DBProductResultParam prod = new DBProductResultParam + { + id = Convert.ToInt32(row["id"]), + from_shop_id = row["from_shop_id"].ToString(), + skc_id = row["skc_id"].ToString(), + spu_id = row["spu_id"].ToString(), + cat_id = row["cat_id"].ToString(), + cat_name = row["cat_name"].ToString(), + product_name = row["product_name"].ToString(), + main_img = row["main_img"].ToString(), + ext_code = row["ext_code"].ToString(), + ext_code_price = row["ext_code_price"].IsNullOrEmpty() ? new int?() : row["ext_code_price"].ParseToInt(), + price_text = row["price_text"].ToString(), + //product_json = row["product_json"].ToString(), + //size_json = row["size_json"].ToString(), + add_time = Convert.ToDateTime(row["add_time"]), + mdy_time = Convert.ToDateTime(row["mdy_time"]), + notes = row["notes"].ToString(), + group = row["group"].ToString(), + select_total_count = row["select_total_count"].ParseToInt(), + end_words = row["end_words"].ParseToString(), + fission_words = row["fission_words"].ParseToString(), + head_words = row["head_words"].ParseToString(), + sku_img_replace_id = row["sku_img_replace_id"].ParseToInt(), + sku_img_replace_url = row["img_url"].ToString(), + product_get_type_text = row["product_get_type"].ToString(), + }; + if (isDetail) + { + prod.product_json = row["product_json"].ToString(); + prod.size_json = row["size_json"].ToString(); + prod.sku_edit_json = row["sku_edit_json"].ToString(); + prod.sku_img_replace_base64 = row["img_base64"].ToString(); + //prod.sku_img_replace_url = row["img_url"].ToString(); + } + if (!string.IsNullOrEmpty(get_select_count)) + { + prod.select_count = row["select_count"].ParseToInt(); + } + productLst.Add(prod); + } + var data = JsonUtils.SerializerObjectToString(productLst); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + } + catch (Exception ex) + { + return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + } + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string WXGetPDDProductGroups(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":50001,\"msg\":\"没有用户名\"}"; + } + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "SELECT DISTINCT p.group FROM `bxx`.`product` p where p.is_del=0"; + + string where = ""; + sql += where; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + + if (dt != null) + { + try + { + string group_data = ""; + foreach (DataRow row in dt.Rows) + { + group_data += row["group"].ToString() + ","; + } + var data = group_data.Trim(','); + return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}"; + } + catch (Exception ex) + { + return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}"; + } + } + else + { + return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string WXGetPDDProductCates(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":50001,\"msg\":\"没有用户名\"}"; + } + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "SELECT DISTINCT p.cat_name FROM `bxx`.`product` p where p.is_del=0"; + + string where = ""; + sql += where; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + + if (dt != null) + { + try + { + string group_data = ""; + foreach (DataRow row in dt.Rows) + { + group_data += row["cat_name"].ToString() + ","; + } + var data = group_data.Trim(','); + return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}"; + } + catch (Exception ex) + { + return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}"; + } + } + else + { + return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + /// + /// 随机获取商品(无详情) 随机添加到上传列表所以不需要获取详情 + /// + /// + /// + public string WXGetPDDProductListRandom(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var in_ext_codes = RegexUtils.GetStringQuery(ref inputData, "in_ext_codes")?.Replace("'", "\\'"); + var in_skc_ids = RegexUtils.GetStringQuery(ref inputData, "in_skc_ids")?.Replace("'", "\\'"); + var in_groups = RegexUtils.GetStringQuery(ref inputData, "in_groups")?.Replace("'", "\\'"); + var in_cates = RegexUtils.GetStringQuery(ref inputData, "in_cates")?.Replace("'", "\\'"); + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "select count(id) from bxx.product p where p.is_del=0"; + + string where = ""; + if (!string.IsNullOrEmpty(in_ext_codes)) + { + in_ext_codes = "'" + string.Join("','", in_ext_codes.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'"; + where += " and p.ext_code in (" + in_ext_codes + ")"; + } + if (!string.IsNullOrEmpty(in_skc_ids)) + { + in_skc_ids = "'" + string.Join("','", in_skc_ids.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'"; + where += " and p.skc_id in (" + in_skc_ids + ")"; + } + if (!string.IsNullOrEmpty(in_groups)) + { + in_groups = "'" + string.Join("','", in_groups.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'"; + where += " and p.group in (" + in_groups + ")"; + } + if (!string.IsNullOrEmpty(in_cates)) + { + in_cates = "'" + string.Join("','", in_cates.Split(new string[] { ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries)) + "'"; + where += " and (p.cat_name in (" + in_cates + ") or p.main_cat_name in (" + in_cates + "))"; + } + + sql += where; + + var count = mySql.ExecuteRowCount(sql); + + DataTable dt; + if (count == 0) + { + dt = new DataTable(); + } + else + { + sql = "select p.id,p.from_shop_id,p.spu_id,p.skc_id,p.main_cat_id,p.main_cat_name,p.cat_id,p.cat_name,p.price_text,p.ext_code," + + "p.product_name,p.main_img,p.group,p.notes,p.add_time,p.mdy_time,p.select_total_count," + + "p.fission_words,p.head_words,p.end_words from bxx.product p where p.is_del=0"; + + //where子句 + sql += where; + + sql += " ORDER BY RAND()"; + sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; + dt = mySql.ExecuteDataTable(sql); + } + + mySql.Close(); + if (dt != null) + { + try + { + List productLst = new List(); + foreach (DataRow row in dt.Rows) + { + DBProductResultParam prod = new DBProductResultParam + { + id = Convert.ToInt32(row["id"]), + from_shop_id = row["from_shop_id"].ToString(), + skc_id = row["skc_id"].ToString(), + spu_id = row["spu_id"].ToString(), + cat_id = row["cat_id"].ToString(), + cat_name = row["cat_name"].ToString(), + main_cat_id = row["main_cat_id"].ToString(), + main_cat_name = row["main_cat_name"].ToString(), + price_text = row["price_text"].ToString(), + product_name = row["product_name"].ToString(), + main_img = row["main_img"].ToString(), + ext_code = row["ext_code"].ToString(), + //product_json = row["product_json"].ToString(), + //size_json = row["size_json"].ToString(), + add_time = Convert.ToDateTime(row["add_time"]), + mdy_time = Convert.ToDateTime(row["mdy_time"]), + group = row["group"].ToString(), + notes = row["notes"].ToString(), + select_total_count = row["select_total_count"].ParseToInt(), + end_words = row["end_words"].ParseToString(), + fission_words = row["fission_words"].ParseToString(), + head_words = row["head_words"].ParseToString(), + }; + productLst.Add(prod); + } + var data = JsonUtils.SerializerObjectToString(productLst); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + } + catch (Exception ex) + { + return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + } + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs new file mode 100644 index 0000000..5cc84bb --- /dev/null +++ b/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs @@ -0,0 +1,818 @@ +using KJD_Web.Model; +using KJD_Web.Model.ShopModel; +using KJD_Web.Utils; +using MySqlX.XDevAPI; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Web; +using System.Web.Security; + +namespace KJD_Web.BLL.WXXD +{ + public class WXShopManage + { + public string GetShop(string inputData, bool isAdmin = false) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + var search_id = RegexUtils.GetStringQuery(ref inputData, "search_id"); + var search_user_name = RegexUtils.GetStringQuery(ref inputData, "search_user_name"); + var search_login_name = RegexUtils.GetStringQuery(ref inputData, "search_login_name"); + var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes"); + var search_name = RegexUtils.GetStringQuery(ref inputData, "search_name"); + var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); + var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); + if (!string.IsNullOrWhiteSpace(shop_ids)) + { + List shopIdLst = shop_ids.Split(',').ToList(); + shop_ids = "'" + string.Join("','", shopIdLst) + "'"; + } + var shop_names = RegexUtils.GetStringQuery(ref inputData, "shop_names"); + if (!string.IsNullOrWhiteSpace(shop_names)) + { + List shopNameLst = shop_names.Split(',').ToList(); + shop_names = "'" + string.Join("','", shopNameLst) + "'"; + } + var shop_notes = RegexUtils.GetStringQuery(ref inputData, "shop_notes"); + if (!string.IsNullOrWhiteSpace(shop_notes)) + { + List shopNotesLst = shop_notes.Split(',').ToList(); + shop_notes = "'" + string.Join("','", shopNotesLst) + "'"; + } + + var page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + var page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(); + + if (page_size == 0) + page_size = 50; + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "SELECT COUNT(s.id) FROM wxxd.shop s WHERE 1=1"; + + //where子句 + string where = ""; + if (isAdmin) + where += " and (s.cookie='' or s.shop_id!='')"; + if (!isAdmin) + where += " and (s.user_name='" + user_name + "' or s.sub_user_name like '%" + user_name + "%')"; + if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) + where += " and s.operate_sub_sa_name='" + operate_sub_sa_name + "'"; + if (!string.IsNullOrWhiteSpace(search_user_name)) + where += " and s.user_name like '%" + search_user_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_login_name)) + where += " and s.login_name like '%" + search_login_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_notes)) + where += " and s.notes like '%" + search_notes + "%'"; + if (!string.IsNullOrWhiteSpace(search_id)) + where += " and s.shop_id like '%" + search_id + "%'"; + if (!string.IsNullOrWhiteSpace(search_name)) + where += " and s.shop_account like '%" + search_name + "%'"; + if (!string.IsNullOrWhiteSpace(shop_ids)) + where += " and s.shop_id in (" + shop_ids + ")"; + if (!string.IsNullOrWhiteSpace(shop_names)) + where += " and s.shop_account in (" + shop_names + ")"; + if (!string.IsNullOrWhiteSpace(shop_notes)) + where += " and s.notes in (" + shop_notes + ")"; + sql += where; + + var count = mySql.ExecuteRowCount(sql); + + DataTable dt; + if (count == 0) + { + dt = new DataTable(); + } + else + { + sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.openid,s.shop_id,s.shop_account,s.sub_user_name," + + "s.user_name,s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month," + + "s.add_time,s.mdy_time,s.add_sub_sa_time,s.operate_sub_sa_name"; + //sql += " FROM wxxd.shop s WHERE 1=1"; + sql += " FROM wxxd.shop s LEFT JOIN wxxd.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1"; + + sql += where; // where 子句 + + sql += " ORDER BY s.id DESC"; + sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size; + dt = mySql.ExecuteDataTable(sql); + } + + mySql.Close(); + if (dt != null) + { + List shopList=new List(); + foreach (DataRow row in dt.Rows) + { + ShopParam shop = new ShopParam + { + id = Convert.ToInt32(row["id"]), + login_name = row["login_name"].ToString(), + login_pass = row["login_pass"].ToString(), + cookie = row["cookie"].ToString(), + cookie2 = row["cookie2"].ToString(), + anti_contents = row["anti_contents"].ToString(), + shop_id = row["shop_id"].ToString(), + shop_account = row["shop_account"].ToString(), + sub_user_name = row["sub_user_name"].ToString(), + user_name = row["user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + login_status = row["login_status"].ToString(), + login_status2 = row["login_status2"].ToString(), + add_product_remaining = row["add_product_remaining"].ParseToInt(), + add_product_month = row["add_product_month"].ParseToInt(), + operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(), + openid = row["openid"].ParseToString(), + }; + shopList.Add(shop); + } + + //sql = "\r\nINSERT INTO wxxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + //foreach (var shop in shopList) + //{ + // sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + shop.add_product_remaining + "," + shop.add_product_month + "),"; + //} + //sql = sql.TrimEnd(',') + " \r\n"; + //sql += "ON DUPLICATE KEY UPDATE " + + // "shop_account=VALUES(shop_account)," + + // "add_product_remaining=VALUES(add_product_remaining)," + + // "add_product_month=VALUES(add_product_month);"; + //var result = mySql.ExecuteNonQuery(sql); + //mySql.Close(); + + int month = DateTime.Now.Month; + var shopMonthList = shopList.Where(s => s.add_product_month != month); + if (shopMonthList.Count() > 0) + { + int remainCount = 300; + var shopMonthIdList = shopMonthList.Select(s => s.id); + mySql = new MysqlUtils(conn); + string ids = string.Join(",", shopMonthIdList); + sql = ""; + sql += "update wxxd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + + " where 1=1 and id in (" + ids + ");"; + + sql += "\r\nINSERT INTO wxxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + foreach (var shop in shopMonthList) + { + sql+= "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),"; + } + sql = sql.TrimEnd(',') + " \r\n"; + sql += "ON DUPLICATE KEY UPDATE " + + "shop_account=VALUES(shop_account)," + + "add_product_remaining=VALUES(add_product_remaining)," + + "add_product_month=VALUES(add_product_month);"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + + if (rst) + { + foreach (var shop in shopMonthList) + { + shop.add_product_month = month; + shop.add_product_remaining = remainCount; + } + } + } + var data = JsonUtils.SerializerObjectToString(shopList); + + + //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string SubSaGetSelectProdShop(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + var search_id = RegexUtils.GetStringQuery(ref inputData, "search_id"); + var search_user_name = RegexUtils.GetStringQuery(ref inputData, "search_user_name"); + var search_login_name = RegexUtils.GetStringQuery(ref inputData, "search_login_name"); + var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes"); + var search_name = RegexUtils.GetStringQuery(ref inputData, "search_name"); + var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); + var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); + if (!string.IsNullOrWhiteSpace(shop_ids)) + { + List shopIdLst = shop_ids.Split(',').ToList(); + shop_ids = "'" + string.Join("','", shopIdLst) + "'"; + } + var shop_names = RegexUtils.GetStringQuery(ref inputData, "shop_names"); + if (!string.IsNullOrWhiteSpace(shop_names)) + { + List shopNameLst = shop_names.Split(',').ToList(); + shop_names = "'" + string.Join("','", shopNameLst) + "'"; + } + var shop_notes = RegexUtils.GetStringQuery(ref inputData, "shop_notes"); + if (!string.IsNullOrWhiteSpace(shop_notes)) + { + List shopNotesLst = shop_notes.Split(',').ToList(); + shop_notes = "'" + string.Join("','", shopNotesLst) + "'"; + } + + var page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + var page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(); + + if (page_size == 0) + page_size = 50; + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "SELECT COUNT(s.id) FROM wxxd.shop s WHERE 1=1"; + + //where子句 + string where = ""; + if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) + where += " and (s.shop_id in (SELECT DISTINCT shop_id From wxxd.product_select WHERE operate_sub_sa_name='" + operate_sub_sa_name + "') or " + + "s.shop_id in (SELECT DISTINCT shop_id From wxxd.third_product_select WHERE operate_sub_sa_name='" + operate_sub_sa_name + "'))"; + where += " and (s.cookie='' or s.shop_id!='')"; + //if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) + // where += " and s.operate_sub_sa_name='" + operate_sub_sa_name + "'"; + if (!string.IsNullOrWhiteSpace(search_user_name)) + where += " and s.user_name like '%" + search_user_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_login_name)) + where += " and s.login_name like '%" + search_login_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_notes)) + where += " and s.notes like '%" + search_notes + "%'"; + if (!string.IsNullOrWhiteSpace(search_id)) + where += " and s.shop_id like '%" + search_id + "%'"; + if (!string.IsNullOrWhiteSpace(search_name)) + where += " and s.shop_account like '%" + search_name + "%'"; + if (!string.IsNullOrWhiteSpace(shop_ids)) + where += " and s.shop_id in (" + shop_ids + ")"; + if (!string.IsNullOrWhiteSpace(shop_names)) + where += " and s.shop_account in (" + shop_names + ")"; + if (!string.IsNullOrWhiteSpace(shop_notes)) + where += " and s.notes in (" + shop_notes + ")"; + sql += where; + + var count = mySql.ExecuteRowCount(sql); + + DataTable dt; + if (count == 0) + { + dt = new DataTable(); + } + else + { + sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.shop_id,s.openid,s.shop_account,s.sub_user_name,s.user_name," + + "s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month,s.add_time,s.mdy_time," + + "s.add_sub_sa_time,s.operate_sub_sa_name"; + sql += " FROM wxxd.shop s LEFT JOIN wxxd.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1"; + + sql += where; // where 子句 + + sql += " ORDER BY s.id DESC"; + sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size; + dt = mySql.ExecuteDataTable(sql); + } + + mySql.Close(); + if (dt != null) + { + List shopList = new List(); + foreach (DataRow row in dt.Rows) + { + ShopParam shop = new ShopParam + { + id = Convert.ToInt32(row["id"]), + login_name = row["login_name"].ToString(), + login_pass = row["login_pass"].ToString(), + cookie = row["cookie"].ToString(), + cookie2 = row["cookie2"].ToString(), + anti_contents = row["anti_contents"].ToString(), + shop_id = row["shop_id"].ToString(), + shop_account = row["shop_account"].ToString(), + sub_user_name = row["sub_user_name"].ToString(), + user_name = row["user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + login_status = row["login_status"].ToString(), + login_status2 = row["login_status2"].ToString(), + add_product_remaining = row["add_product_remaining"].ParseToInt(), + add_product_month = row["add_product_month"].ParseToInt(), + operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(), + openid = row["openid"].ToString(), + }; + shopList.Add(shop); + } + + //sql = "\r\nINSERT INTO wxxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + //foreach (var shop in shopList) + //{ + // sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + shop.add_product_remaining + "," + shop.add_product_month + "),"; + //} + //sql = sql.TrimEnd(',') + " \r\n"; + //sql += "ON DUPLICATE KEY UPDATE " + + // "shop_account=VALUES(shop_account)," + + // "add_product_remaining=VALUES(add_product_remaining)," + + // "add_product_month=VALUES(add_product_month);"; + //var result = mySql.ExecuteNonQuery(sql); + //mySql.Close(); + + int month = DateTime.Now.Month; + var shopMonthList = shopList.Where(s => s.add_product_month != month); + if (shopMonthList.Count() > 0) + { + int remainCount = 300; + var shopMonthIdList = shopMonthList.Select(s => s.id); + mySql = new MysqlUtils(conn); + string ids = string.Join(",", shopMonthIdList); + sql = ""; + sql += "update wxxd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + + " where 1=1 and id in (" + ids + ");"; + + sql += "\r\nINSERT INTO wxxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + foreach (var shop in shopMonthList) + { + sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),"; + } + sql = sql.TrimEnd(',') + " \r\n"; + sql += "ON DUPLICATE KEY UPDATE " + + "shop_account=VALUES(shop_account)," + + "add_product_remaining=VALUES(add_product_remaining)," + + "add_product_month=VALUES(add_product_month);"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + + if (rst) + { + foreach (var shop in shopMonthList) + { + shop.add_product_month = month; + shop.add_product_remaining = remainCount; + } + } + } + var data = JsonUtils.SerializerObjectToString(shopList); + + + //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + + + public string UpdateAddProdRemaining(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + var remainCount = RegexUtils.GetStringQuery(ref inputData, "remain_count"); + var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); + if (!string.IsNullOrWhiteSpace(shop_ids)) + { + List shopIdLst = shop_ids.Split(',').ToList(); + shop_ids = "'" + string.Join("','", shopIdLst) + "'"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + sql += "update wxxd.shop_add_prod_count set add_product_remaining=" + remainCount + + " where 1=1 and shop_id in (" + shop_ids + ");"; + + var rst = mySql.ExecuteNonQuery(sql); + var msg = mySql.Message; + mySql.Close(); + + if (rst) + return "{\"code\":200,\"msg\":\"success\"}"; + else + return "{\"code\":50000,\"msg\":\"" + msg + "\"}"; + } + else + { + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + } + + //获取一个手机登录号码下的所有店铺(以便有则更新,无则新增) + public string GetOneLoginNameShop(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select id,login_name,login_pass,cookie,cookie2,anti_contents,shop_id,openid,shop_account,sub_user_name,user_name from wxxd.shop where user_name='" + + user_name + "' and login_name='" + login_name + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + List shopList = new List(); + foreach (DataRow row in dt.Rows) + { + ShopParam shop = new ShopParam + { + id = Convert.ToInt32(row["id"]), + login_name = row["login_name"].ToString(), + login_pass = row["login_pass"].ToString(), + cookie = row["cookie"].ToString(), + cookie2 = row["cookie2"].ToString(), + anti_contents = row["anti_contents"].ToString(), + shop_id = row["shop_id"].ToString(), + shop_account = row["shop_account"].ToString(), + sub_user_name = row["sub_user_name"].ToString(), + user_name = row["user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + login_status = row["login_status"].ToString(), + openid = row["openid"].ToString(), + }; + shopList.Add(shop); + } + var data = JsonUtils.SerializerObjectToString(shopList); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + //获取一个手机登录号码下特定ID的店铺 + public string GetOneIdShop(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select id,login_name,login_pass,cookie,cookie2,anti_contents,shop_id,openid,shop_account,sub_user_name,user_name from wxxd.shop where user_name='" + + user_name + "' and login_name='" + login_name + "' and shop_id='" + shop_id + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + List shopList = new List(); + foreach (DataRow row in dt.Rows) + { + ShopParam shop = new ShopParam + { + id = Convert.ToInt32(row["id"]), + login_name = row["login_name"].ToString(), + login_pass = row["login_pass"].ToString(), + cookie = row["cookie"].ToString(), + cookie2 = row["cookie2"].ToString(), + anti_contents = row["anti_contents"].ToString(), + shop_id = row["shop_id"].ToString(), + shop_account = row["shop_account"].ToString(), + sub_user_name = row["sub_user_name"].ToString(), + user_name = row["user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + login_status = row["login_status"].ToString(), + openid = row["openid"].ToString(), + }; + shopList.Add(shop); + } + var data = JsonUtils.SerializerObjectToString(shopList); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string AddShop(string inputData, bool isAdmin=false) + { + if (!string.IsNullOrEmpty(inputData)) + { + string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + if (isAdmin) + user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); + string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + string login_pass = RegexUtils.GetStringQuery(ref inputData, "login_pass"); + string sub_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_user_name")); + string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); + string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); + string anti_contents = RegexUtils.GetStringQuery(ref inputData, "anti_contents"); + string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account"); + string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name"); + string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + if (string.IsNullOrEmpty(shop_id)) + sql = "select exists (select 1 from wxxd.shop where login_name='" + login_name + "' and user_name='" + user_name + "')"; + else + sql = "select exists (select 1 from wxxd.shop where login_name='" + login_name + "' and user_name='" + user_name + + "' and shop_id='" + shop_id + "')"; + var exist = mySql.ExecuteFirstInt(sql); + if (exist>0) + { + mySql.Close(); + return "{\"code\":500,\"msg\":\"店铺" + login_name +" " + shop_account + "已存在\"}"; + } + + sql = "insert into wxxd.shop (login_name,login_pass,cookie,cookie2,anti_contents,shop_account,shop_id,sub_user_name,user_name,group_name,notes,add_time,mdy_time) " + + "values ('" + login_name + "','" + login_pass + "','" + cookie + "','" + cookie2 + "','" + anti_contents + "','" + shop_account + "','" + shop_id + "','" + + sub_user_name + "','" + user_name + "','" + group_name + "','" + notes + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string MdyShop(string inputData, bool isAdmin=false) + { + if (!string.IsNullOrEmpty(inputData)) + { + string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + if (isAdmin) + user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); + string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + string login_pass = RegexUtils.GetStringQuery(ref inputData, "login_pass"); + string sub_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_user_name")); + string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); + string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); + string anti_contents = RegexUtils.GetStringQuery(ref inputData, "anti_contents"); + string new_shop_id = RegexUtils.GetStringQuery(ref inputData, "new_shop_id"); + string old_shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account"); + string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name"); + string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); + string login_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status")); + + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update wxxd.shop set"; + if (login_pass != null) + sql += " login_pass='" + login_pass + "',"; + if (cookie != null) + sql += " cookie='" + cookie + "',"; + if (cookie2 != null) + sql += " cookie2='" + cookie2 + "',"; + if (anti_contents != null) + sql += " anti_contents='" + anti_contents + "',"; + if (new_shop_id != null) + sql += " shop_id='" + new_shop_id + "',"; + if (shop_account != null) + sql += " shop_account='" + shop_account + "',"; + if (sub_user_name != null) + sql += " sub_user_name='" + sub_user_name + "',"; + if (group_name != null) + sql += " group_name='" + group_name + "',"; + if (notes != null) + sql += " notes='" + notes + "',"; + if (login_status != null) + sql += " login_status='" + login_status + "',"; + sql = sql.TrimEnd(','); + sql += " where login_name='" + login_name + "' and (user_name='" + user_name + "' or sub_user_name like '%" + user_name + "%')"; + if (!string.IsNullOrEmpty(old_shop_id)) + sql += " and shop_id='" + old_shop_id + "'"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string MdyAntiContent(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + string anti_contents = RegexUtils.GetStringQuery(ref inputData, "anti_contents"); + + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":500,\"msg\":\"店铺没有登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update wxxd.shop set"; + if (anti_contents != null) + sql += " anti_contents='" + anti_contents + "',"; + sql = sql.TrimEnd(','); + sql += " where login_name='" + login_name + "' and shop_id='" + shop_id + "';"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string MdyCookieAndLoginStatus(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); + string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); + string login_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status")); + string login_status2 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status2")); + string openid = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "openid")); + + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":500,\"msg\":\"店铺没有登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update wxxd.shop set"; + if (cookie != null) + sql += " cookie='" + cookie + "',"; + if (cookie2 != null) + sql += " cookie2='" + cookie2 + "',"; + if (login_status != null) + sql += " login_status='" + login_status + "',"; + if (login_status2 != null) + sql += " login_status2='" + login_status2 + "',"; + if (openid != null) + sql += " openid='" + openid + "',"; + sql = sql.TrimEnd(','); + sql += " where login_name='" + login_name + "'"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + + public string DelShop(string inputData, bool isAdmin=false) + { + if (!string.IsNullOrEmpty(inputData)) + { + var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + if (isAdmin) + user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); + var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "delete from wxxd.shop where user_name='" + user_name + "' and login_name='" + login_name + "'"; + if (!string.IsNullOrEmpty(shop_id)) + sql += " and shop_id='" + shop_id + "'"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + /// + /// 设置店铺的二级超管 + /// + /// + public string SetShopSubSa(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":50001,\"msg\":\"没有用户名\"}"; + } + + var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); + var login_name = RegexUtils.GetStringQuery(ref inputData, "shop_login_name")?.Replace("'", "\\'"); + var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); + + if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(login_name)) + { + return "{\"code\":50002,\"msg\":\"未选择任何待上传\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update wxxd.shop set"; + if (operate_sub_sa_name != null) + sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',"; + sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',"; + sql = sql.TrimEnd(','); + if (!string.IsNullOrEmpty(id)) + sql += " where id in (" + id + ")"; + else if (!string.IsNullOrEmpty(login_name)) + sql += " where login_name in ('" + login_name.Replace(",", "','") + "')"; + else + sql += " where 1=2"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs new file mode 100644 index 0000000..33fabd1 --- /dev/null +++ b/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs @@ -0,0 +1,470 @@ +using KJD_Web.Model; +using KJD_Web.Utils; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Web; +using System.Web.UI.WebControls; + +namespace KJD_Web.BLL.WXXD +{ + public class WXUserManage + { + public string CheckUserLogin(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select * from wxxd.user where user_name='" + + mobile + "' and password='" + password + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + foreach (DataRow row in dt.Rows) + { + UserLoginResultParam user = new UserLoginResultParam + { + id = Convert.ToInt32(row["id"]), + user_name = row["user_name"].ToString(), + nick_name = row["nick_name"].ToString(), + mobile = row["user_name"].ToString(), + password = row["password"].ToString(), + group_id = row["group_id"].ToString(), + card_id = row["card_id"].ToString(), + company_name = row["company_name"].ToString(), + is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0, + sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0, + }; + + if (string.IsNullOrEmpty(user.company_name)) + { + user.company_name = "-"; + } + var data = JsonUtils.SerializerObjectToString(user); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + return "{\"code\":1,\"msg\":\"用户名或密码错误\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string AddSubUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var parent_user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_nick_name"))?.Replace("'", "\\'"); + var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_name"))?.Replace("'", "\\'"); + var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_mobile"))?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "sub_password")?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); + var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); + var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "company"))?.Replace("'", "\\'"); + var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + sql = "select exists (select 1 from wxxd.user where user_name='" + user_name + "')"; + var exist = mySql.ExecuteFirstInt(sql); + if (exist > 0) + { + mySql.Close(); + return "{\"code\":500,\"msg\":\"用户名已存在\"}"; + } + + sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,add_time,mdy_time) " + + "values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" + + group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (!rst) + return "{\"code\":501,\"msg\":\""+ mySql.Message + "\"}"; + else + return "{\"code\":200,\"msg\":\"子账户创建成功!\"}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string GetSubUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + var group = RegexUtils.GetStringQuery(ref inputData, "group"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select * from wxxd.user where parent_user_name='" + + user_name + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + List userList = new List(); + foreach (DataRow row in dt.Rows) + { + + UserLoginResultParam user = new UserLoginResultParam + { + id = Convert.ToInt32(row["id"]), + user_name = row["user_name"].ToString(), + nick_name = row["nick_name"].ToString(), + mobile = row["mobile"].ToString(), + password = row["password"].ToString(), + group_id = row["group_id"].ToString(), + card_id = row["card_id"].ToString(), + parent_user_name = row["parent_user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + }; + if (string.IsNullOrEmpty(user.mobile)) + { + user.mobile = row["user_name"].ToString(); + } + userList.Add(user); + } + var data = JsonUtils.SerializerObjectToString(userList); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string UpdateSubUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var id = RegexUtils.GetStringQuery(ref inputData, "id")?.Replace("'", "\\'"); + var parent_user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_nick_name"))?.Replace("'", "\\'"); + var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_name"))?.Replace("'", "\\'"); + var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_mobile"))?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "sub_password")?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); + var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); + var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + //sql = "select * from wxxd.user where parent_user_name='" + // + user_name + "'"; + sql = "update wxxd.user set"; + if (!string.IsNullOrEmpty(nick_name)) + sql += " nick_name='" + nick_name + "',"; + if (!string.IsNullOrEmpty(user_name)) + sql += " user_name='" + user_name + "',"; + if (!string.IsNullOrEmpty(mobile)) + sql += " mobile='" + mobile + "',"; + if (!string.IsNullOrEmpty(password)) + sql += " password='" + password + "',"; + if (!string.IsNullOrEmpty(group_id)) + sql += " group_id=" + group_id + ","; + if (!string.IsNullOrEmpty(card_id)) + sql += " card_id='" + card_id + "',"; + if (!string.IsNullOrEmpty(notes)) + sql += " notes='" + notes + "',"; + sql = sql.TrimEnd(','); + sql += " where id=" + id + ""; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + + public string DelUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var id = RegexUtils.GetStringQuery(ref inputData, "id"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "delete from wxxd.user where id='" + + id + "'"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + else + return "{\"code\":500,\"msg\":\"删除失败,请稍后重试\"}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string GetAllUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); + var search = RegexUtils.GetStringQuery(ref inputData, "search")?.Replace("'", "\\'"); + var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + //string sql = "select * from wxxd.user where group_id=3"; + string sql = "select * from wxxd.user where 1=1"; + if (!string.IsNullOrEmpty(group_id)) + sql += " and group_id=" + group_id; + if (!string.IsNullOrEmpty(sa_level)) + sql += " and sa_level=" + sa_level; + if (!string.IsNullOrEmpty(search)) + sql += " and (user_name like '%" + search + + "%' or nick_name like '%" + search + + "%' or company_name like '%" + search + "%')"; + sql += " order by id desc"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + List userList = new List(); + foreach (DataRow row in dt.Rows) + { + + UserLoginResultParam user = new UserLoginResultParam + { + id = Convert.ToInt32(row["id"]), + user_name = row["user_name"].ToString(), + nick_name = row["nick_name"].ToString(), + mobile = row["mobile"].ToString(), + password = row["password"].ToString(), + group_id = row["group_id"].ToString(), + card_id = row["card_id"].ToString(), + parent_user_name = row["parent_user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0, + sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0, + }; + if (string.IsNullOrEmpty(user.mobile)) + { + user.mobile = row["user_name"].ToString(); + } + userList.Add(user); + } + var data = JsonUtils.SerializerObjectToString(userList); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string AddUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_nick_name"))?.Replace("'", "\\'"); + var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'"); + var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_mobile"))?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "add_password")?.Replace("'", "\\'"); + var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_company"))?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); ; + var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); + var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + sql = "select exists (select 1 from wxxd.user where user_name='" + user_name + "')"; + var exist = mySql.ExecuteFirstInt(sql); + if (exist > 0) + { + mySql.Close(); + return "{\"code\":500,\"msg\":\"用户名已存在\"}"; + } + + sql = "insert into wxxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,add_time,mdy_time) " + + "values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" + + group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (!rst) + return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}"; + else + return "{\"code\":200,\"msg\":\"success\"}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string UpdateUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var id = RegexUtils.GetStringQuery(ref inputData, "id")?.Replace("'", "\\'"); + var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_nick_name"))?.Replace("'", "\\'"); + var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'"); + var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_mobile"))?.Replace("'", "\\'"); + var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_company"))?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "add_password")?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); + var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); + var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + //sql = "select * from wxxd.user where parent_user_name='" + // + user_name + "'"; + sql = "update wxxd.user set"; + if (!string.IsNullOrEmpty(nick_name)) + sql += " nick_name='" + nick_name + "',"; + if (!string.IsNullOrEmpty(user_name)) + sql += " user_name='" + user_name + "',"; + if (!string.IsNullOrEmpty(mobile)) + sql += " mobile='" + mobile + "',"; + if (!string.IsNullOrEmpty(company_name)) + sql += " company_name='" + company_name + "',"; + if (!string.IsNullOrEmpty(password)) + sql += " password='" + password + "',"; + if (!string.IsNullOrEmpty(group_id)) + sql += " group_id=" + group_id + ","; + if (!string.IsNullOrEmpty(card_id)) + sql += " card_id='" + card_id + "',"; + if (!string.IsNullOrEmpty(notes)) + sql += " notes='" + notes + "',"; + if (!string.IsNullOrEmpty(sa_level)) + sql += " sa_level=" + sa_level + ","; + sql = sql.TrimEnd(','); + sql += " where id=" + id + ""; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + + + public string ChangePassword(string inputData) + { + var userName = RegexUtils.GetStringJson(ref inputData, "user_name")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringJson(ref inputData, "password")?.Replace("'", "\\'"); + var newPassword = RegexUtils.GetStringJson(ref inputData, "new_password")?.Replace("'", "\\'"); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["Conn"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select user_id,password from pepdtp.user where user_id='" + + userName + "' and password='" + password + "'"; + + var dw = mySql.ExecuteDataTableRow(sql); + if (dw != null) + { + UserLoginResultParam user = new UserLoginResultParam + { + user_name = dw["user_id"].ToString(), + password = dw["password"].ToString(), + }; + sql = "update pepdtp.user set password = '" + newPassword + "' where user_id='" + userName + "'"; + var result = mySql.ExecuteNonQuery(sql); + mySql.Close(); + + if (result) + { + return "{\"code\":0,\"msg\":\"密码修改成功!\"}"; + } + else + return "{\"code\":19999,\"msg\":\"密码修改失败!请稍后再试。\"}"; + } + else + { + mySql.Close(); + return "{\"code\":1,\"msg\":\"原密码错误。\"}"; + } + } + + public string return_package_secret_key { get; set; } = "aaMETt2bPe6YHzZ1ojbC+6wOvgtwehqc6A+/Rz+pCUU="; + + public string GetPackageSign(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var timestamp = RegexUtils.GetStringQuery(ref inputData, "timestamp")?.Replace("'", "\\'"); + var mallId = RegexUtils.GetStringQuery(ref inputData, "mallId")?.Replace("'", "\\'"); + var returnPackageNo = RegexUtils.GetStringQuery(ref inputData, "returnPackageNo")?.Replace("'", "\\'"); + int r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt(); + string c2 = RegexUtils.GetStringQuery(ref inputData, "c2"); + + if (EncrypUtil.Encryption(r2) != c2) + return "{\"code\":2,\"msg\":\"不合法的输入内容\"}"; + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select * from wxxd.user where user_name='" + + mobile + "' and password='" + password + "'"; + + sql = "select * from wxxd.user where user_name='" + mobile + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt == null || dt.Rows.Count <=0) + { + return "{\"code\":1,\"msg\":\"用户不存在\"}"; + } + + string sign = EncrypUtil.GetMd5(timestamp + return_package_secret_key + mallId + returnPackageNo).ToLower(); + + return "{\"code\":200, \"sign\":\"" + sign + "\", \"msg\":\"\"}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/DYShopService.asmx.cs b/KJDService/KJD_WebService/DYShopService.asmx.cs index 89f16e8..2a9c94d 100644 --- a/KJDService/KJD_WebService/DYShopService.asmx.cs +++ b/KJDService/KJD_WebService/DYShopService.asmx.cs @@ -1,4 +1,5 @@ using KJD_Web.BLL.BXX; +using KJD_Web.BLL.DYXD; using KJD_Web.Utils; using System; using System.Collections.Generic; @@ -54,7 +55,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().GetShop(jsontext); + result = new DYShopManage().GetShop(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -66,7 +67,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().GetOneLoginNameShop(jsontext); + result = new DYShopManage().GetOneLoginNameShop(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -78,7 +79,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().AddShop(jsontext); + result = new DYShopManage().AddShop(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -90,7 +91,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().DelShop(jsontext); + result = new DYShopManage().DelShop(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -102,7 +103,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().MdyShop(jsontext); + result = new DYShopManage().MdyShop(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -114,7 +115,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().MdyAntiContent(jsontext); + result = new DYShopManage().MdyAntiContent(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -126,7 +127,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().MdyCookieAndLoginStatus(jsontext); + result = new DYShopManage().MdyCookieAndLoginStatus(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -138,7 +139,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().GetShop(jsontext, true); + result = new DYShopManage().GetShop(jsontext, true); Context.Response.Write(result); Context.Response.End(); @@ -150,7 +151,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().SubSaGetSelectProdShop(jsontext); + result = new DYShopManage().SubSaGetSelectProdShop(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -162,7 +163,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().UpdateAddProdRemaining(jsontext); + result = new DYShopManage().UpdateAddProdRemaining(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -174,7 +175,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().MdyShop(jsontext, true); + result = new DYShopManage().MdyShop(jsontext, true); Context.Response.Write(result); Context.Response.End(); @@ -186,7 +187,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().AddShop(jsontext, true); + result = new DYShopManage().AddShop(jsontext, true); Context.Response.Write(result); Context.Response.End(); @@ -198,7 +199,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().DelShop(jsontext, true); + result = new DYShopManage().DelShop(jsontext, true); Context.Response.Write(result); Context.Response.End(); @@ -210,7 +211,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXShopManage().SetShopSubSa(jsontext); + result = new DYShopManage().SetShopSubSa(jsontext); Context.Response.Write(result); Context.Response.End(); diff --git a/KJDService/KJD_WebService/DYUserService.asmx.cs b/KJDService/KJD_WebService/DYUserService.asmx.cs index d718e12..091034a 100644 --- a/KJDService/KJD_WebService/DYUserService.asmx.cs +++ b/KJDService/KJD_WebService/DYUserService.asmx.cs @@ -1,4 +1,5 @@ using KJD_Web.BLL.BXX; +using KJD_Web.BLL.DYXD; using KJD_Web.Utils; using System; using System.Collections.Generic; @@ -60,7 +61,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().CheckUserLogin(jsontext); + result = new DYUserManage().CheckUserLogin(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -72,7 +73,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().GetPackageSign(jsontext); + result = new DYUserManage().GetPackageSign(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -84,7 +85,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().ChangePassword(jsontext); + result = new DYUserManage().ChangePassword(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -96,7 +97,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().GetSubUser(jsontext); + result = new DYUserManage().GetSubUser(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -108,7 +109,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().UpdateSubUser(jsontext); + result = new DYUserManage().UpdateSubUser(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -120,7 +121,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().AddSubUser(jsontext); + result = new DYUserManage().AddSubUser(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -132,7 +133,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().DelUser(jsontext); + result = new DYUserManage().DelUser(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -144,7 +145,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().GetAllUser(jsontext); + result = new DYUserManage().GetAllUser(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -156,7 +157,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().UpdateUser(jsontext); + result = new DYUserManage().UpdateUser(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -168,7 +169,7 @@ namespace KJD_Web string jsontext = GetRequestJsonString(); var result = jsontext; - result = new BXXUserManage().AddUser(jsontext); + result = new DYUserManage().AddUser(jsontext); Context.Response.Write(result); Context.Response.End(); diff --git a/KJDService/KJD_WebService/Global.asax.cs b/KJDService/KJD_WebService/Global.asax.cs index dc63528..316c7fa 100644 --- a/KJDService/KJD_WebService/Global.asax.cs +++ b/KJDService/KJD_WebService/Global.asax.cs @@ -122,6 +122,39 @@ namespace KJD_Web hPath = hPath.Replace("/dyxd_price/", "/DYPriceService.asmx/"); Context.RewritePath(hPath); } + + + + if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_user/")) + { + hPath = hPath.Replace("/wxxd_user/", "/WXUserService.asmx/"); + Context.RewritePath(hPath); + } + else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_shop/")) + { + hPath = hPath.Replace("/wxxd_shop/", "/WXShopService.asmx/"); + Context.RewritePath(hPath); + } + //else if (!hPath.Contains(".asmx") && hPath.Contains("/update/")) + //{ + // hPath = hPath.Replace("/update/", "/UpdateService.asmx/"); + // Context.RewritePath(hPath); + //} + else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_product/")) + { + hPath = hPath.Replace("/wxxd_product/", "/WXProductService.asmx/"); + Context.RewritePath(hPath); + } + else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_product_third/")) + { + hPath = hPath.Replace("/wxxd_product_third/", "/WXProductThirdService.asmx/"); + Context.RewritePath(hPath); + } + else if (!hPath.Contains(".asmx") && hPath.Contains("/wxxd_price/")) + { + hPath = hPath.Replace("/wxxd_price/", "/WXPriceService.asmx/"); + Context.RewritePath(hPath); + } } protected void Application_AuthenticateRequest(object sender, EventArgs e) diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj index b932e6b..aa64d2c 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj +++ b/KJDService/KJD_WebService/KJD_WebService.csproj @@ -74,7 +74,10 @@ + + + @@ -108,10 +111,25 @@ + + + + + WXProductService.asmx + Component + + + WXShopService.asmx + Component + DYShopService.asmx Component + + WXUserService.asmx + Component + DYUserService.asmx Component diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj.user b/KJDService/KJD_WebService/KJD_WebService.csproj.user index 1b87364..4bcdc04 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj.user +++ b/KJDService/KJD_WebService/KJD_WebService.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU ShowAllFiles diff --git a/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs b/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs index c158cd8..256a0c1 100644 --- a/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs +++ b/KJDService/KJD_WebService/Model/ShopModel/ShopParam.cs @@ -20,6 +20,10 @@ namespace KJD_Web.Model.ShopModel /// 拼多多Id /// public string pddid { get; set; } + /// + /// 微信openId + /// + public string openid { get; set; } public string shop_id { get; set; } public string shop_account { get; set; } public string sub_user_name { get; set; } diff --git a/KJDService/KJD_WebService/WXProductService.asmx b/KJDService/KJD_WebService/WXProductService.asmx new file mode 100644 index 0000000..a618afb --- /dev/null +++ b/KJDService/KJD_WebService/WXProductService.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="WXProductService.asmx.cs" Class="KJD_Web.WXProductService" %> diff --git a/KJDService/KJD_WebService/WXProductService.asmx.cs b/KJDService/KJD_WebService/WXProductService.asmx.cs new file mode 100644 index 0000000..080b8ea --- /dev/null +++ b/KJDService/KJD_WebService/WXProductService.asmx.cs @@ -0,0 +1,113 @@ +using KJD_Web.BLL.BXX; +using KJD_Web.BLL.WXXD; +using KJD_Web.Utils; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.Services; + +namespace KJD_Web +{ + /// + /// ProductService 的摘要说明 + /// + [WebService(Namespace = "http://tempuri.org/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。 + // [System.Web.Script.Services.ScriptService] + public class WXProductService : System.Web.Services.WebService + { + private string GetRequestJsonString() + { + Context.Response.ContentType = "text/html;charset=utf-8"; + Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8"); + + using (Stream s = HttpContext.Current.Request.InputStream) // 获得json 字符流 + { + // 还原数据流 + byte[] b = new byte[s.Length]; + s.Read(b, 0, (int)s.Length); + string jsonText = Encoding.UTF8.GetString(b); // JSON字符串 + if (string.IsNullOrEmpty(jsonText)) + { + var qs = HttpContext.Current.Request.QueryString; + if (qs != null && qs.Keys.Count > 0) + { + jsonText = "{"; + foreach (var key in qs.Keys) + { + jsonText += "\"" + key + "\":" + "\"" + qs[key.ToString()] + "\";"; + } + jsonText = jsonText.TrimEnd(';') + "}"; + } + } + return jsonText; + } + } + + [WebMethod] + public void get_pdd_product_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductList(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_pdd_product_detail_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductList(jsontext, true); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_pdd_product_list_random() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductListRandom(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + + [WebMethod] + public void get_pdd_product_groups() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductGroups(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_pdd_product_cates() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXProductManage().WXGetPDDProductCates(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + } +} diff --git a/KJDService/KJD_WebService/WXShopService.asmx b/KJDService/KJD_WebService/WXShopService.asmx new file mode 100644 index 0000000..d1e86e4 --- /dev/null +++ b/KJDService/KJD_WebService/WXShopService.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="WXShopService.asmx.cs" Class="KJD_Web.WXShopService" %> diff --git a/KJDService/KJD_WebService/WXShopService.asmx.cs b/KJDService/KJD_WebService/WXShopService.asmx.cs new file mode 100644 index 0000000..f77cd38 --- /dev/null +++ b/KJDService/KJD_WebService/WXShopService.asmx.cs @@ -0,0 +1,220 @@ +using KJD_Web.BLL.BXX; +using KJD_Web.BLL.WXXD; +using KJD_Web.Utils; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.Services; + +namespace KJD_Web +{ + /// + /// ShopService 的摘要说明 + /// + [WebService(Namespace = "http://tempuri.org/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。 + // [System.Web.Script.Services.ScriptService] + public class WXShopService : System.Web.Services.WebService + { + private string GetRequestJsonString() + { + Context.Response.ContentType = "text/html;charset=utf-8"; + Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8"); + + using (Stream s = HttpContext.Current.Request.InputStream) // 获得json 字符流 + { + // 还原数据流 + byte[] b = new byte[s.Length]; + s.Read(b, 0, (int)s.Length); + string jsonText = Encoding.UTF8.GetString(b); // JSON字符串 + if (string.IsNullOrEmpty(jsonText)) + { + var qs = HttpContext.Current.Request.QueryString; + if (qs != null && qs.Keys.Count > 0) + { + jsonText = "{"; + foreach (var key in qs.Keys) + { + jsonText += "\"" + key + "\":" + "\"" + qs[key.ToString()] + "\";"; + } + jsonText = jsonText.TrimEnd(';') + "}"; + } + } + return jsonText; + } + } + + [WebMethod] + public void get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().GetShop(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_one_login_name_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().GetOneLoginNameShop(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().AddShop(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().DelShop(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().MdyShop(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void mdy_anti_content() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().MdyAntiContent(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void mdy_shop_cookie_and_login_status() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().MdyCookieAndLoginStatus(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void admin_get_shop_list() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().GetShop(jsontext, true); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void sub_sa_get_select_prod_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().SubSaGetSelectProdShop(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void update_add_prod_remaining() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().UpdateAddProdRemaining(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void admin_mdy_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().MdyShop(jsontext, true); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void admin_add_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().AddShop(jsontext, true); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void admin_del_shop() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().DelShop(jsontext, true); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void set_shop_sub_sa() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXShopManage().SetShopSubSa(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + } +} diff --git a/KJDService/KJD_WebService/WXUserService.asmx b/KJDService/KJD_WebService/WXUserService.asmx new file mode 100644 index 0000000..6c1ab59 --- /dev/null +++ b/KJDService/KJD_WebService/WXUserService.asmx @@ -0,0 +1 @@ +<%@ WebService Language="C#" CodeBehind="WXUserService.asmx.cs" Class="KJD_Web.WXUserService" %> diff --git a/KJDService/KJD_WebService/WXUserService.asmx.cs b/KJDService/KJD_WebService/WXUserService.asmx.cs new file mode 100644 index 0000000..b93bc1f --- /dev/null +++ b/KJDService/KJD_WebService/WXUserService.asmx.cs @@ -0,0 +1,178 @@ +using KJD_Web.BLL.BXX; +using KJD_Web.BLL.WXXD; +using KJD_Web.Utils; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.Services; + +namespace KJD_Web +{ + /// + /// UserService 的摘要说明 + /// + [WebService(Namespace = "http://tempuri.org/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [System.ComponentModel.ToolboxItem(false)] + // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。 + // [System.Web.Script.Services.ScriptService] + public class WXUserService : System.Web.Services.WebService + { + [WebMethod] + public string hello_world() + { + return "Hello World"; + } + + private string GetRequestJsonString() + { + Context.Response.ContentType = "text/html;charset=utf-8"; + Context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8"); + + using (Stream s = HttpContext.Current.Request.InputStream) // 获得json 字符流 + { + // 还原数据流 + byte[] b = new byte[s.Length]; + s.Read(b, 0, (int)s.Length); + string jsonText = Encoding.UTF8.GetString(b); // JSON字符串 + if (string.IsNullOrEmpty(jsonText)) + { + var qs = HttpContext.Current.Request.QueryString; + if (qs != null && qs.Keys.Count > 0) + { + jsonText = "{"; + foreach (var key in qs.Keys) + { + jsonText += "\"" + key + "\":" + "\"" + qs[key.ToString()] + "\";"; + } + jsonText = jsonText.TrimEnd(';') + "}"; + } + } + return jsonText; + } + } + + [WebMethod] + public void user_login() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().CheckUserLogin(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_package_sign() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetPackageSign(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void change_password() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().ChangePassword(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetSubUser(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void update_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().UpdateSubUser(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void add_sub_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().AddSubUser(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void delete_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().DelUser(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_all_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().GetAllUser(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void update_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().UpdateUser(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void add_user() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new WXUserManage().AddUser(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + } +} diff --git a/TEMUKJD/BLL/HttpResponseBLL.cs b/TEMUKJD/BLL/HttpResponseBLL.cs index d472eb8..4ea4e9e 100644 --- a/TEMUKJD/BLL/HttpResponseBLL.cs +++ b/TEMUKJD/BLL/HttpResponseBLL.cs @@ -228,7 +228,7 @@ namespace TemuKJD.BLL return result; } - private static void WriteMultipartBodyToRequest(HttpWebRequest request, string body) + public static void WriteMultipartBodyToRequest(HttpWebRequest request, string body) { string[] multiparts = Regex.Split(body, @""); byte[] bytes; diff --git a/TEMUKJD/BLL/ShopBLL.cs b/TEMUKJD/BLL/ShopBLL.cs index 721995b..fc0e26e 100644 --- a/TEMUKJD/BLL/ShopBLL.cs +++ b/TEMUKJD/BLL/ShopBLL.cs @@ -258,6 +258,7 @@ namespace TemuKJD.BLL shop.ad_seller_unique_id = BaseRegex.GetStringJson(ref shopStr, "ad_seller_unique_id"); shop.ad_url = BaseRegex.GetStringJson(ref shopStr, "ad_url"); shop.pddid = BaseRegex.GetStringJson(ref shopStr, "pddid"); + shop.openid = BaseRegex.GetStringJson(ref shopStr, "openid"); shop.jit_expire_time = BaseRegex.GetStringJson(ref shopStr, "jit_expire_time") == null ? new DateTime?() : Convert.ToDateTime(BaseRegex.GetStringJson(ref shopStr, "jit_expire_time")); if (BaseClass.MainPath == "binxixi") diff --git a/TEMUKJD/BLL/WXHttpResponseBLL.cs b/TEMUKJD/BLL/WXHttpResponseBLL.cs new file mode 100644 index 0000000..f841239 --- /dev/null +++ b/TEMUKJD/BLL/WXHttpResponseBLL.cs @@ -0,0 +1,332 @@ +using AllBase; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace TemuKJD.BLL +{ + public class WXHttpResponseBLL + { + public static string WeiXinPostResponse(ShopLoginInfo shop, string _url, string _data, string referer) + { + string biz_magic = ""; + string cookies = ""; + try + { + var cookieLst = JsonHelper.DeserializeJsonToList(shop?.Cookies.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + foreach (var cook in cookieLst) + { + cookies += cook.Name + "=" + cook.Value + ";"; + } + var bizMagicCookie = cookieLst.FirstOrDefault(c => c.Name == "biz_magic"); + if (bizMagicCookie != null) + biz_magic = bizMagicCookie.Value; + } + catch { } + + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + request.Headers.Add("wecom_magic", @""); + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.Headers.Add("supplier_magic", @""); + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Headers.Add("potter-scene", @"weixinShop"); + request.Headers.Add("biz_magic", biz_magic); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + request.Accept = "application/json, text/plain, */*"; + request.Headers.Add("talent_magic", @""); + request.ContentType = "application/json"; + request.Headers.Add("mcn_magic", @""); + request.Headers.Add("Origin", @"https://store.weixin.qq.com"); + request.Headers.Add("Sec-Fetch-Site", @"same-origin"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + request.Referer = referer; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"); + request.Headers.Set(HttpRequestHeader.Cookie, cookies); + + request.Method = "POST"; + request.ServicePoint.Expect100Continue = false; + + string body = _data; + byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body); + request.ContentLength = postBytes.Length; + Stream stream = request.GetRequestStream(); + stream.Write(postBytes, 0, postBytes.Length); + stream.Close(); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } + + public static string WeiXinImgPostResponse(ShopLoginInfo shop, string _url, string _data, string dis_k, long dis_t, string ext, string referer = "https://store.weixin.qq.com/") + { + string biz_magic = ""; + string cookies = ""; + try + { + var cookieLst = JsonHelper.DeserializeJsonToList(shop?.Cookies.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + foreach (var cook in cookieLst) + { + cookies += cook.Name + "=" + cook.Value + ";"; + } + var bizMagicCookie = cookieLst.FirstOrDefault(c => c.Name == "biz_magic"); + if (bizMagicCookie != null) + biz_magic = bizMagicCookie.Value; + } + catch { } + + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Headers.Add("X-Requested-With", @"XMLHttpRequest"); + //request.Headers.Add("X-Arguments", @"dis_k=9974f70b8c9e17952a3bf6aa7b0fcfee84d976d5&dis_t=1767868679&ext=1b37ffc79cfe7&apptype=160&filetype=20304&openid=ouBgG2b2iqWytVlHHK0lhZvMBf2o&groupid=0&taskid=c9059d06-383e-460e-86e6-a0cb134016a9"); + request.Headers.Add("X-Arguments", @"dis_k=" + dis_k + @"&dis_t=" + dis_t + @"&ext=" + ext + @"&apptype=160&filetype=20304&openid=" + shop.openid + @"&groupid=0&taskid=" + Guid.NewGuid().ToString()); + request.Accept = "application/json, text/plain, */*"; + request.ContentType = "application/json"; + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + request.Headers.Add("Origin", @"https://store.weixin.qq.com"); + request.Headers.Add("Sec-Fetch-Site", @"same-site"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + request.Referer = referer; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + + + request.Method = "POST"; + request.ServicePoint.Expect100Continue = false; + + string body = _data; + byte[] postBytes = Convert.FromBase64String(body); + request.ContentLength = postBytes.Length; + Stream stream = request.GetRequestStream(); + stream.Write(postBytes, 0, postBytes.Length); + stream.Close(); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } + + public static string WeiXinUploadResponse(ShopLoginInfo shop, string _url, string _body, string boundaryStr, string referer) + { + + string biz_magic = ""; + string cookies = ""; + try + { + var cookieLst = JsonHelper.DeserializeJsonToList(shop?.Cookies.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + foreach (var cook in cookieLst) + { + if (cook.Name.StartsWith("biz")) + cookies += cook.Name + "=" + cook.Value + ";"; + } + var bizMagicCookie = cookieLst.FirstOrDefault(c => c.Name == "biz_magic"); + if (bizMagicCookie != null) + biz_magic = bizMagicCookie.Value; + } + catch { } + + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.Headers.Add("wecom_magic", @""); + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.Headers.Add("supplier_magic", @""); + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Headers.Add("potter-scene", @"weixinShop"); + request.Headers.Add("biz_magic", biz_magic); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + request.Accept = "application/json, text/plain, */*"; + request.Headers.Add("talent_magic", @""); + request.ContentType = "multipart/form-data; boundary=" + boundaryStr; + request.Headers.Add("mcn_magic", @""); + request.Headers.Add("Origin", @"https://store.weixin.qq.com"); + request.Headers.Set(HttpRequestHeader.Cookie, cookies); + request.Headers.Add("Sec-Fetch-Site", @"same-origin"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + request.Referer = referer; //"https://store.weixin.qq.com/shop/goods/entry"; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + + + request.Method = "POST"; + request.ServicePoint.Expect100Continue = false; + + string body = _body; + HttpResponseBLL.WriteMultipartBodyToRequest(request, body); + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } + + public static string WeiXinGetResponse(ShopLoginInfo shop, string _url, string referer = "", bool isGetDocument = false) + { + string biz_magic = ""; + string cookies = ""; + try + { + var cookieLst = JsonHelper.DeserializeJsonToList(shop?.Cookies.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + foreach (var cook in cookieLst) + { + if (cook.Name.StartsWith("biz")) + cookies += cook.Name + "=" + cook.Value + ";"; + } + var bizMagicCookie = cookieLst.FirstOrDefault(c => c.Name == "biz_magic"); + if (bizMagicCookie != null) + biz_magic = bizMagicCookie.Value; + } + catch { } + + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + if (isGetDocument) + { + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.Headers.Add("Upgrade-Insecure-Requests", @"1"); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + request.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.7"; + request.Headers.Set(HttpRequestHeader.Cookie, cookies); + request.Headers.Add("Sec-Fetch-Site", @"none"); + request.Headers.Add("Sec-Fetch-Mode", @"navigate"); + request.Headers.Add("Sec-Fetch-User", @"?1"); + request.Headers.Add("Sec-Fetch-Dest", @"document"); + } + else + { + request.Headers.Add("wecom_magic", @""); + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.Headers.Add("supplier_magic", @""); + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Headers.Add("potter-scene", @"weixinShop"); + request.Headers.Add("biz_magic",biz_magic); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + request.Accept = "application/json, text/plain, */*"; + request.Headers.Add("talent_magic", @""); + request.Headers.Add("mcn_magic", @""); + request.Headers.Set(HttpRequestHeader.Cookie, cookies); + request.Headers.Add("Sec-Fetch-Site", @"same-origin"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + request.Referer = referer; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + } + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } + } +} diff --git a/TEMUKJD/InitForm.Designer.cs b/TEMUKJD/InitForm.Designer.cs index 220b01d..f428044 100644 --- a/TEMUKJD/InitForm.Designer.cs +++ b/TEMUKJD/InitForm.Designer.cs @@ -36,7 +36,7 @@ this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.rbTemu = new System.Windows.Forms.RadioButton(); this.rbPdd = new System.Windows.Forms.RadioButton(); - this.rbDy = new System.Windows.Forms.RadioButton(); + this.rbWX = new System.Windows.Forms.RadioButton(); this.chkRemember = new TemuKJD.UserComponent.UcCheckBox(this.components); this.panel3 = new System.Windows.Forms.Panel(); this.label1 = new System.Windows.Forms.Label(); @@ -57,26 +57,29 @@ this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(1, 33); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(265, 190); + this.panel2.Size = new System.Drawing.Size(278, 190); this.panel2.TabIndex = 39; // // panel4 // + this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panel4.Controls.Add(this.btnOK); this.panel4.Controls.Add(this.flowLayoutPanel1); this.panel4.Location = new System.Drawing.Point(4, 132); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(256, 52); + this.panel4.Size = new System.Drawing.Size(269, 52); this.panel4.TabIndex = 40; this.panel4.Visible = false; // // btnOK // + this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.Top; this.btnOK.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand; this.btnOK.DisabledBackColor = System.Drawing.Color.Empty; this.btnOK.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnOK.Location = new System.Drawing.Point(30, 24); + this.btnOK.Location = new System.Drawing.Point(36, 24); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(199, 23); this.btnOK.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -97,13 +100,15 @@ // // flowLayoutPanel1 // + this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.flowLayoutPanel1.Controls.Add(this.rbTemu); this.flowLayoutPanel1.Controls.Add(this.rbPdd); - this.flowLayoutPanel1.Controls.Add(this.rbDy); + this.flowLayoutPanel1.Controls.Add(this.rbWX); this.flowLayoutPanel1.Controls.Add(this.chkRemember); this.flowLayoutPanel1.Location = new System.Drawing.Point(9, 1); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(250, 48); + this.flowLayoutPanel1.Size = new System.Drawing.Size(263, 48); this.flowLayoutPanel1.TabIndex = 757; // // rbTemu @@ -132,23 +137,23 @@ this.rbPdd.Text = "拼多多"; this.rbPdd.UseVisualStyleBackColor = true; // - // rbDy + // rbSPH // - this.rbDy.AutoSize = true; - this.rbDy.ForeColor = System.Drawing.SystemColors.InfoText; - this.rbDy.Location = new System.Drawing.Point(120, 0); - this.rbDy.Margin = new System.Windows.Forms.Padding(0); - this.rbDy.Name = "rbDy"; - this.rbDy.Size = new System.Drawing.Size(50, 21); - this.rbDy.TabIndex = 28; - this.rbDy.Text = "抖音"; - this.rbDy.UseVisualStyleBackColor = true; - this.rbDy.Visible = false; + this.rbWX.AutoSize = true; + this.rbWX.ForeColor = System.Drawing.SystemColors.InfoText; + this.rbWX.Location = new System.Drawing.Point(120, 0); + this.rbWX.Margin = new System.Windows.Forms.Padding(0); + this.rbWX.Name = "rbSPH"; + this.rbWX.Size = new System.Drawing.Size(62, 21); + this.rbWX.TabIndex = 28; + this.rbWX.Text = "视频号"; + this.rbWX.UseVisualStyleBackColor = true; + this.rbWX.Visible = false; // // chkRemember // this.chkRemember.AutoSize = true; - this.chkRemember.Location = new System.Drawing.Point(170, 0); + this.chkRemember.Location = new System.Drawing.Point(182, 0); this.chkRemember.Margin = new System.Windows.Forms.Padding(0); this.chkRemember.Name = "chkRemember"; this.chkRemember.Size = new System.Drawing.Size(75, 21); @@ -159,19 +164,22 @@ // // panel3 // + this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.panel3.Controls.Add(this.label1); this.panel3.Controls.Add(this.progressBarX1); this.panel3.Controls.Add(this.pbShopLoading); this.panel3.Location = new System.Drawing.Point(4, 27); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(257, 125); + this.panel3.Size = new System.Drawing.Size(270, 125); this.panel3.TabIndex = 39; // // label1 // + this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(54, 9); + this.label1.Location = new System.Drawing.Point(61, 9); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(150, 21); this.label1.TabIndex = 0; @@ -187,7 +195,7 @@ this.progressBarX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.progressBarX1.Location = new System.Drawing.Point(29, 105); this.progressBarX1.Name = "progressBarX1"; - this.progressBarX1.Size = new System.Drawing.Size(199, 15); + this.progressBarX1.Size = new System.Drawing.Size(212, 15); this.progressBarX1.TabIndex = 38; this.progressBarX1.TabStop = false; this.progressBarX1.Text = "progressBarX1"; @@ -198,7 +206,7 @@ this.pbShopLoading.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(247)))), ((int)(((byte)(247))))); this.pbShopLoading.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbShopLoading.Location = new System.Drawing.Point(96, 35); + this.pbShopLoading.Location = new System.Drawing.Point(103, 35); this.pbShopLoading.Name = "pbShopLoading"; this.pbShopLoading.Size = new System.Drawing.Size(64, 64); this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -208,7 +216,7 @@ // InitForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(267, 224); + this.ClientSize = new System.Drawing.Size(280, 224); this.Controls.Add(this.panel2); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -242,6 +250,6 @@ private DevComponents.DotNetBar.PanelEx btnOK; private System.Windows.Forms.Panel panel4; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.RadioButton rbDy; + private System.Windows.Forms.RadioButton rbWX; } } \ No newline at end of file diff --git a/TEMUKJD/InitForm.cs b/TEMUKJD/InitForm.cs index a47ec8e..f425477 100644 --- a/TEMUKJD/InitForm.cs +++ b/TEMUKJD/InitForm.cs @@ -36,7 +36,7 @@ namespace TemuKJD #if DEBUG this.panel3.Location = new Point(4, 4); this.panel4.Visible=true; - this.rbDy.Visible = true; + this.rbWX.Visible = true; #endif initFormSettings = ConfigHelper.LoadConfig("initFormSettings"); if (initFormSettings == null) @@ -44,11 +44,11 @@ namespace TemuKJD this.chkRemember.Checked = initFormSettings.Remember; this.rbTemu.Checked = initFormSettings.LoginType.ToLower() == "temu"; this.rbPdd.Checked = initFormSettings.LoginType.ToLower() == "pdd"; - this.rbDy.Checked = initFormSettings.LoginType.ToLower() == "dy"; + this.rbWX.Checked = initFormSettings.LoginType.ToLower() == "wx"; this.rbTemu.CheckedChanged += rbTemu_CheckedChanged; this.rbPdd.CheckedChanged += rbTemu_CheckedChanged; - this.rbDy.CheckedChanged += rbTemu_CheckedChanged; - if (rbDy.Visible == false) + this.rbWX.CheckedChanged += rbTemu_CheckedChanged; + if (rbWX.Visible == false) flowLayoutPanel1.Location = new Point(38, flowLayoutPanel1.Location.Y); Task.Run(() => @@ -138,8 +138,8 @@ namespace TemuKJD newLoginType = "Temu"; else if (sender == rbPdd && rbPdd.Checked) newLoginType = "Pdd"; - else if (sender == rbDy && rbDy.Checked) - newLoginType = "Dy"; + else if (sender == rbWX && rbWX.Checked) + newLoginType = "Wx"; if (initFormSettings.LoginType != newLoginType) { isChangeType = true; diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 222dfaf..ff189cb 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -117,6 +117,7 @@ + Form @@ -125,59 +126,101 @@ ChangeForm.cs - + Form - - DYAdminAccountForm.cs + + WXAdminShopListForm.cs - + Form - - DYAdminForm.cs + + WXAdminAccountForm.cs - + Form - - DYAdminShopAddSubSaForm.cs + + WXAdminForm.cs - + Form - - DYShopAddEditForm.cs + + WXAdminShopAddSubSaForm.cs - + Form - - DYShopListForm.cs + + WXAdminShopLoginForm.cs - + Form - - DYShopLoginForm.cs + + WXDBProdUploadCacheForm.cs - + Form - - DYSubAccountListForm.cs + + WXDBProdUploadForm.cs - + Form - - DYSubAccountShopEditForm.cs + + WXProductForm.cs - - + + Form + + + WXShopUpdateCookieForm.cs + + + Form + + + WXShopForm.cs + + + Form + + + WXShopAddEditForm.cs + + + Form + + + WXShopListForm.cs + + + Form + + + WXShopLoginForm.cs + + + Form + + + WXSubAccountListForm.cs + + + Form + + + WXSubAccountShopEditForm.cs + + + UserControl - + UcSubAccount.cs @@ -965,31 +1008,52 @@ ChangeForm.cs - - DYAdminAccountForm.cs + + WXAdminShopListForm.cs - - DYAdminForm.cs + + WXAdminAccountForm.cs - - DYAdminShopAddSubSaForm.cs + + WXAdminForm.cs - - DYShopAddEditForm.cs + + WXAdminShopAddSubSaForm.cs - - DYShopListForm.cs + + WXAdminShopLoginForm.cs - - DYShopLoginForm.cs + + WXDBProdUploadCacheForm.cs - - DYSubAccountListForm.cs + + WXDBProdUploadForm.cs - - DYSubAccountShopEditForm.cs + + WXProductForm.cs - + + WXShopUpdateCookieForm.cs + + + WXShopForm.cs + + + WXShopAddEditForm.cs + + + WXShopListForm.cs + + + WXShopLoginForm.cs + + + WXSubAccountListForm.cs + + + WXSubAccountShopEditForm.cs + + UcSubAccount.cs diff --git a/TEMUKJD/KJDForms/ProductForms/PurchasePriceForm.cs b/TEMUKJD/KJDForms/ProductForms/PurchasePriceForm.cs index 23949ce..6b822a0 100644 --- a/TEMUKJD/KJDForms/ProductForms/PurchasePriceForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/PurchasePriceForm.cs @@ -494,7 +494,14 @@ namespace TemuKJD.KJDForms.ProductForms list = JsonHelper.DeserializeJsonToList(jArr.ToString()); foreach (var pPrice in list) { - pPrice.dbSkuPurchasePriceList = JsonHelper.DeserializeJsonToList(pPrice.sku_purchase_price_json); + try + { + pPrice.dbSkuPurchasePriceList = JsonHelper.DeserializeJsonToList(pPrice.sku_purchase_price_json); + } + catch (Exception ex) + { + pPrice.price_text = "获取失败请重新设置"; + } if (pPrice.dbSkuPurchasePriceList == null) pPrice.dbSkuPurchasePriceList = new List(); else diff --git a/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs index 5e39e16..3b22f05 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs @@ -487,7 +487,14 @@ namespace TemuKJD.KJDForms.ProductForms list = JsonHelper.DeserializeJsonToList(jArr.ToString()); foreach (var pPrice in list) { - pPrice.dbSkuPurchasePriceList = JsonHelper.DeserializeJsonToList(pPrice.sku_purchase_price_json); + try + { + pPrice.dbSkuPurchasePriceList = JsonHelper.DeserializeJsonToList(pPrice.sku_purchase_price_json); + } + catch (Exception ex) + { + pPrice.price_text = "获取失败请重新设置"; + } if (pPrice.dbSkuPurchasePriceList == null) pPrice.dbSkuPurchasePriceList = new List(); else diff --git a/TEMUKJD/KJDForms/ShopForms/Statistics/ShopOrderStatisticsForm.cs b/TEMUKJD/KJDForms/ShopForms/Statistics/ShopOrderStatisticsForm.cs index c4f0de3..bf2ea0c 100644 --- a/TEMUKJD/KJDForms/ShopForms/Statistics/ShopOrderStatisticsForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/Statistics/ShopOrderStatisticsForm.cs @@ -884,8 +884,9 @@ namespace TemuKJD.KJDForms.ShopForms.Statistics { pPrice.dbSkuPurchasePriceList = JsonHelper.DeserializeJsonToList(pPrice.sku_purchase_price_json); } - catch (Exception ex) - { + catch (Exception ex) + { + pPrice.price_text = "获取失败请重新设置"; } if (pPrice.dbSkuPurchasePriceList == null) pPrice.dbSkuPurchasePriceList = new List(); diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs index 208de51..ccb6f84 100644 --- a/TEMUKJD/MainForm.cs +++ b/TEMUKJD/MainForm.cs @@ -43,6 +43,9 @@ using TemuKJD.PDDForms.AdminForms; using TemuKJD.PDDForms.ShopForms; using TemuKJD.PDDForms.ProductForms; using TemuKJD.KJDForms.JITForms; +using TemuKJD.WXForms.ShopForms; +using TemuKJD.WXForms.AdminForms; +using TemuKJD.WXForms.ProductForms; namespace TemuKJD { @@ -156,6 +159,11 @@ namespace TemuKJD BaseClass.MainPath = "douyin"; this.pnlJit.Visible = false; } + else if (loginType == "Wx") + { + BaseClass.MainPath = "weixin"; + this.pnlJit.Visible = false; + } instance = this; this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); @@ -183,7 +191,6 @@ namespace TemuKJD //settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36"; //settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"; settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; - //if (BaseClass.MainPath == "binxixi" && BaseClass.UsePddWorkbanch) if (initFormSettings.LoginType.ToLower() == "pdd") settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12"; settings.CefCommandLineArgs.Add("disable-gpu", "1"); // 禁止显卡加速 @@ -684,6 +691,14 @@ namespace TemuKJD } ShowMainPanel(shopForm as A_PddShopForm, sender as Panel); } + else if (BaseClass.MainPath == "weixin") + { + if (shopForm == null) + { + shopForm = new WXShopForm(); + } + ShowMainPanel(shopForm as WXShopForm, sender as Panel); + } } private object adminForm; @@ -713,6 +728,14 @@ namespace TemuKJD //} //ShowMainPanel(adminForm as PDDAdminForm, sender as Panel); } + else if (BaseClass.MainPath == "weixin") + { + if (adminForm == null) + { + adminForm = new WXAdminForm(); + } + ShowMainPanel(adminForm as WXAdminForm, sender as Panel); + } } private object uploadForm; @@ -734,6 +757,14 @@ namespace TemuKJD } ShowMainPanel(uploadForm as PDDProductForm, sender as Panel); } + else if (BaseClass.MainPath == "weixin") + { + if (uploadForm == null) + { + uploadForm = new WXProductForm(); + } + ShowMainPanel(uploadForm as WXProductForm, sender as Panel); + } } //private CollectForm collectForm; diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs index d6d5b9f..e20b63c 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs @@ -754,7 +754,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms if (string.IsNullOrEmpty(dbProd.product_json)) { dbProd = PDDDBProdUserSelectForm.GetProductDetail(dbProd.id.ParseToString()); +#if DEBUG + Thread.Sleep(50); +#else Thread.Sleep(200); +#endif } JObject prodJObj = new JObject(); diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs similarity index 99% rename from TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.Designer.cs rename to TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs index 4e4d56b..3d2d6f9 100644 --- a/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs @@ -1,7 +1,7 @@  -namespace TemuKJD.DYForms.AdminForms +namespace TemuKJD.WXForms.AdminForms { - partial class DYAdminAccountForm + partial class WXAdminAccountForm { /// /// Required designer variable. diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs similarity index 98% rename from TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.cs rename to TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs index 6b0966a..3a6d184 100644 --- a/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs @@ -12,16 +12,16 @@ using System.Windows.Forms; using TemuKJD.BaseForms; using Work; -namespace TemuKJD.DYForms.AdminForms +namespace TemuKJD.WXForms.AdminForms { - public partial class DYAdminAccountForm + public partial class WXAdminAccountForm : BaseForm { public static List AllUsers { get; set; } = new List(); public MainForm Mf { get; set; } = null; public string Uid { get; set; } = ""; - public DYAdminAccountForm() + public WXAdminAccountForm() { InitializeComponent(); } diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.resx b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.resx similarity index 100% rename from TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.resx rename to TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.resx diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs similarity index 99% rename from TEMUKJD/DYForms/AdminForms/DYAdminForm.Designer.cs rename to TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs index 5215dd0..f862a33 100644 --- a/TEMUKJD/DYForms/AdminForms/DYAdminForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs @@ -1,6 +1,6 @@ -namespace TemuKJD.DYForms.AdminForms +namespace TemuKJD.WXForms.AdminForms { - partial class DYAdminForm + partial class WXAdminForm { /// /// Required designer variable. diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs similarity index 86% rename from TEMUKJD/DYForms/AdminForms/DYAdminForm.cs rename to TEMUKJD/WXForms/AdminForms/WXAdminForm.cs index 2d58c8d..f5f4fd4 100644 --- a/TEMUKJD/DYForms/AdminForms/DYAdminForm.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs @@ -12,16 +12,16 @@ using System.Windows.Forms; using TemuKJD.BaseForms; using TemuKJD.PDDForms.ProductSelectForms; -namespace TemuKJD.DYForms.AdminForms +namespace TemuKJD.WXForms.AdminForms { - public partial class DYAdminForm : BaseForm + public partial class WXAdminForm : BaseForm { - public Lazy adminAccountForm = new Lazy(); - //public Lazy adminShopForm = new Lazy(); - //public Lazy dbProdListForm = new Lazy(); - //public Lazy dbProdImgListForm = new Lazy(); + public Lazy adminAccountForm = new Lazy(); + public Lazy adminShopForm = new Lazy(); + //public Lazy dbProdListForm = new Lazy(); + //public Lazy dbProdImgListForm = new Lazy(); - public DYAdminForm() + public WXAdminForm() { InitializeComponent(); @@ -39,8 +39,8 @@ namespace TemuKJD.DYForms.AdminForms { hideName.Remove("超级用户管理"); hideName.Remove("超级店铺管理"); - hideName.Remove("产品数据库"); - hideName.Remove("SKU替换图"); + //hideName.Remove("产品数据库"); + //hideName.Remove("SKU替换图"); } if (BaseClass.SaLevel==2) { @@ -74,9 +74,9 @@ namespace TemuKJD.DYForms.AdminForms case "超级用户管理": SetForm(adminAccountForm.Value); break; - //case "超级店铺管理": - // SetForm(adminShopForm.Value); - // break; + case "超级店铺管理": + SetForm(adminShopForm.Value); + break; //case "产品数据库": // SetForm(dbProdListForm.Value); // break; diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminForm.resx b/TEMUKJD/WXForms/AdminForms/WXAdminForm.resx similarity index 100% rename from TEMUKJD/DYForms/AdminForms/DYAdminForm.resx rename to TEMUKJD/WXForms/AdminForms/WXAdminForm.resx diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopAddSubSaForm.Designer.cs similarity index 98% rename from TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.Designer.cs rename to TEMUKJD/WXForms/AdminForms/WXAdminShopAddSubSaForm.Designer.cs index 5221268..ca2d5ff 100644 --- a/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopAddSubSaForm.Designer.cs @@ -1,7 +1,7 @@  -namespace TemuKJD.DYForms.AdminForms +namespace TemuKJD.WXForms.AdminForms { - partial class DYAdminShopAddSubSaForm + partial class WXAdminShopAddSubSaForm { /// /// Required designer variable. @@ -31,7 +31,7 @@ namespace TemuKJD.DYForms.AdminForms { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DYAdminShopAddSubSaForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXAdminShopAddSubSaForm)); this.panel2 = new System.Windows.Forms.Panel(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.dgvSaUser = new TemuKJD.UserComponent.DataGridViewEx(); diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopAddSubSaForm.cs similarity index 96% rename from TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.cs rename to TEMUKJD/WXForms/AdminForms/WXAdminShopAddSubSaForm.cs index dee020e..d987c0c 100644 --- a/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopAddSubSaForm.cs @@ -13,14 +13,14 @@ using System.Windows.Forms; using TemuKJD.BaseForms; using Work; -namespace TemuKJD.DYForms.AdminForms +namespace TemuKJD.WXForms.AdminForms { - public partial class DYAdminShopAddSubSaForm : LRBaseForm + public partial class WXAdminShopAddSubSaForm : LRBaseForm { List lstShopLoginName = new List(); List lstSubSa = new List(); - public DYAdminShopAddSubSaForm(List ShopSelectIds = null) + public WXAdminShopAddSubSaForm(List ShopSelectIds = null) { InitializeComponent(); if (ShopSelectIds != null) diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.resx b/TEMUKJD/WXForms/AdminForms/WXAdminShopAddSubSaForm.resx similarity index 100% rename from TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.resx rename to TEMUKJD/WXForms/AdminForms/WXAdminShopAddSubSaForm.resx diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs new file mode 100644 index 0000000..085080f --- /dev/null +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs @@ -0,0 +1,944 @@ + +namespace TemuKJD.WXForms.AdminForms +{ + partial class WXAdminShopListForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.panel5 = new System.Windows.Forms.Panel(); + this.chkShowDelete = new System.Windows.Forms.CheckBox(); + this.btnLoginSelect = new TemuKJD.UserControls.ButtonEx(); + this.btnCheck = new TemuKJD.UserControls.ButtonEx(); + this.panel4 = new System.Windows.Forms.Panel(); + this.btnSetSubSa = new TemuKJD.UserControls.ButtonEx(); + this.txtUserName = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtLoginName = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); + this.btnSearch = new TemuKJD.UserControls.ButtonEx(); + this.txtNotes = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.txtShopName = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtShopId = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.pnlAddProdRemaining = new System.Windows.Forms.Panel(); + this.lblShopId = new System.Windows.Forms.Label(); + this.panel2 = new System.Windows.Forms.Panel(); + this.pnlCancel = new DevComponents.DotNetBar.PanelEx(); + this.numAddRemaining = new System.Windows.Forms.NumericUpDown(); + this.btnRemainOK = new DevComponents.DotNetBar.PanelEx(); + this.lblAddProdRemaining = new System.Windows.Forms.Label(); + this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.chkAutoDrag = new System.Windows.Forms.CheckBox(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMinus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPlus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSubUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUploadAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colBuyAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colChatAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colGotoShop = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colShopOperate = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colRelogin = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colRelogin2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMultiLogin = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colApiAuth = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colBuyApiAuth = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colImportCookies = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colUpload = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + this.panel5.SuspendLayout(); + this.panel4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + this.pnlAddProdRemaining.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numAddRemaining)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.White; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4); + this.splitContainer1.Size = new System.Drawing.Size(1273, 610); + this.splitContainer1.SplitterDistance = 46; + this.splitContainer1.TabIndex = 34; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel2.Controls.Add(this.panel5, 1, 0); + this.tableLayoutPanel2.Controls.Add(this.panel4, 0, 0); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(1273, 46); + this.tableLayoutPanel2.TabIndex = 37; + // + // panel5 + // + this.panel5.Controls.Add(this.chkShowDelete); + this.panel5.Controls.Add(this.btnLoginSelect); + this.panel5.Controls.Add(this.btnCheck); + this.panel5.Location = new System.Drawing.Point(1010, 3); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(260, 40); + this.panel5.TabIndex = 1; + // + // chkShowDelete + // + this.chkShowDelete.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.chkShowDelete.AutoSize = true; + this.chkShowDelete.BackColor = System.Drawing.Color.White; + this.chkShowDelete.Location = new System.Drawing.Point(29, 12); + this.chkShowDelete.Name = "chkShowDelete"; + this.chkShowDelete.Size = new System.Drawing.Size(87, 21); + this.chkShowDelete.TabIndex = 374; + this.chkShowDelete.Text = "显示操作栏"; + this.chkShowDelete.UseVisualStyleBackColor = false; + this.chkShowDelete.CheckedChanged += new System.EventHandler(this.chkShowDelete_CheckedChanged); + // + // btnLoginSelect + // + this.btnLoginSelect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnLoginSelect.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnLoginSelect.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnLoginSelect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnLoginSelect.ForeColor = System.Drawing.Color.White; + this.btnLoginSelect.Location = new System.Drawing.Point(193, 9); + this.btnLoginSelect.Margin = new System.Windows.Forms.Padding(2); + this.btnLoginSelect.Name = "btnLoginSelect"; + this.btnLoginSelect.Size = new System.Drawing.Size(66, 26); + this.btnLoginSelect.TabIndex = 373; + this.btnLoginSelect.Text = "登录选中"; + this.btnLoginSelect.UseVisualStyleBackColor = false; + this.btnLoginSelect.Click += new System.EventHandler(this.btnLoginSelect_Click); + // + // btnCheck + // + this.btnCheck.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCheck.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCheck.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCheck.ForeColor = System.Drawing.Color.White; + this.btnCheck.Location = new System.Drawing.Point(123, 9); + this.btnCheck.Margin = new System.Windows.Forms.Padding(2); + this.btnCheck.Name = "btnCheck"; + this.btnCheck.Size = new System.Drawing.Size(66, 26); + this.btnCheck.TabIndex = 372; + this.btnCheck.Text = "检测选中"; + this.btnCheck.UseVisualStyleBackColor = false; + this.btnCheck.Click += new System.EventHandler(this.btnCheck_Click); + // + // panel4 + // + this.panel4.Controls.Add(this.btnSetSubSa); + this.panel4.Controls.Add(this.txtUserName); + this.panel4.Controls.Add(this.label5); + this.panel4.Controls.Add(this.txtLoginName); + this.panel4.Controls.Add(this.label1); + this.panel4.Controls.Add(this.pnlEmpty); + this.panel4.Controls.Add(this.btnSearch); + this.panel4.Controls.Add(this.txtNotes); + this.panel4.Controls.Add(this.label4); + this.panel4.Controls.Add(this.txtShopName); + this.panel4.Controls.Add(this.label3); + this.panel4.Controls.Add(this.txtShopId); + this.panel4.Controls.Add(this.label2); + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel4.Location = new System.Drawing.Point(3, 3); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(1001, 40); + this.panel4.TabIndex = 0; + // + // btnSetSubSa + // + this.btnSetSubSa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSetSubSa.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSetSubSa.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSetSubSa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSetSubSa.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSetSubSa.ForeColor = System.Drawing.Color.White; + this.btnSetSubSa.Location = new System.Drawing.Point(895, 9); + this.btnSetSubSa.Margin = new System.Windows.Forms.Padding(2); + this.btnSetSubSa.Name = "btnSetSubSa"; + this.btnSetSubSa.Size = new System.Drawing.Size(93, 26); + this.btnSetSubSa.TabIndex = 424; + this.btnSetSubSa.Text = "分配二级超管"; + this.btnSetSubSa.UseVisualStyleBackColor = false; + this.btnSetSubSa.Click += new System.EventHandler(this.btnSetSubSa_Click); + // + // txtUserName + // + this.txtUserName.Location = new System.Drawing.Point(34, 11); + this.txtUserName.Name = "txtUserName"; + this.txtUserName.Size = new System.Drawing.Size(90, 23); + this.txtUserName.TabIndex = 419; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(1, 14); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(44, 17); + this.label5.TabIndex = 420; + this.label5.Text = "账户:"; + // + // txtLoginName + // + this.txtLoginName.Location = new System.Drawing.Point(185, 11); + this.txtLoginName.Name = "txtLoginName"; + this.txtLoginName.Size = new System.Drawing.Size(90, 23); + this.txtLoginName.TabIndex = 417; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(128, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(68, 17); + this.label1.TabIndex = 418; + this.label1.Text = "登录号码:"; + // + // pnlEmpty + // + this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlEmpty.Location = new System.Drawing.Point(749, 9); + this.pnlEmpty.Name = "pnlEmpty"; + this.pnlEmpty.Size = new System.Drawing.Size(56, 26); + this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlEmpty.Style.GradientAngle = 90; + this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.pnlEmpty.TabIndex = 413; + this.pnlEmpty.Text = "清空条件"; + this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + // + // btnSearch + // + this.btnSearch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearch.ForeColor = System.Drawing.Color.White; + this.btnSearch.Location = new System.Drawing.Point(688, 9); + this.btnSearch.Margin = new System.Windows.Forms.Padding(2); + this.btnSearch.Name = "btnSearch"; + this.btnSearch.Size = new System.Drawing.Size(56, 26); + this.btnSearch.TabIndex = 372; + this.btnSearch.Text = "搜索"; + this.btnSearch.UseVisualStyleBackColor = false; + this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // + // txtNotes + // + this.txtNotes.Location = new System.Drawing.Point(589, 11); + this.txtNotes.Name = "txtNotes"; + this.txtNotes.Size = new System.Drawing.Size(90, 23); + this.txtNotes.TabIndex = 376; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(556, 14); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(44, 17); + this.label4.TabIndex = 377; + this.label4.Text = "备注:"; + // + // txtShopName + // + this.txtShopName.Location = new System.Drawing.Point(462, 11); + this.txtShopName.Name = "txtShopName"; + this.txtShopName.Size = new System.Drawing.Size(90, 23); + this.txtShopName.TabIndex = 374; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(417, 14); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(56, 17); + this.label3.TabIndex = 375; + this.label3.Text = "店铺名:"; + // + // txtShopId + // + this.txtShopId.Location = new System.Drawing.Point(323, 11); + this.txtShopId.Name = "txtShopId"; + this.txtShopId.Size = new System.Drawing.Size(90, 23); + this.txtShopId.TabIndex = 372; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(279, 14); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(55, 17); + this.label2.TabIndex = 373; + this.label2.Text = "店铺id:"; + // + // splitContainer2 + // + this.splitContainer2.BackColor = System.Drawing.Color.White; + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.BackColor = System.Drawing.Color.White; + this.splitContainer2.Panel1.Controls.Add(this.pbLoading); + this.splitContainer2.Panel1.Controls.Add(this.pnlAddProdRemaining); + this.splitContainer2.Panel1.Controls.Add(this.dgvShop); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.chkAutoDrag); + this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); + this.splitContainer2.Panel2.Controls.Add(this.statusBar); + this.splitContainer2.Size = new System.Drawing.Size(1273, 560); + this.splitContainer2.SplitterDistance = 531; + this.splitContainer2.TabIndex = 0; + // + // pbLoading + // + this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbLoading.Location = new System.Drawing.Point(611, 240); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 6; + this.pbLoading.TabStop = false; + // + // pnlAddProdRemaining + // + this.pnlAddProdRemaining.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pnlAddProdRemaining.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlAddProdRemaining.Controls.Add(this.lblShopId); + this.pnlAddProdRemaining.Controls.Add(this.panel2); + this.pnlAddProdRemaining.Controls.Add(this.lblAddProdRemaining); + this.pnlAddProdRemaining.Location = new System.Drawing.Point(399, 70); + this.pnlAddProdRemaining.Name = "pnlAddProdRemaining"; + this.pnlAddProdRemaining.Size = new System.Drawing.Size(474, 146); + this.pnlAddProdRemaining.TabIndex = 7; + this.pnlAddProdRemaining.Visible = false; + // + // lblShopId + // + this.lblShopId.AutoSize = true; + this.lblShopId.Location = new System.Drawing.Point(20, 19); + this.lblShopId.Name = "lblShopId"; + this.lblShopId.Size = new System.Drawing.Size(50, 17); + this.lblShopId.TabIndex = 455; + this.lblShopId.Text = "ShopId"; + this.lblShopId.Visible = false; + // + // panel2 + // + this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.panel2.Controls.Add(this.pnlCancel); + this.panel2.Controls.Add(this.numAddRemaining); + this.panel2.Controls.Add(this.btnRemainOK); + this.panel2.Location = new System.Drawing.Point(23, 80); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(424, 29); + this.panel2.TabIndex = 454; + // + // pnlCancel + // + this.pnlCancel.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlCancel.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlCancel.Location = new System.Drawing.Point(273, 2); + this.pnlCancel.Name = "pnlCancel"; + this.pnlCancel.Size = new System.Drawing.Size(56, 24); + this.pnlCancel.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlCancel.Style.GradientAngle = 90; + this.pnlCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.pnlCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.pnlCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.pnlCancel.TabIndex = 458; + this.pnlCancel.Text = "取消"; + this.pnlCancel.Click += new System.EventHandler(this.pnlCancel_Click); + // + // numAddRemaining + // + this.numAddRemaining.Location = new System.Drawing.Point(93, 3); + this.numAddRemaining.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.numAddRemaining.Name = "numAddRemaining"; + this.numAddRemaining.Size = new System.Drawing.Size(120, 23); + this.numAddRemaining.TabIndex = 1; + // + // btnRemainOK + // + this.btnRemainOK.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRemainOK.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRemainOK.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRemainOK.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRemainOK.Location = new System.Drawing.Point(215, 2); + this.btnRemainOK.Name = "btnRemainOK"; + this.btnRemainOK.Size = new System.Drawing.Size(56, 24); + this.btnRemainOK.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRemainOK.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRemainOK.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRemainOK.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRemainOK.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRemainOK.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRemainOK.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRemainOK.Style.GradientAngle = 90; + this.btnRemainOK.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRemainOK.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRemainOK.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRemainOK.TabIndex = 453; + this.btnRemainOK.Text = "确定"; + this.btnRemainOK.Click += new System.EventHandler(this.btnRemainOK_Click); + // + // lblAddProdRemaining + // + this.lblAddProdRemaining.Location = new System.Drawing.Point(23, 36); + this.lblAddProdRemaining.Name = "lblAddProdRemaining"; + this.lblAddProdRemaining.Size = new System.Drawing.Size(424, 17); + this.lblAddProdRemaining.TabIndex = 0; + this.lblAddProdRemaining.Text = "shopInfo"; + this.lblAddProdRemaining.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // dgvShop + // + this.dgvShop.AllowUserToAddRows = false; + this.dgvShop.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvShop.BackgroundColor = System.Drawing.Color.White; + this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colLoginName, + this.colShopId, + this.colShopAccount, + this.colNotes, + this.colMinus, + this.colProductRemaining, + this.colPlus, + this.colCookie, + this.colUser, + this.colSubUser, + this.colGroupName, + this.colUploadAccount, + this.colBuyAccount, + this.colChatAccount, + this.colLoginStatus, + this.colGotoShop, + this.colShopOperate, + this.colRelogin, + this.colRelogin2, + this.colMultiLogin, + this.colApiAuth, + this.colBuyApiAuth, + this.colImportCookies, + this.colCopyCookies, + this.colUpload, + this.colSubSa, + this.colEdit, + this.colDelete}); + this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvShop.Location = new System.Drawing.Point(4, 0); + this.dgvShop.Name = "dgvShop"; + this.dgvShop.ReadOnly = true; + this.dgvShop.RowTemplate.Height = 23; + this.dgvShop.ShowCellErrors = false; + this.dgvShop.Size = new System.Drawing.Size(1265, 531); + this.dgvShop.TabIndex = 5; + this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); + this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown); + // + // chkAutoDrag + // + this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.chkAutoDrag.AutoSize = true; + this.chkAutoDrag.BackColor = System.Drawing.Color.White; + this.chkAutoDrag.Location = new System.Drawing.Point(597, 0); + this.chkAutoDrag.Name = "chkAutoDrag"; + this.chkAutoDrag.Size = new System.Drawing.Size(159, 21); + this.chkAutoDrag.TabIndex = 3; + this.chkAutoDrag.Text = "登录时自动滑动拼图验证"; + this.chkAutoDrag.UseVisualStyleBackColor = false; + this.chkAutoDrag.Visible = false; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.IsShowPageSize = false; + this.ucSplitPage1.Location = new System.Drawing.Point(911, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(362, 25); + this.ucSplitPage1.TabIndex = 4; + this.ucSplitPage1.TotalPage = 1; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1273, 25); + this.statusBar.TabIndex = 1; + // + // colSelect + // + this.colSelect.FillWeight = 26F; + this.colSelect.HeaderText = "选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colLoginName + // + this.colLoginName.FillWeight = 70F; + this.colLoginName.HeaderText = "店铺登录号码"; + this.colLoginName.Name = "colLoginName"; + this.colLoginName.ReadOnly = true; + // + // colShopId + // + this.colShopId.FillWeight = 70F; + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + // + // colShopAccount + // + this.colShopAccount.HeaderText = "店铺账号"; + this.colShopAccount.Name = "colShopAccount"; + this.colShopAccount.ReadOnly = true; + // + // colNotes + // + this.colNotes.HeaderText = "备注"; + this.colNotes.Name = "colNotes"; + this.colNotes.ReadOnly = true; + // + // colMinus + // + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colMinus.DefaultCellStyle = dataGridViewCellStyle3; + this.colMinus.FillWeight = 15F; + this.colMinus.HeaderText = "-"; + this.colMinus.Name = "colMinus"; + this.colMinus.ReadOnly = true; + this.colMinus.Visible = false; + // + // colProductRemaining + // + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colProductRemaining.DefaultCellStyle = dataGridViewCellStyle4; + this.colProductRemaining.FillWeight = 30F; + this.colProductRemaining.HeaderText = "选品限额"; + this.colProductRemaining.Name = "colProductRemaining"; + this.colProductRemaining.ReadOnly = true; + // + // colPlus + // + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colPlus.DefaultCellStyle = dataGridViewCellStyle5; + this.colPlus.FillWeight = 15F; + this.colPlus.HeaderText = "+"; + this.colPlus.Name = "colPlus"; + this.colPlus.ReadOnly = true; + // + // colCookie + // + this.colCookie.HeaderText = "店铺Cookie"; + this.colCookie.Name = "colCookie"; + this.colCookie.ReadOnly = true; + this.colCookie.Visible = false; + // + // colUser + // + this.colUser.FillWeight = 67F; + this.colUser.HeaderText = "所属账户"; + this.colUser.Name = "colUser"; + this.colUser.ReadOnly = true; + // + // colSubUser + // + this.colSubUser.FillWeight = 67F; + this.colSubUser.HeaderText = "子账户"; + this.colSubUser.Name = "colSubUser"; + this.colSubUser.ReadOnly = true; + // + // colGroupName + // + this.colGroupName.FillWeight = 70F; + this.colGroupName.HeaderText = "店铺分组"; + this.colGroupName.Name = "colGroupName"; + this.colGroupName.ReadOnly = true; + this.colGroupName.Visible = false; + // + // colUploadAccount + // + this.colUploadAccount.FillWeight = 70F; + this.colUploadAccount.HeaderText = "上货账户"; + this.colUploadAccount.Name = "colUploadAccount"; + this.colUploadAccount.ReadOnly = true; + this.colUploadAccount.Visible = false; + // + // colBuyAccount + // + this.colBuyAccount.FillWeight = 70F; + this.colBuyAccount.HeaderText = "采购账户"; + this.colBuyAccount.Name = "colBuyAccount"; + this.colBuyAccount.ReadOnly = true; + this.colBuyAccount.Visible = false; + // + // colChatAccount + // + this.colChatAccount.FillWeight = 70F; + this.colChatAccount.HeaderText = "客服账户"; + this.colChatAccount.Name = "colChatAccount"; + this.colChatAccount.ReadOnly = true; + this.colChatAccount.Visible = false; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "登录状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Visible = false; + // + // colGotoShop + // + this.colGotoShop.FillWeight = 46F; + this.colGotoShop.HeaderText = "进入店铺"; + this.colGotoShop.Name = "colGotoShop"; + this.colGotoShop.ReadOnly = true; + this.colGotoShop.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colGotoShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colShopOperate + // + this.colShopOperate.FillWeight = 46F; + this.colShopOperate.HeaderText = "检测"; + this.colShopOperate.Name = "colShopOperate"; + this.colShopOperate.ReadOnly = true; + this.colShopOperate.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopOperate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colShopOperate.Visible = false; + // + // colRelogin + // + this.colRelogin.FillWeight = 40F; + this.colRelogin.HeaderText = "登录"; + this.colRelogin.Name = "colRelogin"; + this.colRelogin.ReadOnly = true; + this.colRelogin.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colRelogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colRelogin2 + // + this.colRelogin2.FillWeight = 55F; + this.colRelogin2.HeaderText = "国际版状态"; + this.colRelogin2.Name = "colRelogin2"; + this.colRelogin2.ReadOnly = true; + this.colRelogin2.Visible = false; + // + // colMultiLogin + // + this.colMultiLogin.FillWeight = 52F; + this.colMultiLogin.HeaderText = "多重登录"; + this.colMultiLogin.Name = "colMultiLogin"; + this.colMultiLogin.ReadOnly = true; + this.colMultiLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colMultiLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colMultiLogin.Visible = false; + // + // colApiAuth + // + this.colApiAuth.FillWeight = 70F; + this.colApiAuth.HeaderText = "上货授权"; + this.colApiAuth.Name = "colApiAuth"; + this.colApiAuth.ReadOnly = true; + this.colApiAuth.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colApiAuth.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colApiAuth.Visible = false; + // + // colBuyApiAuth + // + this.colBuyApiAuth.FillWeight = 70F; + this.colBuyApiAuth.HeaderText = "拍单授权"; + this.colBuyApiAuth.Name = "colBuyApiAuth"; + this.colBuyApiAuth.ReadOnly = true; + this.colBuyApiAuth.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colBuyApiAuth.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colBuyApiAuth.Visible = false; + // + // colImportCookies + // + this.colImportCookies.FillWeight = 70F; + this.colImportCookies.HeaderText = "导入Cookie"; + this.colImportCookies.Name = "colImportCookies"; + this.colImportCookies.ReadOnly = true; + this.colImportCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colImportCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colImportCookies.Visible = false; + // + // colCopyCookies + // + this.colCopyCookies.FillWeight = 70F; + this.colCopyCookies.HeaderText = "复制Cookie"; + this.colCopyCookies.Name = "colCopyCookies"; + this.colCopyCookies.ReadOnly = true; + this.colCopyCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCopyCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colUpload + // + this.colUpload.FillWeight = 67F; + this.colUpload.HeaderText = "上传商品"; + this.colUpload.Name = "colUpload"; + this.colUpload.ReadOnly = true; + this.colUpload.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colUpload.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colUpload.Visible = false; + // + // colSubSa + // + this.colSubSa.FillWeight = 67F; + this.colSubSa.HeaderText = "二级超管"; + this.colSubSa.Name = "colSubSa"; + this.colSubSa.ReadOnly = true; + // + // colEdit + // + this.colEdit.FillWeight = 46F; + this.colEdit.HeaderText = "编辑"; + this.colEdit.Name = "colEdit"; + this.colEdit.ReadOnly = true; + this.colEdit.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colEdit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colEdit.Visible = false; + // + // colDelete + // + this.colDelete.FillWeight = 46F; + this.colDelete.HeaderText = "删除"; + this.colDelete.Name = "colDelete"; + this.colDelete.ReadOnly = true; + this.colDelete.Visible = false; + // + // PDDAdminShopListForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1273, 610); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Name = "PDDAdminShopListForm"; + this.Text = "AdminShopForm"; + this.Load += new System.EventHandler(this.AdminShopForm_Load); + this.VisibleChanged += new System.EventHandler(this.AdminShopForm_VisibleChanged); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.tableLayoutPanel2.ResumeLayout(false); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + this.pnlAddProdRemaining.ResumeLayout(false); + this.pnlAddProdRemaining.PerformLayout(); + this.panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numAddRemaining)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.Panel panel5; + private UserControls.ButtonEx btnLoginSelect; + private UserControls.ButtonEx btnCheck; + private System.Windows.Forms.Panel panel4; + private UserControls.ButtonEx btnSearch; + private System.Windows.Forms.TextBox txtNotes; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtShopName; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtShopId; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.PictureBox pbLoading; + private UserComponent.DataGridViewEx dgvShop; + private System.Windows.Forms.CheckBox chkAutoDrag; + private UserControls.StatusBarUserControl statusBar; + private DevComponents.DotNetBar.PanelEx pnlEmpty; + private UserControls.UcSplitPage ucSplitPage1; + private System.Windows.Forms.TextBox txtLoginName; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtUserName; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.CheckBox chkShowDelete; + private UserControls.ButtonEx btnSetSubSa; + private System.Windows.Forms.Panel pnlAddProdRemaining; + private System.Windows.Forms.Label lblAddProdRemaining; + private System.Windows.Forms.NumericUpDown numAddRemaining; + private System.Windows.Forms.Panel panel2; + private DevComponents.DotNetBar.PanelEx btnRemainOK; + private DevComponents.DotNetBar.PanelEx pnlCancel; + private System.Windows.Forms.Label lblShopId; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; + private System.Windows.Forms.DataGridViewTextBoxColumn colMinus; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductRemaining; + private System.Windows.Forms.DataGridViewTextBoxColumn colPlus; + private System.Windows.Forms.DataGridViewTextBoxColumn colCookie; + private System.Windows.Forms.DataGridViewTextBoxColumn colUser; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubUser; + private System.Windows.Forms.DataGridViewTextBoxColumn colGroupName; + private System.Windows.Forms.DataGridViewTextBoxColumn colUploadAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colBuyAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colChatAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus; + private System.Windows.Forms.DataGridViewLinkColumn colGotoShop; + private System.Windows.Forms.DataGridViewLinkColumn colShopOperate; + private System.Windows.Forms.DataGridViewLinkColumn colRelogin; + private System.Windows.Forms.DataGridViewTextBoxColumn colRelogin2; + private System.Windows.Forms.DataGridViewLinkColumn colMultiLogin; + private System.Windows.Forms.DataGridViewLinkColumn colApiAuth; + private System.Windows.Forms.DataGridViewLinkColumn colBuyApiAuth; + private System.Windows.Forms.DataGridViewLinkColumn colImportCookies; + private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies; + private System.Windows.Forms.DataGridViewLinkColumn colUpload; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa; + private System.Windows.Forms.DataGridViewLinkColumn colEdit; + private System.Windows.Forms.DataGridViewLinkColumn colDelete; + } +} \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.cs new file mode 100644 index 0000000..38750bc --- /dev/null +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.cs @@ -0,0 +1,616 @@ +using AllBase; +using AllBase.Model.Param.TemuProductManage; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BLL; +using TemuKJD.Extension; +using TemuKJD.BaseForms; +using Work; +using NaiBa.Util; +using TemuKJD.WXForms.ShopForms; + +namespace TemuKJD.WXForms.AdminForms +{ + public partial class WXAdminShopListForm : BaseForm + { + static WXAdminShopListForm inst = null; + public static WXAdminShopListForm Instance + { + get { if (inst == null) inst = new WXAdminShopListForm(); return inst; } + set { inst = value; } + } + + public static ConcurrentList lstAdminShopInfo { get; set; } = new ConcurrentList(); + + public WXAdminShopListForm() + { + InitializeComponent(); + + Instance = this; + } + + private void AdminShopForm_Load(object sender, EventArgs e) + { + this.ucSplitPage1.PageChange += UcSplitPage1_PageChange; + + this.dgvShop.AddSelectorColumn("colSelect"); + this.dgvShop.AddMergeColumnHeader(new List() { /*"colMinus",*/ "colProductRemaining", "colPlus" }, "选品限额"); + this.dgvShop.AddMergeColumn(new List() { /*"colMinus",*/ "colProductRemaining", "colPlus" }); + this.dgvShop.Columns["colMinus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; + this.dgvShop.Columns["colPlus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; + this.dgvShop.Columns["colPlus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; + + + if (BaseClass.SaLevel != 1) + { + this.chkShowDelete.Visible = false; + + dgvShop.Columns["colSubSa"].Visible = false; + btnSetSubSa.Visible = false; + } + } + + bool firstLoad = true; + private void AdminShopForm_VisibleChanged(object sender, EventArgs e) + { + if (this.Visible == true && firstLoad) + { + firstLoad = false; + this.pbLoading.Visible = true; + SearchShop(this.ucSplitPage1.CurrentPage); + } + } + + private void UcSplitPage1_PageChange(object obj) + { + SearchShop(this.ucSplitPage1.CurrentPage); + } + + public void SearchShop(int page) + { + List shopIdList = GetCheckedShopIdList(); + if (InvokeRequired) + { + Invoke(new Action(() => + { + this.pbLoading.Visible = true; + this.dgvShop.Rows.Clear(); + lstAdminShopInfo.Clear(); + })); + } + else + { + this.pbLoading.Visible = true; + this.dgvShop.Rows.Clear(); + lstAdminShopInfo.Clear(); + } + Task.Run(() => + { + int pageCount; + var list = AdminGetServerShopLst(out pageCount, page); + lstAdminShopInfo.AddRange(list); + this.ucSplitPage1.TotalPage = pageCount; + + foreach (var shop in lstAdminShopInfo) + { + Invoke(new Action(() => + { + int rowIndex = this.dgvShop.Rows.Add( + shopIdList.Contains(shop.ShopId + shop.UserName), + shop.LoginName, + shop.ShopId, + shop.ShopAccount, + shop.Notes, + "-", + shop.AddProductRemaining, + "+", + //"±", + shop.Cookies, + shop.UserName, + shop.SubUserName, + shop.GroupName, + shop.UploadAccount, + shop.BuyAccount, + shop.ChatAccount, + "", + "进入", + "检测", + string.IsNullOrWhiteSpace(shop.LoginStatus) ? "未登录" : shop.LoginStatus.Trim(), + string.IsNullOrWhiteSpace(shop.LoginStatus2) ? "国际版未登录" : shop.LoginStatus2.Trim(), + "多重登录", + shop.ApiAuthStatus, + shop.BuyApiAuth.ApiAuthStatus, + "导入Cookie", + "复制Cookie", + "上传", + shop.OperateSubSaName, + "编辑", + "删除"); + })); + } + + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + })); + }); + } + + private void btnSearch_Click(object sender, EventArgs e) + { + if (this.ucSplitPage1.CurrentPage != 1) + this.ucSplitPage1.CurrentPage = 1; + else + SearchShop(1); + } + + private void pnlEmpty_Click(object sender, EventArgs e) + { + this.txtUserName.Text = ""; + this.txtLoginName.Text = ""; + this.txtNotes.Text = ""; + this.txtShopId.Text = ""; + this.txtShopName.Text = ""; + } + + bool IsOperate = false; + private void btnLoginSelect_Click(object sender, EventArgs e) + { + IsOperate = true; + if (this.btnLoginSelect.Text == "登录选中") + { + List shopLoginNameList = GetCheckedList(); + if (!shopLoginNameList.Any()) + { + BaseMsgForm.ShowError("请选择需要登录的店铺"); + IsOperate = false; + return; + } + + shopLoginNameList = shopLoginNameList.Distinct().ToList(); + foreach (var loginName in shopLoginNameList) + { + if (IsOperate == false) + break; + + var shopInfo = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName); + if (shopInfo != null && !string.IsNullOrEmpty(shopInfo.LoginName) && !string.IsNullOrEmpty(shopInfo.Password)) + { + WXAdminShopLoginForm shopLoginForm = new WXAdminShopLoginForm(shopInfo); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + } + } + if (shopLoginNameList.Count>0) + { + SearchShop(this.ucSplitPage1.CurrentPage); + } + } + IsOperate = false; + } + + private void shopLoginForm_SaveComplete(object obj) + { + SearchShop(this.ucSplitPage1.CurrentPage); + } + + private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; + string loginName = dgvShop.Rows[e.RowIndex].Cells["colLoginName"].Value.ParseToString(); + string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); + var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId); + + switch (headerText) + { + case "检测": + //CheckShopLoginAsync(new string[] { loginName }); + break; + case "进入店铺": + IsOperate = true; + { + WXAdminShopLoginForm adminLoginForm = new WXAdminShopLoginForm(shop); + adminLoginForm.openType = EnumOpenType.manage; + adminLoginForm.WindowState = FormWindowState.Maximized; + adminLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home"; + adminLoginForm.Show(); + } + IsOperate = false; + break; + case "复制Cookie": + List cooks = null; + try { cooks = JsonHelper.DeserializeJsonToList(shop.Cookies); } catch (Exception ex) { } + if (cooks == null) + cooks = new List(); + + string cookJs = ""; + var keys = new string[] { "_qimei_uuid", "_qpsvr_localtk", "biz_magic", "biz_rand", "biz_ticket", "biz_token", "ptcz", "RK", "yyb_muid" }; + foreach (var shopCook in cooks) + { + var cookie = shopCook.Name + "=" + shopCook.Value; + if (!keys.Any(k => cookie.StartsWith(k))) + continue; + cookJs += "\r\ndocument.cookie='" + cookie.Substring(0, Math.Max(0, cookie.IndexOf("="))) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';"; + } + foreach (var shopCook in cooks) + { + var cookie = shopCook.Name + "=" + shopCook.Value; + if (!keys.Any(k => cookie.StartsWith(k))) + continue; + if (!cookie.StartsWith("biz_magic") && !cookie.StartsWith("biz_rand") && !cookie.StartsWith("biz_ticket") && !cookie.StartsWith("biz_token")) + cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.qq.com; expires=" + + DateTime.Now.AddMonths(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';"; + else + cookJs += "\r\ndocument.cookie='" + cookie + "; domain=store.weixin.qq.com; expires=" + + DateTime.Now.AddMonths(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';"; + } + cookJs += "\r\nsetTimeout(() => { window.location.href='https://store.weixin.qq.com/shop/goods/list'; }, 200)"; + Clipboard.SetDataObject(cookJs); + BaseMsgForm.ShowInfo("复制成功"); + break; + case "导入Cookie": + WXShopUpdateCookieForm updateCookieForm = new WXShopUpdateCookieForm(shop); + updateCookieForm.SaveComplete += UpdateCookieForm_SaveComplete; + updateCookieForm.ShowDialog(); + break; + case "删除": + if (BaseMsgForm.ShowConfirm("确定删除店铺吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) + return; + if (ShopBLL.AdminDelServerShop(shop)) + SearchShop(this.ucSplitPage1.CurrentPage); + break; + case "编辑": + WXShopAddEditForm editForm = new WXShopAddEditForm(shop); + editForm.SaveCompleteWithDescribe += EditForm_SaveCompleteWithDescribe; + editForm.ShowDialog(); + break; + case "登录": + IsOperate = true; + { + WXAdminShopLoginForm shopLoginForm = new WXAdminShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; + shopLoginForm.ShowDialog(); + } + IsOperate = false; + break; + case "上传商品": + IsOperate = true; + { + //UploadProduct(shop); + } + IsOperate = false; + break; + + case "+": + case "±": + this.lblAddProdRemaining.Text = shop.ShopAccount + " " + shop.ShopId + " 调整选品限额"; + this.lblShopId.Text = shop.ShopId; + this.numAddRemaining.Value = shop.AddProductRemaining; + this.pnlAddProdRemaining.Visible = true; + break; + case "": + dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value; + break; + default: + break; + } + } + + private void UpdateCookieForm_SaveComplete(object obj) + { + Task.Run(() => + { + //CheckShopListLogin(new string[] { (obj as DouShopLoginInfo).LoginName }); + //RefreshDataGridView(false); + SearchShop(this.ucSplitPage1.CurrentPage); + }); + } + + private void EditForm_SaveCompleteWithDescribe(object obj, object isAdd) + { + var shopInfo = obj as ShopLoginInfo; + if (shopInfo != null) + { + if ((isAdd as bool?) == true) + { + var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == shopInfo.LoginName); + if (shop != null) + { + BaseMsgForm.ShowError("店铺" + shopInfo.LoginName + "已存在!"); + } + else + { + ShopBLL.AdminAddServerShop(shopInfo); + } + } + else + { + ShopBLL.AdminMdyServerShop(shopInfo); + } + SearchShop(this.ucSplitPage1.CurrentPage); + } + } + + private List GetCheckedList() + { + List shopLoginNameList = new List(); + for (int i = 0; i < dgvShop.Rows.Count; i++) + { + if (dgvShop.Rows[i].Cells["colSelect"].Value.ParseToBool()) + { + string shopName = dgvShop.Rows[i].Cells["colLoginName"].Value.ParseToString(); + shopLoginNameList.Add(shopName); + } + } + return shopLoginNameList; + } + + private List GetCheckedShopIdList() + { + List shopNameList = new List(); + for (int i = 0; i < dgvShop.Rows.Count; i++) + { + if (dgvShop.Rows[i].Cells["colSelect"].Value.ParseToBool()) + { + string shopName = dgvShop.Rows[i].Cells["colShopId"].Value.ParseToString(); + shopName += dgvShop.Rows[i].Cells["colUser"].Value.ParseToString(); + shopNameList.Add(shopName); + } + } + return shopNameList; + } + + public List AdminGetServerShopLst(out int pageCount, int page = 1, int pageSize = 50) + { + List list = new List(); + pageCount = 1; + + var url = BaseClass.BuildObjString("shop/admin_get_shop_list"); + var data = UserLogin.GetSignaturex() + + "&page=" + page + + "&page_size=" + pageSize + + "&search_user_name=" + txtUserName.Text.Trim() + + "&search_login_name=" + txtLoginName.Text.Trim() + + "&search_notes=" + txtNotes.Text.Trim() + + "&search_id=" + txtShopId.Text.Trim() + + "&search_name=" + txtShopName.Text.Trim(); + if (BaseClass.SaLevel > 1) + data += "&operate_sub_sa_name=" + BaseClass.UserName; + var html = GetHtml.PostUtf8(url, data); + //if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + // html = GetHtml.PostUtf8(url, data); + //if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + // html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) + || !html.Contains("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass")) + { + return list; + } + + int count = BaseRegex.GetIntJson(ref html, "count"); + pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); + pageCount = Math.Max(pageCount, 1); + + return ShopBLL.DeserializationShop(html); + } + + private void btnCheck_Click(object sender, EventArgs e) + { + if (this.btnCheck.Text == "检测选中") + { + List shopLoginNameList = GetCheckedList(); + if (!shopLoginNameList.Any()) + { + BaseMsgForm.ShowError("请选择需要检测的店铺"); + return; + } + + Task.Run(() => + { + CheckShopListLogin(shopLoginNameList.Distinct().ToArray()); + SearchShop(this.ucSplitPage1.CurrentPage); + }); + } + } + + /// + /// 检测店铺授权状态 + /// + /// + /// + public void CheckShopListLogin(string[] shopLoginNames, bool isShowProgress = true) + { + if (isShowProgress) + { + Invoke(new Action(() => + { + this.pbLoading.Visible = true; + this.statusBar.lblTaskStatus.Text = "正在检测..."; + this.statusBar.pgbTaskProgress.Maximum = shopLoginNames.Length; + this.statusBar.UpdateProgressBar(0); + })); + } + + var shops = lstAdminShopInfo.Where(s => shopLoginNames.Contains(s.LoginName)); + CheckShopLogin(shops.ToArray(), isShowProgress); + + if (this.Created && isShowProgress) + { + this.Invoke(new Action(() => + { + this.pbLoading.Visible = false; + this.statusBar.lblTaskStatus.Text = "检测完毕"; + })); + } + } + + public void CheckShopLogin(ShopLoginInfo[] shops, bool isShowProgress = true) + { + var shopLoginNames = shops.Select(s => s.LoginName).Distinct().ToArray(); + for (int i = 0; i < shopLoginNames.Length; i++) + { + var campanys = shops.Where(v => v.LoginName == shopLoginNames[i]).ToList(); + var shop = shops.FirstOrDefault(v => v.LoginName == shopLoginNames[i]); + + // 先从服务端取最新cookie + var serverCampanys = ShopBLL.AdminGetServerShopLstByIds(campanys.Select(c => c.ShopId).ToList()); + var serverShop = serverCampanys.FirstOrDefault(); + if (shop != null && serverShop != null) + { + shop.Cookies = serverShop.Cookies; + shop.Cookies2 = serverShop.Cookies2; + foreach (var sc in campanys) + { + sc.Cookies = serverShop.Cookies; + sc.Cookies2 = serverShop.Cookies2; + } + } + + if (shop != null) + { + var loginResult = WXShopListForm.CheckShopLogin(shop); + if (loginResult.Contains("\"success\":true") && !loginResult.Contains("\"login\":true")) + { + shop.Cookies = "empty=true;"; + foreach (var sc in campanys) + { + sc.LoginStatus = "未登录"; + shop.Cookies = "empty=true;"; + } + } + else + { + foreach (var sc in campanys) + { + sc.LoginStatus = "登录成功"; + sc.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd"); + } + } + WXShopListForm.UpdateServerShopCookies(shop); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie + } + if (this.Created && isShowProgress) + { + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在检测..."; + this.statusBar.pgbTaskProgress.Value = (i + 1); + this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + shopLoginNames.Length; + })); + } + } + } + + private void chkShowDelete_CheckedChanged(object sender, EventArgs e) + { + if(chkShowDelete.Checked) + { + this.dgvShop.Columns["colEdit"].Visible = true; + this.dgvShop.Columns["colDelete"].Visible = true; + } + else + { + this.dgvShop.Columns["colEdit"].Visible = false; + this.dgvShop.Columns["colDelete"].Visible = false; + } + } + + private void btnSetSubSa_Click(object sender, EventArgs e) + { + + var lstLoginName = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colLoginName"]?.Value.ToString()).ToList(); + var shopList = lstAdminShopInfo.Where(p => lstLoginName.Contains(p.LoginName)).ToArray(); + + if (shopList.Count() <= 0) + { + BaseMsgForm.ShowError("请选择要分配二级超管的店铺!"); + return; + } + + WXAdminShopAddSubSaForm subSaForm = new WXAdminShopAddSubSaForm( + shopList.Select(p => p.LoginName.ToString()).ToList() + ); + subSaForm.SaveComplete += SubSaForm_SaveComplete; + subSaForm.ShowDialog(); + } + + private void SubSaForm_SaveComplete(object subSaName) + { + // 同店铺下商品分配给同一个二级超管 + var lstLoginName = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colLoginName"]?.Value.ToString()).ToList(); + var prodList = lstAdminShopInfo.Where(p => lstLoginName.Contains(p.LoginName)).ToArray(); + + var rows = dgvShop.Rows.Cast().Where(row => lstLoginName.Contains(row.Cells["colLoginName"]?.Value.ParseToString())); + foreach (var row in rows) + { + row.Cells["colSubSa"].Value = subSaName.ParseToString(); + } + foreach (var p in prodList) + { + p.OperateSubSaName = subSaName.ParseToString(); + } + } + + private void dgvShop_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) + { + } + + private void btnRemainOK_Click(object sender, EventArgs e) + { + var url = BaseClass.BuildObjString("shop/update_add_prod_remaining"); + var data = UserLogin.GetSignaturex() + + "&remain_count=" + numAddRemaining.Text.Trim() + + "&shop_ids=" + lblShopId.Text.Trim(); + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (html.Contains("\"code\":200")) + { + foreach (DataGridViewRow row in this.dgvShop.Rows) + { + if (row.Cells["colShopId"].Value.ParseToString() == lblShopId.Text.Trim()) + { + row.Cells["colProductRemaining"].Value = numAddRemaining.Text.Trim(); + } + } + foreach(var shop in lstAdminShopInfo) + { + if (shop.ShopId == lblShopId.Text.Trim()) + shop.AddProductRemaining = numAddRemaining.Text.Trim().ParseToInt(); + } + this.pnlAddProdRemaining.Visible = false; + } + else + { + var msg = BaseRegex.GetStringJson(ref html, "msg"); + if (string.IsNullOrEmpty(msg)) + msg = "选品限额修改失败!"; + BaseMsgForm.ShowError(msg); + } + } + + private void pnlCancel_Click(object sender, EventArgs e) + { + this.pnlAddProdRemaining.Visible = false; + } + } +} diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.resx b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.resx new file mode 100644 index 0000000..33b62f2 --- /dev/null +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.resx @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopLoginForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopLoginForm.Designer.cs new file mode 100644 index 0000000..29ff68f --- /dev/null +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopLoginForm.Designer.cs @@ -0,0 +1,384 @@ +namespace TemuKJD.WXForms.AdminForms +{ + partial class WXAdminShopLoginForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXAdminShopLoginForm)); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.pnlMultiLogin = new System.Windows.Forms.Panel(); + this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); + this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx(); + this.btnDel = new DevComponents.DotNetBar.PanelEx(); + this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnCopyPassword = new TemuKJD.UserControls.ButtonEx(); + this.btnCopyUserName = new TemuKJD.UserControls.ButtonEx(); + this.txtPassWord = new System.Windows.Forms.TextBox(); + this.txtUserName = new System.Windows.Forms.TextBox(); + this.btnStop = new TemuKJD.UserControls.ButtonEx(); + this.btnReload = new TemuKJD.UserControls.ButtonEx(); + this.chkCloseAfterLogin = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.txtAddress = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.pnlMultiLogin.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.pnlMultiLogin); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White; + this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain); + this.splitContainer1.Panel2.Controls.Add(this.label2); + this.splitContainer1.Panel2.Controls.Add(this.label1); + this.splitContainer1.Panel2.Controls.Add(this.btnCopyPassword); + this.splitContainer1.Panel2.Controls.Add(this.btnCopyUserName); + this.splitContainer1.Panel2.Controls.Add(this.txtPassWord); + this.splitContainer1.Panel2.Controls.Add(this.txtUserName); + this.splitContainer1.Panel2.Controls.Add(this.btnStop); + this.splitContainer1.Panel2.Controls.Add(this.btnReload); + this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin); + this.splitContainer1.Size = new System.Drawing.Size(1438, 736); + this.splitContainer1.SplitterDistance = 669; + this.splitContainer1.SplitterWidth = 3; + this.splitContainer1.TabIndex = 4; + // + // pnlMultiLogin + // + this.pnlMultiLogin.Controls.Add(this.cmbMultiCookieName); + this.pnlMultiLogin.Controls.Add(this.btnMultiLogin); + this.pnlMultiLogin.Controls.Add(this.btnDel); + this.pnlMultiLogin.Location = new System.Drawing.Point(5, 634); + this.pnlMultiLogin.Name = "pnlMultiLogin"; + this.pnlMultiLogin.Size = new System.Drawing.Size(251, 31); + this.pnlMultiLogin.TabIndex = 461; + this.pnlMultiLogin.Visible = false; + // + // cmbMultiCookieName + // + this.cmbMultiCookieName.DisplayMember = "Text"; + this.cmbMultiCookieName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.cmbMultiCookieName.FormattingEnabled = true; + this.cmbMultiCookieName.ItemHeight = 18; + this.cmbMultiCookieName.Location = new System.Drawing.Point(3, 3); + this.cmbMultiCookieName.Name = "cmbMultiCookieName"; + this.cmbMultiCookieName.Size = new System.Drawing.Size(158, 24); + this.cmbMultiCookieName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cmbMultiCookieName.TabIndex = 379; + this.cmbMultiCookieName.Text = "cookie1"; + // + // btnMultiLogin + // + this.btnMultiLogin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnMultiLogin.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnMultiLogin.Cursor = System.Windows.Forms.Cursors.Hand; + 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.Location = new System.Drawing.Point(185, 3); + this.btnMultiLogin.Name = "btnMultiLogin"; + this.btnMultiLogin.Size = new System.Drawing.Size(60, 24); + this.btnMultiLogin.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnMultiLogin.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnMultiLogin.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnMultiLogin.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnMultiLogin.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnMultiLogin.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnMultiLogin.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnMultiLogin.Style.GradientAngle = 90; + this.btnMultiLogin.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnMultiLogin.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnMultiLogin.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnMultiLogin.TabIndex = 460; + this.btnMultiLogin.Text = "多重登录"; + this.btnMultiLogin.Click += new System.EventHandler(this.btnMultiLogin_Click); + // + // btnDel + // + this.btnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnDel.CanvasColor = System.Drawing.SystemColors.Control; + this.btnDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnDel.DisabledBackColor = System.Drawing.Color.Empty; + this.btnDel.Location = new System.Drawing.Point(163, 3); + this.btnDel.Name = "btnDel"; + this.btnDel.Size = new System.Drawing.Size(20, 24); + this.btnDel.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnDel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnDel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnDel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnDel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnDel.Style.GradientAngle = 90; + this.btnDel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnDel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnDel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnDel.TabIndex = 409; + this.btnDel.Text = "删"; + this.btnDel.Click += new System.EventHandler(this.btnDel_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 + // + this.label2.Location = new System.Drawing.Point(9, 35); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(44, 17); + this.label2.TabIndex = 378; + this.label2.Text = "密码"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(9, 8); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(44, 17); + this.label1.TabIndex = 377; + this.label1.Text = "用户名"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // btnCopyPassword + // + this.btnCopyPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCopyPassword.Cursor = System.Windows.Forms.Cursors.Hand; + 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.ForeColor = System.Drawing.Color.White; + this.btnCopyPassword.Location = new System.Drawing.Point(276, 31); + this.btnCopyPassword.Margin = new System.Windows.Forms.Padding(2); + this.btnCopyPassword.Name = "btnCopyPassword"; + this.btnCopyPassword.Size = new System.Drawing.Size(57, 25); + this.btnCopyPassword.TabIndex = 376; + this.btnCopyPassword.Text = "复制"; + this.btnCopyPassword.UseVisualStyleBackColor = false; + this.btnCopyPassword.Click += new System.EventHandler(this.btnCopyPassword_Click); + // + // btnCopyUserName + // + this.btnCopyUserName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCopyUserName.Cursor = System.Windows.Forms.Cursors.Hand; + 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.ForeColor = System.Drawing.Color.White; + this.btnCopyUserName.Location = new System.Drawing.Point(276, 4); + this.btnCopyUserName.Margin = new System.Windows.Forms.Padding(2); + this.btnCopyUserName.Name = "btnCopyUserName"; + this.btnCopyUserName.Size = new System.Drawing.Size(57, 25); + this.btnCopyUserName.TabIndex = 375; + this.btnCopyUserName.Text = "复制"; + this.btnCopyUserName.UseVisualStyleBackColor = false; + this.btnCopyUserName.Click += new System.EventHandler(this.btnCopyUserName_Click); + // + // txtPassWord + // + this.txtPassWord.Location = new System.Drawing.Point(53, 32); + this.txtPassWord.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtPassWord.Name = "txtPassWord"; + this.txtPassWord.PasswordChar = '●'; + this.txtPassWord.ReadOnly = true; + this.txtPassWord.Size = new System.Drawing.Size(221, 23); + this.txtPassWord.TabIndex = 374; + // + // txtUserName + // + this.txtUserName.Location = new System.Drawing.Point(53, 5); + this.txtUserName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtUserName.Name = "txtUserName"; + this.txtUserName.ReadOnly = true; + this.txtUserName.Size = new System.Drawing.Size(221, 23); + this.txtUserName.TabIndex = 373; + // + // btnStop + // + this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnStop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Cursor = System.Windows.Forms.Cursors.Hand; + 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.ForeColor = System.Drawing.Color.White; + this.btnStop.Location = new System.Drawing.Point(1342, 31); + this.btnStop.Margin = new System.Windows.Forms.Padding(2); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(91, 25); + this.btnStop.TabIndex = 372; + this.btnStop.Text = "停止操作"; + this.btnStop.UseVisualStyleBackColor = false; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // btnReload + // + this.btnReload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnReload.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnReload.Cursor = System.Windows.Forms.Cursors.Hand; + 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.ForeColor = System.Drawing.Color.White; + this.btnReload.Location = new System.Drawing.Point(1249, 31); + this.btnReload.Margin = new System.Windows.Forms.Padding(2); + this.btnReload.Name = "btnReload"; + this.btnReload.Size = new System.Drawing.Size(91, 25); + this.btnReload.TabIndex = 371; + this.btnReload.Text = "重新加载"; + this.btnReload.UseVisualStyleBackColor = false; + this.btnReload.Click += new System.EventHandler(this.btnReload_Click); + // + // chkCloseAfterLogin + // + this.chkCloseAfterLogin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + // + // + // + this.chkCloseAfterLogin.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.chkCloseAfterLogin.Checked = true; + this.chkCloseAfterLogin.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkCloseAfterLogin.CheckValue = "Y"; + this.chkCloseAfterLogin.Location = new System.Drawing.Point(1306, 6); + this.chkCloseAfterLogin.Name = "chkCloseAfterLogin"; + this.chkCloseAfterLogin.Size = new System.Drawing.Size(135, 23); + this.chkCloseAfterLogin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.chkCloseAfterLogin.TabIndex = 8; + this.chkCloseAfterLogin.Text = "登录成功后关闭窗口"; + // + // splitContainer2 + // + this.splitContainer2.BackColor = System.Drawing.Color.White; + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(1, 33); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.txtAddress); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.splitContainer1); + this.splitContainer2.Size = new System.Drawing.Size(1438, 766); + this.splitContainer2.SplitterDistance = 26; + this.splitContainer2.TabIndex = 5; + // + // txtAddress + // + this.txtAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtAddress.Location = new System.Drawing.Point(3, 3); + this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txtAddress.Name = "txtAddress"; + this.txtAddress.Size = new System.Drawing.Size(1432, 23); + this.txtAddress.TabIndex = 7; + this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown); + // + // PDDShopLoginForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1440, 800); + this.Controls.Add(this.splitContainer2); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "PDDShopLoginForm"; + this.ShowMaximizeBox = true; + this.Text = "店铺登录"; + this.TitleText = "店铺登录"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ShopLoginForm_FormClosed); + this.Load += new System.EventHandler(this.ShopLoginForm_Load); + this.Controls.SetChildIndex(this.splitContainer2, 0); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.pnlMultiLogin.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel1.PerformLayout(); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private UserControls.ButtonEx btnStop; + private UserControls.ButtonEx btnReload; + private System.Windows.Forms.TextBox txtPassWord; + private System.Windows.Forms.TextBox txtUserName; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private UserControls.ButtonEx btnCopyPassword; + private UserControls.ButtonEx btnCopyUserName; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.TextBox txtAddress; + private UserControls.ButtonEx btnLoginAgain; + public DevComponents.DotNetBar.Controls.CheckBoxX chkCloseAfterLogin; + private System.Windows.Forms.Panel pnlMultiLogin; + private DevComponents.DotNetBar.Controls.ComboBoxEx cmbMultiCookieName; + private DevComponents.DotNetBar.PanelEx btnMultiLogin; + private DevComponents.DotNetBar.PanelEx btnDel; + } +} \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopLoginForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopLoginForm.cs new file mode 100644 index 0000000..17be996 --- /dev/null +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopLoginForm.cs @@ -0,0 +1,903 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Result; +using CefSharp; +using CefSharp.WinForms; +//using TemuKJD.DashBoardForms; +using TemuKJD.Helper; +using TemuKJD.BaseForms; +using Microsoft.Win32; +using NaiBa.CefHelper; +using NaiBa.CefHelper.Handler; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +//using System.Web.Hosting; +using System.Windows.Forms; +using Work; +using Work.BLL.Tools; +using TemuKJD.BLL; +using NaiBa.Util; +using TemuKJD.WXForms.ShopForms; + +namespace TemuKJD.WXForms.AdminForms +{ + public enum EnumOpenType + { + login, + manage, + refresh_cookie, + } + public partial class WXAdminShopLoginForm : LRBaseForm + { + public static WXAdminShopLoginForm shopLoginInstance { get; set; } = null; + + public int CloseAfterSecond { get; set; } + public EnumOpenType openType = EnumOpenType.manage; + public bool isMultiLogin = false; + public string MultiLoginCookieName = ""; + public string InitUrl = ""; + private string shopCookieHead = "qq.com"; + private string shopLoginUrl = "https://store.weixin.qq.com/shop?redirect_url=%2Fhome"; + private string shopMainUrl = "https://store.weixin.qq.com/shop/home"; + public ChromiumWebBrowser cefWebBrowser = null; + private ShopLoginInfo shop = null; + private ConcurrentList lstShopCompany = new ConcurrentList(); + private string currentUrl = ""; + + public WXAdminShopLoginForm(ShopLoginInfo shopInfo) + { + shopLoginInstance = this; + + InitializeComponent(); + + this.shop = shopInfo; + this.txtUserName.Text = (shopInfo?.LoginName).ParseToString(); + this.txtPassWord.Text = DataOpenSSL.DecryptString((shopInfo?.Password).ParseToString()); + } + + private void ShopLoginForm_Load(object sender, EventArgs e) + { + this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62; + + if (isMultiLogin && shop != null) + { + this.pnlMultiLogin.Visible = true; + InitMultiLoginCookies(); + } + + if (CloseAfterSecond > 0) + { + Task.Run(() => + { + Thread.Sleep(1000 * CloseAfterSecond); + if (this.Created) + { + Invoke(new Action(() => { this.Close(); })); + } + }); + } + + if (!isMultiLogin) + AutoLogin(); + + CheckAndSaveShop(); //判断登录是否成功,成功则保存店铺信息和店铺cookie + //ClosePopWindow(); //自动关闭弹窗 + } + + /// + /// 判断登录,保存店铺 + /// + private void CheckAndSaveShop() + { + Task.Run(() => + { + // 自动判断是否登录成功,登录成功后记录cookie保存到服务端。 + while (this.Created) + { + Thread.Sleep(3000); + + if (!this.Created) + break; + + if (currentUrl.TrimEnd('/') == shopMainUrl) + { + if (!cefWebBrowser.GetBrowser().MainFrame.IsValid) + continue; + + if (!lstShopCompany.Any()) + continue; + else // 检测到登录成功后 + { + string cookies = ""; + List cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null)); + foreach (var cookie in cookieList) + { + cookie.Domain = cookie.Domain.Replace(".store.weixin.qq.com", "store.weixin.qq.com"); + } + List cookieListNew = new List(); + if (cookieList != null && cookieList.Count > 0) + { + foreach (var cookie in cookieList) + { + cookies += cookie.Name + "=" + cookie.Value + "; "; + cookieListNew.Add(cookie); + } + cookies = JsonHelper.SerializeObject(cookieListNew); + } + + if (!string.IsNullOrEmpty(cookies)) + { + var lstShopCompanyCopy = lstShopCompany.ToList(); + + foreach (ShopCompany sc in lstShopCompanyCopy) + { + ShopLoginInfo newShop = new ShopLoginInfo() + { + LoginName = shop?.LoginName ?? sc.AccountId, + Password = shop?.Password, + GroupName = shop?.GroupName, + ShopAccount = sc.AccountName, + ShopId = sc.AccountId, + SubUserName = shop?.SubUserName, + Notes = shop?.Notes, + openid = sc.openid, + }; + + var oldShop = shop; + if (oldShop.ShopId == newShop.ShopId && (newShop.ShopAccount != oldShop.ShopAccount || newShop.openid != oldShop.openid)) + { + oldShop.ShopId = newShop.ShopId; + oldShop.LoginName = newShop.LoginName; + oldShop.ShopAccount = newShop.ShopAccount; + oldShop.openid = newShop.openid; + + // 店铺更新写入到服务端 + var url = BaseClass.BuildObjString("shop/mdy_shop"); + var data = UserLogin.GetSignaturex() + + "&login_name=" + oldShop.LoginName + + "&shop_id=" + oldShop.ShopId + + "&shop_account=" + oldShop.ShopAccount; + var result = GetHtml.PostUtf8(url, data); + } + } + shop.LoginStatus = "登录成功"; + shop.Cookies = cookies; + shop.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd"); + // 店铺cookie写入服务端,多店共用一个登录账号一组cookie + WXShopListForm.UpdateServerShopCookies(shop); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie + + OnSaveComplete(shop); + if (this.Created && this.chkCloseAfterLogin.Checked) + { + Invoke(new Action(() => { this.Close(); })); + } + else + { + break; + } + } + } + } + } + }); + } + + /// + /// 自动关闭弹窗 + /// + private void ClosePopWindow() + { + // 关闭弹窗 + Task.Run(() => + { + var sleepTime = 2500; + int i = 0; + while (true && i++ < 50) + { + try + { + Thread.Sleep(sleepTime); + var jsStr1 = "function ClosePopWindow(txt) {\r\n" + + " var result = 'no_pop'\r\n" + + " var item = document.getElementsByClassName(txt);\r\n" + + " for(i = 0; i < item.length; i++) {\r\n" + + " item[i].click();\r\n" + + " result = 'success'\r\n" + + " }\r\n" + + " return result;\r\n" + + "}\r\n" + + "ClosePopWindow('anticon-close-circle');\r\n" + + "ClosePopWindow('ant-modal-close-x');\r\n"; + var jsStr2 = "function clickPopWindow(txt) {\r\n" + + "var child = document.body.firstElementChild;\r\n" + + "var element1 = null;\r\n" + + " while (child) {\r\n" + + " if (child.innerHTML.indexOf(txt) >= 0) {\r\n" + + " element1 = child;\r\n" + + " if (child.firstElementChild) {\r\n" + + " child = child.firstElementChild; continue;\r\n" + + " } else break;\r\n" + + " }\r\n" + + " child = child.nextElementSibling;\r\n" + + " }\r\n" + + " if (element1) {\r\n" + + " element1.click(); return 'success';\r\n" + + " } else return 'no_pop';\r\n" + + "}\r\n" + + "clickPopWindow('我知道了');\r\n" + + "clickPopWindow('知道了');\r\n"; + if (cefWebBrowser != null && cefWebBrowser.IsBrowserInitialized) + { + var t1 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr1); + t1.Wait(); + var t2 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr2); + t2.Wait(); + if (t1.Result?.Result?.ToString() == "success" || t2.Result?.Result?.ToString() == "success") + sleepTime = Randomx.GetId(550, 650); + else + sleepTime = Randomx.GetId(1500, 2000); + } + } + catch (Exception ex) { } + } + }); + } + + /// + /// 自动登录店铺后台 + /// + private void AutoLogin() + { + if (shop == null) + return; + + if (cefWebBrowser == null) + { + if (!string.IsNullOrEmpty(InitUrl)) + cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(InitUrl, false); + else + cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false); + CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal(); + resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete; + resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad; + cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler); + var lifeSapnHandler = new LifeSpanHandlerLocal(PopWindowType.SelfWindow); + cefWebBrowser.LifeSpanHandler = lifeSapnHandler; + cefWebBrowser.KeyboardHandler = new KeyboardHandler(); + cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd; + cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged; + cefWebBrowser.LoadError += CefWebBrowser_LoadError; + cefWebBrowser.Dock = DockStyle.Fill; + + //js绑定C#对象 + WXShopBrowserObject shopObj = new WXShopBrowserObject(); + shopObj.OnInfoReceived += ShopObj_OnInfoReceived; + CefSharpSettings.WcfEnabled = true; + cefWebBrowser.JavascriptObjectRepository.Register( + name: "shopObj", + objectToBind: shopObj, + isAsync: false, + options: new BindingOptions { Binder = BindingOptions.DefaultBinder.Binder /*CamelCaseJavascriptNames = false*/ /*cef79*/ } + ); + + List cookieLst = new List(); + try + { + if (shop != null) + { + cookieLst = JsonHelper.DeserializeJsonToList(shop.Cookies.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + } + } + catch + { + } + + Task.Run(() => + { + Invoke(new Action(() => + { + splitContainer1.Panel1.Controls.Add(cefWebBrowser); + //cefWebBrowser.Load(shopMainUrl); + })); + // cef138必须init后方可设置或删除cookie + while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid) + Thread.Sleep(20); + CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null)); + + //cef 138 如果没有设置RequestContext 可能为空,直接getCookieManager + //if (this.openType != EnumOpenType.login) + { + //var t = CEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), cefWebBrowser.GetCookieManager(null)); + foreach (var cook in cookieLst) + { + var t = CEFBrowser.SetCookieAsync(cook.Domain, cook.Name + "=" + cook.Value + ";", cefWebBrowser.GetCookieManager(null)); + t.Wait(5000); + } + } + + //根据登录的具体店铺设置local storage + if (!string.IsNullOrEmpty(shop?.ShopId)) + { + //var storageJsCode = "window.localStorage.setItem('" + "mall-info-id" + "', '" + shop.ShopId + "');\r\n"; + //storageJsCode += "window.localStorage.setItem('" + "agentseller-mall-info-id" + "', '" + shop.ShopId + "');\r\n"; + //while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid) + // Thread.Sleep(20); + //cefWebBrowser.GetBrowser().MainFrame.ExecuteJavaScriptAsync(storageJsCode); + } + + if (!string.IsNullOrEmpty(InitUrl)) + cefWebBrowser.Load(InitUrl); + else + cefWebBrowser.Load(shopMainUrl); + + //不是登录的话就此返回 + if (openType != EnumOpenType.login) + { + Invoke(new Action(() => + { + chkCloseAfterLogin.Visible = false; + btnLoginAgain.Visible = false; + })); + return; + } + + for (int i = 0; i < 50; i++) + { + if (cefWebBrowser.IsLoading) + Thread.Sleep(100); + } + Thread.Sleep(Randomx.GetId(1500,2000)); + + if (!this.Created) + return; + + while (!cefWebBrowser.Address.StartsWith(shopLoginUrl)) + { + Thread.Sleep(1000); + if (!this.Created) + return; + } + + CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null)); + // 扫码登录,无输入密码环节 + // InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password)); + }); + } + } + + private void ShopObj_OnInfoReceived(string information) + { + //BaseMsgForm.ShowInfo(information); + if (!string.IsNullOrEmpty(information)) + cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync("alert('" + information + "');"); + } + + private void CefWebBrowser_LoadError(object sender, CefSharp.LoadErrorEventArgs e) + { + } + + private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e) + { + if (this.Created && !this.Disposing && !this.IsDisposed) + Invoke(new Action(() => + { + currentUrl = e.Address; + txtAddress.Text = e.Address; + })); + } + + private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e) + { + //js绑定C#对象 html页面内声明绑定的C#对象 + StringBuilder sb = new StringBuilder(); + sb.Append("(function(){"); + sb.Append("CefSharp.BindObjectAsync('shopObj');"); + sb.Append("})();"); + //cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString()); + } + + //public Func BeforeResourceLoadEvent; // sender, requestUrl, postData, request, true(表示取消执行) + private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request) + { + return false; + } + + private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request) + { + if (url == "https://store.weixin.qq.com/shop/home" && this.openType == EnumOpenType.login) + { + Task.Run(() => + { + if (shop == null) + return; + + var data = responseData; + + var index = data.IndexOf("window.__INITIAL_PINIA_DATA__=") + "window.__INITIAL_PINIA_DATA__=".Length; + var indexEnd = data.IndexOf(";window.__USE_VITE__="); + if (index < 1000) + { + //BaseMsgForm.ShowError("cookie已失效!"); + return; + } + var dataStr = data.Substring(index, indexEnd - index); + dataStr = GetHtml.Unicode2String(dataStr); + + var shopId = BaseRegex.GetStringJson(ref data, "appid"); + var nickName = BaseRegex.GetStringJson(ref data, "nickName"); + var openId = BaseRegex.GetStringJson(ref data, "openid"); // oGu7k7HxmUyOmc1X6VM7GQwS-9cI + if (shop != null && shop.ShopId != shopId) + { + BaseMsgForm.ShowError("cookie与店铺不匹配,请核对店铺!"); + return; + } + + ShopCompany sc = new ShopCompany() + { + UserName = BaseClass.UserName, // 登录的用户信息 + AccountId = shopId, + AccountName = nickName, + LoginName = shopId, + openid = openId, + LoginStatus = "登录成功", + }; + this.lstShopCompany.RemoveAll(s => s.AccountId == sc.AccountId); + this.lstShopCompany.Add(sc); + }); + } + } + + /// + /// 自动登录 + /// + /// + /// + /// + private void InputUserNameAndPassword(ChromiumWebBrowser webBrowser, string _account, string _password) + { + webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sGetElementWithText); + + var jsStr0 = "var clickBox1 = getElementWithText('账号登录'); clickBox1.click()"; + var response0 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr0); + response0.Wait(1000); + Thread.Sleep(Randomx.GetId(500, 1000)); + + string jsStr1 = "function getInputItem () {var usernameId = document.getElementById('usernameId'); if (usernameId) return 'true';} getInputItem();"; + Task response1 = null; + while (response1?.Result?.Result == null || !response1.Result.Result.ParseToString().Contains("true")) + { + Thread.Sleep(250); + if (!this.Created) + return; + + response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); + response1.Wait(5000); + + if (!this.Created) + return; + } + + webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2); + + jsStr1 = "var usernameId = document.getElementById('usernameId'); " + + "changeReactInputValue(usernameId,'" + _account + "');"; + response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); + response1.Wait(1000); + Thread.Sleep(Randomx.GetId(500, 1000)); + + string jsStr = "var passwordId = document.getElementById('passwordId'); "+ + "changeReactInputValue(passwordId,'" + _password + "');"; + var response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(1000); + Thread.Sleep(Randomx.GetId(500, 1000)); + + jsStr = "var clickBox = getElementWithText('我已阅读并同意'); " + + "clickBox.click()"; + response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(1000); + Thread.Sleep(Randomx.GetId(500, 1000)); + + jsStr = "var clickBox = getElementWithText('登录'); " + + "clickBox.click()"; + response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(1000); + Thread.Sleep(Randomx.GetId(500, 1000)); + return; + //下面代码原抖音使用,废弃 + + #region 输入用js + string jsSetValue = @" +function keyboardInput(dom, st) { + var evt = new InputEvent('input', { + //var evt = new Event('input', { // cef57 + inputType: 'insertText', + data: st, + dataTransfer: null, + isComposing: false + }); + dom.value = st; + dom.dispatchEvent(evt); + dom.focus(); +};"; + + string jsInputKey = @" +function fireKeyEvent(el, evtType, keyCode) { + var evtObj; + if (document.createEvent) + { + if (window.KeyEvent) + { + //firefox 浏览器下模拟事件 + evtObj = document.createEvent('KeyEvents'); + evtObj.initKeyEvent(evtType, true, true, window, true, false, false, false, keyCode, 0); + } + else + { + //chrome 浏览器下模拟事件 + evtObj = document.createEvent('UIEvents'); + evtObj.initUIEvent(evtType, true, true, window, 1); + + delete evtObj.keyCode; + if (typeof evtObj.keyCode === 'undefined') + { + //为了模拟keycode + Object.defineProperty(evtObj, 'keyCode', { value: keyCode }); + } + else + { + evtObj.key = String.fromCharCode(keyCode); + } + + if (typeof evtObj.ctrlKey === 'undefined') + { + //为了模拟ctrl键 + Object.defineProperty(evtObj, 'ctrlKey', { value: true }); + } + else + { + evtObj.ctrlKey = true; + } + } + el.dispatchEvent(evtObj); + } + else if (document.createEventObject) + { + //IE 浏览器下模拟事件 + evtObj = document.createEventObject(); + evtObj.keyCode = keyCode + el.fireEvent('on' + evtType, evtObj); + } +}"; + #endregion + + #region 输入用户名 + jsStr = @"var txt1 = document.getElementsByName('email')[0]; txt1.focus(); txt1.click(); keyboardInput(txt1, '" + _account + "');" + + "var uname = '" + _account + "';" + + "for(var i = 0; i < uname.length; i++) {" + + " cCode = uname.charCodeAt(i);" + + " fireKeyEvent(txt1, 'keydown', cCode);" + + " fireKeyEvent(txt1, 'keypress', cCode);" + + " fireKeyEvent(txt1, 'keyup', cCode);" + + "}"; + response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsSetValue + jsInputKey + jsStr); + response.Wait(2000); + Thread.Sleep(Randomx.GetId(400, 800)); + #endregion + + #region 输入密码 + jsStr = @"var txt2 = document.getElementsByName('password')[0]; txt2.focus(); txt2.click(); keyboardInput(txt2, '" + _password + "');" + + "var pwd = '" + _password + "';" + + "for(var i = 0; i < pwd.length; i++) {" + + " cCode = pwd.charCodeAt(i);" + + " fireKeyEvent(txt2, 'keydown', cCode);" + + " fireKeyEvent(txt2, 'keypress', cCode);" + + " fireKeyEvent(txt2, 'keyup', cCode);" + + "}"; + response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsInputKey + jsStr); + response.Wait(2000); + Thread.Sleep(Randomx.GetId(400, 800)); + #endregion + + #region 点击登录按钮 + jsStr = "var btn = document.getElementsByClassName('account-center-action-button')[0]; btn.click(); //btn.dispatchEvent(new Event('change'));"; + response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(2000); + Thread.Sleep(1500 + Randomx.GetId(1000)); + #endregion + + #region 获取验证码 + int getImageCount = 0; + getImageAgain: + if (!this.Created) + return; + + jsStr = "function getImg() { return document.getElementsByClassName('captcha_verify_img--wrapper')[0].innerHTML; }"; + jsStr += "getImg();"; + response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(2000); + if (response.Result?.Result == null) + { + if (getImageCount < 50) + { + Thread.Sleep(2500); + getImageCount++; + goto getImageAgain; + } + } + if (response.Result?.Result != null) + { + var imgStr = response.Result.Result.ToString(); + var src = BaseRegex.GetMatchRegexString(ref imgStr, "src=\"([\\s\\S]*?)\""); + Bitmap bt = (Bitmap)GetHtml.LoadImage(src); + if (bt != null) + { + int Stopxt = 0; + int dragButtonWidth = 53; + //Stopxt = new Base64ChangeImgUrl().CalculateNick(bt, dragButtonWidth); + Thread.Sleep(500 + Randomx.GetId(1000)); + Stopxt = new Base64ChangeImgUrl().CalculateNickNew(bt, dragButtonWidth); + if (Stopxt > 0) + { + jsStr = "function getImgPos() { return document.getElementsByClassName('secsdk-captcha-drag-icon')[0].getBoundingClientRect().left + '|' " + + " + document.getElementsByClassName('secsdk-captcha-drag-icon')[0].getBoundingClientRect().top;} getImgPos();"; + response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(2000); + if (response.Result?.Result != null) + { + var xy = response.Result?.Result.ToString(); + var xyArr = xy.Split('|'); + if (xyArr.Length == 2) + { + try + { + int x = (int)Convert.ToDecimal(xyArr[0]) + 25; + int y = (int)Convert.ToDecimal(xyArr[1]) + 25; + + // 自动滑块图形验证 + if (GlobalConfig.TemuShopSettingParam.IsAutoDragLogin) + { + WXShopLoginForm.CefMouseDragDou(cefWebBrowser, x, y, Convert.ToInt32((x + Stopxt * 340m / 552m) - 15), y); + for (int i = 0; i < 1; i++) + Thread.Sleep(2000 + Randomx.GetId(1000)); + response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); + response.Wait(2000); + if (response.Result?.Result != null && getImageCount < 50) + { + getImageCount++; + goto getImageAgain; + } + } + } + catch + { + } + } + } + for (int i = 0; i < 1; i++) + Thread.Sleep(2000 + Randomx.GetId(1000)); + } + } + } + Thread.Sleep(1500 + Randomx.GetId(1000)); + #endregion + } + + // 鼠标左键按下,移动,移动...左键抬起。 + public static void CefMouseDragDou(ChromiumWebBrowser webBrowser, int x1, int y1, int x2, int y2) + { + Thread.Sleep(100); + var host = webBrowser.GetBrowser().GetHost(); + + var rx = -6 + Randomx.GetId(13); + x2 = x2 + rx; + // 随机按下点的位置(正负6像素),提高仿真性 + int x = x1 + rx; + int y = y1 - 6 + Randomx.GetId(13); + + // 按下鼠标左键 + host.SendMouseClickEvent(x, y, MouseButtonType.Left, false, 1, CefEventFlags.None); + Thread.Sleep(100 + Randomx.GetId(300)); + + // 滑动光标 + int times = -20; + while (x < x2 + 4 - Randomx.GetId(9)) + { + times++; + x += (15 + Randomx.GetId(15)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + if (x < x2 - 1) + while (x < x2) + { + times++; + x += (8 + Randomx.GetId(8)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + else if (x > x2 + 1) + while (x > x2) + { + times++; + x -= (8 + Randomx.GetId(8)) / 8; + if (times % 5 == 0) + y = y - 1 + Randomx.GetId(3); + Thread.Sleep(6 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + } + + // 如果最后位置偏差较多,再做一次调整 + x = x2 - 1 + Randomx.GetId(3); + x = x2; + Thread.Sleep(18 + Math.Abs(times) / 5 + Randomx.GetId(16)); + Thread.Sleep(18 + Math.Abs(times) / 5 + Randomx.GetId(16)); + host.SendMouseMoveEvent((int)x, (int)y, false, CefEventFlags.LeftMouseButton); + + // 抬起鼠标左键 + Thread.Sleep(300 + Randomx.GetId(500)); + host.SendMouseClickEvent(x, y, MouseButtonType.Left, true, 1, CefEventFlags.None); + host.SendMouseClickEvent(x, y, MouseButtonType.Left, true, 1, CefEventFlags.None); + } + + private void btnStop_Click(object sender, EventArgs e) + { + + } + + private void btnCopyUserName_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtUserName.Text)) + Clipboard.SetDataObject(txtUserName.Text); + } + + private void btnCopyPassword_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtPassWord.Text)) + Clipboard.SetDataObject(txtPassWord.Text); + } + + private void btnReload_Click(object sender, EventArgs e) + { + if (cefWebBrowser != null) + { + if (txtAddress.Text != "about:blank") + cefWebBrowser.Load(txtAddress.Text); + else + cefWebBrowser.Load(shopMainUrl); + } + } + + private void ShopLoginForm_FormClosed(object sender, FormClosedEventArgs e) + { + //OnSaveComplete(shop); + Task.Run(() => { + Thread.Sleep(500); + if (!this.Disposing && !this.IsDisposed) + { + MainForm.instance.Invoke(new Action(() => { this.Dispose(); })); + } + }); + } + + private void txtAddress_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + if (cefWebBrowser != null) + { + cefWebBrowser.Load(txtAddress.Text); + } + } + } + + private void btnMultiLogin_Click(object sender, EventArgs e) + { + MultiLoginCookieName = cmbMultiCookieName.Text; + AutoLogin(); + } + + private void btnDel_Click(object sender, EventArgs e) + { + if (shop != null) + { + shop.DictMultiCookies.Remove(cmbMultiCookieName.Text); + StartUp.SaveLocalShopLoginInfo(); + + InitMultiLoginCookies(); + } + } + + private void InitMultiLoginCookies() + { + this.cmbMultiCookieName.Items.Clear(); + foreach (var cookieKey in shop.DictMultiCookies.Keys) + { + this.cmbMultiCookieName.Items.Add(cookieKey); + } + int i = 1; + foreach (var item in this.cmbMultiCookieName.Items) + { + if (i <= item.ToString().Replace("cookie", "").ParseToInt()) + { + i = item.ToString().Replace("cookie", "").ParseToInt() + 1; + } + } + this.cmbMultiCookieName.Items.Insert(0, "cookie" + i); + this.cmbMultiCookieName.Text = "cookie" + i; + } + + + string sInputValueChange = @" +let usernameId = document.getElementById('usernameId'); +usernameId.value = '1'; + +var event = document.createEvent('HTMLEvents'); +event.initEvent('input', true, true); +event.eventType = 'message'; +usernameId.dispatchEvent(event); +"; + + string sInputValueChange2 = @" +function changeReactInputValue(inputDom,newText){ + let lastValue = inputDom.value; + inputDom.value = newText; + let event = new Event('input', { bubbles: true }); + event.simulated = true; + let tracker = inputDom._valueTracker; + if (tracker) { + tracker.setValue(lastValue); + } + inputDom.dispatchEvent(event); +} +"; + + string sGetElementWithText = @" +function getElementWithText(sText) +{ + var elem=null; + const elements = document.querySelectorAll('*'); // 选择所有元素 + elements.forEach(element => { + if (element.textContent.includes(sText)) { + // 对每个匹配的元素执行操作 + //console.log(element); + elem=element; + } + }); + return elem; +}; +"; + + private void btnLoginAgain_Click(object sender, EventArgs e) + { + if (this.currentUrl != shopLoginUrl) + this.cefWebBrowser.Load(shopLoginUrl); + + + Task.Run(() => + { + InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password)); + }); + } + + private void btnReturnPackage_Click(object sender, EventArgs e) + { + //ReturnPackageDetailForm form = new ReturnPackageDetailForm(this.shop); + //form.ShowDialog(); + } + } +} diff --git a/TEMUKJD/DYForms/ShopForms/DYShopLoginForm.resx b/TEMUKJD/WXForms/AdminForms/WXAdminShopLoginForm.resx similarity index 100% rename from TEMUKJD/DYForms/ShopForms/DYShopLoginForm.resx rename to TEMUKJD/WXForms/AdminForms/WXAdminShopLoginForm.resx diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.Designer.cs new file mode 100644 index 0000000..986fcac --- /dev/null +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.Designer.cs @@ -0,0 +1,278 @@ + +namespace TemuKJD.WXForms.ProductForms +{ + partial class WXDBProdUploadCacheForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXDBProdUploadCacheForm)); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.btnClearDgv = new DevComponents.DotNetBar.PanelEx(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn(); + this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.White; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(1, 33); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.btnClearDgv); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); + this.splitContainer1.Size = new System.Drawing.Size(1110, 566); + this.splitContainer1.SplitterDistance = 55; + this.splitContainer1.TabIndex = 1; + this.splitContainer1.TabStop = false; + // + // btnClearDgv + // + this.btnClearDgv.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control; + this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClearDgv.Location = new System.Drawing.Point(1000, 16); + this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnClearDgv.Name = "btnClearDgv"; + this.btnClearDgv.Size = new System.Drawing.Size(84, 23); + this.btnClearDgv.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnClearDgv.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnClearDgv.Style.GradientAngle = 90; + this.btnClearDgv.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClearDgv.TabIndex = 616; + this.btnClearDgv.Text = "清空列表选中"; + this.btnClearDgv.Click += new System.EventHandler(this.btnClearDgv_Click); + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.dgvSelectProduct); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.splitContainer2.Size = new System.Drawing.Size(1110, 507); + this.splitContainer2.SplitterDistance = 478; + this.splitContainer2.TabIndex = 0; + this.splitContainer2.TabStop = false; + // + // dgvSelectProduct + // + this.dgvSelectProduct.AllowUserToAddRows = false; + this.dgvSelectProduct.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White; + this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colCheck, + this.colId, + this.colSpuId, + this.colImgUrl, + this.colProductSkcPic, + this.colProductName, + this.colProductCat, + this.colExtCode, + this.colNotes, + this.ColDelete}); + this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvSelectProduct.Location = new System.Drawing.Point(5, 0); + this.dgvSelectProduct.Name = "dgvSelectProduct"; + this.dgvSelectProduct.ReadOnly = true; + this.dgvSelectProduct.RowTemplate.Height = 23; + this.dgvSelectProduct.Size = new System.Drawing.Size(1100, 478); + this.dgvSelectProduct.TabIndex = 188; + this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); + // + // colCheck + // + this.colCheck.Frozen = true; + this.colCheck.HeaderText = "选择"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCheck.Width = 30; + // + // colId + // + this.colId.HeaderText = "序号"; + this.colId.Name = "colId"; + this.colId.ReadOnly = true; + this.colId.Width = 45; + // + // colSpuId + // + this.colSpuId.HeaderText = "商品ID"; + this.colSpuId.Name = "colSpuId"; + this.colSpuId.ReadOnly = true; + this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colImgUrl + // + this.colImgUrl.HeaderText = "图片地址"; + this.colImgUrl.Name = "colImgUrl"; + this.colImgUrl.ReadOnly = true; + this.colImgUrl.Visible = false; + // + // colProductSkcPic + // + this.colProductSkcPic.HeaderText = "图片"; + this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colProductSkcPic.Name = "colProductSkcPic"; + this.colProductSkcPic.ReadOnly = true; + this.colProductSkcPic.Width = 60; + // + // colProductName + // + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle3; + this.colProductName.HeaderText = "商品标题"; + this.colProductName.Name = "colProductName"; + this.colProductName.ReadOnly = true; + this.colProductName.Width = 390; + // + // colProductCat + // + this.colProductCat.HeaderText = "商品类目"; + this.colProductCat.Name = "colProductCat"; + this.colProductCat.ReadOnly = true; + this.colProductCat.Width = 120; + // + // colExtCode + // + this.colExtCode.HeaderText = "商品货号"; + this.colExtCode.Name = "colExtCode"; + this.colExtCode.ReadOnly = true; + this.colExtCode.Width = 120; + // + // colNotes + // + this.colNotes.HeaderText = "商品备注"; + this.colNotes.Name = "colNotes"; + this.colNotes.ReadOnly = true; + // + // ColDelete + // + this.ColDelete.HeaderText = "删除"; + this.ColDelete.Name = "ColDelete"; + this.ColDelete.ReadOnly = true; + this.ColDelete.Width = 75; + // + // PDDDBProdUserSelectCacheForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1112, 600); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "PDDDBProdUserSelectCacheForm"; + this.Text = "待上传商品"; + this.TitleText = "待上传商品"; + this.Load += new System.EventHandler(this.WXDBProdUploadCacheForm_Load); + this.Controls.SetChildIndex(this.splitContainer1, 0); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.SplitContainer splitContainer2; + private UserComponent.DataGridViewEx dgvSelectProduct; + private DevComponents.DotNetBar.PanelEx btnClearDgv; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colId; + private System.Windows.Forms.DataGridViewLinkColumn colSpuId; + private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductName; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat; + private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode; + private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; + private System.Windows.Forms.DataGridViewLinkColumn ColDelete; + } +} \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.cs new file mode 100644 index 0000000..ddf3832 --- /dev/null +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.cs @@ -0,0 +1,98 @@ +using AllBase; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using TemuKJD.Extension; +using TemuKJD.ToolForms; + +namespace TemuKJD.WXForms.ProductForms +{ + public partial class WXDBProdUploadCacheForm : LRBaseForm + { + NaiBa.Util.ConcurrentList lstTemuDBProductSelect; + public WXDBProdUploadCacheForm(NaiBa.Util.ConcurrentList _lstTemuDBProductSelect) + { + InitializeComponent(); + + lstTemuDBProductSelect = _lstTemuDBProductSelect; + } + + private void WXDBProdUploadCacheForm_Load(object sender, EventArgs e) + { + dgvSelectProduct.AddSelectorColumn("colCheck"); + dgvSelectProduct.AddImgColumn("colProductSkcPic", "colImgUrl"); + + if (lstTemuDBProductSelect != null && lstTemuDBProductSelect.Count > 0) + { + foreach (var prodSelect in lstTemuDBProductSelect) + { + int rowIndex = this.dgvSelectProduct.Rows.Add( + false, + prodSelect.id, + prodSelect.spu_id, + prodSelect.main_img, + null, + prodSelect.product_name, // 商品名称 + prodSelect.cat_name, + prodSelect.ext_code, + prodSelect.notes, + "删除" + ); + + dgvSelectProduct.Rows[rowIndex].Height = 60; + } + } + } + + private void dgvSelectProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvSelectProduct.Columns[e.ColumnIndex].HeaderText; + var id = dgvSelectProduct.Rows[e.RowIndex].Cells["colId"].Value.ParseToString(); + var dbProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ToString() == id); + var row = dgvSelectProduct.Rows[e.RowIndex]; + + switch (headerText) + { + case "删除": + if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) + return; + lstTemuDBProductSelect.RemoveAll(s => s.id == row.Cells["colId"].Value.ParseToInt()); + this.dgvSelectProduct.Rows.Remove(row); + break; + case "图片": + ShowImgForm imgFrom = new ShowImgForm(dgvSelectProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString()); + imgFrom.ShowDialog(); + break; + case "": + dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value; + break; + default: + break; + } + } + + private void btnClearDgv_Click(object sender, EventArgs e) + { + var rows = this.dgvSelectProduct.Rows.Cast().ToList(); //Cast后Rows做foreach循环时仍会夹花跳过,所以要ToList转一个新的数组。 + foreach (var row in rows) + { + if (row.Cells["colCheck"].Value.ParseToBool() == true) + { + lstTemuDBProductSelect.RemoveAll(s => s.id == row.Cells["colId"].Value.ParseToInt()); + this.dgvSelectProduct.Rows.Remove(row); + } + } + } + } +} diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.resx b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.resx new file mode 100644 index 0000000..05d1891 --- /dev/null +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadCacheForm.resx @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + + + AAABAAEAgIAQAAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// + AAD///8AAAAAAAAAAAAAAAAzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMQ + AAAAAAAAAAAAAAAAAAAAAAAAABM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZkzEAAAAAAAAAAAAAAAAAAAAAADOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZMwAAAAAAAAAAAAAAAAAAABOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZkzAAAAAAAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmTEAAAAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAAAA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAADmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAA5mZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAADmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAGZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAJmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZAAAAAA + OZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmT + AAAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmRAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZkwAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZkwAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZMAAJmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZEAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkwCZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkRmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZOZmZOZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmP+JmZmZmZmZj/////// + ///4OZmZj/eZmZmZmZmZmPg5OZmZmZuI//iIuZmZmZmZmZmZmZM5mZmZmZmZmZmZmb//+JmZmZmZmP// + //////////OZmP//uZmZmZmZmY//+ZmZOZf///////h5k5mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZ + mZ/////////////4mZ///4mZmZmZmZP///uZmZmP////////+JmZmZmZmZmZkzmZmZmZmZmZmZmZj//4 + mZmZmZmf////////////+Jmf//+JmZmZmZmb///4mZmY//////////+JmZmZmZmZmZM5mZmZmZmZmZmZ + mY//+JmZmZmZn/////////////mZmP//iZmZmZmZk///+5mZj/////iP////+JmZmZmZmZmTOZmZmZmZ + mZmZmZmP//iZmZmZmZ////iIiIiIiIiZOZj//4mZmZmZmZP///uZmf////eZmT////+ZmZmZmZmZkzmZ + mZmZmZmZmZmZj//4mZmZmZmf//+JmZmZmZmZk5mY//+JmZmZmZmT///7mZj///+ZmZmZj///uZmZmZmZ + mZM5mZmZmZmZmZmZmY//+JmZmZmZn///iZmZmZmZmZmZmP//iZmZN5k5k///+5mY///zk5mZOT///4mZ + mZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ///4mZmZmZmZmZmZj//4mZmP/5k5P///uZmP//+ZmZmZmY + //+JmZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf///4iIiIiIg5mZmY//+JOb//+JmT///7mZj//4mZ + mZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn///////////85mZmP//iZn///+Jk///+5mf + //+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ////////////+ZmZj//4mY////85v/ + //uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf////////////mZmY//+Jv/// + //+Z///7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn///////////+JmZmP// + if//////if//+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ///////////4mZ + mZj//4j///////j///uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf//+JMzMz + MzOZOZmY//////+D///////7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn/// + iZmZmZmZmZmZmP//////mY//////+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZ + mZ///4mZmZmZmZmZmZj/////+5mf//////uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZMzM5j//4 + kzMzmZmf//+JMzMzMzM5mZmY/////4mTk//////7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmP// + /////////4mZn////////////4mZmP////+ZmZmP////+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZ + mY/////////////4mZ/////////////7mZj////7mZmZn/////uZmP//iZmZmZmY///5mZmZmZmZkzmZ + mZmZmZn//////////////5mf////////////+Jmf////iZmZk5P////4mZ///4mZmZmZmP//+ZmZmZmZ + mZM5mZmZmZmZj/////////////iZn/////////////iZmP///5mZmZmZj///+5mY//+JmZmZmZj//4mZ + mZmZmZmTOZmZmZmZmZ/////////////zmZP///////////+JmZP///uTmZmZmZj//4mZm///mZmZmZmZ + //85mZmZmZmZkzmZmZmZmZOZiIiIiIiIiIiImTmZOIiIiIiIiIiImTmZOIi5mZmZmZOZiIuZmZk4iZOZ + mZmZOZiDmZmZmZmZmZM5mZmZmZmZOZmZmZmZmZmZmZOZmZmZmZmZmZmZmZOZmZmZmZmZmZmZOZmZmZmZ + mZk5mZmZmZOZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmTuIiIiIs5mZmZmZmZ + mTu4i7mZmZmZmZmZmTMzmZOZmZkzOZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmTmbj///////+HmT + mZmZk4j/////iJmZmZk4iP////iZOZmZj/mZOZOIiIiIiIiIiDmZmZmZmZmZkzmZmZmZmZmZj/////// + ///4mZk5k4///4iI///4OZOY////////iZOZmb/5mZmP///////////4mZmZmZmZmZM5mZmZmZmZn/// + //////////mZmY///5mZmZP///iZmP////////+ZOZk/iZmY/////////////4mZmZmZmZmTOZmZmZmZ + mZ/////////////5mZ////+JmZmY////iZl/////////+ZmZP4mZP//////////////7mZmZmZmZkzmZ + mZmZmZmb////////////uZP/j///+HM3j/////+ZmYj///////iZmT+JmY//////////////+JmZmZmZ + mZM5mZmZmZmZmY//////////+JmT+Jv///////////iPmTmZOI/4mP//uTk/iZmP//////////////iZ + mZmZmZmTOZmZmZmZmZmf//////////mZmZmZ///////////5mZmZmZmTOZk///mZP4mZj/////////// + ///4mZmZmZmZkzmZmZmZmZmTmP////////+JOZmZOY//////////iZmZmZmZmZk5mf/4mT+JmY////// + ////////+JmZmZmZmZM5mZmZmZmZmZn/////////mZmZmZk//////////zmZmZmZmZmZmTmP/zm/iZmP + //////////////iZmZmZmZmTOZmZmZmZmZk5v///////85OZmZkzmP////////iZmZmZmZmZmZmZn//4 + /4mZj/////hzN4/////4mZmZmZmZkzmZmZmZmZmZmZj//////4mZmTmY/4j////////4mZmZmZmZmZmZ + mZj///+JmY////+JmZmY////+JmZmZmZmZM5mZmZmZmZmZmZ//////+ZmZmZj////////////4mZmZmZ + mZmZmZmb////+ZmP///4mZu5mY////iZmZmZmZmTOZmZmZmZmZmZOb/////4k5mZmP/////////////7 + mZmZmZmZmZmZk/////OZv///+ZmP+Jmf///4mZmZmZmZkzmZmZmZmZmZmZmf////+ZmZmZj////////4 + eI//+JmZmZmZmZmZmZP////4mb///4mY//+JmP//+5mZmZmZmZM5mZmZmZmZmZk5v/////uTmZmb//// + ///4mZmX//iZmZmZmZmZmZmZ////+Jmf//95n///+Zj///OZmZmZmZmTOZmZmZmZmZmZmf//////mZmZ + mY//////+ZOZmZiJmZmZmZmZmZmZmY////+ZmP//+I////iP//+JmZmZmZmZkzmZmZmZmZmZmZj///// + /4mZmZmf/////5k5mZOZmTmZmZmZmZmZmZmP///4mZP/////////////OZmZmZmZmZM5mZmZmZmZmZk/ + ///////zmZmZm/////iZmZmZmZmZmZmZmZmZmZmZj///85mZj///////////+JmZmZmZmZmTOZmZmZmZ + mZmZv///////+5mZmZmP///5mZmZmZmZmZmZmZmZmZmZmZ///3mZmZj//////////4mZmZmZmZmZkzmZ + mZmZmZmZmb///4j///uZmZmZmP//mTmZmZmZmZmZmZmZmZmZmZmY/4OZmZmZeP///////4eZmZmZmZmZ + mZM5mZmZmZmZmZmY/4OZOP+JmZmZmZmIiZOZmZmZmZmZmZmZmZmZmZmZmYiZmZmZmZk4iIiIiIOZmZmZ + mZmZmZmTOZmZmZmZmZmZmTOZmZkzmZmZmZmZmZk5mZmZmZmZmZmZmZmZmZmZmZmZk5mZmZmZmZmZmZmZ + mZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmTGZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZkwmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZkwA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZMACZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmQAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAABmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTAAADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAJmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmRAAAAA5mZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAACZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmQAAAAAAGZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAOZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkwAAAAAA + AAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTAA + AAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZMAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZkwAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmTAAAAAAAAAAAAAAGZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZEAAAAAAAAAAAAAAAA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAAAAAAAATmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZMQAAAAAAAAAAAAAAAAAAABOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZMQAAAAAAAAAAAAAAAAAAAAAAAzmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTMAAAAAAAAAAAAAAAAAAAAAAAAAAAEzMzMzMzMzMzMzMzMzMz + MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxAAAAAAAAAAAAAAD////////////////////////4AAAA + AAAAAAAAAB//////wAAAAAAAAAAAAAAD/////wAAAAAAAAAAAAAAAP////wAAAAAAAAAAAAAAAA////w + AAAAAAAAAAAAAAAAD///4AAAAAAAAAAAAAAAAAf//8AAAAAAAAAAAAAAAAAD//+AAAAAAAAAAAAAAAAA + Af//AAAAAAAAAAAAAAAAAAD//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAA + AAAAAAAf+AAAAAAAAAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAA + AAAAAAAAAAAAB+AAAAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AA + AAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAAD4AAAAAAAAAAAAAAAAAAAA+AA + AAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAA + AA/4AAAAAAAAAAAAAAAAAAAf/AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAAAD/+AAAAAAAAAAAA + AAAAAAB//wAAAAAAAAAAAAAAAAAA//+AAAAAAAAAAAAAAAAAAf//wAAAAAAAAAAAAAAAAAP//+AAAAAA + AAAAAAAAAAAH///4AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAD////8AAAAAAAAAAAAAAAD///// + wAAAAAAAAAAAAAAD//////wAAAAAAAAAAAAAH////////////////////////w== + + + \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs new file mode 100644 index 0000000..004ba9a --- /dev/null +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs @@ -0,0 +1,1486 @@ + +using TemuKJD.PDDForms.ProductSelectForms; + +namespace TemuKJD.WXForms.ProductForms +{ + partial class WXDBProdUploadForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.label7 = new System.Windows.Forms.Label(); + this.txtWaitSeconds = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.btnStop = new DevComponents.DotNetBar.PanelEx(); + this.chkAddMorePriceFirst = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.btnClearDgv = new DevComponents.DotNetBar.PanelEx(); + this.label14 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.txtSinglePriceAdd = new System.Windows.Forms.TextBox(); + this.panel4 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.fPnlPriceRule = new System.Windows.Forms.FlowLayoutPanel(); + this.ucAddPrice1 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice(); + this.ucAddPrice3 = new TemuKJD.PDDForms.ProductSelectForms.UcAddPrice(); + this.label11 = new System.Windows.Forms.Label(); + this.lblNewAddPrice = new System.Windows.Forms.Label(); + this.txtAddMorePrice = new System.Windows.Forms.TextBox(); + this.txtAddTimes = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.btnUpload = new DevComponents.DotNetBar.PanelEx(); + this.txtStockNum = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.chkStepAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnClearFilter = new DevComponents.DotNetBar.PanelEx(); + this.txtIdFilter = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.cmbCateFilter = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.cmbGroupFilter = new System.Windows.Forms.ComboBox(); + this.label20 = new System.Windows.Forms.Label(); + this.txtExtCodeFilter = new System.Windows.Forms.TextBox(); + this.btnClearUpload = new DevComponents.DotNetBar.PanelEx(); + this.lblWaitToUp = new System.Windows.Forms.Label(); + this.lblGoodsCount = new System.Windows.Forms.Label(); + this.txtAddCount = new System.Windows.Forms.TextBox(); + this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); + this.label16 = new System.Windows.Forms.Label(); + this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.txtTest20981 = new System.Windows.Forms.TextBox(); + this.btnTest20981 = new DevComponents.DotNetBar.PanelEx(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLogin = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colInShop = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colSpuId = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colSkcId = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn(); + this.colSkuFakeImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSkuFakeImg = new System.Windows.Forms.DataGridViewImageColumn(); + this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductCat = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colExtCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDraftId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUserNotes = new System.Windows.Forms.DataGridViewLinkColumn(); + this.ColDelete = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colAddTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.panel1 = new System.Windows.Forms.Panel(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.ucGroupBoxEx2.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel3.SuspendLayout(); + this.fPnlPriceRule.SuspendLayout(); + this.ucGroupBoxEx4.SuspendLayout(); + this.ucGroupBoxEx1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); + this.splitContainer4.Panel1.SuspendLayout(); + this.splitContainer4.Panel2.SuspendLayout(); + this.splitContainer4.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2); + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx4); + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); + this.splitContainer1.Size = new System.Drawing.Size(1523, 546); + this.splitContainer1.SplitterDistance = 140; + this.splitContainer1.TabIndex = 11; + // + // ucGroupBoxEx2 + // + this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx2.Controls.Add(this.label7); + this.ucGroupBoxEx2.Controls.Add(this.txtWaitSeconds); + this.ucGroupBoxEx2.Controls.Add(this.label6); + this.ucGroupBoxEx2.Controls.Add(this.btnStop); + this.ucGroupBoxEx2.Controls.Add(this.chkAddMorePriceFirst); + this.ucGroupBoxEx2.Controls.Add(this.btnClearDgv); + this.ucGroupBoxEx2.Controls.Add(this.label14); + this.ucGroupBoxEx2.Controls.Add(this.label15); + this.ucGroupBoxEx2.Controls.Add(this.txtSinglePriceAdd); + this.ucGroupBoxEx2.Controls.Add(this.panel4); + this.ucGroupBoxEx2.Controls.Add(this.label11); + this.ucGroupBoxEx2.Controls.Add(this.lblNewAddPrice); + this.ucGroupBoxEx2.Controls.Add(this.txtAddMorePrice); + this.ucGroupBoxEx2.Controls.Add(this.txtAddTimes); + this.ucGroupBoxEx2.Controls.Add(this.label10); + this.ucGroupBoxEx2.Controls.Add(this.btnUpload); + this.ucGroupBoxEx2.Controls.Add(this.txtStockNum); + this.ucGroupBoxEx2.Controls.Add(this.label4); + this.ucGroupBoxEx2.Controls.Add(this.label9); + this.ucGroupBoxEx2.Controls.Add(this.chkStepAddPrice); + this.ucGroupBoxEx2.Location = new System.Drawing.Point(459, 2); + this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; + this.ucGroupBoxEx2.Size = new System.Drawing.Size(1062, 140); + this.ucGroupBoxEx2.TabIndex = 667; + this.ucGroupBoxEx2.TabStop = false; + this.ucGroupBoxEx2.Text = "商品上传"; + // + // label7 + // + this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(935, 34); + this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(20, 17); + this.label7.TabIndex = 729; + this.label7.Text = "秒"; + // + // txtWaitSeconds + // + this.txtWaitSeconds.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtWaitSeconds.Location = new System.Drawing.Point(903, 31); + this.txtWaitSeconds.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtWaitSeconds.Name = "txtWaitSeconds"; + this.txtWaitSeconds.Size = new System.Drawing.Size(32, 23); + this.txtWaitSeconds.TabIndex = 728; + this.txtWaitSeconds.Text = "10"; + // + // label6 + // + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(849, 34); + this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(56, 17); + this.label6.TabIndex = 727; + this.label6.Text = "额外等待"; + // + // btnStop + // + this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; + this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStop.Location = new System.Drawing.Point(956, 59); + this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(84, 23); + this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStop.Style.GradientAngle = 90; + this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStop.TabIndex = 546; + this.btnStop.Text = "停止上传"; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // + // chkAddMorePriceFirst + // + this.chkAddMorePriceFirst.AutoSize = true; + this.chkAddMorePriceFirst.Location = new System.Drawing.Point(306, 111); + this.chkAddMorePriceFirst.Name = "chkAddMorePriceFirst"; + this.chkAddMorePriceFirst.Size = new System.Drawing.Size(111, 21); + this.chkAddMorePriceFirst.TabIndex = 625; + this.chkAddMorePriceFirst.Text = "加价时先加再乘"; + this.chkAddMorePriceFirst.UseVisualStyleBackColor = true; + this.chkAddMorePriceFirst.CheckedChanged += new System.EventHandler(this.chkAddMorePriceFirst_CheckedChanged); + // + // btnClearDgv + // + this.btnClearDgv.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control; + this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClearDgv.Location = new System.Drawing.Point(956, 87); + this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnClearDgv.Name = "btnClearDgv"; + this.btnClearDgv.Size = new System.Drawing.Size(84, 23); + this.btnClearDgv.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnClearDgv.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnClearDgv.Style.GradientAngle = 90; + this.btnClearDgv.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearDgv.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearDgv.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClearDgv.TabIndex = 612; + this.btnClearDgv.Text = "清空列表选中"; + this.btnClearDgv.Click += new System.EventHandler(this.btnClearDgv_Click); + // + // label14 + // + this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label14.AutoSize = true; + this.label14.ForeColor = System.Drawing.SystemColors.GrayText; + this.label14.Location = new System.Drawing.Point(8, 62); + this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(68, 51); + this.label14.TabIndex = 599; + this.label14.Text = "阶梯加价未\r\n勾选或条件\r\n不满足,按"; + // + // label15 + // + this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(283, 113); + this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(20, 17); + this.label15.TabIndex = 588; + this.label15.Text = "元"; + // + // txtSinglePriceAdd + // + this.txtSinglePriceAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtSinglePriceAdd.Location = new System.Drawing.Point(252, 110); + this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSinglePriceAdd.Name = "txtSinglePriceAdd"; + this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23); + this.txtSinglePriceAdd.TabIndex = 587; + this.txtSinglePriceAdd.Text = "1.0"; + this.txtSinglePriceAdd.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); + // + // panel4 + // + this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panel4.Controls.Add(this.panel3); + this.panel4.Location = new System.Drawing.Point(76, 17); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(450, 89); + this.panel4.TabIndex = 577; + // + // panel3 + // + this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel3.AutoScroll = true; + this.panel3.BackColor = System.Drawing.Color.White; + this.panel3.Controls.Add(this.fPnlPriceRule); + this.panel3.Location = new System.Drawing.Point(1, 1); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(448, 87); + this.panel3.TabIndex = 541; + // + // fPnlPriceRule + // + this.fPnlPriceRule.AutoSize = true; + this.fPnlPriceRule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.fPnlPriceRule.Controls.Add(this.ucAddPrice1); + this.fPnlPriceRule.Controls.Add(this.ucAddPrice3); + this.fPnlPriceRule.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.fPnlPriceRule.Location = new System.Drawing.Point(0, 0); + this.fPnlPriceRule.Name = "fPnlPriceRule"; + this.fPnlPriceRule.Size = new System.Drawing.Size(426, 58); + this.fPnlPriceRule.TabIndex = 7; + // + // ucAddPrice1 + // + this.ucAddPrice1.AutoSize = true; + this.ucAddPrice1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ucAddPrice1.isShowMax = true; + this.ucAddPrice1.isShowMin = true; + this.ucAddPrice1.Location = new System.Drawing.Point(3, 3); + this.ucAddPrice1.MinimumSize = new System.Drawing.Size(0, 20); + this.ucAddPrice1.Name = "ucAddPrice1"; + this.ucAddPrice1.PriceAddMore = new decimal(new int[] { + 50, + 0, + 0, + 65536}); + this.ucAddPrice1.PriceAddTimes = new decimal(new int[] { + 20, + 0, + 0, + 65536}); + this.ucAddPrice1.PriceEnd = new decimal(new int[] { + 20, + 0, + 0, + 0}); + this.ucAddPrice1.PriceStart = new decimal(new int[] { + 0, + 0, + 0, + 65536}); + this.ucAddPrice1.SinglePriceAdd = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.ucAddPrice1.Size = new System.Drawing.Size(420, 23); + this.ucAddPrice1.TabIndex = 12; + // + // ucAddPrice3 + // + this.ucAddPrice3.AutoSize = true; + this.ucAddPrice3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ucAddPrice3.isShowMax = true; + this.ucAddPrice3.isShowMin = true; + this.ucAddPrice3.Location = new System.Drawing.Point(3, 32); + this.ucAddPrice3.MinimumSize = new System.Drawing.Size(0, 20); + this.ucAddPrice3.Name = "ucAddPrice3"; + this.ucAddPrice3.PriceAddMore = new decimal(new int[] { + 50, + 0, + 0, + 65536}); + this.ucAddPrice3.PriceAddTimes = new decimal(new int[] { + 20, + 0, + 0, + 65536}); + this.ucAddPrice3.PriceEnd = new decimal(new int[] { + 9990, + 0, + 0, + 65536}); + this.ucAddPrice3.PriceStart = new decimal(new int[] { + 20, + 0, + 0, + 0}); + this.ucAddPrice3.SinglePriceAdd = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.ucAddPrice3.Size = new System.Drawing.Size(420, 23); + this.ucAddPrice3.TabIndex = 13; + // + // label11 + // + this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(184, 113); + this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(68, 17); + this.label11.TabIndex = 536; + this.label11.Text = "元,单买加"; + // + // lblNewAddPrice + // + this.lblNewAddPrice.AutoSize = true; + this.lblNewAddPrice.Cursor = System.Windows.Forms.Cursors.Hand; + this.lblNewAddPrice.ForeColor = System.Drawing.SystemColors.HotTrack; + this.lblNewAddPrice.Location = new System.Drawing.Point(20, 42); + this.lblNewAddPrice.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblNewAddPrice.Name = "lblNewAddPrice"; + this.lblNewAddPrice.Size = new System.Drawing.Size(56, 17); + this.lblNewAddPrice.TabIndex = 567; + this.lblNewAddPrice.Text = "增加阶梯"; + this.lblNewAddPrice.Click += new System.EventHandler(this.lblNewAddPrice_Click); + // + // txtAddMorePrice + // + this.txtAddMorePrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtAddMorePrice.Location = new System.Drawing.Point(153, 110); + this.txtAddMorePrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtAddMorePrice.Name = "txtAddMorePrice"; + this.txtAddMorePrice.Size = new System.Drawing.Size(31, 23); + this.txtAddMorePrice.TabIndex = 535; + this.txtAddMorePrice.Text = "1.0"; + this.txtAddMorePrice.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); + // + // txtAddTimes + // + this.txtAddTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtAddTimes.Location = new System.Drawing.Point(78, 110); + this.txtAddTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtAddTimes.Name = "txtAddTimes"; + this.txtAddTimes.Size = new System.Drawing.Size(31, 23); + this.txtAddTimes.TabIndex = 532; + this.txtAddTimes.Text = "1.3"; + this.txtAddTimes.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); + // + // label10 + // + this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(109, 113); + this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(44, 17); + this.label10.TabIndex = 534; + this.label10.Text = "倍再加"; + // + // btnUpload + // + this.btnUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnUpload.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnUpload.DisabledBackColor = System.Drawing.Color.Empty; + this.btnUpload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnUpload.Location = new System.Drawing.Point(956, 31); + this.btnUpload.Name = "btnUpload"; + this.btnUpload.Size = new System.Drawing.Size(84, 23); + this.btnUpload.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnUpload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnUpload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnUpload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnUpload.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnUpload.Style.GradientAngle = 90; + this.btnUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnUpload.TabIndex = 517; + this.btnUpload.Text = "批量上传"; + this.btnUpload.Click += new System.EventHandler(this.btnUpload_Click); + // + // txtStockNum + // + this.txtStockNum.Location = new System.Drawing.Point(486, 110); + this.txtStockNum.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtStockNum.Name = "txtStockNum"; + this.txtStockNum.Size = new System.Drawing.Size(32, 23); + this.txtStockNum.TabIndex = 530; + this.txtStockNum.Text = "99"; + this.txtStockNum.TextChanged += new System.EventHandler(this.txtAddPrice_TextChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(430, 113); + this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(56, 17); + this.label4.TabIndex = 531; + this.label4.Text = "库存数量"; + // + // label9 + // + this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(8, 113); + this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(68, 17); + this.label9.TabIndex = 533; + this.label9.Text = "默认加价加"; + // + // chkStepAddPrice + // + this.chkStepAddPrice.AutoSize = true; + this.chkStepAddPrice.Location = new System.Drawing.Point(8, 20); + this.chkStepAddPrice.Name = "chkStepAddPrice"; + this.chkStepAddPrice.Size = new System.Drawing.Size(75, 21); + this.chkStepAddPrice.TabIndex = 598; + this.chkStepAddPrice.Text = "阶梯加价"; + this.chkStepAddPrice.UseVisualStyleBackColor = true; + this.chkStepAddPrice.CheckedChanged += new System.EventHandler(this.chkStepAddPrice_CheckedChanged); + // + // ucGroupBoxEx4 + // + this.ucGroupBoxEx4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx4.Controls.Add(this.btnClearFilter); + this.ucGroupBoxEx4.Controls.Add(this.txtIdFilter); + this.ucGroupBoxEx4.Controls.Add(this.label1); + this.ucGroupBoxEx4.Controls.Add(this.cmbCateFilter); + this.ucGroupBoxEx4.Controls.Add(this.label2); + this.ucGroupBoxEx4.Controls.Add(this.cmbGroupFilter); + this.ucGroupBoxEx4.Controls.Add(this.label20); + this.ucGroupBoxEx4.Controls.Add(this.txtExtCodeFilter); + this.ucGroupBoxEx4.Controls.Add(this.btnClearUpload); + this.ucGroupBoxEx4.Controls.Add(this.lblWaitToUp); + this.ucGroupBoxEx4.Controls.Add(this.lblGoodsCount); + this.ucGroupBoxEx4.Controls.Add(this.txtAddCount); + this.ucGroupBoxEx4.Controls.Add(this.panelEx2); + this.ucGroupBoxEx4.Controls.Add(this.label16); + this.ucGroupBoxEx4.Location = new System.Drawing.Point(147, 2); + this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; + this.ucGroupBoxEx4.Size = new System.Drawing.Size(312, 140); + this.ucGroupBoxEx4.TabIndex = 666; + this.ucGroupBoxEx4.TabStop = false; + this.ucGroupBoxEx4.Text = "待传商品"; + // + // btnClearFilter + // + this.btnClearFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearFilter.CanvasColor = System.Drawing.SystemColors.Control; + this.btnClearFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClearFilter.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClearFilter.Location = new System.Drawing.Point(254, 23); + this.btnClearFilter.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnClearFilter.Name = "btnClearFilter"; + this.btnClearFilter.Size = new System.Drawing.Size(48, 51); + this.btnClearFilter.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearFilter.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnClearFilter.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearFilter.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnClearFilter.Style.GradientAngle = 90; + this.btnClearFilter.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearFilter.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearFilter.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearFilter.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearFilter.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClearFilter.TabIndex = 559; + this.btnClearFilter.Text = "清除\r\n筛选"; + this.btnClearFilter.Click += new System.EventHandler(this.btnClearFilter_Click); + // + // txtIdFilter + // + this.txtIdFilter.Location = new System.Drawing.Point(158, 51); + this.txtIdFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtIdFilter.Name = "txtIdFilter"; + this.txtIdFilter.Size = new System.Drawing.Size(92, 23); + this.txtIdFilter.TabIndex = 652; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(130, 54); + this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(32, 17); + this.label1.TabIndex = 651; + this.label1.Text = "编号"; + // + // cmbCateFilter + // + this.cmbCateFilter.FormattingEnabled = true; + this.cmbCateFilter.Location = new System.Drawing.Point(158, 22); + this.cmbCateFilter.Name = "cmbCateFilter"; + this.cmbCateFilter.Size = new System.Drawing.Size(92, 25); + this.cmbCateFilter.TabIndex = 663; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(130, 26); + this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(32, 17); + this.label2.TabIndex = 662; + this.label2.Text = "类目"; + // + // cmbGroupFilter + // + this.cmbGroupFilter.FormattingEnabled = true; + this.cmbGroupFilter.Location = new System.Drawing.Point(37, 22); + this.cmbGroupFilter.Name = "cmbGroupFilter"; + this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25); + this.cmbGroupFilter.TabIndex = 641; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(8, 25); + this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(32, 17); + this.label20.TabIndex = 570; + this.label20.Text = "分组"; + // + // txtExtCodeFilter + // + this.txtExtCodeFilter.Location = new System.Drawing.Point(37, 51); + this.txtExtCodeFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtExtCodeFilter.Name = "txtExtCodeFilter"; + this.txtExtCodeFilter.Size = new System.Drawing.Size(92, 23); + this.txtExtCodeFilter.TabIndex = 555; + // + // btnClearUpload + // + this.btnClearUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClearUpload.CanvasColor = System.Drawing.SystemColors.Control; + this.btnClearUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClearUpload.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClearUpload.Location = new System.Drawing.Point(226, 105); + this.btnClearUpload.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnClearUpload.Name = "btnClearUpload"; + this.btnClearUpload.Size = new System.Drawing.Size(76, 23); + this.btnClearUpload.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnClearUpload.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnClearUpload.Style.GradientAngle = 90; + this.btnClearUpload.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClearUpload.TabIndex = 548; + this.btnClearUpload.Text = "清空待上传"; + this.btnClearUpload.Click += new System.EventHandler(this.btnClearUpload_Click); + // + // lblWaitToUp + // + this.lblWaitToUp.AutoSize = true; + this.lblWaitToUp.Cursor = System.Windows.Forms.Cursors.Hand; + this.lblWaitToUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblWaitToUp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.lblWaitToUp.Location = new System.Drawing.Point(8, 108); + this.lblWaitToUp.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblWaitToUp.Name = "lblWaitToUp"; + this.lblWaitToUp.Size = new System.Drawing.Size(95, 17); + this.lblWaitToUp.TabIndex = 541; + this.lblWaitToUp.Text = "待上传商品 0 件"; + this.lblWaitToUp.Click += new System.EventHandler(this.lblWaitToUp_Click); + // + // lblGoodsCount + // + this.lblGoodsCount.AutoSize = true; + this.lblGoodsCount.Location = new System.Drawing.Point(155, 81); + this.lblGoodsCount.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblGoodsCount.Name = "lblGoodsCount"; + this.lblGoodsCount.Size = new System.Drawing.Size(131, 17); + this.lblGoodsCount.TabIndex = 537; + this.lblGoodsCount.Text = "产品库中共有 0 件商品"; + this.lblGoodsCount.Click += new System.EventHandler(this.lblGoodsCount_Click); + // + // txtAddCount + // + this.txtAddCount.Location = new System.Drawing.Point(10, 78); + this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtAddCount.Name = "txtAddCount"; + this.txtAddCount.Size = new System.Drawing.Size(47, 23); + this.txtAddCount.TabIndex = 536; + this.txtAddCount.Text = "500"; + // + // panelEx2 + // + this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand; + this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelEx2.Location = new System.Drawing.Point(60, 78); + this.panelEx2.Name = "panelEx2"; + this.panelEx2.Size = new System.Drawing.Size(92, 23); + this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.panelEx2.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.panelEx2.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.panelEx2.Style.ForeColor.Color = System.Drawing.Color.White; + this.panelEx2.Style.GradientAngle = 90; + this.panelEx2.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.panelEx2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.panelEx2.TabIndex = 431; + this.panelEx2.Text = "随机添加商品"; + this.panelEx2.Click += new System.EventHandler(this.btnRandomAdd_Click); + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(8, 54); + this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(32, 17); + this.label16.TabIndex = 560; + this.label16.Text = "货号"; + // + // ucGroupBoxEx1 + // + this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); + this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); + this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; + this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 140); + this.ucGroupBoxEx1.TabIndex = 399; + this.ucGroupBoxEx1.TabStop = false; + this.ucGroupBoxEx1.Text = "基础"; + // + // btnRefreshShop + // + this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRefreshShop.Location = new System.Drawing.Point(17, 31); + this.btnRefreshShop.Name = "btnRefreshShop"; + this.btnRefreshShop.Size = new System.Drawing.Size(110, 24); + this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefreshShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRefreshShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRefreshShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRefreshShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRefreshShop.Style.GradientAngle = 90; + this.btnRefreshShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRefreshShop.TabIndex = 431; + this.btnRefreshShop.Text = "刷新店铺"; + this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.splitContainer2); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); + this.splitContainer3.Size = new System.Drawing.Size(1523, 402); + this.splitContainer3.SplitterDistance = 372; + this.splitContainer3.TabIndex = 1; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.dgvShop); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.txtTest20981); + this.splitContainer2.Panel2.Controls.Add(this.btnTest20981); + this.splitContainer2.Panel2.Controls.Add(this.pbLoading); + this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct); + this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); + this.splitContainer2.Size = new System.Drawing.Size(1523, 372); + this.splitContainer2.SplitterDistance = 300; + this.splitContainer2.TabIndex = 0; + // + // dgvShop + // + this.dgvShop.AllowUserToAddRows = false; + this.dgvShop.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvShop.AutoRowNumber = true; + this.dgvShop.BackgroundColor = System.Drawing.Color.White; + this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colShopLoginName, + this.colShopId, + this.colShopName, + this.colShopNotes, + this.colSelectProduct, + this.colLoginStatus, + this.colCanUse, + this.colRemaining, + this.colMessage}); + this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvShop.Location = new System.Drawing.Point(4, 0); + this.dgvShop.Name = "dgvShop"; + this.dgvShop.ReadOnly = true; + this.dgvShop.RowHeadersWidth = 25; + this.dgvShop.RowTemplate.Height = 23; + this.dgvShop.Size = new System.Drawing.Size(296, 372); + this.dgvShop.TabIndex = 6; + this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); + // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colShopLoginName + // + this.colShopLoginName.HeaderText = "店铺登录名"; + this.colShopLoginName.Name = "colShopLoginName"; + this.colShopLoginName.ReadOnly = true; + this.colShopLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.FillWeight = 150F; + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 70; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "分组"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 70; + // + // colSelectProduct + // + this.colSelectProduct.HeaderText = "选择商品"; + this.colSelectProduct.Name = "colSelectProduct"; + this.colSelectProduct.ReadOnly = true; + this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelectProduct.Visible = false; + this.colSelectProduct.Width = 62; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 40; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colRemaining + // + this.colRemaining.HeaderText = "月限额"; + this.colRemaining.Name = "colRemaining"; + this.colRemaining.ReadOnly = true; + this.colRemaining.Visible = false; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + // + // txtTest20981 + // + this.txtTest20981.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtTest20981.Location = new System.Drawing.Point(996, 30); + this.txtTest20981.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtTest20981.Name = "txtTest20981"; + this.txtTest20981.Size = new System.Drawing.Size(127, 23); + this.txtTest20981.TabIndex = 650; + this.txtTest20981.Visible = false; + // + // btnTest20981 + // + this.btnTest20981.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnTest20981.CanvasColor = System.Drawing.SystemColors.Control; + this.btnTest20981.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnTest20981.DisabledBackColor = System.Drawing.Color.Empty; + this.btnTest20981.Location = new System.Drawing.Point(1127, 30); + this.btnTest20981.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnTest20981.Name = "btnTest20981"; + this.btnTest20981.Size = new System.Drawing.Size(84, 23); + this.btnTest20981.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnTest20981.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnTest20981.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnTest20981.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnTest20981.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnTest20981.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnTest20981.Style.GradientAngle = 90; + this.btnTest20981.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnTest20981.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnTest20981.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnTest20981.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnTest20981.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnTest20981.TabIndex = 649; + this.btnTest20981.Text = "测试20981"; + this.btnTest20981.Visible = false; + // + // pbLoading + // + this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbLoading.Location = new System.Drawing.Point(584, 161); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 188; + this.pbLoading.TabStop = false; + this.pbLoading.Visible = false; + // + // dgvSelectProduct + // + this.dgvSelectProduct.AllowUserToAddRows = false; + this.dgvSelectProduct.AllowUserToDeleteRows = false; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + this.dgvSelectProduct.AutoRowNumber = true; + this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White; + this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colCheck, + this.colSelectId, + this.colSupplierId, + this.colSupplierName, + this.colLogin, + this.colInShop, + this.colSpuId, + this.colSkcId, + this.colImgUrl, + this.colProductSkcPic, + this.colSkuFakeImgUrl, + this.colSkuFakeImg, + this.colProductName, + this.colProductCat, + this.colExtCode, + this.colMsg, + this.colDraftId, + this.colNotes, + this.colUserNotes, + this.ColDelete, + this.colAddTime, + this.colOpResult}); + this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0); + this.dgvSelectProduct.Name = "dgvSelectProduct"; + this.dgvSelectProduct.ReadOnly = true; + this.dgvSelectProduct.RowTemplate.Height = 23; + this.dgvSelectProduct.Size = new System.Drawing.Size(1215, 372); + this.dgvSelectProduct.TabIndex = 187; + this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); + // + // colCheck + // + this.colCheck.Frozen = true; + this.colCheck.HeaderText = "选择"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCheck.Width = 30; + // + // colSelectId + // + this.colSelectId.HeaderText = "认领Id"; + this.colSelectId.Name = "colSelectId"; + this.colSelectId.ReadOnly = true; + this.colSelectId.Visible = false; + // + // colSupplierId + // + this.colSupplierId.Frozen = true; + this.colSupplierId.HeaderText = "店铺Id"; + this.colSupplierId.Name = "colSupplierId"; + this.colSupplierId.ReadOnly = true; + // + // colSupplierName + // + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; + this.colSupplierName.Frozen = true; + this.colSupplierName.HeaderText = "店铺名称"; + this.colSupplierName.Name = "colSupplierName"; + this.colSupplierName.ReadOnly = true; + // + // colLogin + // + this.colLogin.HeaderText = "登录"; + this.colLogin.Name = "colLogin"; + this.colLogin.ReadOnly = true; + this.colLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLogin.Width = 40; + // + // colInShop + // + this.colInShop.HeaderText = "进店"; + this.colInShop.Name = "colInShop"; + this.colInShop.ReadOnly = true; + this.colInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colInShop.Width = 40; + // + // colSpuId + // + this.colSpuId.HeaderText = "源商品ID"; + this.colSpuId.Name = "colSpuId"; + this.colSpuId.ReadOnly = true; + this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colSkcId + // + this.colSkcId.FillWeight = 150F; + this.colSkcId.HeaderText = "商品SKC"; + this.colSkcId.Name = "colSkcId"; + this.colSkcId.ReadOnly = true; + this.colSkcId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSkcId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSkcId.Visible = false; + this.colSkcId.Width = 80; + // + // colImgUrl + // + this.colImgUrl.HeaderText = "图片地址"; + this.colImgUrl.Name = "colImgUrl"; + this.colImgUrl.ReadOnly = true; + this.colImgUrl.Visible = false; + // + // colProductSkcPic + // + this.colProductSkcPic.HeaderText = "图片"; + this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colProductSkcPic.Name = "colProductSkcPic"; + this.colProductSkcPic.ReadOnly = true; + this.colProductSkcPic.Width = 60; + // + // colSkuFakeImgUrl + // + this.colSkuFakeImgUrl.HeaderText = "SKU替换图地址"; + this.colSkuFakeImgUrl.Name = "colSkuFakeImgUrl"; + this.colSkuFakeImgUrl.ReadOnly = true; + this.colSkuFakeImgUrl.Visible = false; + // + // colSkuFakeImg + // + this.colSkuFakeImg.HeaderText = "SKU替换图"; + this.colSkuFakeImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colSkuFakeImg.Name = "colSkuFakeImg"; + this.colSkuFakeImg.ReadOnly = true; + this.colSkuFakeImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSkuFakeImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSkuFakeImg.Visible = false; + this.colSkuFakeImg.Width = 60; + // + // colProductName + // + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; + this.colProductName.HeaderText = "商品标题"; + this.colProductName.Name = "colProductName"; + this.colProductName.ReadOnly = true; + this.colProductName.Width = 150; + // + // colProductCat + // + this.colProductCat.HeaderText = "商品类目"; + this.colProductCat.Name = "colProductCat"; + this.colProductCat.ReadOnly = true; + this.colProductCat.Width = 90; + // + // colExtCode + // + this.colExtCode.HeaderText = "商品货号"; + this.colExtCode.Name = "colExtCode"; + this.colExtCode.ReadOnly = true; + // + // colMsg + // + this.colMsg.HeaderText = "状态"; + this.colMsg.Name = "colMsg"; + this.colMsg.ReadOnly = true; + // + // colDraftId + // + this.colDraftId.HeaderText = "上传商品Id"; + this.colDraftId.Name = "colDraftId"; + this.colDraftId.ReadOnly = true; + this.colDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colDraftId.Width = 80; + // + // colNotes + // + this.colNotes.HeaderText = "上传备注"; + this.colNotes.Name = "colNotes"; + this.colNotes.ReadOnly = true; + this.colNotes.Visible = false; + // + // colUserNotes + // + this.colUserNotes.HeaderText = "重上/已买"; + this.colUserNotes.Name = "colUserNotes"; + this.colUserNotes.ReadOnly = true; + this.colUserNotes.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colUserNotes.Visible = false; + this.colUserNotes.Width = 75; + // + // ColDelete + // + this.ColDelete.HeaderText = "删除"; + this.ColDelete.Name = "ColDelete"; + this.ColDelete.ReadOnly = true; + this.ColDelete.Visible = false; + this.ColDelete.Width = 75; + // + // colAddTime + // + this.colAddTime.FillWeight = 110F; + this.colAddTime.HeaderText = "上传时间"; + this.colAddTime.Name = "colAddTime"; + this.colAddTime.ReadOnly = true; + // + // colOpResult + // + this.colOpResult.HeaderText = "操作结果"; + this.colOpResult.Name = "colOpResult"; + this.colOpResult.ReadOnly = true; + this.colOpResult.Width = 260; + // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.statusBar); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Panel2.Controls.Add(this.panelEx1); + this.splitContainer4.Size = new System.Drawing.Size(1523, 26); + this.splitContainer4.SplitterDistance = 832; + this.splitContainer4.TabIndex = 3; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(832, 26); + this.statusBar.TabIndex = 2; + // + // btnClear + // + this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(475, 2); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // + // panelEx1 + // + this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx1.Location = new System.Drawing.Point(568, 2); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Size = new System.Drawing.Size(115, 21); + this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx1.Style.GradientAngle = 90; + this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.panelEx1.TabIndex = 668; + this.panelEx1.Text = "停止当前操作"; + this.panelEx1.Visible = false; + // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.Location = new System.Drawing.Point(699, 552); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(881, 86); + this.panel1.TabIndex = 189; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); + // + // WXDBProdUploadForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1583, 641); + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.panel1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Name = "WXDBProdUploadForm"; + this.Text = "PDDDBProdUserSelectForm"; + this.Load += new System.EventHandler(this.UserSelectDbProductForm_Load); + this.VisibleChanged += new System.EventHandler(this.UserSelectDbProductForm_VisibleChanged); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ucGroupBoxEx2.ResumeLayout(false); + this.ucGroupBoxEx2.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.fPnlPriceRule.ResumeLayout(false); + this.fPnlPriceRule.PerformLayout(); + this.ucGroupBoxEx4.ResumeLayout(false); + this.ucGroupBoxEx4.PerformLayout(); + this.ucGroupBoxEx1.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.Panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit(); + this.splitContainer4.Panel1.ResumeLayout(false); + this.splitContainer4.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); + this.splitContainer4.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private UserComponent.UcGroupBoxEx ucGroupBoxEx4; + private UserComponent.UcGroupBoxEx ucGroupBoxEx1; + private DevComponents.DotNetBar.PanelEx btnRefreshShop; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.SplitContainer splitContainer2; + private UserComponent.DataGridViewEx dgvShop; + private UserComponent.DataGridViewEx dgvSelectProduct; + private System.Windows.Forms.SplitContainer splitContainer4; + private UserControls.StatusBarUserControl statusBar; + private System.Windows.Forms.PictureBox pbLoading; + private DevComponents.DotNetBar.PanelEx btnUpload; + private System.Windows.Forms.Panel panel1; + private UserComponent.UcGroupBoxEx ucGroupBoxEx2; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.TextBox txtAddMorePrice; + private System.Windows.Forms.TextBox txtAddTimes; + private System.Windows.Forms.TextBox txtStockNum; + private System.Windows.Forms.Label label4; + private DevComponents.DotNetBar.PanelEx btnStop; + private DevComponents.DotNetBar.PanelEx panelEx2; + private System.Windows.Forms.TextBox txtAddCount; + private System.Windows.Forms.Label lblGoodsCount; + private DevComponents.DotNetBar.PanelEx btnClearUpload; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label lblNewAddPrice; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox txtSinglePriceAdd; + private System.Windows.Forms.Label label14; + private UserComponent.UcCheckBox chkStepAddPrice; + private DevComponents.DotNetBar.PanelEx btnClearDgv; + private UserComponent.UcCheckBox chkAddMorePriceFirst; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colSelectProduct; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private System.Windows.Forms.FlowLayoutPanel fPnlPriceRule; + private UcAddPrice ucAddPrice1; + private UcAddPrice ucAddPrice3; + private System.Windows.Forms.Label label10; + private DevComponents.DotNetBar.PanelEx btnClearFilter; + private System.Windows.Forms.TextBox txtExtCodeFilter; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.ComboBox cmbGroupFilter; + private DevComponents.DotNetBar.PanelEx btnClear; + private DevComponents.DotNetBar.PanelEx panelEx1; + private System.Windows.Forms.TextBox txtIdFilter; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox cmbCateFilter; + private System.Windows.Forms.Label label2; + public System.Windows.Forms.Label lblWaitToUp; + private System.Windows.Forms.TextBox txtTest20981; + private DevComponents.DotNetBar.PanelEx btnTest20981; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; + private System.Windows.Forms.DataGridViewLinkColumn colLogin; + private System.Windows.Forms.DataGridViewLinkColumn colInShop; + private System.Windows.Forms.DataGridViewLinkColumn colSpuId; + private System.Windows.Forms.DataGridViewLinkColumn colSkcId; + private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic; + private System.Windows.Forms.DataGridViewTextBoxColumn colSkuFakeImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colSkuFakeImg; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductName; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductCat; + private System.Windows.Forms.DataGridViewTextBoxColumn colExtCode; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + private System.Windows.Forms.DataGridViewTextBoxColumn colDraftId; + private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; + private System.Windows.Forms.DataGridViewLinkColumn colUserNotes; + private System.Windows.Forms.DataGridViewLinkColumn ColDelete; + private System.Windows.Forms.DataGridViewTextBoxColumn colAddTime; + private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox txtWaitSeconds; + private System.Windows.Forms.Label label6; + } +} \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs new file mode 100644 index 0000000..f935b02 --- /dev/null +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -0,0 +1,1328 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.Extension; +using TemuKJD.BaseForms; +using TemuKJD.ToolForms; +using Work; +using TemuKJD.BLL; +using System.Text.RegularExpressions; +using TemuKJD.PDDForms.ProductSelectForms; +using TemuKJD.WXForms.ShopForms; +using AllBase.Model.Result.PDDResult; +using AllBase.Model.Param.WXParam; +using AllBase.Model.Result.WXResult; + +namespace TemuKJD.WXForms.ProductForms +{ + public partial class WXDBProdUploadForm : BaseForm + { + public CancellationTokenSource cancellationTokenSource { get; set; } = null; + public bool IsLoadComplate { get; set; } = false; + + bool isInit = false; + bool isStepAddPrice = false; + CheckBox chkSelectAll = null; + Dictionary dicShopGetCount = new Dictionary(); + Dictionary> dicNotSupportCate = new Dictionary>(); + public NaiBa.Util.ConcurrentList lstTemuDBProductSelect = new NaiBa.Util.ConcurrentList(); + NaiBa.Util.ConcurrentList lstAddPriceRule = new NaiBa.Util.ConcurrentList(); + AddPriceRule defaultAddPriceRule = null; + WXUploadRule wxUploadRule = null; + public WXDBProdUploadForm() + { + InitializeComponent(); + } + + private void UserSelectDbProductForm_Load(object sender, EventArgs e) + { + this.splitContainer1.Dock = DockStyle.Fill; + this.panel1.Location = new Point(40, 30); + this.panel1.Width = this.Width - 80; + this.panel1.Height = this.Height - 60; + this.panel1.SendToBack(); + + lstTemuDBProductSelect = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("wx_db_prod_upload_list"); + if (lstTemuDBProductSelect == null) + lstTemuDBProductSelect = new NaiBa.Util.ConcurrentList(); + + lstAddPriceRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("wx_add_price_rules"); + if (lstAddPriceRule == null) + { + lstAddPriceRule = new NaiBa.Util.ConcurrentList(); + lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 0, LessThanPrice = 10, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 }); + lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 10, LessThanPrice = 20, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 }); + lstAddPriceRule.Add(new AddPriceRule() { MoreThanPrice = 20, LessThanPrice = 999, AddPriceTimes = 2, AddMorePrice = 5, SinglePriceAdd = 1 }); + } + this.fPnlPriceRule.Controls.Clear(); + foreach (var priceItem in lstAddPriceRule) + { + var ucPrice = new UcAddPrice() + { + PriceEnd = priceItem.LessThanPrice, + PriceStart = priceItem.MoreThanPrice, + PriceAddTimes = priceItem.AddPriceTimes, + PriceAddMore = priceItem.AddMorePrice, + SinglePriceAdd = priceItem.SinglePriceAdd, + }; + if (IsSetFontScaleNone) + { + Font of = ucPrice.Font; + Font nf = new Font(of.FontFamily, (of.Size * 96.0 / FormDpi).ParseToFloat(), of.Style, of.Unit, of.GdiCharSet, of.Bold); + ucPrice.Font = nf; + } + + this.fPnlPriceRule.Controls.Add(ucPrice); + ucPrice.PriceChange += ucAddPrice_PriceChange; + } + + defaultAddPriceRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig("wx_default_add_price_rule"); + if (defaultAddPriceRule == null) + { + defaultAddPriceRule = new AddPriceRule() { AddPriceTimes = 1.3m, AddMorePrice = 1, SinglePriceAdd = 1 }; + } + this.txtAddTimes.Text = defaultAddPriceRule.AddPriceTimes.ToString(); + this.txtAddMorePrice.Text = defaultAddPriceRule.AddMorePrice.ToString(); + this.txtSinglePriceAdd.Text = defaultAddPriceRule.SinglePriceAdd.ToString(); + this.txtStockNum.Text = defaultAddPriceRule.StockNum.ToString(); + this.chkAddMorePriceFirst.Checked = defaultAddPriceRule.AddMorePriceFirst; + + wxUploadRule = NaiBa.Util.Helper.ConfigHelper.LoadConfig("wx_upload_rule"); + if (wxUploadRule == null) + wxUploadRule = new WXUploadRule(); + + + this.lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + + int prodCount = 0; + var list = GetRandomProductList(out prodCount, 1, 1); + lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品"; + + this.panel1.SendToBack(); + chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false); + dgvShop.Columns["colSelect"].HeaderText = ""; + //chkSelectAll.Width = chkSelectAll.Height = 13; + chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; + chkSelectAll.Checked = true; + + this.dgvSelectProduct.AddSelectorColumn("colCheck"); + + dgvSelectProduct.AddImgColumn("colProductSkcPic", "colImgUrl"); + dgvSelectProduct.AddImgColumn("colSkuFakeImg", "colSkuFakeImgUrl"); + + dgvSelectProduct.Columns["colSkuFakeImg"].Visible = false; + +// if (BaseClass.SaLevel == 1) +// { +// dgvSelectProduct.Columns["colSkuFakeImg"].Visible = true; +// } +//#if DEBUG +// dgvSelectProduct.Columns["colSkuFakeImg"].Visible = true; +//#endif + + IsLoadComplate = true; + } + + private void chkSelectAll_CheckedChanged(object sender, EventArgs e) + { + if (!chkSelectAll.Checked) + { + foreach (DataGridViewRow row in dgvShop.Rows) + { + row.Cells["colSelect"].Value = false; + } + } + else + { + //var list = GlobalConfig.ShopLoginList.Where(s => s.LoginStatus == "登录成功").Select(ss => ss.ShopId); + foreach (DataGridViewRow row in dgvShop.Rows) + { + //if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString())) + row.Cells["colSelect"].Value = true; + } + } + } + + private void btnRefreshShop_Click(object sender, EventArgs e) + { + RefreshShop(); + RefreshDbProd(); + } + + private void UserSelectDbProductForm_VisibleChanged(object sender, EventArgs e) + { + if (Visible == true) + { + RefreshShop(); + RefreshDbProd(); + + isInit = true; + } + } + + private void RefreshDbProd() + { + Task.Run(() => + { + PDDDBProdListForm.GetPDDProductGroup(cmbGroupFilter); // 同时刷新下商品分组 + + GetPddProductCate(); + }); + } + + /// + /// 获取商品所有类目 + /// + void GetPddProductCate() + { + var url = BaseClass.BuildObjString("product/get_pdd_product_cates"); + var data = UserLogin.GetSignaturex(); + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + //BaseMsgForm.ShowError("商品分组获取失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg")); + } + else + { + Invoke(new Action(() => + { + cmbCateFilter.Items.Clear(); + var groups = BaseRegex.GetStringJson(ref html, "data"); + foreach (var item in groups.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) + { + cmbCateFilter.Items.Add(item); + } + cmbCateFilter.Items.Add(""); + })); + } + } + + private void RefreshShop() + { + // 店铺Id + var selectIds = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + // 获取被删除的店铺 + List dgvRowList = dgvShop.Rows.Cast().Where(row + => !GlobalConfig.ShopLoginList.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList(); + // 更新被删除的店铺列表 + foreach (var row in dgvRowList) + { + dgvShop.Rows.Remove(row); + } + // 绑定其他店铺(含新导入的店铺) + foreach (ShopLoginInfo shopEntity in GlobalConfig.ShopLoginList) + { + if (!string.IsNullOrEmpty(shopEntity.ShopId)) + BindShop(shopEntity, selectIds); + } + } + + private void BindShop(ShopLoginInfo shopEntity, List selectShopId = null) + { + if (shopEntity == null) + return; + if (selectShopId == null) + selectShopId = new List(); + + bool canUse = shopEntity.LoginStatus == "登录成功"; + //canUse = true; // 内部库不需要校验登录状态 + var row = dgvShop.Rows.Cast().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId); + if (row == null) + { + this.dgvShop.Rows.Add( + !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse), + shopEntity.LoginName, + shopEntity.ShopId, + shopEntity.ShopAccount, + shopEntity.Notes, + "选择商品", + canUse ? "在线" : "掉线", + canUse, + shopEntity.AddProductRemaining, + string.Empty + ); + } + else + { + row.Cells["colSelect"].Value = !isInit || (selectShopId.Contains(shopEntity.ShopId) && canUse); + row.Cells["colShopLoginName"].Value = shopEntity.LoginName; + row.Cells["colShopName"].Value = shopEntity.ShopAccount; + row.Cells["colShopNotes"].Value = shopEntity.Notes; + row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; + row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + row.Cells["colCanUse"].Value = canUse; + row.Cells["colRemaining"].Value = shopEntity.AddProductRemaining; + } + } + + private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; + string columnName = dgvShop.Columns[e.ColumnIndex].Name; + string shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); + string shopAccount = dgvShop.Rows[e.RowIndex].Cells["colShopName"].Value.ToString(); + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString()); + var row = dgvShop.Rows[e.RowIndex]; + switch (columnName) + { + case "colSelect": + //if (row.Cells["colCanUse"].Value.ParseToBool()) + { + row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool(); + + chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged; + if (dgvShop.Rows.Cast().All(r => r.Cells["colSelect"].Value.ParseToBool())) + chkSelectAll.Checked = true; + else + chkSelectAll.Checked = false; + chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; + } + //else + { + //BaseMsgForm.ShowInfo("店铺未登录!"); + } + break; + case "colLoginStatus": + if (WXShopListForm.Instance == null) + WXShopListForm.Instance = new WXShopListForm(); + WXShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop); + //shopLoginForm.prodUserSelectForm = this; + if (shop.LoginStatus != "登录成功") + { + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + RefreshShop(); + } + else + { + shopLoginForm.openType = EnumOpenType.manage; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.Show(); + } + break; + } + } + + private void btnSearch_Click(object sender, EventArgs e) + { + var lstShopId = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + if (lstShopId.Count == 0) + { + BaseMsgForm.ShowInfo("请选择店铺!"); + return; + } + } + + private void dgvSelectProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvSelectProduct.Columns[e.ColumnIndex].HeaderText; + var dbId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSelectId"].Value.ParseToString(); + var dbProduct = lstTemuDBProductSelect.FirstOrDefault(p => p.id.ToString() == dbId); + var shopId = dgvSelectProduct.Rows[e.RowIndex].Cells["colSupplierId"].Value.ParseToString(); + var draftId = dgvSelectProduct.Rows[e.RowIndex].Cells["colDraftId"].Value.ParseToString(); + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId); + + switch (headerText) + { + case "删除": + break; + case "登录": + { + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop); + //shopLoginForm.prodUserSelectForm = this; + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + RefreshShop(); + } + break; + case "进店": + { + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop); + //shopLoginForm.prodUserSelectForm = this; + shopLoginForm.openType = EnumOpenType.manage; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home"; + shopLoginForm.Show(); + } + break; + case "上传商品Id": + //if (!string.IsNullOrEmpty(draftId) && shop != null) + //{ + // ShopLoginForm shopLoginForm = new ShopLoginForm(shop); + // shopLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" + + // draftId + "&from=productDraftList"; + // shopLoginForm.openType = EnumOpenType.manage; + // shopLoginForm.WindowState = FormWindowState.Maximized; + // shopLoginForm.ShowDialog(); + //} + break; + case "图片": + { + ShowImgForm imgFrom = new ShowImgForm(dgvSelectProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString()); + imgFrom.ShowDialog(); + break; + } + case "SKU替换图": + { + ShowImgForm imgFrom = new ShowImgForm(dgvSelectProduct.Rows[e.RowIndex].Cells["colSkuFakeImgUrl"].Value.ParseToString()); + imgFrom.ShowDialog(); + break; + } + case "": + dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvSelectProduct.Rows[e.RowIndex].Cells["colCheck"].Value; + break; + default: + break; + } + } + + private void btnUpload_Click(object sender, EventArgs e) + { + var shopIdLst = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + if (shopIdLst.Count <= 0) + { + BaseMsgForm.ShowError("未勾选上传店铺!"); + return; + } + + if (lstTemuDBProductSelect.Count() > 0) + { + if (WXShopLoginForm.shopLoginInstance != null && WXShopLoginForm.shopLoginInstance.IsDisposed != true) + WXShopLoginForm.shopLoginInstance.Dispose(); + + this.btnUpload.Enabled = false; + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + AddProductArr(shopIdLst); + Invoke(new Action(() => + { + this.btnUpload.Enabled = true; + })); + }, cancellationTokenSource.Token); + } + else + { + BaseMsgForm.ShowError("请选择要上传的商品!"); + } + } + + void AddProductArr(List shopIdLst) + { + Invoke(new Action(() => + { + this.pbLoading.Visible = true; + this.statusBar.lblTaskStatus.Text = "正在上传" + "...".Substring(0, DateTime.Now.Second % 4); + this.statusBar.pgbTaskProgress.Maximum = lstTemuDBProductSelect.Count; + this.statusBar.UpdateProgressBar(0); + })); + + NaiBa.Util.ConcurrentList currentShopList = new NaiBa.Util.ConcurrentList(); + while (lstTemuDBProductSelect.Count > 0) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + Invoke(new Action(() => + { + shopIdLst = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + })); + while (shopIdLst.Count <= 0) + { + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "请至少勾选一个店铺"; + shopIdLst = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + })); + Thread.Sleep(1000); + if (cancellationTokenSource.IsCancellationRequested) + break; + } + var randomShopLst = new NaiBa.Util.ConcurrentList(); + randomShopLst.AddRange(GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId) && s.LoginStatus == "登录成功")); + while (randomShopLst.Count <= 0) + { + Thread.Sleep(1000); + Invoke(new Action(() => + { + shopIdLst = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + })); + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "所有店铺都已掉线,请登录店铺"; + randomShopLst.Clear(); + randomShopLst.AddRange(GlobalConfig.ShopLoginList.Where(s => shopIdLst.Contains(s.ShopId) && s.LoginStatus == "登录成功")); + })); + if (cancellationTokenSource.IsCancellationRequested) + break; + } + if (cancellationTokenSource.IsCancellationRequested) + break; + var randomShop = randomShopLst[Randomx.GetId(randomShopLst.Count)]; + while (currentShopList.Count >= 5) // 最多5店同传 + { + Thread.Sleep(100); + } + if (cancellationTokenSource.IsCancellationRequested) + break; + + while (currentShopList.Any(s => s.ShopId == randomShop.ShopId)) + { + Thread.Sleep(500); + randomShop = randomShopLst[Randomx.GetId(randomShopLst.Count)]; + } + currentShopList.Add(randomShop); + if (cancellationTokenSource.IsCancellationRequested) + break; + + if (lstTemuDBProductSelect.Count <= 0) + { + currentShopList.Remove(randomShop); + break; + } + var prod = lstTemuDBProductSelect[0]; + if (randomShop != null) + { + prod.shop_id = randomShop.ShopId; + prod.shop_account = randomShop.ShopAccount = randomShop.ShopAccount; + } + else + { + currentShopList.Remove(randomShop); + continue; + } + if (cancellationTokenSource.IsCancellationRequested) + break; + + lstTemuDBProductSelect.RemoveAt(0); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_db_prod_upload_list", this.lstTemuDBProductSelect); + Invoke(new Action(() => + { + lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + })); + + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在上传" + "...".Substring(0, DateTime.Now.Second % 4); + this.statusBar.pgbTaskProgress.Maximum = lstTemuDBProductSelect.Count + this.statusBar.pgbTaskProgress.Value + 1; + this.statusBar.UpdateProgressBar(this.statusBar.pgbTaskProgress.Value + 1); + })); + + if (prod == null) + { + Invoke(new Action(() => + { + BaseMsgForm.ShowError("商品为空,将为您跳过该商品!"); + })); + currentShopList.Remove(randomShop); + continue; + } + + Invoke(new Action(() => + { + int rowIndex = 0; + this.dgvSelectProduct.Rows.Insert(rowIndex, + true, + prod.id, + prod.shop_id, + prod.shop_account, + "登录", + "进店", + prod.spu_id, + prod.skc_id, + prod.main_img, + null, + "", + null, + prod.product_name, // 用户端显示商品原名 + prod.cat_name, + prod.ext_code, + prod.status, + prod.draft_id, + prod.notes, + (prod.user_notes + " 编辑").Trim(), + "删除", + "", + ""); + + dgvSelectProduct.Rows[rowIndex].Height = 60; + + int maxRowCount = 10000; + while (dgvSelectProduct.Rows.Count > maxRowCount) + { + dgvSelectProduct.Rows.RemoveAt(maxRowCount); + } + })); + + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + })); + + Task.Run(() => + { + DateTime startTime = DateTime.Now; + for (int j = 0; j < 1; j++) + { + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == prod.shop_id); + if (shop == null) + continue; + + var row = dgvSelectProduct.Rows.Cast().FirstOrDefault(r => + r.Cells["colSelectId"]?.Value.ToString() == prod.id.ToString()); + double duration = 0; + if (row == null) + { + Invoke(new Action(() => + { + BaseMsgForm.ShowError("商品已被清除,将为您跳过该商品!"); + })); + continue; + } + + KJDDBProduct kjdDbProd = prod.kjdDbProduct; + if (kjdDbProd == null) + kjdDbProd = GetProductDetail(prod.out_product_Id.ToString()); + if (kjdDbProd == null || kjdDbProd.id == 0) + { + if (kjdDbProd?.id == 0) + { + prod.status = "已清除"; + } + + Invoke(new Action(() => + { + if (row.Index >= 0) + { + row.Cells["colOpResult"].Value = "选品数据库商品已被清除"; + if (kjdDbProd?.id == 0) + row.Cells["colStatus"].Value = "已清除"; + } + })); + continue; + } + + var result = ""; + try + { + WXShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + if (shop.LoginStatus != "登录成功") + { + Invoke(new Action(() => + { + if (row.Index >= 0) + { + row.Cells["colOpResult"].Value = "店铺掉线"; + } + })); + continue; + } + + if (cancellationTokenSource.IsCancellationRequested) + break; + + //将商品上传 + result = UploadProduct(shop, kjdDbProd, prod, row.Cells["colOpResult"], startTime); + + Invoke(new Action(() => + { + row.Cells["colSkuFakeImgUrl"].Value = kjdDbProd.sku_img_replace_url; + if (row.Displayed) + { + string getImgError = ""; + Image img = GetHtml.GetUrlImg(kjdDbProd.sku_img_replace_url.Replace("https://", "http://"), out getImgError); + if (string.IsNullOrEmpty(getImgError)) + row.Cells["colSkuFakeImg"].Value = img; + } + })); + + if (!result.Contains("success")) + { + WXShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + } + } + catch (Exception ex) + { + result = "{\"success\":false,\"status\":\"未上传\",\"errMsg\":\"" + ex.Message + "\"}"; + } + Thread.Sleep(Randomx.GetId(200, 300)); + + var timeSpan = DateTime.Now - startTime; + duration = timeSpan.TotalSeconds; + + var error = BaseRegex.GetStringJson(ref result, "errMsg"); + if (!result.Contains("\"success\":true") && !result.Contains("上传成功")) + { + if (string.IsNullOrWhiteSpace(error)) + error = result; + Invoke(new Action(() => + { + if (row.Index >= 0) + { + row.Cells["colOpResult"].Value = error + " " + duration.ParseToInt() + "秒"; + } + })); + goto UploadEnd; + } + prod.status = BaseRegex.GetStringJson(ref result, "status"); + if (string.IsNullOrWhiteSpace(prod.status)) + prod.status = "待上传"; + var productDraftId = BaseRegex.GetStringJson(ref result, "draftId"); + + Invoke(new Action(() => + { + if (row.Index >= 0) + { + row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id + row.Cells["colAddTime"].Value = DateTime.Now.ToString("yy-MM-dd HH:mm:ss"); + row.Cells["colOpResult"].Value = (prod.status == "已上传" ? "已成功上传" : "已上传 发生错误:") + (" " + error).TrimEnd(' ') + " " + duration.ParseToInt() + "秒"; + row.Cells["colMsg"].Value = prod.status; + } + })); + + UploadEnd:; + //额外等待时间(无论失败与否) + var waitTime = 0; + Invoke(new Action(() => { waitTime = txtWaitSeconds.Text.Trim().ParseToInt(); })); + if (waitTime > 0) + Thread.Sleep(Randomx.GetId(waitTime * 1000, (waitTime + 10) * 1000)); + } + currentShopList.Remove(randomShop); + }); + } + + for (int i = 0; i < 200 && currentShopList.Count > 0; i++) + { + Thread.Sleep(1000); + if (cancellationTokenSource.IsCancellationRequested) + break; + } + Invoke(new Action(() => + { + if (cancellationTokenSource.IsCancellationRequested) + BaseMsgForm.ShowInfo("上传停止!"); + else + BaseMsgForm.ShowInfo("上传完成!"); + })); + + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + if (cancellationTokenSource.IsCancellationRequested) + this.statusBar.lblTaskStatus.Text = "上传停止"; + else + this.statusBar.lblTaskStatus.Text = "上传完成"; + //this.statusBar.UpdateProgressBar(lstTemuDBProductSelect.Count); + })); + } + + public static KJDDBProduct GetProductDetail(string prodDbId) + { + if (string.IsNullOrEmpty(prodDbId)) + return new KJDDBProduct(); + + List list = new List(); + + var url = BaseClass.BuildObjString("product/get_pdd_product_detail_list"); + var data = ""; + + data = UserLogin.GetSignaturex() + "&search_db_ids=" + prodDbId; + + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + return null; + } + + var jArr = JObject.Parse(html)["data"]; + if (jArr.Count() == 0) + return null; + var sProd = JsonHelper.SerializeObject(jArr); + + try + { + list = JsonHelper.DeserializeJsonToList(sProd); + var item = list.FirstOrDefault(); + if (item == null) + item = new KJDDBProduct(); + return item; + } + catch (Exception ex) + { + return null; + } + } + + string UploadProduct(ShopLoginInfo shop, KJDDBProduct dbProd, TemuDBProductSelect selectProd, DataGridViewCell cell, DateTime startTime) + { + Thread.Sleep(Randomx.GetId(300, 2000)); + if (shop == null || string.IsNullOrEmpty(shop.ShopId) || shop.LoginStatus != "登录成功") + { + return "店铺为空或未登录!"; + } + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在初始化上传"; + })); + } + + var prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); + prodInfo.detail.galleries.RemoveAll(g => g.type == 6); // 视频暂时移除,以后再视情况加上 + + if ((prodInfo?.detail?.galleries?.Where(g => g.type == 1).Count()).ParseToInt() < 3) + { + Invoke(new Action(() => + { + cell.Value = "主图数量少于三张"; + })); + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"msg\":\"主图数量少于三张\"}"; + } + + // 生成初始化上传商品对象 + var upProdInitParam = new WXUploadProductInitParam(); + // 生成上传商品对象 + var upProdParam = new WXUploadProductParam(); + + upProdInitParam.product.info.title = prodInfo.detail.goods_name; + upProdParam.product.info.title = prodInfo.detail.goods_name; + upProdParam.sessionInfo.sessionId = upProdInitParam.product.sessionId; + + int imgId = 0; + string tempImgPath = Path.GetTempPath() + "\\"; + string folderLetters = "abcdefghijklmnopqrstuvwxyz1234567890"; + for (int i = 0; i < 8; i++) + { + tempImgPath += folderLetters[Randomx.GetId(folderLetters.Length)]; + } + List tempImgFullPathLst = new List(); + + foreach (var gallery_item in prodInfo.detail.galleries.Where(g => g.type == 1).Take(9)) // 9张主图 + { + var upImgAuthRst = WXUpload.getUploadTempImgAuth(shop); + if (!upImgAuthRst.Contains("\"code\":0")) + { + var error = BaseRegex.GetStringJson(ref upImgAuthRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = upImgAuthRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + error + "\"}"; + } + string disK = BaseRegex.GetStringJson(ref upImgAuthRst, "disK"); + long disT = BaseRegex.GetLongJson(ref upImgAuthRst, "disT"); + string ext = BaseRegex.GetStringJson(ref upImgAuthRst, "ext"); + string imgBase64 = ""; + + //------------------------------------------------------------------------------------------------------------------------------------- + //生成主图base64字符串 + string getImgError; + var image = GetHtml.GetUrlImg(gallery_item.url.Replace("https://", "http://"), out getImgError); + var imageBg = new Bitmap(800, 800); + if (!string.IsNullOrEmpty(getImgError) || image == null) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"初始化主图上传失败\"}"; + } + try + { + using (Graphics g = Graphics.FromImage(imageBg)) + { + g.DrawImage(image, new Rectangle(0, 0, imageBg.Width, imageBg.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); + } + + if (imgId < 3) + { + imgId++; + if (!Directory.Exists(tempImgPath)) + Directory.CreateDirectory(tempImgPath); + string imgFullPath = tempImgPath + "\\图片" + imgId + ".jpg"; + tempImgFullPathLst.Add(imgFullPath); + if (imgId == 1) + image.Save(imgFullPath, System.Drawing.Imaging.ImageFormat.Jpeg); + else + { + // 只需要传一张真实图像即可 + int fileSize = Randomx.GetId(1024, 10240); + using (BinaryWriter writer = new BinaryWriter(File.Create(imgFullPath))) + { + for (int i = 0; i < fileSize; i++) + { + writer.Write((byte)Randomx.GetId(256)); // 生成0到255之间的随机字节 + } + } + } + } + + using (MemoryStream memoryStream = new MemoryStream()) + { + imageBg.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Jpeg); + byte[] imageBytes = memoryStream.ToArray(); + imgBase64 = Convert.ToBase64String(imageBytes); + } + } + catch (Exception ex) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + "修改sku图片失败 " + ex.Message + "\"}"; + } + + //------------------------------------------------------------------------------------------------------------------------------------- + //上传主图获取路径 + var upImgRst = WXUpload.adtimageupload(shop, imgBase64, disK, disT, ext).ParseToString(); + var location = BaseRegex.GetStringJson(ref upImgRst, "Location"); + if (string.IsNullOrEmpty(location)) + { + var error = BaseRegex.GetStringJson(ref upImgAuthRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = upImgAuthRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"主图上传失败 " + error + "\"}"; + } + upProdInitParam.product.info.headImg.Add(location); + upProdParam.product.info.headImg.Add(location); + Thread.Sleep(Randomx.GetId(10, 50)); + } + + //{"code":0,"predInfo":{"firstCatRes":[{"catId":10000111,"catName":"服饰内衣","level":1},{"catId":10000111,"catName":"服饰内衣","level":1},{"catId":10000111,"catName":"服饰内衣","level":1}],"secondCatRes":[{"catId":10000113,"catName":"女装","level":2},{"catId":10000113,"catName":"女装","level":2},{"catId":10000113,"catName":"女装","level":2}],"thirdCatRes":[{"catId":547705,"catName":"牛仔裤","level":3,"modelVersion":""},{"catId":547704,"catName":"加绒裤","level":3,"modelVersion":"商品标题含'加绒加厚、保暖'等关键词,这表示裤子具备加绒保暖功能。主图展示了加绒内衬,也符合【服饰内衣:女装:裤子:加绒裤】类目特征。"},{"catId":547701,"catName":"休闲裤","level":3,"modelVersion":""}],"singleSecondCatRes":[],"singleFirstCatRes":[],"isSupportedCate":1},"aiCategoryList":[{"id":547705,"paths":[{"id":"10000111","name":"服饰内衣","sonIdList":["10000397","10000115","10000112","10000113","10000114"],"fId":"0","level":1,"leaf":false},{"id":"10000113","name":"女装","sonIdList":["546810","546811","530041","547706","6090","6089","6088","6087","6083","6076","6073","6070","6065","6063","6058","10000672","10000671","10000670","10000669","10000668","10000667","10000666","10000665","10000664","10000663","10000662","10000661","10000660","10000659","10000658","10000657","10000656","10000655"],"fId":"10000111","level":2,"leaf":false},{"id":"10000672","name":"裤子","sonIdList":["547699","547700","547701","547702","547703","547704","547705"],"fId":"10000113","level":3,"leaf":false},{"id":"547705","name":"牛仔裤","fId":"10000672","level":4,"leaf":true,"state":0,"hasTrialCategory":false,"isTrialCategory":false,"isLocalLife":false}],"depositAmount":0,"catAuth":true,"limitSubjectTypes":[]},{"id":547704,"paths":[{"id":"10000111","name":"服饰内衣","sonIdList":["10000397","10000115","10000112","10000113","10000114"],"fId":"0","level":1,"leaf":false},{"id":"10000113","name":"女装","sonIdList":["546810","546811","530041","547706","6090","6089","6088","6087","6083","6076","6073","6070","6065","6063","6058","10000672","10000671","10000670","10000669","10000668","10000667","10000666","10000665","10000664","10000663","10000662","10000661","10000660","10000659","10000658","10000657","10000656","10000655"],"fId":"10000111","level":2,"leaf":false},{"id":"10000672","name":"裤子","sonIdList":["547699","547700","547701","547702","547703","547704","547705"],"fId":"10000113","level":3,"leaf":false},{"id":"547704","name":"加绒裤","fId":"10000672","level":4,"leaf":true,"state":0,"hasTrialCategory":false,"isTrialCategory":false,"isLocalLife":false}],"depositAmount":0,"catAuth":true,"limitSubjectTypes":[]},{"id":547701,"paths":[{"id":"10000111","name":"服饰内衣","sonIdList":["10000397","10000115","10000112","10000113","10000114"],"fId":"0","level":1,"leaf":false},{"id":"10000113","name":"女装","sonIdList":["546810","546811","530041","547706","6090","6089","6088","6087","6083","6076","6073","6070","6065","6063","6058","10000672","10000671","10000670","10000669","10000668","10000667","10000666","10000665","10000664","10000663","10000662","10000661","10000660","10000659","10000658","10000657","10000656","10000655"],"fId":"10000111","level":2,"leaf":false},{"id":"10000672","name":"裤子","sonIdList":["547699","547700","547701","547702","547703","547704","547705"],"fId":"10000113","level":3,"leaf":false},{"id":"547701","name":"休闲裤","fId":"10000672","level":4,"leaf":true,"state":0,"hasTrialCategory":false,"isTrialCategory":false,"isLocalLife":false}],"depositAmount":0,"catAuth":true,"limitSubjectTypes":[]}],"version":"ProductClsRAG","noQualificationCatIds":[547705,547704,547701],"depositCatInfos":[{"catId":547705,"amountToPay":0,"error":false},{"catId":547704,"amountToPay":0,"error":false},{"catId":547701,"amountToPay":0,"error":false}],"visionCallMethod":"ProductClsRAG"} + var productClassifyRst = WXUpload.getProductClassify(shop, upProdInitParam.product.info.title, tempImgFullPathLst); + if (!productClassifyRst.Contains("\"code\":0")) + { + var error = BaseRegex.GetStringJson(ref productClassifyRst, "msg"); + if (string.IsNullOrEmpty(error)) + error = productClassifyRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + error + "\"}"; + } + WXGetProdCateInfo cateInfo = new WXGetProdCateInfo(); + try + { + cateInfo = JsonHelper.DeserializeJsonToObject(productClassifyRst); + } + catch (Exception ex) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"" + "根据图片获取类目失败 " + ex.Message + "\"}"; + } + + + if (cell != null) + { + Invoke(new Action(() => + { + cell.Value = "正在提交商品"; + })); + } + Thread.Sleep(2000); + if (cell != null) + { + Invoke(new Action(() => + { + var timeSpan = DateTime.Now - startTime; + var duration = timeSpan.TotalSeconds; + cell.Value = "商品已上传" + " " + duration.ParseToInt() + "秒"; + })); + } + + return "{\"success\":true,\"draftId\":" + "1000000000000000000000" + ",\"status\":\"已上传\",\"msg\":\"上传成功\"}"; + } + + + + + + + + + + + + + + + + + private void panel1_Paint(object sender, PaintEventArgs e) + { + + } + + private void btnStop_Click(object sender, EventArgs e) + { + if (this.cancellationTokenSource != null) + this.cancellationTokenSource.Cancel(); + } + + private void btnRandomAdd_Click(object sender, EventArgs e) + { + int addCount = txtAddCount.Text.Trim().ParseToInt(); + Task.Run(() => + { + while (addCount > 0) + { + int prodCount = 0; + var list = GetRandomProductList(out prodCount, 1, 50); + if (list.Count == 0) // 等于0要么库里没数据要么出错了,跳出 + break; + Invoke(new Action(() => + { + lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品"; + })); + Thread.Sleep(Randomx.GetId(50,100)); + foreach (var prod in list) + { + var selectProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prod)); + selectProd.out_product_Id = prod.id.ToString(); + selectProd.id = 1; + if(lstTemuDBProductSelect.Count > 0) + selectProd.id = lstTemuDBProductSelect.Max(p => p.id) + 1; + this.lstTemuDBProductSelect.Add(selectProd); + + Invoke(new Action(() => + { + lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + })); + addCount--; + if (addCount <= 0) + break; + } + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_db_prod_upload_list", this.lstTemuDBProductSelect); + } + }); + } + + public List GetRandomProductList(out int totalCount, int page = 1, int pageSize = 50) + { + var lstShopId = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + + List list = new List(); + int pageCount = 1; + totalCount = 0; + + var url = BaseClass.BuildObjString("product/get_pdd_product_list_random"); + var data = ""; + Invoke(new Action(() => + { + data = UserLogin.GetSignaturex() + + "&page=" + 1 + + "&page_size=" + pageSize; + data += "&in_ext_codes=" + txtExtCodeFilter.Text; + data += "&in_skc_ids=" + txtIdFilter.Text; + data += "&in_groups=" + cmbGroupFilter.Text; + data += "&in_cates=" + cmbCateFilter.Text; + })); + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + Invoke(new Action(() => + { + BaseMsgForm.ShowError("获取商品失败,请重试!" + BaseRegex.GetStringJson(ref html, "msg")); + })); + return new List(); + } + + int count = BaseRegex.GetIntJson(ref html, "count"); + totalCount = count; + pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); + pageCount = Math.Max(pageCount, 1); + + var jArr = JObject.Parse(html)["data"]; + if (jArr.Count() == 0) + return list; + var sProd = JsonHelper.SerializeObject(jArr); + + try + { + list = JsonHelper.DeserializeJsonToList(sProd); + return list; + } + catch (Exception ex) + { + return new List(); + } + } + + private void btnClearUpload_Click(object sender, EventArgs e) + { + if (BaseMsgForm.ShowConfirm("确定清空待上传商品吗?清空后不可恢复!").DialogResult == DialogResult.Cancel) + return; + + this.lstTemuDBProductSelect.Clear(); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_db_prod_upload_list", this.lstTemuDBProductSelect); + lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + } + + private void lblNewAddPrice_Click(object sender, EventArgs e) + { + var ucPrice = new UcAddPrice(); + if (IsSetFontScaleNone) + { + Font of = ucPrice.Font; + Font nf = new Font(of.FontFamily, (of.Size * 96.0 / FormDpi).ParseToFloat(), of.Style, of.Unit, of.GdiCharSet, of.Bold); + ucPrice.Font = nf; + } + ucPrice.PriceChange += ucAddPrice_PriceChange; + this.fPnlPriceRule.Controls.Add(ucPrice); + } + + private void ucAddPrice_PriceChange(object obj) + { + List priceRuleLst = new List(); + foreach (var ucItem in fPnlPriceRule.Controls) + { + var ucPrice = ucItem as UcAddPrice; + if (ucPrice != null) + { + priceRuleLst.Add(new AddPriceRule() + { + AddMorePrice = ucPrice.PriceAddMore, + AddPriceTimes = ucPrice.PriceAddTimes, + LessThanPrice = ucPrice.PriceEnd, + MoreThanPrice = ucPrice.PriceStart, + SinglePriceAdd = ucPrice.SinglePriceAdd, + }); + } + } + this.lstAddPriceRule.Clear(); + this.lstAddPriceRule.AddRange(priceRuleLst); + + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_add_price_rules", lstAddPriceRule); + } + + private void txtAddPrice_TextChanged(object sender, EventArgs e) + { + if (IsLoadComplate) + { + defaultAddPriceRule.AddPriceTimes = txtAddTimes.Text.Trim().ParseToDecimal(); + defaultAddPriceRule.AddMorePrice = txtAddMorePrice.Text.Trim().ParseToDecimal(); + defaultAddPriceRule.SinglePriceAdd = txtSinglePriceAdd.Text.Trim().ParseToDecimal(); + defaultAddPriceRule.StockNum = txtStockNum.Text.Trim().ParseToInt(); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_default_add_price_rule", defaultAddPriceRule); + } + } + + private void chkStepAddPrice_CheckedChanged(object sender, EventArgs e) + { + isStepAddPrice = this.chkStepAddPrice.Checked; + } + + private void btnClearDgv_Click(object sender, EventArgs e) + { + //this.dgvSelectProduct.Rows.Clear(); + var rows = this.dgvSelectProduct.Rows.Cast().ToList(); //Cast后Rows做foreach循环时仍会夹花跳过,所以要ToList转一个新的数组。 + foreach (var row in rows) + { + if (row.Cells["colCheck"].Value.ParseToBool() == true) + this.dgvSelectProduct.Rows.Remove(row); + } + } + + private void chkAddMorePriceFirst_CheckedChanged(object sender, EventArgs e) + { + if (IsLoadComplate) + { + defaultAddPriceRule.AddMorePriceFirst = chkAddMorePriceFirst.Checked; + NaiBa.Util.Helper.ConfigHelper.SaveConfig("wx_default_add_price_rule", defaultAddPriceRule); + } + } + + private void lblGoodsCount_Click(object sender, EventArgs e) + { + //PDDDBProdListForm f = new PDDDBProdListForm(); + //f.Width = 1366; + //f.Height = 768; + //f.ShowMaximizeBox = true; + //f.ShowDialog(); + } + + private void lblWaitToUp_Click(object sender, EventArgs e) + { + PDDDBProdUserSelectCacheForm selectCacheForm = new PDDDBProdUserSelectCacheForm(lstTemuDBProductSelect); + selectCacheForm.ShowDialog(); + + lblWaitToUp.Text = "待上传商品 " + lstTemuDBProductSelect.Count + " 件"; + } + + private void btnClearFilter_Click(object sender, EventArgs e) + { + txtIdFilter.Text = ""; + txtExtCodeFilter.Text = ""; + cmbGroupFilter.Text = ""; + cmbCateFilter.Text = ""; + int prodCount; + GetRandomProductList(out prodCount, 1, 1); + lblGoodsCount.Text = "产品库中共有 " + prodCount + " 件商品"; + } + } + + public class WXUpload + { + public static string getUploadTempImgAuth(ShopLoginInfo shop, int uploadScene = 3) + { + string url = "https://store.weixin.qq.com/shop-faas/mmecchannelspicture/cgi/getUploadTempImgAuth?token=&lang=zh_CN&uploadScene=" + uploadScene; + string refere = "https://store.weixin.qq.com/shop/goods/entry"; + //{"code":0,"disK":"538c14e950da7b678ce9f5a12658c8acddd09e4b","disT":1767870926,"ext":"23aa0ecfb792a","url":"https://westore.video.qq.com/adtimageupload"} + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, refere); + return result; + } + + public static string adtimageupload(ShopLoginInfo shop, string imgBase64, string dis_k, long dis_t, string ext) + { + string url = "https://westorealpha.video.qq.com/adtimageupload"; + string referer = "https://store.weixin.qq.com/"; + string body = imgBase64; + var result = WXHttpResponseBLL.WeiXinImgPostResponse(shop, url, body, dis_k, dis_t, ext, referer); + return result; + } + + public static string getProductClassify(ShopLoginInfo shop, string goodsName, List goodImgUrlsLst) + { + string boundaryLetters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; + string boundaryStr = "----WebKitFormBoundary"; + for (int i = 0; i < 16; i++) + { + boundaryStr += boundaryLetters[Randomx.GetId(boundaryLetters.Length)]; + } + + string url = "https://store.weixin.qq.com/shop-faas/cgi/common/productClassify?from=B&title=" + GetHtml.UrlEncodeUtf8(goodsName) + "&token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + + string body = @"--" + boundaryStr + @" +"; + foreach (var imgFullPath in goodImgUrlsLst) + { + string fileName = imgFullPath.Split('\\').LastOrDefault(); + body += @"Content-Disposition: form-data; name=""file""; filename=""" + fileName + @""" +Content-Type: image/jpeg + +" + imgFullPath + @" +--" + boundaryStr; + } + body += @"-- +"; + var result = WXHttpResponseBLL.WeiXinUploadResponse(shop, url, body, boundaryStr, referer); + return result; + } + + public static string getCategoryOnShelf(ShopLoginInfo shop, List catIdLst) + { + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradecategory/cgi/product/getCategoryOnShelfV2?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + string body = @"{""catIdList"":[" + string.Join(",", catIdLst) + @"],""brandId"":2100000000}"; + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + + public static string genProductShortTitle(ShopLoginInfo shop, WXGetShortTitleParam getShortTitleParam) + { + string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductupload/common/cgi/goods/genProductShortTitle?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + string body = JsonHelper.SerializeObject(getShortTitleParam); + //{"productTitle":"妈妈老年中年阔脚裤冬季秋季时尚牛仔裤","headImgUrls":["https://wst.wxapp.tc.qq.com/160/20304/snscosdownload/SH/reserved/6xykWLEnztKEVU0iahAM7HQ28puCia87zPkvSbFT8Fcia99g2ZNWRdy8licxD6qwsqV4bCicoxwQF9e6jh3qwibgzxuA?token=x5Y29zUxcibCe0pFyoSA8zb1aYVKnIBLkQ8ZUXMcwEq3qYHsko3TDzv2rsL2AfJPd&idx=1&expire=1768211170","https://wst.wxapp.tc.qq.com/160/20304/snscosdownload/SH/reserved/6xykWLEnztKEVU0iahAM7Hbwaw1AboTKxjGsLhJgVreuYNxwyQxrk9RtvCv3XsXSnic9WfBFMAIZYpNgYkWd7VDQ?token=x5Y29zUxcibCe0pFyoSA8zb1aYVKnIBLk4qWUsS2WZiaCjXhZLj0D6PYyddX71qNiat&idx=1&expire=1768211170","https://wst.wxapp.tc.qq.com/160/20304/snscosdownload/SH/reserved/6xykWLEnztKEVU0iahAM7HTa1Ej2xJpy6Ej84arVO7A3vxIDD1XP6ZRVw43OficKLXPcXPUvDNmc8A4lMHCgbic3A?token=x5Y29zUxcibCe0pFyoSA8zb1aYVKnIBLkhejArCiaiaLIEKtvOicA5chibIj1tfELV0Mm&idx=1&expire=1768211170"],"categories":[{"catId":"10000111","catName":"服饰内衣"},{"catId":"10000113","catName":"女装"},{"catId":"10000672","catName":"裤子"},{"catId":"547705","catName":"牛仔裤"}]} + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + + public static string getFreightTemplate(ShopLoginInfo shop) + { + string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductupload/express/cgi/goods/getFreightTemplate?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry"; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, referer); + return result; + } + } + + public class AddPriceRule + { + /// + /// 加价金额区间大于 不包含 + /// + public decimal MoreThanPrice { get; set; } + /// + /// 加价金额区间小于 包含 + /// + public decimal LessThanPrice { get; set; } + /// + /// 加价倍数 + /// + public decimal AddPriceTimes { get; set; } + /// + /// 额外加价金额 + /// + public decimal AddMorePrice { get; set; } + /// + /// 单买加价 + /// + public decimal SinglePriceAdd { get; set; } + /// + /// 先加后乘 + /// + public bool AddMorePriceFirst { get; set; } = false; + /// + /// 上货库存量设置 + /// + public int StockNum { get; set; } = 0; + } + + public class WXUploadRule + { + public bool IsUseUpperSizeSpec { get; set; } = true; + public bool IsKeepChanceGoodImg { get; set; } = true; + /// + /// 是否报名活动(提交一个虚拟高倍率加价再通过活动价格实现商品原价) + /// + public bool IsSignActivity { get; set; } = true; + /// + /// 准备报名活动的商品原价加价倍率 + /// + public decimal ActivityAddPriceTimes { get; set; } = 3m; + public bool IsLowPriceSku { get; set; } = true; + public string LowPriceSkuName { get; set; } = "福利款"; + public decimal LowPriceSkuLowestPrice { get; set; } = 5m; + + /// + /// 升级版 + /// + public bool IsUpgradeVersion { get; set; } = false; + public string UpgradeVersionName { get; set; } = "升级版"; + /// + /// 升级版额外加价 + /// + public decimal UpgradeVersionAddPrice { get; set; } = 1m; + + public bool IsUseExtCodePrice { get; set; } + + public bool sign20981 { get; set; } + public bool sign22347 { get; set; } + public bool sign15996 { get; set; } + public bool sign21365 { get; set; } + } +} diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.resx b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.resx new file mode 100644 index 0000000..ca5e014 --- /dev/null +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.resx @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXProductForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXProductForm.Designer.cs new file mode 100644 index 0000000..d08431d --- /dev/null +++ b/TEMUKJD/WXForms/ProductForms/WXProductForm.Designer.cs @@ -0,0 +1,173 @@ +namespace TemuKJD.WXForms.ProductForms +{ + partial class WXProductForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("选品上传"); + System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("商品列表"); + System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("营销工具"); + System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("商品管理", new System.Windows.Forms.TreeNode[] { + treeNode1, + treeNode2, + treeNode3}); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lblName = new System.Windows.Forms.Label(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tv = new TemuKJD.UserComponent.UcTreeView(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.panel3); + this.panel1.Controls.Add(this.panel2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(793, 521); + this.panel1.TabIndex = 2; + // + // panel3 + // + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 28); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(793, 493); + this.panel3.TabIndex = 1; + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); + this.panel2.Controls.Add(this.lblName); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(793, 28); + this.panel2.TabIndex = 0; + // + // lblName + // + this.lblName.AutoSize = true; + this.lblName.Location = new System.Drawing.Point(5, 6); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(57, 17); + this.lblName.TabIndex = 0; + this.lblName.Text = "lblName"; + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tv); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.panel1); + this.splitContainer1.Size = new System.Drawing.Size(934, 521); + this.splitContainer1.SplitterDistance = 140; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.TabIndex = 3; + // + // tv + // + this.tv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251))))); + this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.tv.Cursor = System.Windows.Forms.Cursors.Hand; + this.tv.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll; + this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.tv.FullRowSelect = true; + this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.tv.HideCollapsedGroup = false; + this.tv.ItemHeight = 32; + this.tv.Location = new System.Drawing.Point(0, 0); + this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.tv.Name = "tv"; + treeNode1.Name = "选品上传"; + treeNode1.Text = "选品上传"; + treeNode2.Name = "商品列表"; + treeNode2.Text = "商品列表"; + treeNode3.Name = "营销工具"; + treeNode3.Text = "营销工具"; + treeNode4.Name = "商品管理"; + treeNode4.Text = "商品管理"; + this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { + treeNode4}); + this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.tv.Size = new System.Drawing.Size(140, 521); + this.tv.TabIndex = 1; + this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); + // + // PDDProductForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(934, 521); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "PDDProductForm"; + this.Text = "UploadForms"; + this.Load += new System.EventHandler(this.ShopForm_Load); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private UserComponent.UcTreeView tv; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label lblName; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.SplitContainer splitContainer1; + } +} \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXProductForm.cs b/TEMUKJD/WXForms/ProductForms/WXProductForm.cs new file mode 100644 index 0000000..1445b67 --- /dev/null +++ b/TEMUKJD/WXForms/ProductForms/WXProductForm.cs @@ -0,0 +1,149 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using AllBase; + +namespace TemuKJD.WXForms.ProductForms +{ + public partial class WXProductForm : BaseForm + { + public static WXProductForm instance; + public Lazy userSelectDbProductForm = new Lazy(); + //public Lazy productUpDownForm = new Lazy(); + //public Lazy prodCouponForm = new Lazy(); + + public WXProductForm() + { + InitializeComponent(); + + try + { + tv.SelectedNode = tv.Nodes[0].Nodes[0]; + tv.ExpandGroup(tv.Nodes[0].Name); + + if (BaseClass.GroupId == 3) + { + //hideName.Remove("设置进货价"); + if (BaseClass.SaLevel == 1) + { + } + if (BaseClass.SaLevel == 2) + { + } + } + } + catch { } + } + + private void tv_AfterSelect(object sender, TreeViewEventArgs e) + { + instance = this; + + MainForm.sCurrentModule = e.Node.Name; + this.lblName.Text = e.Node.Text; + + //如果是一级菜单,不做任何动作 + if (e.Node.Parent == null) return; + new Thread(() => + { + Thread.Sleep(200); + Invoke(new Action(() => + { + switch (e.Node.Name) + { + case "选品上传": + SetForm(userSelectDbProductForm.Value); + break; + //case "商品列表": + // SetForm(productUpDownForm.Value); + // break; + //case "营销工具": + // SetForm(prodCouponForm.Value); + // break; + } + })); + }).Start(); + } + + public void SetTvSelect(string name) + { + var n = tv.Nodes[0].Nodes.Find(name, true); + if (n.Count() > 0) + tv.SelectedNode = n[0]; + } + + /// + /// 显示隐藏层 + /// + /// + private void SetForm(Form f) + { + if (f == null) + { + foreach (Control form in panel3.Controls) + { + form.Visible = false; + if (form is Form) + { + panel3.Controls.Remove(form); + } + } + return; + } + + bool had = false; + string sCurrentFormName = f.Name; + for (int i = 0; i < panel3.Controls.Count; i++) + { + if (sCurrentFormName == panel3.Controls[i].Name) + { + had = true; + panel3.Controls[i].Visible = true; + } + else + { + panel3.Controls[i].Visible = false; + } + } + if (had) + { + return; + } + f.TopLevel = false; + f.Left = 0; + f.Top = 0; + f.FormBorderStyle = FormBorderStyle.None; + panel3.Controls.Add(f); + f.AutoSize = true; + f.Dock = DockStyle.Fill; + f.Show(); + } + + private void ShopForm_Load(object sender, EventArgs e) + { + try + { + tv.SelectedNode = tv.Nodes[0].Nodes[0]; + tv.ExpandGroup(tv.Nodes[0].Name); + + List hideName = new List() { /*"营销工具"*/ }; + + foreach (var item in hideName) + { + var n = tv.Nodes[0].Nodes.Find(item, true); + if (n.Count() > 0) + n[0].Remove(); + } + } + catch { } + } + } +} diff --git a/TEMUKJD/DYForms/ShopForms/DYShopAddEditForm.resx b/TEMUKJD/WXForms/ProductForms/WXProductForm.resx similarity index 100% rename from TEMUKJD/DYForms/ShopForms/DYShopAddEditForm.resx rename to TEMUKJD/WXForms/ProductForms/WXProductForm.resx diff --git a/TEMUKJD/DYForms/ShopForms/UcSubAccount.Designer.cs b/TEMUKJD/WXForms/ShopForms/UcSubAccount.Designer.cs similarity index 99% rename from TEMUKJD/DYForms/ShopForms/UcSubAccount.Designer.cs rename to TEMUKJD/WXForms/ShopForms/UcSubAccount.Designer.cs index 5087019..50c55f4 100644 --- a/TEMUKJD/DYForms/ShopForms/UcSubAccount.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/UcSubAccount.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { partial class UcSubAccount { diff --git a/TEMUKJD/DYForms/ShopForms/UcSubAccount.cs b/TEMUKJD/WXForms/ShopForms/UcSubAccount.cs similarity index 98% rename from TEMUKJD/DYForms/ShopForms/UcSubAccount.cs rename to TEMUKJD/WXForms/ShopForms/UcSubAccount.cs index 2a98277..8025cbe 100644 --- a/TEMUKJD/DYForms/ShopForms/UcSubAccount.cs +++ b/TEMUKJD/WXForms/ShopForms/UcSubAccount.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using AllBase.Model.Result; -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { public partial class UcSubAccount : UserControl { diff --git a/TEMUKJD/DYForms/ShopForms/UcSubAccount.resx b/TEMUKJD/WXForms/ShopForms/UcSubAccount.resx similarity index 100% rename from TEMUKJD/DYForms/ShopForms/UcSubAccount.resx rename to TEMUKJD/WXForms/ShopForms/UcSubAccount.resx diff --git a/TEMUKJD/DYForms/ShopForms/DYShopAddEditForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.Designer.cs similarity index 99% rename from TEMUKJD/DYForms/ShopForms/DYShopAddEditForm.Designer.cs rename to TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.Designer.cs index ada4429..fa0b962 100644 --- a/TEMUKJD/DYForms/ShopForms/DYShopAddEditForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.Designer.cs @@ -1,6 +1,6 @@ -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - partial class DYShopAddEditForm + partial class WXShopAddEditForm { /// /// Required designer variable. @@ -28,7 +28,7 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DYShopAddEditForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXShopAddEditForm)); this.panel2 = new System.Windows.Forms.Panel(); this.label7 = new System.Windows.Forms.Label(); this.cmbGroup = new System.Windows.Forms.ComboBox(); diff --git a/TEMUKJD/DYForms/ShopForms/DYShopAddEditForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.cs similarity index 95% rename from TEMUKJD/DYForms/ShopForms/DYShopAddEditForm.cs rename to TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.cs index 7581e69..62cba51 100644 --- a/TEMUKJD/DYForms/ShopForms/DYShopAddEditForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.cs @@ -11,14 +11,14 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - public partial class DYShopAddEditForm : LRBaseForm + public partial class WXShopAddEditForm : LRBaseForm { ShopLoginInfo shopLoginInfo = null; bool isAdd = true; - public DYShopAddEditForm(ShopLoginInfo shop = null) + public WXShopAddEditForm(ShopLoginInfo shop = null) { InitializeComponent(); shopLoginInfo = shop; @@ -115,7 +115,7 @@ namespace TemuKJD.DYForms.ShopForms private void txt_Click(object sender, EventArgs e) { - DYSubAccountShopEditForm f = new DYSubAccountShopEditForm(shopLoginInfo); + WXSubAccountShopEditForm f = new WXSubAccountShopEditForm(shopLoginInfo); f.SaveComplete += F_SaveComplete; f.ShowDialog(); } diff --git a/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.resx b/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TEMUKJD/WXForms/ShopForms/WXShopAddEditForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TEMUKJD/DYForms/ShopForms/DYShopBrowserObject.cs b/TEMUKJD/WXForms/ShopForms/WXShopBrowserObject.cs similarity index 99% rename from TEMUKJD/DYForms/ShopForms/DYShopBrowserObject.cs rename to TEMUKJD/WXForms/ShopForms/WXShopBrowserObject.cs index 5e02445..5678707 100644 --- a/TEMUKJD/DYForms/ShopForms/DYShopBrowserObject.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopBrowserObject.cs @@ -18,9 +18,9 @@ using TemuKJD.PDDForms.AdminForms; using TemuKJD.PDDForms.ProductThirdSelectForms; using Work; -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - public class DYShopBrowserObject + public class WXShopBrowserObject { public delegate void InfoReceivedHandler(string information); public event InfoReceivedHandler OnInfoReceived; @@ -521,7 +521,7 @@ namespace TemuKJD.DYForms.ShopForms //} List shopLst = new List(); - DYShopListForm.Instance.Invoke(new Action(() => + WXShopListForm.Instance.Invoke(new Action(() => { PDDThirdProdSelectAddShopForm shopForm = new PDDThirdProdSelectAddShopForm(); shopForm.ShowDialog(); diff --git a/TEMUKJD/WXForms/ShopForms/WXShopForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopForm.Designer.cs new file mode 100644 index 0000000..0fcd086 --- /dev/null +++ b/TEMUKJD/WXForms/ShopForms/WXShopForm.Designer.cs @@ -0,0 +1,189 @@ +namespace TemuKJD.WXForms.ShopForms +{ + partial class WXShopForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("店铺列表"); + System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("子账号管理"); + System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("订单金额统计"); + System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("工作明细统计"); + System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("运费模板"); + System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("高级运费模板"); + System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("素材库管理"); + System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("店铺管理", new System.Windows.Forms.TreeNode[] { + treeNode1, + treeNode2, + treeNode3, + treeNode4, + treeNode5, + treeNode6, + treeNode7}); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lblName = new System.Windows.Forms.Label(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tv = new TemuKJD.UserComponent.UcTreeView(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.panel3); + this.panel1.Controls.Add(this.panel2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(792, 461); + this.panel1.TabIndex = 2; + // + // panel3 + // + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 28); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(792, 433); + this.panel3.TabIndex = 1; + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); + this.panel2.Controls.Add(this.lblName); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(792, 28); + this.panel2.TabIndex = 0; + // + // lblName + // + this.lblName.AutoSize = true; + this.lblName.Location = new System.Drawing.Point(5, 6); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(57, 17); + this.lblName.TabIndex = 0; + this.lblName.Text = "lblName"; + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tv); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.panel1); + this.splitContainer1.Size = new System.Drawing.Size(933, 461); + this.splitContainer1.SplitterDistance = 140; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.TabIndex = 3; + // + // tv + // + this.tv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251))))); + this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.tv.Cursor = System.Windows.Forms.Cursors.Hand; + this.tv.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll; + this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.tv.FullRowSelect = true; + this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.tv.HideCollapsedGroup = false; + this.tv.ItemHeight = 32; + this.tv.Location = new System.Drawing.Point(0, 0); + this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.tv.Name = "tv"; + treeNode1.Name = "店铺列表"; + treeNode1.Text = "店铺列表"; + treeNode2.Name = "子账号管理"; + treeNode2.Text = "子账号管理"; + treeNode3.Name = "订单金额统计"; + treeNode3.Text = "订单金额统计"; + treeNode4.Name = "工作明细统计"; + treeNode4.Text = "工作明细统计"; + treeNode5.Name = "运费模板"; + treeNode5.Text = "运费模板"; + treeNode6.Name = "高级运费模板"; + treeNode6.Text = "高级运费模板"; + treeNode7.Name = "素材库管理"; + treeNode7.Text = "素材库管理"; + treeNode8.Name = "店铺管理"; + treeNode8.Text = "店铺管理"; + this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { + treeNode8}); + this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.tv.Size = new System.Drawing.Size(140, 461); + this.tv.TabIndex = 1; + this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); + // + // ShopForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(933, 461); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "ShopForm"; + this.Text = "ShopForm"; + this.Load += new System.EventHandler(this.ShopForm_Load); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private UserComponent.UcTreeView tv; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label lblName; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.SplitContainer splitContainer1; + } +} \ No newline at end of file diff --git a/TEMUKJD/WXForms/ShopForms/WXShopForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopForm.cs new file mode 100644 index 0000000..d71b23c --- /dev/null +++ b/TEMUKJD/WXForms/ShopForms/WXShopForm.cs @@ -0,0 +1,151 @@ +using AllBase; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.KJDForms.AdminForms; +using TemuKJD.BaseForms; +using TemuKJD.KJDForms.ProductSelectForms; +using TemuKJD.KJDForms.ProductThirdSelectForms; +using TemuKJD.KJDForms.ShopForms.Statistics; + +namespace TemuKJD.WXForms.ShopForms +{ + public partial class WXShopForm : BaseForm + { + public Lazy shopListForm = new Lazy(); + public Lazy sbuAccountForm = new Lazy(); + + + public WXShopForm() + { + InitializeComponent(); + + try + { + tv.SelectedNode = tv.Nodes[0].Nodes[0]; + tv.ExpandGroup(tv.Nodes[0].Name); + + List hideName = new List() { "子账号管理", "高级运费模板", "运费模板", "素材库管理", "订单金额统计", "工作明细统计" }; + + if (BaseClass.GroupId == 3) + { + hideName.Remove("子账号管理"); + } + + foreach (var item in hideName) + { + var n = tv.Nodes[0].Nodes.Find(item, true); + if (n.Count() > 0) + n[0].Remove(); + } + } + catch { } + } + + private void tv_AfterSelect(object sender, TreeViewEventArgs e) + { + MainForm.sCurrentModule = e.Node.Name; + this.lblName.Text = e.Node.Text; + // 如果是一级菜单,不做任何动作 + if (e.Node.Parent == null) return; + new Thread(() => + { + Thread.Sleep(200); + Invoke(new Action(() => + { + switch (e.Node.Name) + { + case "店铺列表": + SetForm(shopListForm.Value); + break; + case "子账号管理": + SetForm(sbuAccountForm.Value); + break; + } + })); + }).Start(); + } + + /// + /// 显示隐藏层 + /// + /// + private void SetForm(Form f) + { + if (f == null) + { + foreach (Control form in panel3.Controls) + { + form.Visible = false; + if (form is Form) + { + panel3.Controls.Remove(form as Form); + } + } + return; + } + + bool had = false; + string sCurrentFormName = f.Name; + for (int i = 0; i < panel3.Controls.Count; i++) + { + if (sCurrentFormName == panel3.Controls[i].Name) + { + had = true; + panel3.Controls[i].Visible = true; + } + else + { + panel3.Controls[i].Visible = false; + } + } + if (had) + { + f = null; + return; + } + f.TopLevel = false; + f.Left = 0; + f.Top = 0; + f.FormBorderStyle = FormBorderStyle.None; + panel3.Controls.Add(f); + f.AutoSize = true; + f.Dock = DockStyle.Fill; + try + { + f.Show(); + } + catch + { + } + } + + private void ShopForm_Load(object sender, EventArgs e) + { + try + { + var ns = tv.Nodes.Find("运费模板", true); + if (ns.Count() > 0) + { + //foreach (var n in ns) + //{ + // tv.Nodes.Remove(n); + //} + + if (AllBase.BaseClass.IsCloudBuyOrder) + this.tv.Nodes[0].Nodes.Insert(ns[0].Index + 1, new TreeNode() { Text = "高级运费模板", Name = "高级运费模板" }); + } + tv.SelectedNode = tv.Nodes[0].Nodes[0]; + tv.ExpandGroup(tv.Nodes[0].Name); + } + catch { } + } + } +} diff --git a/TEMUKJD/WXForms/ShopForms/WXShopForm.resx b/TEMUKJD/WXForms/ShopForms/WXShopForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TEMUKJD/WXForms/ShopForms/WXShopForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TEMUKJD/DYForms/ShopForms/DYShopListForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs similarity index 96% rename from TEMUKJD/DYForms/ShopForms/DYShopListForm.Designer.cs rename to TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs index bbb22e9..f728cee 100644 --- a/TEMUKJD/DYForms/ShopForms/DYShopListForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.Designer.cs @@ -1,6 +1,6 @@ -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - partial class DYShopListForm + partial class WXShopListForm { /// /// Required designer variable. @@ -28,7 +28,6 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.label1 = new System.Windows.Forms.Label(); @@ -39,7 +38,6 @@ this.btnLoginSelect = new TemuKJD.UserControls.ButtonEx(); this.btnCheck = new TemuKJD.UserControls.ButtonEx(); this.panel4 = new System.Windows.Forms.Panel(); - this.chkUsePddWorkbanch = new TemuKJD.UserComponent.UcCheckBox(this.components); this.cmbNotes = new System.Windows.Forms.ComboBox(); this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); this.btnSearch = new TemuKJD.UserControls.ButtonEx(); @@ -54,6 +52,8 @@ this.btnRefreshAuth = new TemuKJD.UserControls.ButtonEx(); this.pbLoading = new System.Windows.Forms.PictureBox(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.chkAutoDrag = new System.Windows.Forms.CheckBox(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -77,8 +77,6 @@ this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn(); this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn(); this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn(); - this.chkAutoDrag = new System.Windows.Forms.CheckBox(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -199,7 +197,7 @@ // // panel4 // - this.panel4.Controls.Add(this.chkUsePddWorkbanch); + this.panel4.Controls.Add(this.btnAddShop); this.panel4.Controls.Add(this.cmbNotes); this.panel4.Controls.Add(this.pnlEmpty); this.panel4.Controls.Add(this.btnSearch); @@ -209,25 +207,12 @@ this.panel4.Controls.Add(this.txtShopId); this.panel4.Controls.Add(this.label2); this.panel4.Controls.Add(this.btnImport); - this.panel4.Controls.Add(this.btnAddShop); this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; this.panel4.Location = new System.Drawing.Point(3, 3); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(1023, 40); this.panel4.TabIndex = 0; // - // chkUsePddWorkbanch - // - this.chkUsePddWorkbanch.AutoSize = true; - this.chkUsePddWorkbanch.Location = new System.Drawing.Point(897, 11); - this.chkUsePddWorkbanch.Name = "chkUsePddWorkbanch"; - this.chkUsePddWorkbanch.Size = new System.Drawing.Size(128, 21); - this.chkUsePddWorkbanch.TabIndex = 417; - this.chkUsePddWorkbanch.Text = "使用工作台Cookie"; - this.chkUsePddWorkbanch.UseVisualStyleBackColor = true; - this.chkUsePddWorkbanch.Visible = false; - this.chkUsePddWorkbanch.CheckedChanged += new System.EventHandler(this.chkUsePddWorkbanch_CheckedChanged); - // // cmbNotes // this.cmbNotes.FormattingEnabled = true; @@ -332,6 +317,7 @@ this.btnImport.TabIndex = 371; this.btnImport.Text = "导入店铺"; this.btnImport.UseVisualStyleBackColor = false; + this.btnImport.Visible = false; this.btnImport.Click += new System.EventHandler(this.btnImport_Click); // // btnAddShop @@ -344,9 +330,9 @@ this.btnAddShop.Location = new System.Drawing.Point(1, 9); this.btnAddShop.Margin = new System.Windows.Forms.Padding(2); this.btnAddShop.Name = "btnAddShop"; - this.btnAddShop.Size = new System.Drawing.Size(66, 26); + this.btnAddShop.Size = new System.Drawing.Size(107, 26); this.btnAddShop.TabIndex = 370; - this.btnAddShop.Text = "添加店铺"; + this.btnAddShop.Text = "扫码添加店铺"; this.btnAddShop.UseVisualStyleBackColor = false; this.btnAddShop.Click += new System.EventHandler(this.btnAddShop_Click); // @@ -408,6 +394,7 @@ this.dgvShop.AllowUserToDeleteRows = false; dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvShop.AutoRowNumber = true; this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -453,6 +440,31 @@ this.dgvShop.TabIndex = 5; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // + // chkAutoDrag + // + this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.chkAutoDrag.AutoSize = true; + this.chkAutoDrag.BackColor = System.Drawing.Color.White; + this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2); + this.chkAutoDrag.Name = "chkAutoDrag"; + this.chkAutoDrag.Size = new System.Drawing.Size(159, 21); + this.chkAutoDrag.TabIndex = 3; + this.chkAutoDrag.Text = "登录时自动滑动拼图验证"; + this.chkAutoDrag.UseVisualStyleBackColor = false; + this.chkAutoDrag.Visible = false; + this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click); + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, -1); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1264, 29); + this.statusBar.TabIndex = 1; + // // colSelect // this.colSelect.FillWeight = 26F; @@ -610,7 +622,7 @@ // colUpdateCookies // this.colUpdateCookies.FillWeight = 67F; - this.colUpdateCookies.HeaderText = "获取Cookie"; + this.colUpdateCookies.HeaderText = "导入Cookie"; this.colUpdateCookies.Name = "colUpdateCookies"; this.colUpdateCookies.ReadOnly = true; this.colUpdateCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True; @@ -641,32 +653,7 @@ this.colDelete.Name = "colDelete"; this.colDelete.ReadOnly = true; // - // chkAutoDrag - // - this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.chkAutoDrag.AutoSize = true; - this.chkAutoDrag.BackColor = System.Drawing.Color.White; - this.chkAutoDrag.Location = new System.Drawing.Point(1108, 2); - this.chkAutoDrag.Name = "chkAutoDrag"; - this.chkAutoDrag.Size = new System.Drawing.Size(159, 21); - this.chkAutoDrag.TabIndex = 3; - this.chkAutoDrag.Text = "登录时自动滑动拼图验证"; - this.chkAutoDrag.UseVisualStyleBackColor = false; - this.chkAutoDrag.Visible = false; - this.chkAutoDrag.Click += new System.EventHandler(this.chkAutoDrag_Click); - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Bottom; - this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.statusBar.Location = new System.Drawing.Point(0, -1); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(1264, 29); - this.statusBar.TabIndex = 1; - // - // PDDShopListForm + // WXShopListForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; @@ -675,7 +662,7 @@ this.Controls.Add(this.label1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.Name = "PDDShopListForm"; + this.Name = "WXShopListForm"; this.Text = "ShopListForm"; this.Load += new System.EventHandler(this.ShopListForm_Load); this.VisibleChanged += new System.EventHandler(this.ShopListForm_VisibleChanged); @@ -748,6 +735,5 @@ private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies; private System.Windows.Forms.DataGridViewLinkColumn colEdit; private System.Windows.Forms.DataGridViewLinkColumn colDelete; - private UserComponent.UcCheckBox chkUsePddWorkbanch; } } \ No newline at end of file diff --git a/TEMUKJD/DYForms/ShopForms/DYShopListForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs similarity index 80% rename from TEMUKJD/DYForms/ShopForms/DYShopListForm.cs rename to TEMUKJD/WXForms/ShopForms/WXShopListForm.cs index 268b1fc..679e61a 100644 --- a/TEMUKJD/DYForms/ShopForms/DYShopListForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopListForm.cs @@ -24,13 +24,13 @@ using TemuKJD.BLL; using System.Diagnostics; //using TemuKJD.PDDForms.AdminForms; -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - public partial class DYShopListForm : BaseForm + public partial class WXShopListForm : BaseForm { - public static List LstShopListFormInatance = new List(); - private static DYShopListForm _instance = null; - public static DYShopListForm Instance { get { if (_instance == null) { _instance = new DYShopListForm(); } return _instance; } set { _instance = value; } } + public static List LstShopListFormInatance = new List(); + private static WXShopListForm _instance = null; + public static WXShopListForm Instance { get { if (_instance == null) { _instance = new WXShopListForm(); } return _instance; } set { _instance = value; } } public static bool IsOperate { get; set; } = false; private bool isLoading { get; set; } = false; @@ -40,7 +40,7 @@ namespace TemuKJD.DYForms.ShopForms // 获取本地店铺和服务端店铺。将服务端相关信息与本地店铺合并后暂时存在内存中(不保存敏感信息)。 GlobalConfig.ShopLoginList = new ConcurrentList(); // 获取服务端店铺 - var serverShopList = DYShopListForm.GetServerShop(); + var serverShopList = WXShopListForm.GetServerShop(); var localShopList = new ConcurrentList(); localShopList.AddRange(serverShopList); foreach (var localShop in localShopList) @@ -202,7 +202,7 @@ namespace TemuKJD.DYForms.ShopForms + "&login_status2=" + shop.LoginStatus2 + "&cookie=" + shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+") + "&cookie2=" + shop.Cookies2.Replace("&", "&").Replace("%", "%").Replace("+", "+") - + "&pddid=" + shop.pddid + + "&openid=" + shop.openid + fTool; var result = GetHtml.PostUtf8(url, data); if (!result.Contains("\"code\":200")) @@ -233,7 +233,7 @@ namespace TemuKJD.DYForms.ShopForms return result; } - public DYShopListForm() + public WXShopListForm() { InitializeComponent(); @@ -244,9 +244,15 @@ namespace TemuKJD.DYForms.ShopForms private void btnAddShop_Click(object sender, EventArgs e) { - DYShopAddEditForm sae = new DYShopAddEditForm(); - sae.SaveCompleteWithDescribe += Sae_SaveComplete; - sae.Show(); + //WXShopAddEditForm sae = new WXShopAddEditForm(); + //sae.SaveCompleteWithDescribe += Sae_SaveComplete; + //sae.Show(); + WXShopLoginForm shopLoginForm = new WXShopLoginForm(null); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop?redirect_url=%2Fhome"; + shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; + shopLoginForm.ShowDialog(); + btnRefreshCookie_Click(null, null); } private void Sae_SaveComplete(object obj, object isAdd) @@ -288,7 +294,7 @@ namespace TemuKJD.DYForms.ShopForms Task.Run(() => { //CheckShopListLogin(new string[] { (obj as DouShopLoginInfo).LoginName }); - StartUp.SaveLocalShopLoginInfo(); + //StartUp.SaveLocalShopLoginInfo(); Invoke(new Action(() => { btnRefreshCookie_Click(null, null); @@ -488,7 +494,7 @@ namespace TemuKJD.DYForms.ShopForms "多重登录", param.ApiAuthStatus, param.BuyApiAuth.ApiAuthStatus, - "获取Cookie", + "导入Cookie", "复制Cookie", "编辑", "删除"); @@ -550,6 +556,12 @@ namespace TemuKJD.DYForms.ShopForms } } + + public void CheckShopLogin(ShopLoginInfo[] shops, bool isShowProgress = true) + { + CheckShopLogin(shops.Select(s => s.ShopId).ToArray(), isShowProgress); + } + public void CheckShopLogin(string[] shopNames, bool isShowProgress = true) { @@ -560,7 +572,7 @@ namespace TemuKJD.DYForms.ShopForms // 先从服务端取最新cookie var serverCampanys = ShopBLL.AdminGetServerShopLstByIds(campanys.Select(c => c.ShopId).ToList()); - var sss = string.Join(",", serverCampanys.Select(s => s.UserName + s.ShopAccount)); + //var shopInfoTmp = string.Join(",", serverCampanys.Select(s => s.UserName + s.ShopAccount)); var serverShop = serverCampanys.FirstOrDefault(); if (shop != null && serverShop != null) { @@ -576,7 +588,7 @@ namespace TemuKJD.DYForms.ShopForms if (shop != null) { var loginResult = CheckShopLogin(shop); - if (loginResult.Contains("\"success\":true") && !loginResult.Contains("\"login\":true")) + if (!loginResult.Contains("\"code\":0")) { shop.Cookies = "empty=true;"; foreach (var sc in campanys) @@ -608,45 +620,21 @@ namespace TemuKJD.DYForms.ShopForms } } - public static string GetShopStatus(ShopLoginInfo shop) + public static string GetShopInfo(ShopLoginInfo shop) { - string url = "https://mms.pinduoduo.com/janus/api/userinfo"; - string refere = "https://mms.pinduoduo.com/login/"; - refere = "https://mms.pinduoduo.com/home"; - string body = @"{}"; - var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere); + string url = "https://store.weixin.qq.com/shop/home"; + string refere = ""; + var result = WXHttpResponseBLL.WeiXinGetResponse(shop, url, refere, true); return result; } public static string CheckShopLogin(ShopLoginInfo shop, string refere = "https://mms.pinduoduo.com/home/") { - string url = "https://mms.pinduoduo.com/janus/api/checkLogin"; - string body = @"{}"; - return HttpResponseBLL.PDDPostResponse(shop, url, body, refere); + string url = "https://store.weixin.qq.com/shop-faas/mmecnodebase/reachDiolog/getBizNotifyConfig?token=&lang=zh_CN"; + string body = @"{""path"":""https://store.weixin.qq.com/shop/home""}"; + return WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, refere); } - /// - /// 获取国际版登录状态 - /// - /// - /// - public static string GetShopStatus2(ShopLoginInfo shop) - { - //string url = "https://agentseller.temu.com/api/seller/auth/userInfo"; - //string refere = "https://agentseller.temu.com/"; - //string body = @"{}"; - //return HttpResponseBLL.PDDPostResponse2(shop, url, body, refere); - return ""; - } - - public static string GetShopLogin2Code(ShopLoginInfo shop) - { - //string url = "https://seller.kuajingmaihuo.com/bg/quiet/api/auth/obtainCode"; - //string refere = "https://seller.kuajingmaihuo.com/settle/seller-login?redirectUrl=https%3A%2F%2Fagentseller.temu.com%2F®ion=1&source=https%3A%2F%2Fagentseller.temu.com%2Fmain%2Fauthentication%3FredirectUrl%3Dhttps%253A%252F%252Fagentseller.temu.com%252F"; - //string body = @"{""redirectUrl"":""https://agentseller.temu.com/main/authentication""}"; - //return HttpResponseBLL.PostResponse(shop, url, body, refere); - return ""; - } private void ShopListForm_VisibleChanged(object sender, EventArgs e) { @@ -659,10 +647,6 @@ namespace TemuKJD.DYForms.ShopForms private void ShopListForm_Load(object sender, EventArgs e) { - chkUsePddWorkbanch.CheckedChanged -= chkUsePddWorkbanch_CheckedChanged; - chkUsePddWorkbanch.Checked = BaseClass.UsePddWorkbanch; - chkUsePddWorkbanch.CheckedChanged += chkUsePddWorkbanch_CheckedChanged; - if (BaseClass.GroupId != 3) { this.dgvShop.Columns["ColEdit"].Visible = false; @@ -676,20 +660,6 @@ namespace TemuKJD.DYForms.ShopForms this.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin; this.splitContainer2.FixedPanel = FixedPanel.Panel2; - //子账号 - //var url = BaseClass.BuildObjString("shop&act=get_shop_user_sub_group"); - //var data = UserLogin.GetSignaturex(); - //var result = GetHtml.PostUtf8(url, data); - //if (result?.Contains("\"code\":200") == true) - //{ - // var jObj = JObject.Parse(result); - // List shopSubAccountList = JsonHelper.DeserializeJsonToList(jObj["data"].ToString()); - // foreach (var shop in GlobalConfig.DouShopLoginList) - // { - // shop.ShopSubAccountList.Clear(); - // shop.ShopSubAccountList.AddRange(shopSubAccountList.Where(s => s.shop_login_name == shop.LoginName)); - // } - //} foreach (var shop in GlobalConfig.ShopLoginList) { shop.ShopSubAccountList.Clear(); @@ -703,44 +673,6 @@ namespace TemuKJD.DYForms.ShopForms shop.ShopSubAccountList.Add(subAccount); } } - - GetWorkBenchCookie(); - } - - void GetWorkBenchCookie() - { - return; - //FiddlerCore.Utilities.SmartAssembly.Attributes. - - Task.Run(() => - { - while (true) - { - var process = Process.GetProcessesByName("notepad").FirstOrDefault();// 获取Notepad进程的实例 - if (process != null) - { - IntPtr handle = process.Handle; - MemoryReader.ReadMemory(handle.ToInt32(), 0X1474DEC8, 0X50000000); - - break; - - } - //var memory = new Memory(process); // 创建Memory对象来操作进程内存 - //IntPtr address = new IntPtr(0x12345678); // 假设的内存地址(需要根据实际情况调整) - //byte[] buffer = new byte[1024]; // 读取数据的缓冲区大小根据需要调整 - //if (memory.Read(address, buffer)) // 读取内存到buffer中 - //{ - // Console.WriteLine("Read successful."); - // Console.WriteLine(Encoding.ASCII.GetString(buffer)); // 打印读取的数据(这里假设是ASCII文本) - //} - //else - //{ - // Console.WriteLine("Read failed."); - //} - - Thread.Sleep(5000); - } - }); } private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) @@ -756,17 +688,17 @@ namespace TemuKJD.DYForms.ShopForms { case "检测": //CheckShopLoginAsync(new string[] { loginName }); + break; case "进入店铺": IsOperate = true; { - PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop); - //shopLoginForm.Parent = this; + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.manage; shopLoginForm.WindowState = FormWindowState.Maximized; - shopLoginForm.InitUrl = "https://mms.pinduoduo.com/home/"; + shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home"; shopLoginForm.Show(); - IsOperate = false; } + IsOperate = false; break; case "复制Cookie": List cooks = null; @@ -775,8 +707,7 @@ namespace TemuKJD.DYForms.ShopForms cooks = new List(); string cookJs = ""; - var keys = new string[] { "_a42", "_bee", "_f77", "_nano_fp", "api_uid", "JSESSIONID", "mms_b84d1838", "rckk", "ru1k", "ru2k", "PASS_ID", "webp", "x-visit-time" }; - var keys2 = new string[] { /*"_bee", "_nano_fp", "api_uid", "dilx", "hfsc", "njrpl", "seller_temp"*/ }; + var keys = new string[] { "_qimei_uuid", "_qpsvr_localtk", "biz_magic", "biz_rand", "biz_ticket", "biz_token", "ptcz", "RK", "yyb_muid" }; foreach (var shopCook in cooks) { var cookie = shopCook.Name + "=" + shopCook.Value; @@ -789,44 +720,22 @@ namespace TemuKJD.DYForms.ShopForms var cookie = shopCook.Name + "=" + shopCook.Value; if (!keys.Any(k => cookie.StartsWith(k))) continue; - if (!cookie.StartsWith("PASS_ID") && !cookie.StartsWith("_nano_fp") && !cookie.StartsWith("JSESSIONID") && - !cookie.StartsWith("mms_b84d1838") && !cookie.StartsWith("webp") && !cookie.StartsWith("x-visit-time")) - cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.pinduoduo.com;expires=" + + if (!cookie.StartsWith("biz_magic") && !cookie.StartsWith("biz_rand") && !cookie.StartsWith("biz_ticket") && !cookie.StartsWith("biz_token")) + cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.qq.com; expires=" + DateTime.Now.AddMonths(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';"; else - cookJs += "\r\ndocument.cookie='" + cookie + "; domain=mms.pinduoduo.com; expires=" + + cookJs += "\r\ndocument.cookie='" + cookie + "; domain=store.weixin.qq.com; expires=" + DateTime.Now.AddMonths(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';"; } - // 全球站cookie - //foreach (var shopCook in shop.Cookies2.Split(';')) - //{ - // var cookie = shopCook.Trim(); - // if (cookie.StartsWith("mallid")) - // cookie = "mallid=" + shop.ShopId; - // if (!keys2.Any(k => cookie.StartsWith(k))) - // continue; - // if (!cookie.StartsWith("seller_temp") && !cookie.StartsWith("_nano_fp") && !cookie.StartsWith("mallid")) - // cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.temu.com; expires=" + - // DateTime.Now.AddDays(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';"; - // else - // cookJs += "\r\ndocument.cookie='" + cookie + "; domain=agentseller.temu.com; expires=" + - // DateTime.Now.AddDays(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';"; - //} - //cookJs += "\r\nwindow.localStorage.setItem('" + "mall-info-id" + "', '" + shop.ShopId + "');"; - //cookJs += "\r\nwindow.localStorage.setItem('" + "agentseller-mall-info-id" + "', '" + shop.ShopId + "');"; - cookJs += "\r\nsetTimeout(() => { window.location.href='https://mms.pinduoduo.com/home'; }, 200)"; + cookJs += "\r\nsetTimeout(() => { window.location.href='https://store.weixin.qq.com/shop/goods/list'; }, 200)"; Clipboard.SetDataObject(cookJs); BaseMsgForm.ShowInfo("复制成功"); break; case "获取Cookie": case "导入Cookie": - ////PDDShopUpdateCookieForm updateCookieForm = new PDDShopUpdateCookieForm(shop); - ////updateCookieForm.SaveComplete += UpdateCookieForm_SaveComplete; - ////updateCookieForm.ShowDialog(); - //PDDShopUpdateFddlCookieForm updateFddlCookieForm = new PDDShopUpdateFddlCookieForm(shop); - //updateFddlCookieForm.SaveComplete += UpdateCookieForm_SaveComplete; - //updateFddlCookieForm.ShowDialog(); - //updateFddlCookieForm.fddlHelper.UninstallFiddler(); + WXShopUpdateCookieForm updateCookieForm = new WXShopUpdateCookieForm(shop); + updateCookieForm.SaveComplete += UpdateCookieForm_SaveComplete; + updateCookieForm.ShowDialog(); break; case "删除": if (BaseMsgForm.ShowConfirm("确定删除店铺吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) @@ -836,14 +745,14 @@ namespace TemuKJD.DYForms.ShopForms StartUp.SaveLocalShopLoginInfo(); break; case "编辑": - DYShopAddEditForm editForm = new DYShopAddEditForm(shop); + WXShopAddEditForm editForm = new WXShopAddEditForm(shop); editForm.SaveCompleteWithDescribe += Sae_SaveComplete; editForm.ShowDialog(); break; case "登录": IsOperate = true; { - PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop); + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.login; shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; shopLoginForm.ShowDialog(); @@ -993,27 +902,27 @@ namespace TemuKJD.DYForms.ShopForms private void btnLoginSelect_Click(object sender, EventArgs e) { - DYShopListForm.IsOperate = true; + WXShopListForm.IsOperate = true; if (this.btnLoginSelect.Text == "登录选中") { List shopLoginNameList = GetCheckedList(); if (!shopLoginNameList.Any()) { BaseMsgForm.ShowError("请选择需要登录的店铺"); - DYShopListForm.IsOperate = false; + WXShopListForm.IsOperate = false; return; } shopLoginNameList = shopLoginNameList.Distinct().ToList(); foreach (var loginName in shopLoginNameList) { - if (DYShopListForm.IsOperate == false) + if (WXShopListForm.IsOperate == false) break; var shopInfo = GlobalConfig.ShopLoginList.FirstOrDefault(v => v.LoginName == loginName); if (shopInfo != null && !string.IsNullOrEmpty(shopInfo.LoginName) && !string.IsNullOrEmpty(shopInfo.Password)) { - PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shopInfo); + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shopInfo); shopLoginForm.openType = EnumOpenType.login; shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; shopLoginForm.ShowDialog(); @@ -1021,7 +930,7 @@ namespace TemuKJD.DYForms.ShopForms } btnRefreshCookie_Click(null, null); } - DYShopListForm.IsOperate = false; + WXShopListForm.IsOperate = false; } private void chkAutoDrag_Click(object sender, EventArgs e) @@ -1109,47 +1018,5 @@ namespace TemuKJD.DYForms.ShopForms this.txtShopId.Text = ""; this.txtShopName.Text = ""; } - - private static string sJsSetCookie = @" -function setCookie(name, value, daysToLive, path, domain, secure, httpOnly, sameSite) { - //let cookie = name + '=' + encodeURIComponent(value) + ';'; - let cookie = name + '=' + value + ';'; - if (daysToLive) { - if (typeof daysToLive === 'string' && daysToLive.toLowerCase() == 'session') { - cookie += 'expires=Session;'; - } - else { - let date = new Date(); - date.setTime(date.getTime() + (daysToLive * 24 * 60 * 60 * 1000)); - cookie += 'expires=' + date.toUTCString() + ';'; - } - } - if (path) { - cookie += 'path=' + path + ';'; - } - if (domain) - { - cookie += 'domain=' + domain + ';'; - } - if (secure) - { - cookie += 'secure;'; - } - if (httpOnly) - { - cookie += 'HttpOnly;'; - } - if (sameSite) - { - cookie += 'SameSite=' + sameSite + ';'; - } - document.cookie = cookie; -}"; - - private void chkUsePddWorkbanch_CheckedChanged(object sender, EventArgs e) - { - BaseMsgForm.ShowInfo("您已切换Cookie来源,请重启软件生效!"); - NaiBa.Util.Helper.ConfigHelper.SaveConfig("use_pdd_workbanch", chkUsePddWorkbanch.Checked); - } } } diff --git a/TEMUKJD/DYForms/ShopForms/DYShopListForm.resx b/TEMUKJD/WXForms/ShopForms/WXShopListForm.resx similarity index 100% rename from TEMUKJD/DYForms/ShopForms/DYShopListForm.resx rename to TEMUKJD/WXForms/ShopForms/WXShopListForm.resx diff --git a/TEMUKJD/DYForms/ShopForms/DYShopLoginForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.Designer.cs similarity index 99% rename from TEMUKJD/DYForms/ShopForms/DYShopLoginForm.Designer.cs rename to TEMUKJD/WXForms/ShopForms/WXShopLoginForm.Designer.cs index 88111d4..d2799a7 100644 --- a/TEMUKJD/DYForms/ShopForms/DYShopLoginForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.Designer.cs @@ -1,6 +1,6 @@ -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - partial class PDDShopLoginForm + partial class WXShopLoginForm { /// /// Required designer variable. @@ -28,7 +28,7 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDDShopLoginForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXShopLoginForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.pnlMultiLogin = new System.Windows.Forms.Panel(); this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); diff --git a/TEMUKJD/DYForms/ShopForms/DYShopLoginForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs similarity index 68% rename from TEMUKJD/DYForms/ShopForms/DYShopLoginForm.cs rename to TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs index b76c590..c45a836 100644 --- a/TEMUKJD/DYForms/ShopForms/DYShopLoginForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs @@ -26,8 +26,9 @@ using Work; using Work.BLL.Tools; using TemuKJD.BLL; using AllBase.Model.Result.PDDResult; +using NaiBa.Util; -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { public enum EnumOpenType { @@ -35,56 +36,37 @@ namespace TemuKJD.DYForms.ShopForms manage, refresh_cookie, } - public partial class PDDShopLoginForm : LRBaseForm + public partial class WXShopLoginForm : LRBaseForm { - public static PDDShopLoginForm shopLoginInstance { get; set; } = null; - - public string pddUploadGoodsData = ""; - //public static AllBase.Model.Param.PDDProdParam.PDDProductUploadParam prodParam = null; - public string pddSourceGoodsDetail = ""; - //public static AllBase.Model.Result.PDDResult.PDDProductDetailInfo prodInfo = null; - public string pddSourceGoodsDetailTemp = ""; - public string pddSourceGoodsDecorationTemp = ""; - public string pddSourceGoodsChanceId = ""; - public string pddGetChanceGoodsRefere = ""; - public string pddEditChanceGoodsRefereChanceTab = ""; + public static WXShopLoginForm shopLoginInstance { get; set; } = null; public int CloseAfterSecond { get; set; } public EnumOpenType openType = EnumOpenType.manage; public bool isMultiLogin = false; public string MultiLoginCookieName = ""; public string InitUrl = ""; - private string shopCookieHead = "pinduoduo.com"; - private string shopLoginUrl = "https://mms.pinduoduo.com/login"; - private string shopMainUrl = "https://mms.pinduoduo.com/home"; + private string shopCookieHead = "qq.com"; + private string shopLoginUrl = "https://store.weixin.qq.com/shop?redirect_url=%2Fhome"; + private string shopMainUrl = "https://store.weixin.qq.com/shop/home"; public ChromiumWebBrowser cefWebBrowser = null; private ShopLoginInfo shop = null; - private List lstShopCompany = new List(); + private ConcurrentList lstShopCompany = new ConcurrentList(); private string currentUrl = ""; - public PDDShopLoginForm(ShopLoginInfo shopInfo) + public WXShopLoginForm(ShopLoginInfo shopInfo) { - //if (shopLoginInstance != null && !shopLoginInstance.IsDisposed) - //{ - // shopLoginInstance.Dispose(); - //} shopLoginInstance = this; InitializeComponent(); this.shop = shopInfo; - this.txtUserName.Text = shopInfo.LoginName; - this.txtPassWord.Text = DataOpenSSL.DecryptString(shopInfo.Password); + this.txtUserName.Text = (shopInfo?.LoginName).ParseToString(); + this.txtPassWord.Text = DataOpenSSL.DecryptString((shopInfo?.Password).ParseToString()); } private void ShopLoginForm_Load(object sender, EventArgs e) { this.splitContainer1.SplitterDistance = this.splitContainer1.Height - 62; - pddSourceGoodsDetailTemp = ""; - pddSourceGoodsDecorationTemp = ""; // 详情装修 - pddSourceGoodsChanceId = ""; - pddGetChanceGoodsRefere = ""; - pddEditChanceGoodsRefereChanceTab = ""; if (isMultiLogin && shop != null) { @@ -126,62 +108,12 @@ namespace TemuKJD.DYForms.ShopForms if (!this.Created) break; - if (this.shop != null && currentUrl.TrimEnd('/') == shopMainUrl) + if (currentUrl.TrimEnd('/') == shopMainUrl) { if (!cefWebBrowser.GetBrowser().MainFrame.IsValid) continue; - // 刷新cookie - if (openType == EnumOpenType.refresh_cookie) - { - string cookies = ""; - List cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null)); - foreach (var cookie in cookieList) - { - cookie.Domain = cookie.Domain.Replace(".mms.pinduoduo.com", "mms.pinduoduo.com"); - } - List cookieListNew = new List(); - if (cookieList != null && cookieList.Count > 0) - { - foreach (var cookie in cookieList) - { - //PASS_ID同时出现两个,domain是mms.pinduoduo.com才是能登录店铺后台的 - if (cookie.Name == "PASS_ID" && cookie.Domain != "mms.pinduoduo.com" - && cookieList.Any(c => c.Name == "PASS_ID" && c.Domain == "mms.pinduoduo.com")) - continue; - - cookies += cookie.Name + "=" + cookie.Value + "; "; - cookieListNew.Add(cookie); - } - - if (cookieListNew.Any(c => c.Name == "PASS_ID" && c.Value.StartsWith("windows_1")) && - !cookieListNew.Any(c => c.Name == "PddBrowser")) - { - cookieList.Add(new Cookie() { Domain = ".pinduoduo.com", Name = "PddBrowser", Value = "1", Expires = DateTime.Now.AddYears(1), }); - } - cookies = JsonHelper.SerializeObject(cookieListNew); - - if (!string.IsNullOrEmpty(cookies)) - { - shop.Cookies = cookies; - shop.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd"); - DYShopListForm.UpdateServerShopCookies(shop); // 店铺cookie写入服务端 - if (this.Created && this.chkCloseAfterLogin.Checked) - { - Invoke(new Action(() => { this.Close(); })); - } - else - { - break; - } - } - } - } - - if (openType!= EnumOpenType.login) - continue; - - if (!lstShopCompany.Any(c => c.LoginName == shop.LoginName)) + if (!lstShopCompany.Any()) continue; else // 检测到登录成功后 { @@ -189,86 +121,72 @@ namespace TemuKJD.DYForms.ShopForms List cookieList = CEFBrowser.GetCookieList(shopCookieHead, cefWebBrowser.GetCookieManager(null)); foreach (var cookie in cookieList) { - cookie.Domain = cookie.Domain.Replace(".mms.pinduoduo.com", "mms.pinduoduo.com"); + cookie.Domain = cookie.Domain.Replace(".store.weixin.qq.com", "store.weixin.qq.com"); } List cookieListNew = new List(); if (cookieList != null && cookieList.Count > 0) { foreach (var cookie in cookieList) { - //PASS_ID同时出现两个,domain是mms.pinduoduo.com才是能登录店铺后台的 - if (cookie.Name == "PASS_ID" && cookie.Domain != "mms.pinduoduo.com" - && cookieList.Any(c => c.Name == "PASS_ID" && c.Domain == "mms.pinduoduo.com")) - continue; - cookies += cookie.Name + "=" + cookie.Value + "; "; cookieListNew.Add(cookie); } - //cookies = cookies.Trim().TrimEnd(';'); cookies = JsonHelper.SerializeObject(cookieListNew); } - if (!string.IsNullOrEmpty(cookies) - && lstShopCompany.Any(c => c.LoginName == shop.LoginName)) + if (!string.IsNullOrEmpty(cookies)) { var lstShopCompanyCopy = lstShopCompany.ToList(); - lstShopCompanyCopy = lstShopCompanyCopy.Where(l => l.LoginName == shop.LoginName).ToList(); foreach (ShopCompany sc in lstShopCompanyCopy) { ShopLoginInfo newShop = new ShopLoginInfo() { - LoginName = shop.LoginName, - Password = shop.Password, - GroupName = shop.GroupName, + LoginName = shop?.LoginName ?? sc.AccountId, + Password = shop?.Password, + GroupName = shop?.GroupName, ShopAccount = sc.AccountName, ShopId = sc.AccountId, - SubUserName = shop.SubUserName, - Notes = shop.Notes, - AntiContents = new NaiBa.Util.ConcurrentList { sc.AntiContent }, + SubUserName = shop?.SubUserName, + Notes = shop?.Notes, + openid = sc.openid, }; - var oldShop = GlobalConfig.ShopLoginList.FirstOrDefault(l => - l.LoginName == newShop.LoginName); + var oldShop = GlobalConfig.ShopLoginList.FirstOrDefault(l => l.ShopId == newShop.ShopId); if (oldShop == null) { GlobalConfig.ShopLoginList.Add(newShop); ShopBLL.AddServerShop(newShop); // 店铺写入到服务端 + if (shop == null) + shop = newShop; } else { - oldShop.LoginName = newShop.LoginName; - oldShop.Password = newShop.Password; - oldShop.GroupName = newShop.GroupName; - oldShop.ShopAccount = newShop.ShopAccount; oldShop.ShopId = newShop.ShopId; - oldShop.SubUserName = newShop.SubUserName; - oldShop.Notes = newShop.Notes; - oldShop.AntiContents.AddRange(newShop.AntiContents); - while (oldShop.AntiContents.Count > 50) - oldShop.AntiContents.RemoveAt(0); + oldShop.LoginName = newShop.LoginName; + oldShop.ShopAccount = newShop.ShopAccount; + oldShop.openid = newShop.openid; // 店铺更新写入到服务端 var url = BaseClass.BuildObjString("shop/mdy_shop"); var data = UserLogin.GetSignaturex() + "&login_name=" + oldShop.LoginName - + "&new_shop_id=" + oldShop.ShopId + + "&shop_id=" + oldShop.ShopId + "&shop_account=" + oldShop.ShopAccount; var result = GetHtml.PostUtf8(url, data); - - ShopBLL.MdyAntiContent(oldShop); } - } - var lstShop = GlobalConfig.ShopLoginList.Where(l => l.LoginName == shop.LoginName).ToList(); + + } + // 店铺cookie写入服务端,多店共用一个登录账号一组cookie + WXShopListForm.UpdateServerShopCookies(shop); + // 手动更新内存中的店铺cookie + var lstShop = GlobalConfig.ShopLoginList.Where(l => l.LoginName == shop?.LoginName).ToList(); foreach (var s in lstShop) { s.LoginStatus = "登录成功"; s.Cookies = cookies; s.LastRefreshDate = DateTime.Now.ToString("yyyyMMdd"); - s.pddid = ""; // 网页登录无拼多多id(pddid) } - StartUp.SaveLocalShopLoginInfo(); // 店铺保存到本地 - DYShopListForm.UpdateServerShopCookies(shop); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie OnSaveComplete(shop); if (this.Created && this.chkCloseAfterLogin.Checked) @@ -352,13 +270,12 @@ namespace TemuKJD.DYForms.ShopForms /// private void AutoLogin() { - if (shop == null) + if (openType != EnumOpenType.login && shop == null) return; if (cefWebBrowser == null) { - //cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false); - if (!string.IsNullOrEmpty(InitUrl)) //temu国际版不支持无痕模式多开,此处改为true,每次创建cefwebbrowser时删除cookie + if (!string.IsNullOrEmpty(InitUrl)) cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(InitUrl, false); else cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false); @@ -375,7 +292,7 @@ namespace TemuKJD.DYForms.ShopForms cefWebBrowser.Dock = DockStyle.Fill; //js绑定C#对象 - DYShopBrowserObject shopObj = new DYShopBrowserObject(); + WXShopBrowserObject shopObj = new WXShopBrowserObject(); shopObj.OnInfoReceived += ShopObj_OnInfoReceived; CefSharpSettings.WcfEnabled = true; cefWebBrowser.JavascriptObjectRepository.Register( @@ -385,20 +302,15 @@ namespace TemuKJD.DYForms.ShopForms options: new BindingOptions { Binder = BindingOptions.DefaultBinder.Binder /*CamelCaseJavascriptNames = false*/ /*cef79*/ } ); - if (shop.Cookies == null) - shop.Cookies = ""; - if (shop.Cookies2 == null) - shop.Cookies2 = ""; - - //var cookie = shop.Cookies; - //if (isMultiLogin) - // cookie = shop.DictMultiCookies.Keys.Contains(MultiLoginCookieName) ? shop.DictMultiCookies[MultiLoginCookieName] : ""; List cookieLst = new List(); try { - cookieLst = JsonHelper.DeserializeJsonToList(shop.Cookies); - if (cookieLst == null) - cookieLst = new List(); + if (shop != null) + { + cookieLst = JsonHelper.DeserializeJsonToList(shop.Cookies.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + } } catch { @@ -416,9 +328,6 @@ namespace TemuKJD.DYForms.ShopForms Thread.Sleep(20); CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null)); - //if (cookieLst.Any(c => c.Value.StartsWith("windows_1"))) - // cefWebBrowser.ExecuteScriptAsync("navigator.__defineGetter__('userAgent', function() { return 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12'; });"); - //cef 138 如果没有设置RequestContext 可能为空,直接getCookieManager //if (this.openType != EnumOpenType.login) { @@ -430,15 +339,8 @@ namespace TemuKJD.DYForms.ShopForms } } - if (this.openType != EnumOpenType.login) - { - //var cookie2 = shop.Cookies2; - //var t2 = CEFBrowser.SetCookieAsync(shopCookieHead2, cookie2, cefWebBrowser.GetCookieManager(null)); - //t2.Wait(5000); - } - //根据登录的具体店铺设置local storage - if (!string.IsNullOrEmpty(shop.ShopId)) + if (!string.IsNullOrEmpty(shop?.ShopId)) { //var storageJsCode = "window.localStorage.setItem('" + "mall-info-id" + "', '" + shop.ShopId + "');\r\n"; //storageJsCode += "window.localStorage.setItem('" + "agentseller-mall-info-id" + "', '" + shop.ShopId + "');\r\n"; @@ -481,10 +383,12 @@ namespace TemuKJD.DYForms.ShopForms } CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null)); - InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password)); + // 扫码登录,无输入密码环节 + // InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password)); }); } } + private void ShopObj_OnInfoReceived(string information) { //BaseMsgForm.ShowInfo(information); @@ -513,139 +417,58 @@ namespace TemuKJD.DYForms.ShopForms sb.Append("(function(){"); sb.Append("CefSharp.BindObjectAsync('shopObj');"); sb.Append("})();"); - 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= 0) { - var sSpuId = addBtnItem.innerText.replace('\r','').replace('\n','').replace('ID: ', ''); - addBtnItem.outerHTML = addBtnItem.outerHTML.replace(""
"",""
"") - .replace(""
"", ""
""); - } - } - }"; - cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sAddInputJs); - }); - } + //cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sb.ToString()); } //public Func BeforeResourceLoadEvent; // sender, requestUrl, postData, request, true(表示取消执行) private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request) { - if (BaseClass.MainPath == "binxixi" && BaseClass.UsePddWorkbanch && !shop.Cookies.Contains("windows_1")) - { - var ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; - //ua = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36"; - request.SetHeaderByName("User-Agent", ua, true); - - //var ua = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12"; - //request.SetHeaderByName("User-Agent", ua, true); - ////if (request.Method == "POST") - //request.SetHeaderByName("pddid", shop.pddid, true); - //request.SetHeaderByName("Accept-Encoding", "gzip, deflate, br", true); - //var headers = request.Headers; - //headers.Remove("sec-ch-ua"); - //headers.Remove("sec-ch-ua-mobile"); - //headers.Remove("sec-ch-ua-platform"); - //headers.Remove("Accept-Language"); - //headers.Remove("Origin"); - ////headers["User-Agent"] = ua; - ////headers["Accept-Encoding"] = "gzip, deflate, br"; - //request.Headers = headers; - } - return false; } - - static int GetAntiContentsTimes = 40; + private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request) { - var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : ""; - var refere = request.ReferrerUrl; - if (shop != null && !url.StartsWith("https://mms.pinduoduo.com/janus/api/userinfo") && !string.IsNullOrEmpty(antiContent) && request.Method == "POST") - { - Task.Run(() => - { - GetAntiContentsTimes++; - if (this.Created && !this.Disposing && !this.IsDisposed) - Invoke(new Action(() => - { - try { this.TitleText = "店铺登录 - " + GetAntiContentsTimes; } catch { return; } - })); - shop.AntiContents.Add(antiContent); - while (shop.AntiContents.Count > 100) - shop.AntiContents.RemoveAt(0); - if (!string.IsNullOrEmpty(shop.ShopId) && GetAntiContentsTimes > 500) - { - GetAntiContentsTimes = 0; - ShopBLL.MdyAntiContent(shop); - } - }); - } - if (url == "https://mms.pinduoduo.com/janus/api/userinfo") + if (url == "https://store.weixin.qq.com/shop/home" && this.openType == EnumOpenType.login) { Task.Run(() => { var data = responseData; - if (this.shop != null && data.Contains("\"success\":true")) + + var index = data.IndexOf("window.__INITIAL_PINIA_DATA__=") + "window.__INITIAL_PINIA_DATA__=".Length; + var indexEnd = data.IndexOf(";window.__USE_VITE__="); + if (index < 1000) { - var username = BaseRegex.GetStringJson(ref data, "username"); - var maskMobile = BaseRegex.GetStringJson(ref data, "mobile"); - maskMobile = maskMobile.Split('*').Last(); - if (string.IsNullOrWhiteSpace(maskMobile) || string.IsNullOrWhiteSpace(username)) - return; - - if (shop.LoginName.EndsWith(maskMobile) || shop.LoginName == username) - { - lstShopCompany.Clear(); - var jObj = JObject.Parse(data); - var jArr = jObj["result"] as JArray; - if (jArr == null) - jArr = new JArray(); - - Thread.Sleep(500); - - ShopCompany sc = new ShopCompany() - { - //AccountId = BaseRegex.GetStringJson(ref data, "mallId"), - AccountId = BaseRegex.GetStringJson(ref data, "username"), - AccountName = BaseRegex.GetStringJson(ref data, "mall_name"), - LoginName = shop.LoginName, - UserName = BaseClass.UserName, - LoginStatus = "登录成功", - AntiContent = antiContent, - }; - this.lstShopCompany.Add(sc); - } + //BaseMsgForm.ShowError("cookie已失效!"); + return; } + var dataStr = data.Substring(index, indexEnd - index); + dataStr = GetHtml.Unicode2String(dataStr); + + var shopId = BaseRegex.GetStringJson(ref data, "appid"); + var nickName = BaseRegex.GetStringJson(ref data, "nickName"); + var openId = BaseRegex.GetStringJson(ref data, "openid"); // oGu7k7HxmUyOmc1X6VM7GQwS-9cI + if (shop != null && shop.ShopId != shopId) + { + BaseMsgForm.ShowError("cookie与店铺不匹配,请核对店铺!"); + return; + } + if (shop == null && GlobalConfig.ShopLoginList.Any(s=>s.ShopId == shopId)) + { + BaseMsgForm.ShowError("录入的新店铺已存在,请核对店铺!"); + return; + } + + ShopCompany sc = new ShopCompany() + { + UserName = BaseClass.UserName, // 登录的用户信息 + AccountId = shopId, + AccountName = nickName, + LoginName = shopId, + openid = openId, + LoginStatus = "登录成功", + }; + this.lstShopCompany.RemoveAll(s => s.AccountId == sc.AccountId); + this.lstShopCompany.Add(sc); }); } } @@ -859,7 +682,7 @@ function fireKeyEvent(el, evtType, keyCode) { // 自动滑块图形验证 if (GlobalConfig.TemuShopSettingParam.IsAutoDragLogin) { - PDDShopLoginForm.CefMouseDragDou(cefWebBrowser, x, y, Convert.ToInt32((x + Stopxt * 340m / 552m) - 15), y); + WXShopLoginForm.CefMouseDragDou(cefWebBrowser, x, y, Convert.ToInt32((x + Stopxt * 340m / 552m) - 15), y); for (int i = 0; i < 1; i++) Thread.Sleep(2000 + Randomx.GetId(1000)); response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); diff --git a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.resx b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.resx new file mode 100644 index 0000000..c963c3c --- /dev/null +++ b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.resx @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAgIAQYAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// + AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzM + zMzMzMzMzMx3d4iIiIiIiIh3fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM + zMzMzMzMzMzHeIiIiIj/////////iIiIiId8zMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM + zMzMzMzMzMzMzMeIiI/////////////////////4iIh8zMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAATMzM + zMzMzMzMzMzMzMzMzHiI////////////////////////////iIfMzMzMzMzMzMzMzMzMzMzMxAAAAAAA + AGzMzMzMzMzMzMzMzMzMx3iP///////////////////////////////4iHzMzMzMzMzMzMzMzMzMzMYA + AAAAAAbMzMzMzMzMzMzMzMzMx3iP//////////////////////////////////+IfMzMzMzMzMzMzMzM + zMzMYAAAAABMzMzMzMzMzMzMzMzMx3iP/////////////////////////////////////4h8zMzMzMzM + zMzMzMzMzMQAAAAAbMzMzMzMzMzMzMzMzHiP////////////////////////////////////////h3zM + zMzMzMzMzMzMzMzGAAAABMzMzMzMzMzMzMzMzHiP//////////////////////////////////////// + //iHzMzMzMzMzMzMzMzMzEAAAAbMzMzMzMzMzMzMzMeI//////////////////////////////////// + ////////+IfMzMzMzMzMzMzMzMxgAABMzMzMzMzMzMzMzMx4//////////////////////////////// + //////////////+IfMzMzMzMzMzMzMzMxAAAbMzMzMzMzMzMzMzHj/////////////////////////// + /////////////////////4fMzMzMzMzMzMzMzMYAAMzMzMzMzMzMzMzMeP////////////////////// + ///////////////////////////4fMzMzMzMzMzMzMzMAAbMzMzMzMzMzMzMx4////////////////// + /////////////////////////////////4fMzMzMzMzMzMzMzGAGzMzMzMzMzMzMzHj///////////// + ///////////////////////////////////////4fMzMzMzMzMzMzMxgDMzMzMzMzMzMzMyI//////// + /////////////////////////////////////////////4zMzMzMzMzMzMzMwEzMzMzMzMzMzMzHj/// + //////////////////////////////////////////////////+HzMzMzMzMzMzMzMRszMzMzMzMzMzM + eP//////////////////////////////////////////////////////+HzMzMzMzMzMzMzGbMzMzMzM + zMzMzHj///////////////////////////////////////////////////////+MzMzMzMzMzMzMxmzM + zMzMzMzMzMyP////+IiP////////////////////////////////////////+I//////h8zMzMzMzMzM + zMZszMzMzMzMzMzHj////4iIiI//////////////////////////////////////+IiIj/////jMzMzM + zMzMzMzGbMzMzMzMzMzMyP////iIiIiI/////////////////////////////////////4iIiIj////4 + fMzMzMzMzMzMxszMzMzMzMzMzHj////4iIiIiP////////////////////////////////////+IiIiI + j////4zMzMzMzMzMzMbMzMzMzMzMzMx4////iIiIiIj////////////////////////////////////4 + iIiIiI////+HzMzMzMzMzMzMzMzMzMzMzMzMj////4iIiIiI//////////////+IiP//iI////////// + ////+IiIiIiP////h8zMzMzMzMzMzMzMzMzMzMzMzI/////4iIiIiP/////////////4d3eIiIeIj/// + //////////+IiIiIj/////jMzMzMzMzMzMzMzMzMzMzMzMyP////+IiIiIj/////////////iIiId3eI + iI//////////////iIiIiI/////4zMzMzMzMzMzMzMzMzMzMzMzHj/////+IiIiP/////////////4// + /4d4j/+P//////////////iIiIj/////+MzMzMzMzMzMzMzMzMzMzMzMx4//////+IiP//////////// + ///////4j///////////////////iIiP//////jMzMzMzMzMzMzMzMzMzMzMzMeP//////////+IiIj/ + ///////////////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzH//////////+H + fMx8eP//////////////////////////iId3iP//////////+HzMzMzMzMzMzMzMzMzMzMzMyP////// + ///4fMzHh8eP////////////////////////+MzMzMd4//////////h8zMzMzMzMzMzMzMzMzMzMzMf/ + ////////+MzMePjMeP///////////////////////4zMzMeHx4/////////4fMzMzMzMzMzMzMzMzMzM + zMzH/////////4fMd3eHzMeP//////////////////////iMzMzIiHx4////////+HzMzMzMzMzMzMzM + zMzMzMzMx/////////+Hx4iIfMzMj//////////////////////4h3d8x4h8yP////////jMzMzMzMzM + zMzMzMzMzMzMzMeP////////+HiP+IfMzI//////////////////////+HiIiHd3zHj////////4zMzM + zMzMzMzMzMzMzMzMzMzHj/////////h4//+HzMeP//////////////////////h4//h8zMyP//////// + +MzMzMzMzMzMzMzMzMzMzMzMzI/////////4iP//h8x4///////////////////////4j//4fMzHj/// + //////jMzMzMzMzMzMzMzMzMzMzMzMyP///////4iIiP+IfHj///////////////////////+Ij/+HzM + eP/////////4zMzMzMzMzMzMzMzMzMzMzMzMj///////iIiIiIh3eP////////////////////////+I + j4h8x3iI////////h8zMzMzMzMzMzMzMzMzMzMzMzH//////+Hj///iIiI////////////////////// + /////4iId4iIiIj//////4zMzMzMzMzMzMzMzMzMzMzMzMx4//////iP////iP////////////////// + /////////////4iP//iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMyP//////////+I////////////// + ///////////////////4eP//iP//////jMzMzMzMzMzMzMzMzMzMzMzMzMj///////////iP//////// + /////////////////////////4j/////////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////////// + //////////////////////////////+I//////////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////// + //////////////////////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMyP//// + ////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM + eP///////////////////////////////////////////////////////4zMzMzMzMzMzMzMzMzMzMzM + zMzMzMj///////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzM + zMzMzMzMzMzHj//////////////////////////////////////////////////////4zMzMzMzMzMzM + zMzMzMzMzMzMzMzMzI//////////////////////////////////////////////////////h8zMzMzM + zMzMzMzMzMzMzMzMzMzMzMx4////////////////////////////////////////////////////+HzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMyI////+I//////////////////////////////////////////// + //h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+Ij///////////////////////////////////// + //////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+IiIiIj//////////////////////////4 + ////iI/////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMiP/////4iIiP////////////////////// + ////+IiIiIj/////iHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////////////////// + ///////////4iIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP//////////////////// + //////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////// + //////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHj///////// + ///////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//// + ////////////////////////////////////////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI + j/////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMeP//////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMx4////////+I//////////////////////////////////////jMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMeP///////4iIj///////////////////////////iP///////4fMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMx4////////iIiIiP///////////////////////4iIiP///////4zMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIj///////+HzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIj////////////////////4iIiIiIj/////// + +MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIiI// + //////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiP////////////////////iIiI + iIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiIj/////iIiIiIiIj///// + /4iIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiI/////4zMzMzMzM + j/////+IiIiIiIiP//////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//////+IiIiIiIj/////+MzM + zMzMzI//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iIiIiIiI//// + //jMzMzMzMyP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP///////4iIiIiI + iP/////4zMzMzMzMj//////4iIiIiIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iI + iIiIiI//////+MzMzMzMzI//////+IiIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMyP//// + ///4iIiIiIiP//////fMzMzMzMyP//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzH + j///////+IiIiIiI//////+HzMzMzMzMeP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzM + zMzMyP////////iIiIiIiP//////jMzMzMzMzHj///////iIiIiIiI///////4fMzMzMzMzMzMzMzMzM + zMzMzMzMzMj///////+IiIiIiI///////4zMzMzMzMzI///////4iIiIiIiI///////3zMzMzMzMzMzM + zMzMzMzMzMzMzMzI////////iIiIiIiP//////+MzMzMzMzMyP//////+IiIiIiIiP//////+MzMzMzM + zMzMzMzMzMzMzMzMzMzMeP///////4iIiIiIj///////jMzMzMzMzMj///////+IiIiIiIj///////jM + zMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiIiP//////+HzMzMzMzMzHj///////iIiIiIiI//// + ///4zMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIiI////////jMzMzMzMzMzI///////4iIiIiI + iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMzMj////////4iIiIiP///////4zMzMzMzMzMyP///////4 + iIiIiIiP//////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiI////////h8zMzMzMzMzMeP// + /////4iIiIiIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIj////////4fMzMzMzMzM + zHj///////+IiIiIiI//////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////iIiP////////+MzMzM + zMzMzMzI////////+IiIiIiP//////h8zMzMzMzMzMzMxmzMzMzMzMzMx4/////////4iP/////////4 + fMzMzMzMzMzMx4////////+IiIiIj//////4fMzMzMzMzMzMzMZszMzMzMzMzMeP//////////////// + ////+MzMzMzMzMzMzMyP////////iIiIiP//////+HzMzMzMzMzMzMzGbMzMzMzMzMzH//////////// + //////////fMzMzMzMzMzMzMeP////////iIiIj///////98zMzMzMzMzMzMxmzMzMzMzMzMyP////// + //////////////+HzMzMzMzMzMzMzHj/////////+IiP////////jMzMzMzMzMzMzMZszMzMzMzMzMj/ + ////////////////////jMzMzMzMzMzMzMzIj////////////////////4zMzMzMzMzMzMzGTMzMzMzM + zMzH////////////////////+HzMzMzMzMzMzMzMx4////////////////////+MzMzMzMzMzMzMxAzM + zMzMzMzMx/////////////////////jMzMzMzMzMzMzMzMyI///////////////////4fMzMzMzMzMzM + zMAGzMzMzMzMzMeP//////////////////+HzMzMzMzMzMzMzMzMeP//////////////////+HzMzMzM + zMzMzMxgBszMzMzMzMzHj//////////////////4fMzMzMzMzMzMzMzMzMeP//////////////////h8 + zMzMzMzMzMzMYADMzMzMzMzMzI//////////////////+HzMzMzMzMzMzMzMzMzHj/////////////// + ///4zMzMzMzMzMzMzAAAbMzMzMzMzMyP/////////////////4fMzMzMzMzMzMzMzMzMzHj///////// + ////////+MzMzMzMzMzMzMYAAEzMzMzMzMzMj/////////////////+MzMzMzMzMzMzMzMzMzMzIj/// + /////////////4fMzMzMzMzMzMzEAAAGzMzMzMzMzHj////////////////4fMzMzMzMzMzMzMzMzMzM + x4////////////////+MzMzMzMzMzMzMYAAABMzMzMzMzMx4////////////////h8zMzMzMzMzMzMzM + zMzMzMx4///////////////4fMzMzMzMzMzMzEAAAABszMzMzMzMx4//////////////+HzMzMzMzMzM + zMzMzMzMzMzMx4//////////////+MzMzMzMzMzMzMYAAAAATMzMzMzMzMyP/////////////4fMzMzM + zMzMzMzMzMzMzMzMzMeI/////////////4fMzMzMzMzMzMzEAAAAAAbMzMzMzMzMeP////////////h8 + zMzMzMzMzMzMzMzMzMzMzMzMeI////////////h8zMzMzMzMzMzMYAAAAAAAbMzMzMzMzMeP//////// + //iHzMzMzMzMzMzMzMzMzMzMzMzMzMyI//////////+HzMzMzMzMzMzMxgAAAAAAAEzMzMzMzMzMeP// + //////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMx4/////////4fMzMzMzMzMzMzMQAAAAAAAAGzMzMzMzM + zMeI//////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4j//////4h8zMzMzMzMzMzMxgAAAAAAAAAGzM + zMzMzMzMx4iIiIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiIj/+Ih3zMzMzMzMzMzMzGAAAAAAAA + AAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx3iId8zMzMzMzMzMzMzMYAAA + AAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + xgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzGAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA + AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+ + AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA + B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA + AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA + AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA + AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA + AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA + AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA + AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA + AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA + AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA + AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA + AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf///// + +AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w== + + + \ No newline at end of file diff --git a/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.Designer.cs new file mode 100644 index 0000000..d2c1705 --- /dev/null +++ b/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.Designer.cs @@ -0,0 +1,203 @@ +namespace TemuKJD.WXForms.ShopForms +{ + partial class WXShopUpdateCookieForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXShopUpdateCookieForm)); + this.panel2 = new System.Windows.Forms.Panel(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.label4 = new System.Windows.Forms.Label(); + this.txtCookieJs1 = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.label3 = new System.Windows.Forms.Label(); + this.txtSubPassId = new System.Windows.Forms.TextBox(); + this.txtLoginName = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btnOk = new TemuKJD.UserControls.ButtonEx(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.White; + this.panel2.Controls.Add(this.splitContainer1); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(1, 33); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(698, 424); + this.panel2.TabIndex = 1; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.label4); + this.splitContainer1.Panel1.Controls.Add(this.txtCookieJs1); + this.splitContainer1.Panel1.Controls.Add(this.label3); + this.splitContainer1.Panel1.Controls.Add(this.txtSubPassId); + this.splitContainer1.Panel1.Controls.Add(this.txtLoginName); + this.splitContainer1.Panel1.Controls.Add(this.label1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.btnOk); + this.splitContainer1.Size = new System.Drawing.Size(698, 424); + this.splitContainer1.SplitterDistance = 348; + this.splitContainer1.TabIndex = 394; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(40, 103); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(60, 17); + this.label4.TabIndex = 399; + this.label4.Text = "CookieJs"; + // + // txtCookieJs1 + // + this.txtCookieJs1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + // + // + // + this.txtCookieJs1.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtCookieJs1.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtCookieJs1.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtCookieJs1.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.txtCookieJs1.Border.Class = "CrumbBarBackgroundKey"; + this.txtCookieJs1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtCookieJs1.Border.PaddingBottom = 2; + this.txtCookieJs1.Border.PaddingLeft = 2; + this.txtCookieJs1.Border.PaddingRight = 2; + this.txtCookieJs1.Border.PaddingTop = 2; + this.txtCookieJs1.Location = new System.Drawing.Point(100, 101); + this.txtCookieJs1.Multiline = true; + this.txtCookieJs1.Name = "txtCookieJs1"; + this.txtCookieJs1.Size = new System.Drawing.Size(569, 227); + this.txtCookieJs1.TabIndex = 398; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(16, 72); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(84, 17); + this.label3.TabIndex = 397; + this.label3.Text = "SUB_PASS_ID"; + this.label3.Visible = false; + // + // txtSubPassId + // + this.txtSubPassId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSubPassId.Location = new System.Drawing.Point(100, 69); + this.txtSubPassId.Name = "txtSubPassId"; + this.txtSubPassId.Size = new System.Drawing.Size(569, 23); + this.txtSubPassId.TabIndex = 396; + this.txtSubPassId.Visible = false; + // + // txtLoginName + // + this.txtLoginName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtLoginName.Location = new System.Drawing.Point(100, 15); + this.txtLoginName.Name = "txtLoginName"; + this.txtLoginName.Size = new System.Drawing.Size(569, 23); + this.txtLoginName.TabIndex = 395; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(44, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(56, 17); + this.label1.TabIndex = 394; + this.label1.Text = "登录账号"; + // + // btnOk + // + this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnOk.ForeColor = System.Drawing.Color.White; + this.btnOk.Location = new System.Drawing.Point(614, 28); + this.btnOk.Margin = new System.Windows.Forms.Padding(2); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(55, 26); + this.btnOk.TabIndex = 392; + this.btnOk.Text = "保存"; + this.btnOk.UseVisualStyleBackColor = false; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // WXShopUpdateCookieForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(700, 458); + this.Controls.Add(this.panel2); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "WXShopUpdateCookieForm"; + this.Text = "更新Cookie"; + this.TitleText = "更新Cookie"; + this.Load += new System.EventHandler(this.ShopUpdateCookieForm_Load); + this.Controls.SetChildIndex(this.panel2, 0); + this.panel2.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.SplitContainer splitContainer1; + private DevComponents.DotNetBar.Controls.TextBoxX txtCookieJs1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtSubPassId; + private System.Windows.Forms.TextBox txtLoginName; + private System.Windows.Forms.Label label1; + private UserControls.ButtonEx btnOk; + private System.Windows.Forms.Label label4; + } +} \ No newline at end of file diff --git a/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.cs new file mode 100644 index 0000000..9db82a5 --- /dev/null +++ b/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.cs @@ -0,0 +1,237 @@ +using AllBase.Helper; +using AllBase.Model.Result; +using TemuKJD.BaseForms; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using AllBase; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using Work; +using TemuKJD.KJDForms.AdminForms; +using TemuKJD.BLL; + +namespace TemuKJD.WXForms.ShopForms +{ + public enum SetCookieFromEnum + { + normal_user, + sa, + } + public partial class WXShopUpdateCookieForm : LRBaseForm + { + ShopLoginInfo shopLoginInfo = null; + SetCookieFromEnum updateFrom; + string cookieVersion = ""; + + public WXShopUpdateCookieForm(ShopLoginInfo shop = null, SetCookieFromEnum from = SetCookieFromEnum.normal_user, string _cookieVersion="国内版") + { + InitializeComponent(); + shopLoginInfo = shop; + updateFrom = from; + cookieVersion = _cookieVersion; + this.TitleText = "更新Cookie"; + } + + private void ShopUpdateCookieForm_Load(object sender, EventArgs e) + { + if (shopLoginInfo != null) + txtLoginName.Text = shopLoginInfo.LoginName + " " + shopLoginInfo.ShopAccount + " " + shopLoginInfo.Notes; + } + + /* + document.cookie='_qimei_uuid42=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + document.cookie='_qpsvr_localtk=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + document.cookie='biz_magic=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + document.cookie='biz_rand=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + document.cookie='biz_ticket=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + document.cookie='biz_token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + document.cookie='ptcz=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + document.cookie='RK=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + document.cookie='yyb_muid=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;'; + + document.cookie='_qimei_uuid42=19b0b09361e100c47695a05aaf3375f6d5eb35bb32; domain=.qq.com; expires=2026-11-11T01:54:30.000Z; path=/'; + document.cookie='_qpsvr_localtk=5432784879518021; domain=.qq.com;expires=Fri, 06 Feb 2026 01:31:39 UTC; path=/'; + document.cookie='biz_magic=4a425a343f033dd057463cfafc3e04b1531e36a25b0e99be21efce245c9129e8; domain=store.weixin.qq.com;expires=Fri, 06 Feb 2026 01:31:39 UTC; path=/'; + document.cookie='biz_rand=CAESIMo2sjiyv4vip6jSSg+6B6Uh7gdgW4GBae7AEySSXswt; domain=store.weixin.qq.com;expires=Fri, 06 Feb 2026 01:31:39 UTC; path=/'; + document.cookie='biz_ticket=; domain=store.weixin.qq.com;expires=Fri, 06 Feb 2026 01:31:39 UTC; path=/'; + document.cookie='biz_token=b_0000019b_8e3d689c_f4835bf4_23267fa7_c4ff2be1; domain=store.weixin.qq.com;expires=Fri, 06 Feb 2026 01:31:39 UTC; path=/'; + document.cookie='ptcz=584e5aff2216045382bfed928d03d10924787f910ea5a5e09e0df73b6c5e6c9d; domain=.qq.com;expires=2027-02-09T06:15:17.542Z; path=/'; + document.cookie='RK=WCfEwM0OZQ; domain=.qq.com;expires=2026-07-30T07:12:51.627Z; path=/'; + document.cookie='yyb_muid=3B8E28E6B8EA60762CCA3EF0B9EF61AB; domain=.qq.com; expires=2026-08-01T04:50:29.209Z; path=/'; + window.location.href='https://store.weixin.qq.com/shop/goods/list'; + */ + + private void btnOk_Click(object sender, EventArgs e) + { + if (shopLoginInfo == null) + { + BaseMsgForm.ShowError("店铺为空!"); + return; + } + + bool ok1 = false; + bool ok2 = false; + if (!string.IsNullOrWhiteSpace(txtSubPassId.Text) || !string.IsNullOrWhiteSpace(txtCookieJs1.Text)) + { + ok1 = GetCookie1(); + } + + if (ok1 || ok2) + { + this.OnSaveComplete(shopLoginInfo); + this.Close(); + } + } + + bool GetCookie1() + { + string txt = this.txtCookieJs1.Text; + txt = txt.Replace("_qimei_uuid42=;", "").Replace("_qpsvr_localtk=;", "").Replace("biz_magic=;", "") + .Replace("biz_rand=;", "").Replace("biz_ticket=;", "").Replace("biz_token=;", "") + .Replace("ptcz=;", "").Replace("RK=;", "").Replace("yyb_muid=;", ""); + + List cookieLst = new List(); + + + string _qimei_uuid42 = BaseRegex.GetStringCookie(ref txt, "_qimei_uuid42").ParseToString().Trim('\''); + string _qpsvr_localtk = BaseRegex.GetStringCookie(ref txt, "_qpsvr_localtk").ParseToString().Trim('\''); + string biz_magic = BaseRegex.GetStringCookie(ref txt, "biz_magic").ParseToString().Trim('\''); + string biz_rand = BaseRegex.GetStringCookie(ref txt, "biz_rand").ParseToString().Trim('\''); + string biz_ticket = BaseRegex.GetStringCookie(ref txt, "biz_ticket").ParseToString().Trim('\''); + string biz_token = BaseRegex.GetStringCookie(ref txt, "biz_token").ParseToString().Trim('\''); + string ptcz = BaseRegex.GetStringCookie(ref txt, "ptcz").ParseToString().Trim('\''); + string RK = BaseRegex.GetStringCookie(ref txt, "RK").ParseToString().Trim('\''); + string yyb_muid = BaseRegex.GetStringCookie(ref txt, "yyb_muid").ParseToString().Trim('\''); + + cookieLst.Add(new CefSharp.Cookie() { Name = "_qimei_uuid42", Value = _qimei_uuid42, Domain = ".qq.com", Expires = DateTime.Now.AddMonths(1) }); + cookieLst.Add(new CefSharp.Cookie() { Name = "_qpsvr_localtk", Value = _qpsvr_localtk, Domain = ".qq.com", Expires = DateTime.Now.AddMonths(1) }); + cookieLst.Add(new CefSharp.Cookie() { Name = "biz_magic", Value = biz_magic, Domain = "store.weixin.qq.com", Expires = DateTime.Now.AddMonths(1) }); + cookieLst.Add(new CefSharp.Cookie() { Name = "biz_rand", Value = biz_rand, Domain = "store.weixin.qq.com", Expires = DateTime.Now.AddMonths(1) }); + cookieLst.Add(new CefSharp.Cookie() { Name = "biz_ticket", Value = biz_ticket, Domain = "store.weixin.qq.com", Expires = DateTime.Now.AddMonths(1) }); + cookieLst.Add(new CefSharp.Cookie() { Name = "biz_token", Value = biz_token, Domain = "store.weixin.qq.com", Expires = DateTime.Now.AddMonths(1) }); + cookieLst.Add(new CefSharp.Cookie() { Name = "ptcz", Value = ptcz, Domain = ".qq.com", Expires = DateTime.Now.AddMonths(1) }); + cookieLst.Add(new CefSharp.Cookie() { Name = "RK", Value = RK, Domain = ".qq.com", Expires = DateTime.Now.AddMonths(1) }); + cookieLst.Add(new CefSharp.Cookie() { Name = "yyb_muid", Value = yyb_muid, Domain = ".qq.com", Expires = DateTime.Now.AddMonths(1) }); + + if (string.IsNullOrEmpty(biz_magic)) + { + BaseMsgForm.ShowError("Cookie缺少关键字段,请检查!"); + return false; + } + + // 建立一个临时店铺并用这个店铺去登录 + var cookieShop = new ShopLoginInfo(); + cookieShop.Cookies = JsonHelper.SerializeObject(cookieLst); + + var data = ""; + + data = WXShopListForm.GetShopInfo(cookieShop); + var index = data.IndexOf("window.__INITIAL_PINIA_DATA__=") + "window.__INITIAL_PINIA_DATA__=".Length; + var indexEnd = data.IndexOf(";window.__USE_VITE__="); + if (index < 1000) + { + BaseMsgForm.ShowError("cookie已失效!"); + return false; + } + var dataStr = data.Substring(index, indexEnd - index); + dataStr = GetHtml.Unicode2String(dataStr); + + var shopId = BaseRegex.GetStringJson(ref data, "appid"); + var nickName = BaseRegex.GetStringJson(ref data, "nickName"); + if (shopLoginInfo.ShopId != shopId) + { + BaseMsgForm.ShowError("cookie与店铺不匹配,请核对店铺!"); + return false; + } + + shopLoginInfo.Cookies = JsonHelper.SerializeObject(cookieLst); + shopLoginInfo.ShopAccount = nickName; + shopLoginInfo.LoginStatus = "登录成功"; + WXShopListForm.UpdateServerShopCookies(shopLoginInfo); // 店铺cookie写入服务端,多店共用一个登录账号一组cookie + return true; + } + + /// + /// 如果店铺没有cookie登录过,处理店铺第一次登录(分裂cookie下的所有店铺) + /// + /// + void GetShopFirstLogin(string loginData, List lstServerShop) + { + if (this.shopLoginInfo == null) + return; + if (lstServerShop == null) + lstServerShop = new List(); + + List lstShopCompany = new List(); + var jObj = JObject.Parse(loginData); + var jArr = jObj["result"]?["companyList"]?[0]?["malInfoList"] as JArray; + if (jArr == null) + jArr = new JArray(); + + foreach (var productObj in jArr) + { + var prod = JsonHelper.SerializeObject(productObj); + ShopCompany sc = new ShopCompany() + { + AccountId = BaseRegex.GetStringJson(ref prod, "mallId"), + AccountName = BaseRegex.GetStringJson(ref prod, "mallName"), + LoginName = shopLoginInfo.LoginName, + UserName = BaseClass.UserName, + LoginStatus = "登录成功", + }; + lstShopCompany.Add(sc); + } + + var lstShopCompanyCopy = lstShopCompany.ToList(); + foreach (ShopCompany sc in lstShopCompanyCopy) + { + ShopLoginInfo newShop = new ShopLoginInfo() + { + UserName = shopLoginInfo.UserName, + LoginName = shopLoginInfo.LoginName, + Password = shopLoginInfo.Password, + GroupName = shopLoginInfo.GroupName, + ShopAccount = sc.AccountName, + ShopId = sc.AccountId, + SubUserName = shopLoginInfo.SubUserName, + Notes = shopLoginInfo.Notes, + }; + + var oldServerShop = lstServerShop.FirstOrDefault(s => + s.LoginName == newShop.LoginName && s.ShopId == newShop.ShopId); + if (oldServerShop == null) + { + if (updateFrom != SetCookieFromEnum.normal_user) + ShopBLL.AdminAddServerShop(newShop); // 店铺写入到服务端 + else + ShopBLL.AddServerShop(newShop); // 店铺写入到服务端 + } + } + } + + private void btnGetCookie_Click(object sender, EventArgs e) + { + //复制cookie + var cookJs = @" +document.body.innerHTML = '' + document.body.innerHTML; +function geCookie() +{ + var cookieText = document.cookie; + navigator.clipboard.writeText(cookieText).then(function() { + alert('复制cookie成功!'); + }, function(err) { + alert('复制cookie失败: ', err); + }); +}"; + Clipboard.SetDataObject(cookJs); + BaseMsgForm.ShowInfo("js复制成功"); + } + } +} diff --git a/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.resx b/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.resx new file mode 100644 index 0000000..c963c3c --- /dev/null +++ b/TEMUKJD/WXForms/ShopForms/WXShopUpdateCookieForm.resx @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAgIAQYAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// + AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzM + zMzMzMzMzMx3d4iIiIiIiIh3fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM + zMzMzMzMzMzHeIiIiIj/////////iIiIiId8zMzMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM + zMzMzMzMzMzMzMeIiI/////////////////////4iIh8zMzMzMzMzMzMzMzMzMzMzMxgAAAAAAAATMzM + zMzMzMzMzMzMzMzMzHiI////////////////////////////iIfMzMzMzMzMzMzMzMzMzMzMxAAAAAAA + AGzMzMzMzMzMzMzMzMzMx3iP///////////////////////////////4iHzMzMzMzMzMzMzMzMzMzMYA + AAAAAAbMzMzMzMzMzMzMzMzMx3iP//////////////////////////////////+IfMzMzMzMzMzMzMzM + zMzMYAAAAABMzMzMzMzMzMzMzMzMx3iP/////////////////////////////////////4h8zMzMzMzM + zMzMzMzMzMQAAAAAbMzMzMzMzMzMzMzMzHiP////////////////////////////////////////h3zM + zMzMzMzMzMzMzMzGAAAABMzMzMzMzMzMzMzMzHiP//////////////////////////////////////// + //iHzMzMzMzMzMzMzMzMzEAAAAbMzMzMzMzMzMzMzMeI//////////////////////////////////// + ////////+IfMzMzMzMzMzMzMzMxgAABMzMzMzMzMzMzMzMx4//////////////////////////////// + //////////////+IfMzMzMzMzMzMzMzMxAAAbMzMzMzMzMzMzMzHj/////////////////////////// + /////////////////////4fMzMzMzMzMzMzMzMYAAMzMzMzMzMzMzMzMeP////////////////////// + ///////////////////////////4fMzMzMzMzMzMzMzMAAbMzMzMzMzMzMzMx4////////////////// + /////////////////////////////////4fMzMzMzMzMzMzMzGAGzMzMzMzMzMzMzHj///////////// + ///////////////////////////////////////4fMzMzMzMzMzMzMxgDMzMzMzMzMzMzMyI//////// + /////////////////////////////////////////////4zMzMzMzMzMzMzMwEzMzMzMzMzMzMzHj/// + //////////////////////////////////////////////////+HzMzMzMzMzMzMzMRszMzMzMzMzMzM + eP//////////////////////////////////////////////////////+HzMzMzMzMzMzMzGbMzMzMzM + zMzMzHj///////////////////////////////////////////////////////+MzMzMzMzMzMzMxmzM + zMzMzMzMzMyP////+IiP////////////////////////////////////////+I//////h8zMzMzMzMzM + zMZszMzMzMzMzMzHj////4iIiI//////////////////////////////////////+IiIj/////jMzMzM + zMzMzMzGbMzMzMzMzMzMyP////iIiIiI/////////////////////////////////////4iIiIj////4 + fMzMzMzMzMzMxszMzMzMzMzMzHj////4iIiIiP////////////////////////////////////+IiIiI + j////4zMzMzMzMzMzMbMzMzMzMzMzMx4////iIiIiIj////////////////////////////////////4 + iIiIiI////+HzMzMzMzMzMzMzMzMzMzMzMzMj////4iIiIiI//////////////+IiP//iI////////// + ////+IiIiIiP////h8zMzMzMzMzMzMzMzMzMzMzMzI/////4iIiIiP/////////////4d3eIiIeIj/// + //////////+IiIiIj/////jMzMzMzMzMzMzMzMzMzMzMzMyP////+IiIiIj/////////////iIiId3eI + iI//////////////iIiIiI/////4zMzMzMzMzMzMzMzMzMzMzMzHj/////+IiIiP/////////////4// + /4d4j/+P//////////////iIiIj/////+MzMzMzMzMzMzMzMzMzMzMzMx4//////+IiP//////////// + ///////4j///////////////////iIiP//////jMzMzMzMzMzMzMzMzMzMzMzMeP//////////+IiIj/ + ///////////////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzH//////////+H + fMx8eP//////////////////////////iId3iP//////////+HzMzMzMzMzMzMzMzMzMzMzMyP////// + ///4fMzHh8eP////////////////////////+MzMzMd4//////////h8zMzMzMzMzMzMzMzMzMzMzMf/ + ////////+MzMePjMeP///////////////////////4zMzMeHx4/////////4fMzMzMzMzMzMzMzMzMzM + zMzH/////////4fMd3eHzMeP//////////////////////iMzMzIiHx4////////+HzMzMzMzMzMzMzM + zMzMzMzMx/////////+Hx4iIfMzMj//////////////////////4h3d8x4h8yP////////jMzMzMzMzM + zMzMzMzMzMzMzMeP////////+HiP+IfMzI//////////////////////+HiIiHd3zHj////////4zMzM + zMzMzMzMzMzMzMzMzMzHj/////////h4//+HzMeP//////////////////////h4//h8zMyP//////// + +MzMzMzMzMzMzMzMzMzMzMzMzI/////////4iP//h8x4///////////////////////4j//4fMzHj/// + //////jMzMzMzMzMzMzMzMzMzMzMzMyP///////4iIiP+IfHj///////////////////////+Ij/+HzM + eP/////////4zMzMzMzMzMzMzMzMzMzMzMzMj///////iIiIiIh3eP////////////////////////+I + j4h8x3iI////////h8zMzMzMzMzMzMzMzMzMzMzMzH//////+Hj///iIiI////////////////////// + /////4iId4iIiIj//////4zMzMzMzMzMzMzMzMzMzMzMzMx4//////iP////iP////////////////// + /////////////4iP//iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMyP//////////+I////////////// + ///////////////////4eP//iP//////jMzMzMzMzMzMzMzMzMzMzMzMzMj///////////iP//////// + /////////////////////////4j/////////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////////// + //////////////////////////////+I//////////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////// + //////////////////////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMyP//// + ////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM + eP///////////////////////////////////////////////////////4zMzMzMzMzMzMzMzMzMzMzM + zMzMzMj///////////////////////////////////////////////////////h8zMzMzMzMzMzMzMzM + zMzMzMzMzMzHj//////////////////////////////////////////////////////4zMzMzMzMzMzM + zMzMzMzMzMzMzMzMzI//////////////////////////////////////////////////////h8zMzMzM + zMzMzMzMzMzMzMzMzMzMzMx4////////////////////////////////////////////////////+HzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMyI////+I//////////////////////////////////////////// + //h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+Ij///////////////////////////////////// + //////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP////+IiIiIj//////////////////////////4 + ////iI/////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMiP/////4iIiP////////////////////// + ////+IiIiIj/////iHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////////////////// + ///////////4iIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP//////////////////// + //////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiP////////////// + //////////////////////////////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHj///////// + ///////////////////////////////////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//// + ////////////////////////////////////////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI + j/////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMeP//////////////////////////////////////////////h8zMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMx4////////+I//////////////////////////////////////jMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMeP///////4iIj///////////////////////////iP///////4fMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMx4////////iIiIiP///////////////////////4iIiP///////4zMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIj///////+HzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIj////////////////////4iIiIiIj/////// + +MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiI////////////////////+IiIiIiI// + //////h8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiP////////////////////iIiI + iIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMj///////+IiIiIiIj/////iIiIiIiIj///// + /4iIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4////////iIiIiIiI/////4zMzMzMzM + j/////+IiIiIiIiP//////+HzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP//////+IiIiIiIj/////+MzM + zMzMzI//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iIiIiIiI//// + //jMzMzMzMyP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzMzMzMzMeP///////4iIiIiI + iP/////4zMzMzMzMj//////4iIiIiIiI///////4fMzMzMzMzMzMzMzMzMzMzMzMzMzMzI////////iI + iIiIiI//////+MzMzMzMzI//////+IiIiIiIiP///////4zMzMzMzMzMzMzMzMzMzMzMzMzMzMyP//// + ///4iIiIiIiP//////fMzMzMzMyP//////+IiIiIiIj///////+MzMzMzMzMzMzMzMzMzMzMzMzMzMzH + j///////+IiIiIiI//////+HzMzMzMzMeP//////iIiIiIiIj///////jMzMzMzMzMzMzMzMzMzMzMzM + zMzMyP////////iIiIiIiP//////jMzMzMzMzHj///////iIiIiIiI///////4fMzMzMzMzMzMzMzMzM + zMzMzMzMzMj///////+IiIiIiI///////4zMzMzMzMzI///////4iIiIiIiI///////3zMzMzMzMzMzM + zMzMzMzMzMzMzMzI////////iIiIiIiP//////+MzMzMzMzMyP//////+IiIiIiIiP//////+MzMzMzM + zMzMzMzMzMzMzMzMzMzMeP///////4iIiIiIj///////jMzMzMzMzMj///////+IiIiIiIj///////jM + zMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiIiP//////+HzMzMzMzMzHj///////iIiIiIiI//// + ///4zMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIiI////////jMzMzMzMzMzI///////4iIiIiI + iI//////+MzMzMzMzMzMzMzMzMzMzMzMzMzMj////////4iIiIiP///////4zMzMzMzMzMyP///////4 + iIiIiIiP//////jMzMzMzMzMzMzMzMzMzMzMzMzMzI////////+IiIiI////////h8zMzMzMzMzMeP// + /////4iIiIiIj//////4fMzMzMzMzMzMzMzMzMzMzMzMzMyP////////iIiIj////////4fMzMzMzMzM + zHj///////+IiIiIiI//////+HzMzMzMzMzMzMzMzMzMzMzMzMzHj/////////iIiP////////+MzMzM + zMzMzMzI////////+IiIiIiP//////h8zMzMzMzMzMzMxmzMzMzMzMzMx4/////////4iP/////////4 + fMzMzMzMzMzMx4////////+IiIiIj//////4fMzMzMzMzMzMzMZszMzMzMzMzMeP//////////////// + ////+MzMzMzMzMzMzMyP////////iIiIiP//////+HzMzMzMzMzMzMzGbMzMzMzMzMzH//////////// + //////////fMzMzMzMzMzMzMeP////////iIiIj///////98zMzMzMzMzMzMxmzMzMzMzMzMyP////// + //////////////+HzMzMzMzMzMzMzHj/////////+IiP////////jMzMzMzMzMzMzMZszMzMzMzMzMj/ + ////////////////////jMzMzMzMzMzMzMzIj////////////////////4zMzMzMzMzMzMzGTMzMzMzM + zMzH////////////////////+HzMzMzMzMzMzMzMx4////////////////////+MzMzMzMzMzMzMxAzM + zMzMzMzMx/////////////////////jMzMzMzMzMzMzMzMyI///////////////////4fMzMzMzMzMzM + zMAGzMzMzMzMzMeP//////////////////+HzMzMzMzMzMzMzMzMeP//////////////////+HzMzMzM + zMzMzMxgBszMzMzMzMzHj//////////////////4fMzMzMzMzMzMzMzMzMeP//////////////////h8 + zMzMzMzMzMzMYADMzMzMzMzMzI//////////////////+HzMzMzMzMzMzMzMzMzHj/////////////// + ///4zMzMzMzMzMzMzAAAbMzMzMzMzMyP/////////////////4fMzMzMzMzMzMzMzMzMzHj///////// + ////////+MzMzMzMzMzMzMYAAEzMzMzMzMzMj/////////////////+MzMzMzMzMzMzMzMzMzMzIj/// + /////////////4fMzMzMzMzMzMzEAAAGzMzMzMzMzHj////////////////4fMzMzMzMzMzMzMzMzMzM + x4////////////////+MzMzMzMzMzMzMYAAABMzMzMzMzMx4////////////////h8zMzMzMzMzMzMzM + zMzMzMx4///////////////4fMzMzMzMzMzMzEAAAABszMzMzMzMx4//////////////+HzMzMzMzMzM + zMzMzMzMzMzMx4//////////////+MzMzMzMzMzMzMYAAAAATMzMzMzMzMyP/////////////4fMzMzM + zMzMzMzMzMzMzMzMzMeI/////////////4fMzMzMzMzMzMzEAAAAAAbMzMzMzMzMeP////////////h8 + zMzMzMzMzMzMzMzMzMzMzMzMeI////////////h8zMzMzMzMzMzMYAAAAAAAbMzMzMzMzMeP//////// + //iHzMzMzMzMzMzMzMzMzMzMzMzMzMyI//////////+HzMzMzMzMzMzMxgAAAAAAAEzMzMzMzMzMeP// + //////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMx4/////////4fMzMzMzMzMzMzMQAAAAAAAAGzMzMzMzM + zMeI//////iHfMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx4j//////4h8zMzMzMzMzMzMxgAAAAAAAAAGzM + zMzMzMzMx4iIiIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzHiIj/+Ih3zMzMzMzMzMzMzGAAAAAAAA + AAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMx3iId8zMzMzMzMzMzMzMYAAA + AAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + xgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzGAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM + zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA + AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+ + AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA + B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA + AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA + AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA + AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA + AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA + AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA + AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA + AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA + AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA + AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA + AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf///// + +AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w== + + + \ No newline at end of file diff --git a/TEMUKJD/DYForms/ShopForms/DYSubAccountListForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXSubAccountListForm.Designer.cs similarity index 99% rename from TEMUKJD/DYForms/ShopForms/DYSubAccountListForm.Designer.cs rename to TEMUKJD/WXForms/ShopForms/WXSubAccountListForm.Designer.cs index 39bbc02..a6b74de 100644 --- a/TEMUKJD/DYForms/ShopForms/DYSubAccountListForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WXSubAccountListForm.Designer.cs @@ -1,6 +1,6 @@ -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - partial class DYSubAccountListForm + partial class WXSubAccountListForm { /// /// Required designer variable. diff --git a/TEMUKJD/DYForms/ShopForms/DYSubAccountListForm.cs b/TEMUKJD/WXForms/ShopForms/WXSubAccountListForm.cs similarity index 98% rename from TEMUKJD/DYForms/ShopForms/DYSubAccountListForm.cs rename to TEMUKJD/WXForms/ShopForms/WXSubAccountListForm.cs index d19a712..3bc2100 100644 --- a/TEMUKJD/DYForms/ShopForms/DYSubAccountListForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXSubAccountListForm.cs @@ -12,14 +12,14 @@ using System.Threading.Tasks; using System.Windows.Forms; using Work; -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - public partial class DYSubAccountListForm : BaseForm + public partial class WXSubAccountListForm : BaseForm { public static List AllUsers { get; set; } = new List(); public MainForm Mf { get; set; } = null; public string Uid { get; set; } = ""; - public DYSubAccountListForm() + public WXSubAccountListForm() { InitializeComponent(); } diff --git a/TEMUKJD/DYForms/ShopForms/DYSubAccountListForm.resx b/TEMUKJD/WXForms/ShopForms/WXSubAccountListForm.resx similarity index 100% rename from TEMUKJD/DYForms/ShopForms/DYSubAccountListForm.resx rename to TEMUKJD/WXForms/ShopForms/WXSubAccountListForm.resx diff --git a/TEMUKJD/DYForms/ShopForms/DYSubAccountShopEditForm.Designer.cs b/TEMUKJD/WXForms/ShopForms/WXSubAccountShopEditForm.Designer.cs similarity index 99% rename from TEMUKJD/DYForms/ShopForms/DYSubAccountShopEditForm.Designer.cs rename to TEMUKJD/WXForms/ShopForms/WXSubAccountShopEditForm.Designer.cs index 6a438f1..674005a 100644 --- a/TEMUKJD/DYForms/ShopForms/DYSubAccountShopEditForm.Designer.cs +++ b/TEMUKJD/WXForms/ShopForms/WXSubAccountShopEditForm.Designer.cs @@ -1,6 +1,6 @@ -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - partial class DYSubAccountShopEditForm + partial class WXSubAccountShopEditForm { /// /// Required designer variable. @@ -28,7 +28,7 @@ /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DYSubAccountShopEditForm)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXSubAccountShopEditForm)); this.label1 = new System.Windows.Forms.Label(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.flpShopSubAccount = new System.Windows.Forms.FlowLayoutPanel(); diff --git a/TEMUKJD/DYForms/ShopForms/DYSubAccountShopEditForm.cs b/TEMUKJD/WXForms/ShopForms/WXSubAccountShopEditForm.cs similarity index 98% rename from TEMUKJD/DYForms/ShopForms/DYSubAccountShopEditForm.cs rename to TEMUKJD/WXForms/ShopForms/WXSubAccountShopEditForm.cs index c1a1f3d..c223811 100644 --- a/TEMUKJD/DYForms/ShopForms/DYSubAccountShopEditForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXSubAccountShopEditForm.cs @@ -12,15 +12,15 @@ using System.Threading.Tasks; using System.Windows.Forms; using Work; -namespace TemuKJD.DYForms.ShopForms +namespace TemuKJD.WXForms.ShopForms { - public partial class DYSubAccountShopEditForm : LRBaseForm + public partial class WXSubAccountShopEditForm : LRBaseForm { ShopLoginInfo shop = null; public List AllSubAccountList { get; set; } = new List(); public List ShopSubAccountList { get; set; } = new List(); public List NotShopSubAccountList { get; set; } = new List(); - public DYSubAccountShopEditForm(ShopLoginInfo _shop) + public WXSubAccountShopEditForm(ShopLoginInfo _shop) { InitializeComponent(); shop = _shop; diff --git a/TEMUKJD/DYForms/ShopForms/DYSubAccountShopEditForm.resx b/TEMUKJD/WXForms/ShopForms/WXSubAccountShopEditForm.resx similarity index 100% rename from TEMUKJD/DYForms/ShopForms/DYSubAccountShopEditForm.resx rename to TEMUKJD/WXForms/ShopForms/WXSubAccountShopEditForm.resx