Skip to content

Commit

Permalink
refactor(dicts): update cnki url
Browse files Browse the repository at this point in the history
Closes #1201
  • Loading branch information
crimx committed Jan 18, 2021
1 parent abd56b2 commit 2515d7b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/dictionaries/cnki/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import {
import { DictConfigs } from '@/app-config'

export const getSrcPage: GetSrcPageFunction = text => {
return 'http://dict.cnki.net/dict_result.aspx?scw=' + encodeURIComponent(text)
return (
'http://dict.cnki.net/old/dict_result.aspx?scw=' + encodeURIComponent(text)
)
}

const HOST = 'http://dict.cnki.net'
const HOST = 'http://dict.cnki.net/old'

interface CNKIDictItem {
word: string
Expand Down Expand Up @@ -48,7 +50,7 @@ export const search: SearchFunction<CNKIResult> = (
payload
) => {
return fetchDirtyDOM(
'http://dict.cnki.net/dict_result.aspx?scw=' + encodeURIComponent(text),
'http://dict.cnki.net/old/dict_result.aspx?scw=' + encodeURIComponent(text),
{ withCredentials: false }
)
.catch(handleNetWorkError)
Expand Down

0 comments on commit 2515d7b

Please sign in to comment.