释义搜索改用英文单词关键词,减少广告干扰

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 22:30:22 +08:00
parent 7e627df952
commit 945e71dfa7
@@ -188,7 +188,8 @@ final class WordDetailViewController: UIViewController {
private func searchMeaning() {
Haptics.selection()
guard let query = word.meaning.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
let text = "\(word.word) 是什么意思"
guard let query = text.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
let url = URL(string: "https://www.google.com/search?q=\(query)") else { return }
present(SFSafariViewController(url: url), animated: true)
}