diff --git a/app/util/Xunfei.php b/app/util/Xunfei.php index 3d5e3da..c31bcfb 100644 --- a/app/util/Xunfei.php +++ b/app/util/Xunfei.php @@ -53,7 +53,8 @@ class Xunfei //在控制台-我的应用-机器翻译获取 $api_key = "b6d805f240176ecaea85130cb5f2bca1"; // 机器翻译接口地址 - $url = "https://ntrans.xfyun.cn/v2/ots"; +// $url = "https://ntrans.xfyun.cn/v2/ots"; + $url = "https://114.118.75.150/v2/ots"; // $url = "http://ntrans.example.cn"; //body组装 // $text = "中华人民共和国于1949年成立";//待翻译文本 @@ -115,7 +116,7 @@ digest: %s", "ntrans.xfyun.cn", $date, $digestBase64); { try { $res = $this->xfyun($text, $from, $to); - log::error('fanyi_res',[$res]); +// log::error('fanyi_res',[$res]); $data = json_decode($res["body"], true); if ($data["code"] === 0) { return $data["data"]["result"];