释义搜索改用英文单词关键词,减少广告干扰
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -188,7 +188,8 @@ final class WordDetailViewController: UIViewController {
|
|||||||
|
|
||||||
private func searchMeaning() {
|
private func searchMeaning() {
|
||||||
Haptics.selection()
|
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 }
|
let url = URL(string: "https://www.google.com/search?q=\(query)") else { return }
|
||||||
present(SFSafariViewController(url: url), animated: true)
|
present(SFSafariViewController(url: url), animated: true)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user