Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
genary
uni-app
提交
2317459d
U
uni-app
项目概览
genary
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2317459d
编写于
7月 27, 2021
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
b26effea
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
1430 addition
and
1124 deletion
+1430
-1124
packages/uni-app-plus/dist/uni-app-service.es.js
packages/uni-app-plus/dist/uni-app-service.es.js
+111
-13
packages/uni-app-vue/dist/service.runtime.esm.js
packages/uni-app-vue/dist/service.runtime.esm.js
+507
-495
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+106
-7
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+106
-9
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+100
-100
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+100
-100
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+100
-100
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+100
-100
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+100
-100
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+100
-100
未找到文件。
packages/uni-app-plus/dist/uni-app-service.es.js
浏览文件 @
2317459d
...
...
@@ -419,6 +419,105 @@ var serviceContext = (function (vue) {
return callbackId;
}
const HOOK_SUCCESS = 'success';
const HOOK_FAIL = 'fail';
const HOOK_COMPLETE = 'complete';
const globalInterceptors = {};
const scopedInterceptors = {};
function wrapperHook(hook) {
return function (data) {
return hook(data) || data;
};
}
function queue(hooks, data) {
let promise = false;
for (let i = 0; i < hooks.length; i++) {
const hook = hooks[i];
if (promise) {
promise = Promise.resolve(wrapperHook(hook));
}
else {
const res = hook(data);
if (isPromise(res)) {
promise = Promise.resolve(res);
}
if (res === false) {
return {
then() { },
catch() { },
};
}
}
}
return (promise || {
then(callback) {
return callback(data);
},
catch() { },
});
}
function wrapperOptions(interceptors, options = {}) {
[HOOK_SUCCESS, HOOK_FAIL, HOOK_COMPLETE].forEach((name) => {
const hooks = interceptors[name];
if (!isArray(hooks)) {
return;
}
const oldCallback = options[name];
options[name] = function callbackInterceptor(res) {
queue(hooks, res).then((res) => {
return (isFunction(oldCallback) && oldCallback(res)) || res;
});
};
});
return options;
}
function wrapperReturnValue(method, returnValue) {
const returnValueHooks = [];
if (isArray(globalInterceptors.returnValue)) {
returnValueHooks.push(...globalInterceptors.returnValue);
}
const interceptor = scopedInterceptors[method];
if (interceptor && isArray(interceptor.returnValue)) {
returnValueHooks.push(...interceptor.returnValue);
}
returnValueHooks.forEach((hook) => {
returnValue = hook(returnValue) || returnValue;
});
return returnValue;
}
function getApiInterceptorHooks(method) {
const interceptor = Object.create(null);
Object.keys(globalInterceptors).forEach((hook) => {
if (hook !== 'returnValue') {
interceptor[hook] = globalInterceptors[hook].slice();
}
});
const scopedInterceptor = scopedInterceptors[method];
if (scopedInterceptor) {
Object.keys(scopedInterceptor).forEach((hook) => {
if (hook !== 'returnValue') {
interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
}
});
}
return interceptor;
}
function invokeApi(method, api, options, ...params) {
const interceptor = getApiInterceptorHooks(method);
if (interceptor && Object.keys(interceptor).length) {
if (isArray(interceptor.invoke)) {
const res = queue(interceptor.invoke, options);
return res.then((options) => {
return api(wrapperOptions(interceptor, options), ...params);
});
}
else {
return api(wrapperOptions(interceptor, options), ...params);
}
}
return api(options, ...params);
}
function hasCallback(args) {
if (isPlainObject(args) &&
[API_SUCCESS, API_FAIL, API_COMPLETE].find((cb) => isFunction(args[cb]))) {
...
...
@@ -429,14 +528,14 @@ var serviceContext = (function (vue) {
function handlePromise(promise) {
return promise;
}
function promisify(fn) {
function promisify(
name,
fn) {
return (args = {}) => {
if (hasCallback(args)) {
return
fn(args
);
return
wrapperReturnValue(name, invokeApi(name, fn, args)
);
}
return handlePromise(new Promise((resolve, reject) => {
fn(
extend(args, { success: resolve, fail: reject }));
}));
return
wrapperReturnValue(name,
handlePromise(new Promise((resolve, reject) => {
invokeApi(name, fn,
extend(args, { success: resolve, fail: reject }));
}))
)
;
};
}
...
...
@@ -566,13 +665,13 @@ var serviceContext = (function (vue) {
return wrapperOffApi(name, fn, options);
}
function defineTaskApi(name, fn, protocol, options) {
return promisify(wrapperTaskApi(name, fn, (process.env.NODE_ENV !== 'production') ? protocol : undefined, options));
return promisify(
name,
wrapperTaskApi(name, fn, (process.env.NODE_ENV !== 'production') ? protocol : undefined, options));
}
function defineSyncApi(name, fn, protocol, options) {
return wrapperSyncApi(name, fn, (process.env.NODE_ENV !== 'production') ? protocol : undefined, options);
}
function defineAsyncApi(name, fn, protocol, options) {
return promisify(wrapperAsyncApi(name, fn, (process.env.NODE_ENV !== 'production') ? protocol : undefined, options));
return promisify(
name,
wrapperAsyncApi(name, fn, (process.env.NODE_ENV !== 'production') ? protocol : undefined, options));
}
const API_BASE64_TO_ARRAY_BUFFER = 'base64ToArrayBuffer';
...
...
@@ -2017,9 +2116,6 @@ var serviceContext = (function (vue) {
return number < 0 ? -result : result;
}, Upx2pxProtocol);
const globalInterceptors = {};
const scopedInterceptors = {};
const API_ADD_INTERCEPTOR = 'addInterceptor';
const API_REMOVE_INTERCEPTOR = 'removeInterceptor';
const AddInterceptorProtocol = [
...
...
@@ -9184,14 +9280,14 @@ var serviceContext = (function (vue) {
class AdBase extends AdEventHandler {
constructor(adInstance, options) {
super();
this.preload = true;
this._isLoaded = false;
this._isLoading = false;
this._preload = true;
this._loadPromiseResolve = null;
this._loadPromiseReject = null;
this._showPromiseResolve = null;
this._showPromiseReject = null;
this.
_
preload = options.preload !== undefined ? options.preload : false;
this.preload = options.preload !== undefined ? options.preload : false;
const ad = (this._adInstance = adInstance);
ad.onLoad(() => {
this._isLoaded = true;
...
...
@@ -9211,7 +9307,7 @@ var serviceContext = (function (vue) {
this._isLoaded = false;
this._isLoading = false;
this._dispatchEvent(EventType.close, e);
if (this.
_
preload === true) {
if (this.preload === true) {
this._loadAd();
}
});
...
...
@@ -9297,6 +9393,7 @@ var serviceContext = (function (vue) {
class FullScreenVideoAd extends AdBase {
constructor(options) {
super(plus.ad.createFullScreenVideoAd(options), options);
this.preload = false;
}
}
const createFullScreenVideoAd = (defineSyncApi(API_CREATE_FULL_SCREEN_VIDEO_AD, (options) => {
...
...
@@ -9306,6 +9403,7 @@ var serviceContext = (function (vue) {
class InterstitialAd extends AdBase {
constructor(options) {
super(plus.ad.createInterstitialAd(options), options);
this.preload = false;
this._loadAd();
}
}
...
...
packages/uni-app-vue/dist/service.runtime.esm.js
浏览文件 @
2317459d
此差异已折叠。
点击以展开。
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
2317459d
...
...
@@ -1271,6 +1271,105 @@ function createAsyncApiCallback(name, args = {}, { beforeAll, beforeSuccess } =
});
return
callbackId
;
}
const
HOOK_SUCCESS
=
"
success
"
;
const
HOOK_FAIL
=
"
fail
"
;
const
HOOK_COMPLETE
=
"
complete
"
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
shared
.
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
}
};
}
}
}
return
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
}
};
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
shared
.
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res2
)
=>
{
return
shared
.
isFunction
(
oldCallback
)
&&
oldCallback
(
res2
)
||
res2
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
shared
.
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
shared
.
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
"
returnValue
"
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
"
returnValue
"
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api2
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
shared
.
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options2
)
=>
{
return
api2
(
wrapperOptions
(
interceptor
,
options2
),
...
params
);
});
}
else
{
return
api2
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api2
(
options
,
...
params
);
}
function
hasCallback
(
args
)
{
if
(
shared
.
isPlainObject
(
args
)
&&
[
API_SUCCESS
,
API_FAIL
,
API_COMPLETE
].
find
((
cb
)
=>
shared
.
isFunction
(
args
[
cb
])))
{
return
true
;
...
...
@@ -1285,14 +1384,14 @@ function handlePromise(promise) {
}
return
promise
;
}
function
promisify
(
fn
)
{
function
promisify
(
name
,
fn
)
{
return
(
args
=
{})
=>
{
if
(
hasCallback
(
args
))
{
return
fn
(
args
);
return
wrapperReturnValue
(
name
,
invokeApi
(
name
,
fn
,
args
)
);
}
return
handlePromise
(
new
Promise
((
resolve
,
reject
)
=>
{
fn
(
shared
.
extend
(
args
,
{
success
:
resolve
,
fail
:
reject
}));
}));
return
wrapperReturnValue
(
name
,
handlePromise
(
new
Promise
((
resolve
,
reject
)
=>
{
invokeApi
(
name
,
fn
,
shared
.
extend
(
args
,
{
success
:
resolve
,
fail
:
reject
}));
}))
)
;
};
}
function
formatApiArgs
(
args
,
options
)
{
...
...
@@ -1374,13 +1473,13 @@ function wrapperAsyncApi(name, fn, protocol, options) {
return
wrapperTaskApi
(
name
,
fn
,
protocol
,
options
);
}
function
defineTaskApi
(
name
,
fn
,
protocol
,
options
)
{
return
promisify
(
wrapperTaskApi
(
name
,
fn
,
process
.
env
.
NODE_ENV
!==
"
production
"
?
protocol
:
void
0
,
options
));
return
promisify
(
name
,
wrapperTaskApi
(
name
,
fn
,
process
.
env
.
NODE_ENV
!==
"
production
"
?
protocol
:
void
0
,
options
));
}
function
defineSyncApi
(
name
,
fn
,
protocol
,
options
)
{
return
wrapperSyncApi
(
name
,
fn
,
process
.
env
.
NODE_ENV
!==
"
production
"
?
protocol
:
void
0
,
options
);
}
function
defineAsyncApi
(
name
,
fn
,
protocol
,
options
)
{
return
promisify
(
wrapperAsyncApi
(
name
,
fn
,
process
.
env
.
NODE_ENV
!==
"
production
"
?
protocol
:
void
0
,
options
));
return
promisify
(
name
,
wrapperAsyncApi
(
name
,
fn
,
process
.
env
.
NODE_ENV
!==
"
production
"
?
protocol
:
void
0
,
options
));
}
const
API_ON_TAB_BAR_MID_BUTTON_TAP
=
"
onTabBarMidButtonTap
"
;
const
API_GET_STORAGE
=
"
getStorage
"
;
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
2317459d
...
...
@@ -2462,6 +2462,105 @@ function createAsyncApiCallback(name, args = {}, { beforeAll, beforeSuccess } =
});
return callbackId;
}
const HOOK_SUCCESS = "success";
const HOOK_FAIL = "fail";
const HOOK_COMPLETE = "complete";
const globalInterceptors = {};
const scopedInterceptors = {};
function wrapperHook(hook) {
return function(data) {
return hook(data) || data;
};
}
function queue(hooks, data) {
let promise = false;
for (let i = 0; i < hooks.length; i++) {
const hook = hooks[i];
if (promise) {
promise = Promise.resolve(wrapperHook(hook));
} else {
const res = hook(data);
if (isPromise(res)) {
promise = Promise.resolve(res);
}
if (res === false) {
return {
then() {
},
catch() {
}
};
}
}
}
return promise || {
then(callback) {
return callback(data);
},
catch() {
}
};
}
function wrapperOptions(interceptors, options = {}) {
[HOOK_SUCCESS, HOOK_FAIL, HOOK_COMPLETE].forEach((name) => {
const hooks = interceptors[name];
if (!isArray(hooks)) {
return;
}
const oldCallback = options[name];
options[name] = function callbackInterceptor(res) {
queue(hooks, res).then((res2) => {
return isFunction(oldCallback) && oldCallback(res2) || res2;
});
};
});
return options;
}
function wrapperReturnValue(method, returnValue) {
const returnValueHooks = [];
if (isArray(globalInterceptors.returnValue)) {
returnValueHooks.push(...globalInterceptors.returnValue);
}
const interceptor = scopedInterceptors[method];
if (interceptor && isArray(interceptor.returnValue)) {
returnValueHooks.push(...interceptor.returnValue);
}
returnValueHooks.forEach((hook) => {
returnValue = hook(returnValue) || returnValue;
});
return returnValue;
}
function getApiInterceptorHooks(method) {
const interceptor = Object.create(null);
Object.keys(globalInterceptors).forEach((hook) => {
if (hook !== "returnValue") {
interceptor[hook] = globalInterceptors[hook].slice();
}
});
const scopedInterceptor = scopedInterceptors[method];
if (scopedInterceptor) {
Object.keys(scopedInterceptor).forEach((hook) => {
if (hook !== "returnValue") {
interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
}
});
}
return interceptor;
}
function invokeApi(method, api2, options, ...params) {
const interceptor = getApiInterceptorHooks(method);
if (interceptor && Object.keys(interceptor).length) {
if (isArray(interceptor.invoke)) {
const res = queue(interceptor.invoke, options);
return res.then((options2) => {
return api2(wrapperOptions(interceptor, options2), ...params);
});
} else {
return api2(wrapperOptions(interceptor, options), ...params);
}
}
return api2(options, ...params);
}
function hasCallback(args) {
if (isPlainObject(args) && [API_SUCCESS, API_FAIL, API_COMPLETE].find((cb) => isFunction(args[cb]))) {
return true;
...
...
@@ -2476,14 +2575,14 @@ function handlePromise(promise) {
}
return promise;
}
function promisify(fn) {
function promisify(
name,
fn) {
return (args = {}) => {
if (hasCallback(args)) {
return
fn(args
);
return
wrapperReturnValue(name, invokeApi(name, fn, args)
);
}
return handlePromise(new Promise((resolve, reject) => {
fn(
extend(args, { success: resolve, fail: reject }));
}));
return
wrapperReturnValue(name,
handlePromise(new Promise((resolve, reject) => {
invokeApi(name, fn,
extend(args, { success: resolve, fail: reject }));
}))
)
;
};
}
function formatApiArgs(args, options) {
...
...
@@ -2607,13 +2706,13 @@ function defineOffApi(name, fn, options) {
return wrapperOffApi(name, fn, options);
}
function defineTaskApi(name, fn, protocol, options) {
return promisify(wrapperTaskApi(name, fn, process.env.NODE_ENV !== "production" ? protocol : void 0, options));
return promisify(
name,
wrapperTaskApi(name, fn, process.env.NODE_ENV !== "production" ? protocol : void 0, options));
}
function defineSyncApi(name, fn, protocol, options) {
return wrapperSyncApi(name, fn, process.env.NODE_ENV !== "production" ? protocol : void 0, options);
}
function defineAsyncApi(name, fn, protocol, options) {
return promisify(wrapperAsyncApi(name, fn, process.env.NODE_ENV !== "production" ? protocol : void 0, options));
return promisify(
name,
wrapperAsyncApi(name, fn, process.env.NODE_ENV !== "production" ? protocol : void 0, options));
}
function createUnsupportedMsg(name) {
return `method 'uni.${name}' not supported`;
...
...
@@ -2703,8 +2802,6 @@ const upx2px = /* @__PURE__ */ defineSyncApi(API_UPX2PX, (number, newDeviceWidth
}
return number < 0 ? -result : result;
}, Upx2pxProtocol);
const globalInterceptors = {};
const scopedInterceptors = {};
const API_ADD_INTERCEPTOR = "addInterceptor";
const API_REMOVE_INTERCEPTOR = "removeInterceptor";
const AddInterceptorProtocol = [
...
...
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
2317459d
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Function
,
isPromise
,
extend
}
from
'
@vue/shared
'
;
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Promise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
function
getBaseSystemInfo
()
{
return
my
.
getSystemInfoSync
()
...
...
@@ -140,6 +140,105 @@ function isBoolean(...args) {
return
args
.
some
((
elem
)
=>
elem
.
toLowerCase
()
===
'
boolean
'
);
}
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
function
handlePromise
(
promise
)
{
if
(
__UNI_FEATURE_PROMISE__
)
{
return
promise
...
...
@@ -249,105 +348,6 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
return
number
<
0
?
-
result
:
result
;
},
Upx2pxProtocol
);
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
const
API_ADD_INTERCEPTOR
=
'
addInterceptor
'
;
const
API_REMOVE_INTERCEPTOR
=
'
removeInterceptor
'
;
const
AddInterceptorProtocol
=
[
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
2317459d
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Function
,
isPromise
,
extend
}
from
'
@vue/shared
'
;
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Promise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
function
getBaseSystemInfo
()
{
return
swan
.
getSystemInfoSync
()
...
...
@@ -140,6 +140,105 @@ function isBoolean(...args) {
return
args
.
some
((
elem
)
=>
elem
.
toLowerCase
()
===
'
boolean
'
);
}
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
function
handlePromise
(
promise
)
{
if
(
__UNI_FEATURE_PROMISE__
)
{
return
promise
...
...
@@ -249,105 +348,6 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
return
number
<
0
?
-
result
:
result
;
},
Upx2pxProtocol
);
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
const
API_ADD_INTERCEPTOR
=
'
addInterceptor
'
;
const
API_REMOVE_INTERCEPTOR
=
'
removeInterceptor
'
;
const
AddInterceptorProtocol
=
[
...
...
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
2317459d
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Function
,
isPromise
,
extend
}
from
'
@vue/shared
'
;
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Promise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
function
getBaseSystemInfo
()
{
return
qq
.
getSystemInfoSync
()
...
...
@@ -140,6 +140,105 @@ function isBoolean(...args) {
return
args
.
some
((
elem
)
=>
elem
.
toLowerCase
()
===
'
boolean
'
);
}
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
function
handlePromise
(
promise
)
{
if
(
__UNI_FEATURE_PROMISE__
)
{
return
promise
...
...
@@ -249,105 +348,6 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
return
number
<
0
?
-
result
:
result
;
},
Upx2pxProtocol
);
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
const
API_ADD_INTERCEPTOR
=
'
addInterceptor
'
;
const
API_REMOVE_INTERCEPTOR
=
'
removeInterceptor
'
;
const
AddInterceptorProtocol
=
[
...
...
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
2317459d
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Function
,
isPromise
,
extend
}
from
'
@vue/shared
'
;
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Promise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
function
getBaseSystemInfo
()
{
return
tt
.
getSystemInfoSync
()
...
...
@@ -140,6 +140,105 @@ function isBoolean(...args) {
return
args
.
some
((
elem
)
=>
elem
.
toLowerCase
()
===
'
boolean
'
);
}
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
function
handlePromise
(
promise
)
{
if
(
__UNI_FEATURE_PROMISE__
)
{
return
promise
...
...
@@ -249,105 +348,6 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
return
number
<
0
?
-
result
:
result
;
},
Upx2pxProtocol
);
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
const
API_ADD_INTERCEPTOR
=
'
addInterceptor
'
;
const
API_REMOVE_INTERCEPTOR
=
'
removeInterceptor
'
;
const
AddInterceptorProtocol
=
[
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
2317459d
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Function
,
isPromise
,
extend
}
from
'
@vue/shared
'
;
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Promise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
...
...
@@ -140,6 +140,105 @@ function isBoolean(...args) {
return
args
.
some
((
elem
)
=>
elem
.
toLowerCase
()
===
'
boolean
'
);
}
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
function
handlePromise
(
promise
)
{
if
(
__UNI_FEATURE_PROMISE__
)
{
return
promise
...
...
@@ -249,105 +348,6 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
return
number
<
0
?
-
result
:
result
;
},
Upx2pxProtocol
);
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
const
API_ADD_INTERCEPTOR
=
'
addInterceptor
'
;
const
API_REMOVE_INTERCEPTOR
=
'
removeInterceptor
'
;
const
AddInterceptorProtocol
=
[
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
2317459d
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Function
,
isPromise
,
extend
}
from
'
@vue/shared
'
;
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
is
Promise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
function
getBaseSystemInfo
()
{
return
qa
.
getSystemInfoSync
()
...
...
@@ -140,6 +140,105 @@ function isBoolean(...args) {
return
args
.
some
((
elem
)
=>
elem
.
toLowerCase
()
===
'
boolean
'
);
}
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
function
handlePromise
(
promise
)
{
if
(
__UNI_FEATURE_PROMISE__
)
{
return
promise
...
...
@@ -249,105 +348,6 @@ const upx2px = defineSyncApi(API_UPX2PX, (number, newDeviceWidth) => {
return
number
<
0
?
-
result
:
result
;
},
Upx2pxProtocol
);
const
HOOK_SUCCESS
=
'
success
'
;
const
HOOK_FAIL
=
'
fail
'
;
const
HOOK_COMPLETE
=
'
complete
'
;
const
globalInterceptors
=
{};
const
scopedInterceptors
=
{};
function
wrapperHook
(
hook
)
{
return
function
(
data
)
{
return
hook
(
data
)
||
data
;
};
}
function
queue
(
hooks
,
data
)
{
let
promise
=
false
;
for
(
let
i
=
0
;
i
<
hooks
.
length
;
i
++
)
{
const
hook
=
hooks
[
i
];
if
(
promise
)
{
promise
=
Promise
.
resolve
(
wrapperHook
(
hook
));
}
else
{
const
res
=
hook
(
data
);
if
(
isPromise
(
res
))
{
promise
=
Promise
.
resolve
(
res
);
}
if
(
res
===
false
)
{
return
{
then
()
{
},
catch
()
{
},
};
}
}
}
return
(
promise
||
{
then
(
callback
)
{
return
callback
(
data
);
},
catch
()
{
},
});
}
function
wrapperOptions
(
interceptors
,
options
=
{})
{
[
HOOK_SUCCESS
,
HOOK_FAIL
,
HOOK_COMPLETE
].
forEach
((
name
)
=>
{
const
hooks
=
interceptors
[
name
];
if
(
!
isArray
(
hooks
))
{
return
;
}
const
oldCallback
=
options
[
name
];
options
[
name
]
=
function
callbackInterceptor
(
res
)
{
queue
(
hooks
,
res
).
then
((
res
)
=>
{
return
(
isFunction
(
oldCallback
)
&&
oldCallback
(
res
))
||
res
;
});
};
});
return
options
;
}
function
wrapperReturnValue
(
method
,
returnValue
)
{
const
returnValueHooks
=
[];
if
(
isArray
(
globalInterceptors
.
returnValue
))
{
returnValueHooks
.
push
(...
globalInterceptors
.
returnValue
);
}
const
interceptor
=
scopedInterceptors
[
method
];
if
(
interceptor
&&
isArray
(
interceptor
.
returnValue
))
{
returnValueHooks
.
push
(...
interceptor
.
returnValue
);
}
returnValueHooks
.
forEach
((
hook
)
=>
{
returnValue
=
hook
(
returnValue
)
||
returnValue
;
});
return
returnValue
;
}
function
getApiInterceptorHooks
(
method
)
{
const
interceptor
=
Object
.
create
(
null
);
Object
.
keys
(
globalInterceptors
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
globalInterceptors
[
hook
].
slice
();
}
});
const
scopedInterceptor
=
scopedInterceptors
[
method
];
if
(
scopedInterceptor
)
{
Object
.
keys
(
scopedInterceptor
).
forEach
((
hook
)
=>
{
if
(
hook
!==
'
returnValue
'
)
{
interceptor
[
hook
]
=
(
interceptor
[
hook
]
||
[]).
concat
(
scopedInterceptor
[
hook
]);
}
});
}
return
interceptor
;
}
function
invokeApi
(
method
,
api
,
options
,
...
params
)
{
const
interceptor
=
getApiInterceptorHooks
(
method
);
if
(
interceptor
&&
Object
.
keys
(
interceptor
).
length
)
{
if
(
isArray
(
interceptor
.
invoke
))
{
const
res
=
queue
(
interceptor
.
invoke
,
options
);
return
res
.
then
((
options
)
=>
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
});
}
else
{
return
api
(
wrapperOptions
(
interceptor
,
options
),
...
params
);
}
}
return
api
(
options
,
...
params
);
}
const
API_ADD_INTERCEPTOR
=
'
addInterceptor
'
;
const
API_REMOVE_INTERCEPTOR
=
'
removeInterceptor
'
;
const
AddInterceptorProtocol
=
[
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录