Пример #1
0
 public TmallApiClient(ShopType shopType = ShopType.LingZhong)
 {
     this.Url   = "http://gw.api.taobao.com/router/rest";
     Shop       = shopType;
     _apiConfig = GetApiConfig();
     if (shopType == ShopType.LingZhong)
     {
         UserName = "******";
         Password = "******";
     }
     else if (shopType == ShopType.YinJi)
     {
         UserName = "******";
         Password = "******";
     }
     else if (shopType == ShopType.ShengLv)
     {
         UserName = "******";
         Password = "******";
     }
     else if (Shop == ShopType.RenXing)
     {
         UserName = "******";
         Password = "******";
     }
     else
     {
         UserName = "******";
         Password = "******";
     }
 }
Пример #2
0
        public AliTripConfig aliTripConfig(ShopType shopType = ShopType.RenNiXing)
        {
            var config = new AliTripConfig();

            if (Shop == ShopType.RenNiXing)
            {
                config.Id           = 17;
                config.AppName      = "贵州任你行酒店专营店";
                config.AppKey       = "25316312";
                config.AppSecret    = "079b3279307304ed39a6d08ae4aebfd0";
                config.SessionKey   = "6100e063fc0b1d1826f1eaccee286b04603a1a1e17e04ed2200535632758";
                config.RefreshToken = "6102b06162cf2f15ac3690ea3bcf6065f27d0bad4ac1b882200535632758 ";
                config.ShopType     = (int)shopType;
            }
            else
            {
                config = SqlSugarContext.LingZhongInstance.Queryable <AliTripConfig>().Where(u => u.ShopType == (int)Shop).First();
            }
            return(config);
        }