157 lines
6.6 KiB
C#
157 lines
6.6 KiB
C#
using AllBase.Model.Config;
|
|
using AllBase.Model.Param.CollectManage;
|
|
using AllBase.Model.Param.ProductManage;
|
|
using AllBase.Model.Param.ShopManage;
|
|
using AllBase.Model.Param.TemuProductManage;
|
|
using AllBase.Model.Result;
|
|
using AllBase.Model.Result.PDDResult;
|
|
using AllBase.Model.Result.WXResult;
|
|
using LittleCow.Model.Param.WeiDianManage;
|
|
using NaiBa.Util;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AllBase.Helper
|
|
{
|
|
public class GlobalConfig
|
|
{
|
|
public static GlobalSettings GlobalSettings { get; set; } = new GlobalSettings();
|
|
|
|
/// <summary>
|
|
/// 店铺列表
|
|
/// </summary>
|
|
public static ConcurrentList<ShopLoginInfo> ShopLoginList { get; set; } = new ConcurrentList<ShopLoginInfo>();
|
|
public static ConcurrentList<ShopLoginInfo> ValidShopLoginList
|
|
{
|
|
get
|
|
{
|
|
var list = new ConcurrentList<ShopLoginInfo>();
|
|
list.AddRange(ShopLoginList.Where(s => !s.is_point_shop_expire));
|
|
return list;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 微信小店用户拼多多机会商品采集的拼多多店铺列表
|
|
/// </summary>
|
|
public static ConcurrentList<ShopLoginInfo> _29WxPddShopLoginList { get; set; } = new ConcurrentList<ShopLoginInfo>();
|
|
/// <summary>
|
|
/// 店铺默认地址
|
|
/// </summary>
|
|
public static ConcurrentList<WXShopDefaultAddressInfo> WXShopDefaultAddressList = new ConcurrentList<WXShopDefaultAddressInfo>();
|
|
/// <summary>
|
|
/// 拼多多买手列表
|
|
/// </summary>
|
|
public static ConcurrentList<BuyerLoginInfo> BuyerLoginList { get; set; } = new ConcurrentList<BuyerLoginInfo>();
|
|
/// <summary>
|
|
/// 微信店铺授权信息
|
|
/// </summary>
|
|
public static ConcurrentList<AuthInfo> lstWxShopAuthInfo { get; set; } = new ConcurrentList<AuthInfo>();
|
|
/// <summary>
|
|
/// 微信全局token(上传图片用)
|
|
/// </summary>
|
|
public static ConcurrentList<WXShopTokenInfo> WxGlobalTokenList { get; set; } = new ConcurrentList<WXShopTokenInfo>();
|
|
|
|
public static Dictionary<string, WxShopUploadInfo> dicWxShopUploadInfo { get; set; } = new Dictionary<string, WxShopUploadInfo>();
|
|
|
|
public static ConcurrentList<PddCatInfo> PddCatList { get; set; } = new ConcurrentList<PddCatInfo>();
|
|
public static ConcurrentList<WxCatInfo> WxCatList { get; set; } = new ConcurrentList<WxCatInfo>();
|
|
public static ConcurrentList<WxCatBoundInfo> WxCatBoundList { get; set; } = new ConcurrentList<WxCatBoundInfo>();
|
|
|
|
/// <summary>
|
|
/// 店铺设置参数
|
|
/// </summary>
|
|
public static TemuShopSettingParam TemuShopSettingParam { get; set; } = new TemuShopSettingParam();
|
|
|
|
public static TemuProductWords ProductWords { get; set; }
|
|
|
|
public static string cAgentIpCode { get; } = "AFZ94w3a";
|
|
|
|
public static List<SameProductCheckParam> SameProductCheckParamList { get; set; }
|
|
|
|
//public static string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36";
|
|
public static string UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36";
|
|
|
|
/// <summary>
|
|
/// 微店店铺列表
|
|
/// </summary>
|
|
public static ConcurrentList<VDianShopLoginInfo> VDianShopLoginList { get; set; } = new ConcurrentList<VDianShopLoginInfo>();
|
|
/// <summary>
|
|
/// 微店上货参数
|
|
/// </summary>
|
|
public static WeiDianSettingParam WeiDianUploadParam { get; set; }
|
|
|
|
/// <summary>
|
|
/// 拼多多api列表
|
|
/// </summary>
|
|
public static ConcurrentList<PddClientInfo> PddClientInfoList = new ConcurrentList<PddClientInfo>();
|
|
|
|
public static System.Drawing.Color DefaultMainColor { get; set; } = System.Drawing.Color.FromArgb(63, 126, 255);
|
|
public static System.Drawing.Color DefaultMainColorLight { get; set; } = System.Drawing.Color.FromArgb(185, 215, 255);
|
|
public static System.Drawing.Color DefaultBorderColor { get; set; } = System.Drawing.Color.FromArgb(25, 98, 200);
|
|
|
|
public static System.Drawing.Color MainColor { get; set; } = System.Drawing.Color.FromArgb(63, 126, 255);
|
|
public static System.Drawing.Color MainColorLight { get; set; } = System.Drawing.Color.FromArgb(185, 215, 255);
|
|
public static System.Drawing.Color BorderColor { get; set; } = System.Drawing.Color.FromArgb(25, 98, 200);
|
|
|
|
public static System.Drawing.Color PddMainColor { get; set; } = System.Drawing.Color.FromArgb(225, 120, 135);
|
|
public static System.Drawing.Color PddMainColorLight { get; set; } = System.Drawing.Color.FromArgb(255, 235, 245);
|
|
public static System.Drawing.Color PddBorderColor { get; set; } = System.Drawing.Color.FromArgb(195, 112, 135);
|
|
|
|
public static System.Drawing.Color WeiXinMainColor { get; set; } = System.Drawing.Color.FromArgb(152, 99, 143);
|
|
public static System.Drawing.Color WeiXinMainColorLight { get; set; } = System.Drawing.Color.FromArgb(245, 235, 255);
|
|
public static System.Drawing.Color WeiXinBorderColor { get; set; } = System.Drawing.Color.FromArgb(107, 83, 147);
|
|
}
|
|
|
|
public enum ShopPlatform
|
|
{
|
|
[Description("淘宝")]
|
|
TaoBao = 1,
|
|
|
|
[Description("拼多多")]
|
|
PinDuoDuo = 2,
|
|
|
|
[Description("爆单王")]
|
|
BaoDanWang = 3,
|
|
|
|
[Description("苏宁")]
|
|
SuNing = 4,
|
|
|
|
[Description("微店")]
|
|
WeiDian = 5,
|
|
|
|
[Description("阿里巴巴")]
|
|
Alibaba = 6,
|
|
}
|
|
|
|
public sealed class ComplianceOptions
|
|
{
|
|
public int? MainCount { get; set; }
|
|
public int? DetailCount { get; set; } = 0;
|
|
public bool IncludeSku { get; set; }
|
|
public string Keywords { get; set; }
|
|
}
|
|
|
|
public class GlobalSettings
|
|
{
|
|
public ComplianceOptions GoodsCompliance { get; set; } = new ComplianceOptions();
|
|
|
|
/// <summary>
|
|
/// 微信使用软件设置的默认上货地址
|
|
/// </summary>
|
|
public bool IsWxUseSoftwareDefaultAddress { get; set; } = true;
|
|
|
|
/// <summary>自动上报违规商品</summary>
|
|
public bool AutoReportViolationProducts { get; set; } = true;
|
|
|
|
/// <summary>上货自动剔除违规商品</summary>
|
|
public bool AutoExcludeViolationProductsOnUpload { get; set; } = true;
|
|
|
|
/// <summary>自动下架违规商品</summary>
|
|
public bool AutoDelistViolationProducts { get; set; } = true;
|
|
}
|
|
}
|