Skip to content

获取重定向真实url ​

方法名 ​

getRedirectUrl

用法 ​

用法示例 ​

js
module.getRedirectUrl({
  url: "http://mhcg.392.me/adiuc.php?d=59930"
}, res => {
  console.log(res)
})

参数说明 ​

参数名参数类型是否必填默认值参数描述
urlString是无url地址

回调 ​

回调示例 ​

json
{
    "data": {
        "location": "https://mp3.haoge500.com/hot/2004/09-11/59930.mp3?ltd=584922",
        "url": "http://mhcg.392.me/adiuc.php?d=59930",
        "isRedirect": true
    },
    "message": "",
    "code": 0
}

回调说明 ​

参数名参数类型参数描述
messageString消息提示
dataObject数据对象
data.locationString重定向后的地址
data.urlString原始地址
data.isRedirectBoolean是否重定向,true:重定向,false:未重定向
codeInteger返回类型,0.成功,其他:失败