【JS】Promise:回调地狱/then()/fulfiled/reject

回调地狱

在JavaScript中,异步通常就伴随着回调_(复习:异步和回调__)_。

为什么呢?看下面的代码:

let result = false; function loadSuccess() { setTimeout(function () { result = true; }, 1000) } loadSuccess(); console.log(result ? 'oh yeah!' : 'what happen?');

@想一想@:结果是什么?_(__演示:并__在控制台看一下result的值__)_

如果我们想要保持loadSuccess的封装,并在result的值在loadSuccess()中被改变后再影响console.log(),大概只能把上述代码改成这个样子:

function loadSuccess(callback) { setTimeout(function () { //如果这个result也依赖于另一个异步函数,咋整? var result = true; console.log(result ? 'oh yeah!' : 'what happen?'); }, 1000) }

但是,假设_(事实上很容易出现这种情况,尤其是node.js中)_loadSucess()里的result也依赖于另一个异步函数,咋整?

@想一想@:能不能由某个异步方法返回bool值

var result = someAsyncFunc();

实际上最终只能写成这个样子

function loadAnotherSuccess(callback) { setTimeout(function () { //获得result值的异步方法 var result = true; setTimeout(function () { console.log(result ? 'oh yeah!' : 'what happen?'); }, 1000) }, 1000) }

@想一想@:能不能在loadAnotherSuccess()中直接调用之前的loadSuccess()?_(复习:文本作用域和闭包)_

setTimeout(function () { loadSuccess(result); //需要改造loadSuccess() }, 1000)

@想一想@:再进一步,如果loadAnotherSuccess()还需要另外一个异步函数的结果……

这就是大名鼎鼎的回调地狱(callback hell):

【JS】Promise:回调地狱/then()/fulfiled/reject

之所以称其为地狱,是因为:

  1. 代码本身就不“好”看,眼睛都花了……(メ`ロ´)/
  2. 书写/维护代码时,其内容和“正常”的流程是反的。比如:我需要一个result的值,
    正常的做法是:调用能获得result值的函数即可;
    但这里是要:把我当前的代码放到能获得result值的函数里面去?
  3. 无法捕捉异常,因为在不同的“栈”(演示:略)

所以,我们迫切的需要引入:

Promise

promise是ES6推出的新的内置类。使用它的大致方式是:

let p = new Promise(function (resolve, reject) { resolve('resolve'); }); p.then(function (value) { console.log(value); }); console.log('after then');

注意:

  • Promise的构造函数参数resolve和reject,都是函数
    @想一想@:这两个参数是不是必须名为resolve和reject?
  • resolve和reject本身又是两个内置函数,都可以带一个参数

断点演示:

  1. 代码执行顺序
  2. console.log(value) 中value的值由resolve()传递
  3. 注释掉:resolve('resolve');

我们得到的规律是:then()一定会在resolve()之后才能执行;没有执行resolve(),就不会执行then(),但这有什么作用呢?

用Promise重写之前地狱回调代码:

let p = new Promise(function (resolve, reject) { setTimeout(function () { var result = true; resolve(result); //先获得result的值 }, 1000); }); p.then(function (result) { console.log(result ? 'oh yeah!' : 'what happen?'); //一定会在得到result的值后才运行 })

这样,代码的可读性是不是变得更强了?

内部原理

每一个Promise实例中都保存着一个状态(status)。状态值有三种:

  • pending(进行中):默认初始状态
  • fulfiled(成功):调用resolve(value)后获得,即resolve()将Promise实例的状态由pending转换为fulfiled
  • rejected(失败):调用reject(error)后获得:即reject()将Promise实例的状态由pending转换为rejected

注意:这三种状态在Promise实例外部无法改变,只能在Promise的构造函数中的代码实现。

方法then()总是会在Promise实例化之后,检查其状态:

  • 如果是pending,不予任何执行
  • 如果是fulfiled,执行其第一个回调函数
  • 如果是rejected,执行其第二个回调函数

是异步操作出现错误

,通常是异步操作成功运行

状态

和某个未来才会结束的事件(通常是一个异步操作)的结果。

(设断点演示:状态转变,略)

then,catch和finally

promise对象可以通过调用:

  • then():两个callback function参数,第一个是resolved之后的调用,第二个(可选)是reject之后的调用
  • catch():等同于.then(null, rejection)或.then(undefined, rejection):推荐catch写法。
    注意:不显示catch,error就会被“吞”掉:console中仍然会报错,但不阻断后续(如setTimeout())代码的执行
  • finally():有错没错,最后都要执行的。

    let p = new Promise(function (resolve, reject) { setTimeout(function () { var result = true; if (true) { throw new Error('......'); resolve(result); } else { reject('error'); } console.log('after error'); }, 1000); }); p.then(function (result) { console.log(result ? 'oh yeah!' : 'what happen?'); }).catch(function (reason) { //推荐:可读性更高 console.log(reason); }).finally(function () { console.log('finally'); })

(_演示:_略_。注意:setInterval()演示promise的状态一旦确定,无法再更改_)

then()的连缀

因为then()还会返回一个新的Promise实例,所以then()后面还可以紧接着继续调用then()……_(复习:JQuery的链式调用)_

需要return

new Promise((resolve, reject) => { setTimeout(function() { console.log('第 1 次resolve'); resolve(false); }, 500) }).then(function(result) { return new Promise((resolve, reject) => { setTimeout(function() { console.log('第 2 次resolve'); resolve(result); }, 500) }); }).then(function(result) { if (result) { console.log('oh yeah!'); } else { console.log('what happen?') }https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...
http://github.com/hdfgfgh546/...
https://github.com/hdfgfgh546...
https://www.github.com/hdfgfg...

以上是 【JS】Promise:回调地狱/then()/fulfiled/reject 的全部内容, 来源链接: utcz.com/a/87659.html

回到顶部