ios小程序不支持Promise的finally方法,我们要做的是给Promise扩展finally
Promise.prototype.finally || (Promise.prototype.finally = function (callback) {
return this.then(
value => Promise.resolve(callback()).then(() => value),
reason => Promise.resolve(callback()).then(() => { throw reason; })
);
})