修复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,16 +1,15 @@
import { httpFetch } from '../../request'
import { requestMsg } from '../../message'
import { headers, timeout } from '../options'
import { getHostIp } from '../utils'
import { dnsLookup } from '../utils'
const api_test = {
getMusicUrl(songInfo, type) {
const ip = getHostIp('ts.tempmusic.tk')
const requestObj = httpFetch(`http://ts.tempmusic.tk/url/wy/${songInfo.songmid}/${type}`, {
method: 'get',
timeout,
headers,
host: ip,
lookup: dnsLookup,
family: 4,
})
requestObj.promise = requestObj.promise.then(({ body }) => {