修复dns查询问题

This commit is contained in:
lyswhut
2021-06-18 15:13:15 +08:00
parent 94bf9eae8b
commit 507f66b3b6
9 changed files with 27 additions and 26 deletions
+2 -3
View File
@@ -1,15 +1,14 @@
import { httpFetch } from '../../request'
import { headers, timeout } from '../options'
import { getHostIp } from '../utils'
import { dnsLookup } from '../utils'
const api_temp = {
getMusicUrl(songInfo, type) {
const ip = getHostIp('tm.tempmusic.tk')
const requestObj = httpFetch(`http://tm.tempmusic.tk/url/kw/${songInfo.songmid}/${type}`, {
method: 'get',
headers,
timeout,
host: ip,
lookup: dnsLookup,
family: 4,
})
requestObj.promise = requestObj.promise.then(({ body }) => {