瀏覽代碼

查询首选意思的时候去掉格尾

visuddhinanda 5 年之前
父節點
當前提交
ffe220b9c6
共有 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");