Appearance
获取重定向真实url
方法名
getRedirectUrl
用法
用法示例
js
module.getRedirectUrl({
url: "http://mhcg.392.me/adiuc.php?d=59930"
}, res => {
console.log(res)
})参数说明
| 参数名 | 参数类型 | 是否必填 | 默认值 | 参数描述 |
|---|---|---|---|---|
| url | String | 是 | 无 | 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
}回调说明
| 参数名 | 参数类型 | 参数描述 |
|---|---|---|
| message | String | 消息提示 |
| data | Object | 数据对象 |
| data.location | String | 重定向后的地址 |
| data.url | String | 原始地址 |
| data.isRedirect | Boolean | 是否重定向,true:重定向,false:未重定向 |
| code | Integer | 返回类型,0.成功,其他:失败 |

