Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
ae73c41b
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ae73c41b
编写于
3月 16, 2024
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
73cf6ffd
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
72 addition
and
108 deletion
+72
-108
packages/uni-h5/dist-x/uni-h5.cjs.js
packages/uni-h5/dist-x/uni-h5.cjs.js
+15
-17
packages/uni-h5/dist-x/uni-h5.es.js
packages/uni-h5/dist-x/uni-h5.es.js
+15
-17
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+10
-11
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+12
-13
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+2
-5
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+2
-5
packages/uni-mp-jd/dist/uni.api.esm.js
packages/uni-mp-jd/dist/uni.api.esm.js
+2
-5
packages/uni-mp-kuaishou/dist/uni.api.esm.js
packages/uni-mp-kuaishou/dist/uni.api.esm.js
+2
-5
packages/uni-mp-lark/dist/uni.api.esm.js
packages/uni-mp-lark/dist/uni.api.esm.js
+2
-5
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+2
-5
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+2
-5
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+2
-5
packages/uni-mp-xhs/dist/uni.api.esm.js
packages/uni-mp-xhs/dist/uni.api.esm.js
+2
-5
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+2
-5
未找到文件。
packages/uni-h5/dist-x/uni-h5.cjs.js
浏览文件 @
ae73c41b
...
...
@@ -1521,10 +1521,11 @@ function invokeSuccess(id, name, res) {
}
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
"
:fail
"
+
(
errMsg
?
"
"
+
errMsg
:
""
);
return
invokeCallback
(
id
,
typeof
UniError
!==
"
undefined
"
?
typeof
errRes
.
errCode
!==
"
undefined
"
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
shared
.
extend
({
errMsg
:
apiErrMsg
},
errRes
)
);
let
res
=
shared
.
extend
({
errMsg
:
apiErrMsg
},
errRes
);
if
(
typeof
UniError
!==
"
undefined
"
)
{
res
=
typeof
errRes
.
errCode
!==
"
undefined
"
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
);
}
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
(
process
.
env
.
NODE_ENV
!==
"
production
"
)
{
...
...
@@ -3401,13 +3402,9 @@ function useBase(props2, rootRef, emit2) {
};
}
function
useValueSync
(
props2
,
state
,
emit2
,
trigger
)
{
const
valueChangeFn
=
uniShared
.
debounce
(
(
val
)
=>
{
state
.
value
=
getValueString
(
val
,
props2
.
type
);
},
100
,
{
setTimeout
,
clearTimeout
}
);
const
valueChangeFn
=
throttle
((
val
)
=>
{
state
.
value
=
getValueString
(
val
,
props2
.
type
);
},
100
);
vue
.
watch
(()
=>
props2
.
modelValue
,
valueChangeFn
);
vue
.
watch
(()
=>
props2
.
value
,
valueChangeFn
);
const
triggerInputFn
=
throttle
((
event
,
detail
)
=>
{
...
...
@@ -8734,16 +8731,17 @@ function initRouter(app) {
app
.
router
=
router
;
app
.
use
(
router
);
}
const
scrollBehavior
=
(
_to
,
_from
,
savedPosition
)
=>
{
if
(
savedPosition
)
{
return
savedPosition
;
}
};
function
createRouterOptions
()
{
return
{
history
:
initHistory
(),
strict
:
!!
__uniConfig
.
router
.
strict
,
routes
:
__uniRoutes
/**
* 传入scrollBehavior后,vue-router会将history.scrollRestoration设为manual。
* 导致safari无法保留上一页面的截图,进而导致在iOS手势返回期间上一页面处于白屏状态
*/
// scrollBehavior,
routes
:
__uniRoutes
,
scrollBehavior
};
}
function
initHistory
()
{
...
...
packages/uni-h5/dist-x/uni-h5.es.js
浏览文件 @
ae73c41b
...
...
@@ -3175,10 +3175,11 @@ function invokeSuccess(id2, name, res) {
}
function invokeFail(id2, name, errMsg, errRes = {}) {
const apiErrMsg = name + ":fail" + (errMsg ? " " + errMsg : "");
return invokeCallback(
id2,
typeof UniError !== "undefined" ? typeof errRes.errCode !== "undefined" ? new UniError(name, errRes.errCode, apiErrMsg) : new UniError(apiErrMsg, errRes) : extend({ errMsg: apiErrMsg }, errRes)
);
let res = extend({ errMsg: apiErrMsg }, errRes);
if (typeof UniError !== "undefined") {
res = typeof errRes.errCode !== "undefined" ? new UniError(name, errRes.errCode, apiErrMsg) : new UniError(apiErrMsg, errRes);
}
return invokeCallback(id2, res);
}
function beforeInvokeApi(name, args, protocol, options) {
if (process.env.NODE_ENV !== "production") {
...
...
@@ -9557,13 +9558,9 @@ function useBase(props2, rootRef, emit2) {
};
}
function useValueSync(props2, state2, emit2, trigger) {
const valueChangeFn = debounce(
(val) => {
state2.value = getValueString(val, props2.type);
},
100,
{ setTimeout, clearTimeout }
);
const valueChangeFn = throttle((val) => {
state2.value = getValueString(val, props2.type);
}, 100);
watch(() => props2.modelValue, valueChangeFn);
watch(() => props2.value, valueChangeFn);
const triggerInputFn = throttle((event, detail) => {
...
...
@@ -17753,16 +17750,17 @@ function initRouter(app) {
app.router = router;
app.use(router);
}
const scrollBehavior = (_to, _from, savedPosition) => {
if (savedPosition) {
return savedPosition;
}
};
function createRouterOptions() {
return {
history: initHistory(),
strict: !!__uniConfig.router.strict,
routes: __uniRoutes
/**
* 传入scrollBehavior后,vue-router会将history.scrollRestoration设为manual。
* 导致safari无法保留上一页面的截图,进而导致在iOS手势返回期间上一页面处于白屏状态
*/
// scrollBehavior,
routes: __uniRoutes,
scrollBehavior
};
}
function removeCurrentPages(delta = 1) {
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
ae73c41b
...
...
@@ -1458,10 +1458,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
"
:fail
"
+
(
errMsg
?
"
"
+
errMsg
:
""
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
"
undefined
"
?
typeof
errRes
.
errCode
!==
"
undefined
"
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
shared
.
extend
({
errMsg
:
apiErrMsg
},
errRes
)
);
let
res
=
shared
.
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
(
process
.
env
.
NODE_ENV
!==
"
production
"
)
{
...
...
@@ -3326,7 +3324,7 @@ function useBase(props2, rootRef, emit2) {
};
}
function
useValueSync
(
props2
,
state
,
emit2
,
trigger
)
{
const
valueChangeFn
=
uniShared
.
debounce
(
const
valueChangeFn
=
debounce
(
(
val
)
=>
{
state
.
value
=
getValueString
(
val
,
props2
.
type
);
},
...
...
@@ -7932,16 +7930,17 @@ function initRouter(app) {
app
.
router
=
router
;
app
.
use
(
router
);
}
const
scrollBehavior
=
(
_to
,
_from
,
savedPosition
)
=>
{
if
(
savedPosition
)
{
return
savedPosition
;
}
};
function
createRouterOptions
()
{
return
{
history
:
initHistory
(),
strict
:
!!
__uniConfig
.
router
.
strict
,
routes
:
__uniRoutes
/**
* 传入scrollBehavior后,vue-router会将history.scrollRestoration设为manual。
* 导致safari无法保留上一页面的截图,进而导致在iOS手势返回期间上一页面处于白屏状态
*/
// scrollBehavior,
routes
:
__uniRoutes
,
scrollBehavior
};
}
function
initHistory
()
{
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
ae73c41b
import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, provide, computed, watch, onUnmounted, inject, onBeforeUnmount, mergeProps, injectHook, reactive, onActivated, onMounted, nextTick, onBeforeMount, withDirectives, vModelDynamic, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, Comment, h, createTextVNode, createBlock, onBeforeActivate, onBeforeDeactivate, renderList, onDeactivated, createApp, isReactive, Transition, effectScope, withCtx, KeepAlive, resolveDynamicComponent, createElementVNode, normalizeStyle, renderSlot } from "vue";
import { isArray, isString, extend, remove, stringifyStyle, parseStringStyle, isPlainObject, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, hyphenate, invokeArrayFns as invokeArrayFns$1 } from "@vue/shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, normalizeStyles, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, getLen,
debounce, isUniLifecycleHook, ON_LOAD, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook, parseQuery, NAVBAR_HEIGHT, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery
, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, ON_THEME_CHANGE, updateElementStyle, sortObject, OFF_THEME_CHANGE, ON_BACK_PRESS, parseUrl, addFont, ON_NAVIGATION_BAR_CHANGE, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, normalizeStyles, addLeadingSlash, invokeArrayFns, removeLeadingSlash, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, getLen,
isUniLifecycleHook, ON_LOAD, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook, parseQuery, NAVBAR_HEIGHT, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, debounce as debounce$1
, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, ON_THEME_CHANGE, updateElementStyle, sortObject, OFF_THEME_CHANGE, ON_BACK_PRESS, parseUrl, addFont, ON_NAVIGATION_BAR_CHANGE, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared";
import { onCreateVueApp as onCreateVueApp2 } from "@dcloudio/uni-shared";
import { initVueI18n, isI18nStr, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT } from "@dcloudio/uni-i18n";
import { useRoute, createRouter, createWebHistory, createWebHashHistory, useRouter, isNavigationFailure, RouterView } from "vue-router";
...
...
@@ -3074,10 +3074,8 @@ function invokeSuccess(id2, name, res) {
function invokeFail(id2, name, errMsg, errRes = {}) {
const apiErrMsg = name + ":fail" + (errMsg ? " " + errMsg : "");
delete errRes.errCode;
return invokeCallback(
id2,
typeof UniError !== "undefined" ? typeof errRes.errCode !== "undefined" ? new UniError(name, errRes.errCode, apiErrMsg) : new UniError(apiErrMsg, errRes) : extend({ errMsg: apiErrMsg }, errRes)
);
let res = extend({ errMsg: apiErrMsg }, errRes);
return invokeCallback(id2, res);
}
function beforeInvokeApi(name, args, protocol, options) {
if (process.env.NODE_ENV !== "production") {
...
...
@@ -15762,16 +15760,17 @@ function initRouter(app) {
app.router = router;
app.use(router);
}
const scrollBehavior = (_to, _from, savedPosition) => {
if (savedPosition) {
return savedPosition;
}
};
function createRouterOptions() {
return {
history: initHistory(),
strict: !!__uniConfig.router.strict,
routes: __uniRoutes
/**
* 传入scrollBehavior后,vue-router会将history.scrollRestoration设为manual。
* 导致safari无法保留上一页面的截图,进而导致在iOS手势返回期间上一页面处于白屏状态
*/
// scrollBehavior,
routes: __uniRoutes,
scrollBehavior
};
}
function removeCurrentPages(delta = 1) {
...
...
@@ -16009,7 +16008,7 @@ function setupApp(comp) {
onMounted(() => {
window.addEventListener(
"resize",
debounce(onResize, 50, { setTimeout, clearTimeout })
debounce
$1
(onResize, 50, { setTimeout, clearTimeout })
);
window.addEventListener("message", onMessage);
document.addEventListener("visibilitychange", onVisibilityChange);
...
...
@@ -20911,7 +20910,7 @@ const LoctaionPicker = /* @__PURE__ */ defineSystemComponent({
reset,
getList
} = useList(state2);
const search = debounce(() => {
const search = debounce
$1
(() => {
reset();
if (state2.keyword) {
getList();
...
...
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-mp-jd/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-mp-kuaishou/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-mp-lark/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-mp-xhs/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
ae73c41b
...
...
@@ -384,11 +384,8 @@ function invokeSuccess(id, name, res) {
function
invokeFail
(
id
,
name
,
errMsg
,
errRes
=
{})
{
const
apiErrMsg
=
name
+
'
:fail
'
+
(
errMsg
?
'
'
+
errMsg
:
''
);
delete
errRes
.
errCode
;
return
invokeCallback
(
id
,
typeof
UniError
!==
'
undefined
'
?
typeof
errRes
.
errCode
!==
'
undefined
'
?
new
UniError
(
name
,
errRes
.
errCode
,
apiErrMsg
)
:
new
UniError
(
apiErrMsg
,
errRes
)
:
extend
({
errMsg
:
apiErrMsg
},
errRes
));
let
res
=
extend
({
errMsg
:
apiErrMsg
},
errRes
);
return
invokeCallback
(
id
,
res
);
}
function
beforeInvokeApi
(
name
,
args
,
protocol
,
options
)
{
if
((
process
.
env
.
NODE_ENV
!==
'
production
'
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录