作者 lyh

gx

@@ -437,7 +437,6 @@ function isEnglish($str) { @@ -437,7 +437,6 @@ function isEnglish($str) {
437 */ 437 */
438 function characterTruncation($str,){ 438 function characterTruncation($str,){
439 preg_match('/<main>(.*?)<\/main>/', $str, $matches); 439 preg_match('/<main>(.*?)<\/main>/', $str, $matches);
440 -  
441 if (isset($matches[1])) { 440 if (isset($matches[1])) {
442 $result = $matches[1]; 441 $result = $matches[1];
443 echo $result; 442 echo $result;
@@ -155,11 +155,7 @@ class ComController extends BaseController @@ -155,11 +155,7 @@ class ComController extends BaseController
155 * @time :2023/6/28 16:13 155 * @time :2023/6/28 16:13
156 */ 156 */
157 public function stringTranslation(){ 157 public function stringTranslation(){
158 - $str = $this->param['str'];  
159 - $rs = isChinese($str);  
160 - if($rs == true){  
161 - $str = Translate::tran($this->param['str'], 'en');  
162 - } 158 + $str = Translate::tran($this->param['str'], 'en');
163 $this->response('success',Code::SUCCESS,$str); 159 $this->response('success',Code::SUCCESS,$str);
164 } 160 }
165 } 161 }