释义搜索改回 Google,搜索词用释义加"是什么意思"

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 22:40:03 +08:00
parent d6e75eaede
commit 5b2f51d140
@@ -188,8 +188,9 @@ final class WordDetailViewController: UIViewController {
private func searchMeaning() {
Haptics.selection()
guard let encoded = word.meaning.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed),
let url = URL(string: "https://baike.baidu.com/item/\(encoded)") else { return }
let text = "\(word.meaning) 是什么意思"
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)
}