时间:2019-04-30 来源:小程序工厂
我目前是这样用的,在app.js的onLaunch里自己拓展
Promise.prototype.finally = function (callback) {
let P = this.constructor;
return this.then(
value => P.resolve(callback()).then(() => value),
reason => P.resolve(callback()).then(() => { throw reason })
);
};