20 lines
1012 B
JavaScript
20 lines
1012 B
JavaScript
// +----------------------------------------------------------------------
|
||
// | 麦沃德科技赋能开发者,助力商协会发展
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||
// +----------------------------------------------------------------------
|
||
// | Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||
// +----------------------------------------------------------------------
|
||
|
||
uni.addInterceptor({
|
||
returnValue (res) {
|
||
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) {
|
||
return res;
|
||
}
|
||
return new Promise((resolve, reject) => {
|
||
res.then((res) => res[0] ? reject(res[0]) : resolve(res[1]));
|
||
});
|
||
},
|
||
}); |