Closed jechtliu closed 5 years ago
也可以是异步(promise )的, 需要 返回 reject即可
{
transformResponse: (res, option) => {
// 异步函数或者 new promise 都行
return new Promise((resolve, reject) => {
wx.getStorage({
key: res.data as string,
success: resolve,
fail: reject,
});
});
}
}
同步操作直接
throw
比如内置的
transformRequestResponseOkData