소스 검색

Merge pull request #347 from visuddhinanda:master

查询首选意思的时候去掉格尾
visuddhinanda 5 년 전
부모
커밋
ed79058838
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      app/dict/dict.js
  2. 1 0
      app/dict/function.php

+ 1 - 0
app/dict/dict.js

@@ -301,6 +301,7 @@ function getPartMeaning(word = "") {
 	if (word == "") {
 		sWord = $("#dict_ref_search_input").val();
 	}
+
 	$.get(
 		"../dict/get_first_mean.php",
 		{

+ 1 - 0
app/dict/function.php

@@ -4,6 +4,7 @@ require_once '../public/_pdo.php';
 require_once '../redis/function.php';
 
 function getRefFirstMeaning($word,$lang,$redis){
+	$word = strstr($word,"[",true);
 	if($redis!==false){
 		if(mb_substr($word,0,1,"UTF-8")==="["){
 			$ending = "-".mb_substr($word,1,-1,"UTF-8");