京东商城助手
欢迎加入QQ群415014949一起讨论
Ejemplo n.º 1
0
 /// <summary>
 /// 自动获取关注数据
 /// </summary>
 private void GetFocusWare()
 {
     try
     {
         //确定采集模式为批量采集
         SysParams.GatherModel = GatherType.Batch;
         //1、登录京东
         JDKiller.GetInstance().InitProcess = InitProcess;
         JDKiller.GetInstance().EndProcess  = EndProcess;
         JDKiller.GetInstance().ShowStep    = ShowStep;
         JDKiller.GetInstance().ShowMessage = ShowMessage;
         ShowAutoMessage("开始登录");
         JDKiller.GetInstance().InitLogin(SysParams.JDUserName, SysParams.JDUserPass);
         if (JDKiller.GetInstance().Login4JD(""))
         {
             ShowAutoMessage("获取关注商品列表");
             //2、获取关注商品列表
             List <WebSiteModel> weburls = JDKiller.GetInstance().GetWatchList();
             if (weburls != null && weburls.Count > 0)
             {
                 ShowAutoMessage("导入关注数据");
                 //3、导入关注数据
                 WareImport.GetInstance().ShowStep    = null;
                 WareImport.GetInstance().EndProcess  = null;
                 WareImport.GetInstance().ShowMessage = null;
                 WareImport.GetInstance().ImportWareList(weburls);
                 ShowAutoMessage("导入完成");
             }
         }
         else
         {
             ShowAutoMessage("登录失败!");
         }
     }
     catch (Exception ex)
     {
         OtCom.XLogErr(ex.Message);
     }
 }
Ejemplo n.º 2
0
 public static JDKiller GetInstance()
 {
     return _killer ?? (_killer = new JDKiller());
 }
Ejemplo n.º 3
0
 public static JDKiller GetInstance()
 {
     return(_killer ?? (_killer = new JDKiller()));
 }