Browse Source

去掉测试代码

chenbo 4 years ago
parent
commit
e10bace15c
1 changed files with 2 additions and 5 deletions
  1. 2 5
      lib/input_163.class.php

+ 2 - 5
lib/input_163.class.php

@@ -11,7 +11,7 @@ class Input_163
     const GLOBAL_URL_0 = "http://quotes.money.163.com/service/chddata.html?code=";
     const GLOBAL_URL_1 = "&start=";
     const GLOBAL_URL_2 = "&end=";
-    const GLOBAL_URL_3 = "&fields=TOPEN;HIGH;LOW;TCLOSE;VATURNOVER;VOTURNOVER;CHG;PCHG;TCLOSE";
+    const GLOBAL_URL_3 = "&fields=TOPEN;HIGH;LOW;TCLOSE;VATURNOVER;VOTURNOVER;CHG;PCHG";
 
     static private function curl_get_data($url){
         $curlHandle = curl_init();
@@ -42,10 +42,7 @@ class Input_163
     {
         $urlCode = self::getCodeForURL($code);
         $url = self::GLOBAL_URL_0.$urlCode.self::GLOBAL_URL_1.$start_date.self::GLOBAL_URL_2.$end_date.self::GLOBAL_URL_3;
-        echo $url;
         $contentList = self::curl_get_data($url);
-        print_r($contentList);
-        return;
         if (empty($contentList[1])) {               //只有标题,没有内容
             return;
         }
@@ -83,7 +80,7 @@ class Input_163
     static public function getIndexDayK()
     {
         $indexList = Index::getAllList();
-        $start_date = 20210108;
+        $start_date = 20210106;
         $end_date = (int)date('Ymd', time());
         foreach($indexList as $item) {
             self::getPartIndexDayK($item['code'], $start_date, $end_date);