返回的值Promise {[[PromiseStatus]]: "resolved",
[[PromiseValue]]: "http://dl.stream.qqmusic.qq.com/M8000046HRBd0FvKLm…C380C8F140044403EDC0124&guid=489780640&fromtag=30"
}
取其中的
PromiseValue
var a = Promise.resolve(‘xx‘)
// Promise {[[PromiseStatus]]: "resolved", [[PromiseValue]]: "xx"}
a.then(function (result) { console.log(result) })
原文地址:https://www.cnblogs.com/ch-zaizai/p/9057106.html
时间: 2024-10-12 23:15:44