|
|
|
using BBWY.Client.Models;
|
|
|
|
using BBWY.Client.Models.PackUser;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
namespace BBWY.Client
|
|
|
|
{
|
|
|
|
[ClassInterface(ClassInterfaceType.AutoDual)]
|
|
|
|
[ComVisible(true)]
|
|
|
|
public class GlobalContext : NotifyObject
|
|
|
|
{
|
|
|
|
public GlobalContext()
|
|
|
|
{
|
|
|
|
ShopServiceGroupList = new List<string>();
|
|
|
|
ShopServiceGroupLowerList = new List<string>();
|
|
|
|
ClientVersion = "10230";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private string title;
|
|
|
|
|
|
|
|
public string Title { get => title; set { Set(ref title, value); } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private User user;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public User User { get => user; set { Set(ref user, value); } }
|
|
|
|
|
|
|
|
public string UserToken { get; set; }
|
|
|
|
|
|
|
|
public IList<LogisticsResponse> LogisticsResponseList { get; set; }
|
|
|
|
|
|
|
|
public IList<string> ShopServiceGroupList { get; set; }
|
|
|
|
|
|
|
|
public IList<string> ShopServiceGroupLowerList { get; set; }
|
|
|
|
|
|
|
|
public string ClientVersion { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 物流公司列表
|
|
|
|
/// </summary>
|
|
|
|
public List<string> ExpressNameList { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 打包赔付系数列表
|
|
|
|
/// </summary>
|
|
|
|
public List<PackagingStile> PackagingStileList { get; set; } = new List<PackagingStile>() {
|
|
|
|
new PackagingStile(){ MinNumber=0,MaxNumber=4,DisCount=0.1M},// 0<x<=4
|
|
|
|
new PackagingStile(){ MinNumber=4,MaxNumber=24,DisCount=0.15M},// 4<x<=8
|
|
|
|
new PackagingStile(){ MinNumber=24,MaxNumber=48,DisCount=0.2M},
|
|
|
|
new PackagingStile(){ MinNumber=48,MaxNumber=72,DisCount=0.3M},
|
|
|
|
new PackagingStile(){ MinNumber=72,MaxNumber=2147483647,DisCount=0.5M},
|
|
|
|
};
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// JD客户端
|
|
|
|
/// </summary>
|
|
|
|
//public IJdClient JdClient { get; set; }
|
|
|
|
|
|
|
|
#region APIHost
|
|
|
|
public string BBYWApiHost { get; set; }
|
|
|
|
|
|
|
|
public string MDSApiHost { get; set; }
|
|
|
|
|
|
|
|
public string JOSApiHost { get; set; }
|
|
|
|
|
|
|
|
public string _1688ApiHost { get; set; }
|
|
|
|
|
|
|
|
public string QKApiHost { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region Web
|
|
|
|
public string GetUserString()
|
|
|
|
{
|
|
|
|
return JsonConvert.SerializeObject(User);
|
|
|
|
}
|
|
|
|
|
|
|
|
public string GetClientApiVersion()
|
|
|
|
{
|
|
|
|
return ClientVersion;
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|