@@ -65,7 +65,6 @@ class FinanceTencent
$url = "http://qt.gtimg.cn/q=" . $code;
//市盈率,流通市值,总市值,市净率
$content1 = self::curl_get_data($url);
-
// 解析返回的历史数据
if (!empty($content1)) {
$data["pe_ttm"] = floatval($content1[39]);//pe_ttm市盈率
@@ -27,6 +27,13 @@ class Stock {
return $id;
}
+ /***
+ * @param $stock_code
+ * @param $attrs
+ * @return mixed
+ * @throws Exception
+ * 更新部分静态数据
+ */
static public function updateByCode($stock_code,$attrs)
{
if (empty($attrs)) throw new Exception('参数不能为空', 102);