|
@@ -16,7 +16,8 @@ use Illuminate\Support\Facades\Http; |
|
@@ -16,7 +16,8 @@ use Illuminate\Support\Facades\Http; |
|
16
|
class Translate
|
16
|
class Translate
|
|
17
|
{
|
17
|
{
|
|
18
|
//接口地址
|
18
|
//接口地址
|
|
19
|
- public static $url = 'https://translate.hbb618.cn/translates';
|
19
|
+// public static $url = 'https://translate.hbb618.cn/translates';
|
|
|
|
20
|
+ public static $url = 'https://translate.hbbapi.com/';
|
|
20
|
|
21
|
|
|
21
|
public static $tls_list = [
|
22
|
public static $tls_list = [
|
|
22
|
'en' => [
|
23
|
'en' => [
|
|
@@ -713,6 +714,7 @@ class Translate |
|
@@ -713,6 +714,7 @@ class Translate |
|
713
|
*/
|
714
|
*/
|
|
714
|
public static function translate($texts, $tls)
|
715
|
public static function translate($texts, $tls)
|
|
715
|
{
|
716
|
{
|
|
|
|
717
|
+ $action = 'translates';
|
|
716
|
if (is_string($texts)) {
|
718
|
if (is_string($texts)) {
|
|
717
|
$texts = [$texts];
|
719
|
$texts = [$texts];
|
|
718
|
}
|
720
|
}
|
|
@@ -724,7 +726,7 @@ class Translate |
|
@@ -724,7 +726,7 @@ class Translate |
|
724
|
'sl' => 'auto',
|
726
|
'sl' => 'auto',
|
|
725
|
'tls' => $tls,
|
727
|
'tls' => $tls,
|
|
726
|
];
|
728
|
];
|
|
727
|
- return Http::post(self::$url, $data);
|
729
|
+ return Http::post(self::$url.$action, $data);
|
|
728
|
}
|
730
|
}
|
|
729
|
|
731
|
|
|
730
|
/**
|
732
|
/**
|