Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小浣熊撸代码
uni-app
提交
966e08fb
U
uni-app
项目概览
小浣熊撸代码
/
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,发现更多精彩内容 >>
提交
966e08fb
编写于
8月 25, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(mp): onAppLaunch
上级
e0a90007
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
305 addition
and
141 deletion
+305
-141
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+74
-60
packages/uni-mp-alipay/dist/uni.mp.esm.js
packages/uni-mp-alipay/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+32
-18
packages/uni-mp-baidu/dist/uni.mp.esm.js
packages/uni-mp-baidu/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-kuaishou/dist/uni.api.esm.js
packages/uni-mp-kuaishou/dist/uni.api.esm.js
+22
-8
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+22
-8
packages/uni-mp-qq/dist/uni.mp.esm.js
packages/uni-mp-qq/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+33
-19
packages/uni-mp-toutiao/dist/uni.mp.esm.js
packages/uni-mp-toutiao/dist/uni.mp.esm.js
+11
-2
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+21
-7
packages/uni-mp-weixin/dist/uni.mp.esm.js
packages/uni-mp-weixin/dist/uni.mp.esm.js
+11
-2
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+22
-8
packages/uni-quickapp-webview/dist/uni.mp.esm.js
packages/uni-quickapp-webview/dist/uni.mp.esm.js
+10
-0
packages/vue-cli-plugin-uni/lib/configure-webpack.js
packages/vue-cli-plugin-uni/lib/configure-webpack.js
+3
-1
未找到文件。
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
my
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
my
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
my
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
packages/uni-mp-alipay/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
isArray
,
extend
,
hyphenate
,
isObject
,
hasOwn
,
toNumber
,
capitalize
,
isFunction
,
NOOP
,
EMPTY_OBJ
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -476,7 +476,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -542,6 +542,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook
(
mpOptions
,
hook
,
excludes
));
}
my
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
my
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -566,7 +573,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
swan
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
swan
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
swan
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
packages/uni-mp-baidu/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -501,7 +501,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -567,6 +567,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
swan
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
swan
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -591,7 +598,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-kuaishou/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
ks
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
ks
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
ks
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -501,7 +501,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -567,6 +567,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
ks
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
ks
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -591,7 +598,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
qq
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
qq
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
qq
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
packages/uni-mp-qq/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -501,7 +501,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -567,6 +567,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
qq
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
qq
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -591,7 +598,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
tt
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
tt
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
tt
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
packages/uni-mp-toutiao/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -501,7 +501,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -570,6 +570,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
tt
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
tt
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -594,7 +601,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
wx
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
wx
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
...
...
@@ -686,6 +699,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
packages/uni-mp-weixin/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
onUnmounted
}
from
'
vue
'
;
import
{
onUnmounted
,
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -447,7 +447,7 @@ function initScopedSlotsParams(instance) {
const
vueIds
=
instance
.
attrs
.
vueId
;
if
(
vueIds
)
{
const
vueId
=
vueIds
.
split
(
'
,
'
)[
0
];
const
object
=
center
[
vueId
]
=
center
[
vueId
]
||
{}
;
const
object
=
(
center
[
vueId
]
=
center
[
vueId
]
||
{})
;
object
[
name
]
=
value
;
if
(
parents
[
vueId
])
{
parents
[
vueId
].
$forceUpdate
();
...
...
@@ -513,6 +513,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
wx
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
wx
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -537,7 +544,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
966e08fb
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isPromise
,
isFunction
,
extend
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
//App
const
ON_LAUNCH
=
'
onLaunch
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -36,6 +40,15 @@ const navigateTo = {
},
};
qa
.
appLaunchHooks
=
[];
function
onAppLaunch
(
hook
)
{
const
app
=
getApp
({
allowDefault
:
true
});
if
(
app
&&
app
.
$vm
)
{
return
injectHook
(
ON_LAUNCH
,
hook
,
app
.
$vm
.
$
);
}
qa
.
appLaunchHooks
.
push
(
hook
);
}
function
getBaseSystemInfo
()
{
return
qa
.
getSystemInfoSync
()
}
...
...
@@ -722,6 +735,7 @@ const baseApis = {
upx2px
,
addInterceptor
,
removeInterceptor
,
onAppLaunch
,
};
function
initUni
(
api
,
protocols
)
{
const
wrapper
=
initWrapper
(
protocols
);
...
...
packages/uni-quickapp-webview/dist/uni.mp.esm.js
浏览文件 @
966e08fb
import
{
isPlainObject
,
hasOwn
,
isArray
,
extend
,
hyphenate
,
isObject
,
toNumber
,
isFunction
,
NOOP
,
camelize
}
from
'
@vue/shared
'
;
import
{
injectHook
}
from
'
vue
'
;
const
encode
=
encodeURIComponent
;
function
stringifyQuery
(
obj
,
encodeStr
=
encode
)
{
...
...
@@ -497,6 +498,13 @@ function initUnknownHooks(mpOptions, vueOptions, excludes = EXCLUDE_HOOKS) {
findHooks
(
vueOptions
).
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
qa
.
appLaunchHooks
=
[];
function
injectAppLaunchHooks
(
appInstance
)
{
qa
.
appLaunchHooks
.
forEach
((
hook
)
=>
{
injectHook
(
ON_LAUNCH
,
hook
,
appInstance
);
});
}
const
HOOKS
=
[
ON_SHOW
,
ON_HIDE
,
...
...
@@ -521,7 +529,9 @@ function parseApp(instance, parseAppOptions) {
mpInstance
:
this
,
slots
:
[],
});
injectAppLaunchHooks
(
internalInstance
);
ctx
.
globalData
=
this
.
globalData
;
options
.
app
=
this
;
instance
.
$callHook
(
ON_LAUNCH
,
options
);
},
};
...
...
packages/vue-cli-plugin-uni/lib/configure-webpack.js
浏览文件 @
966e08fb
...
...
@@ -307,7 +307,9 @@ module.exports = function configureWebpack (platformOptions, manifestPlatformOpt
.
UNI_INPUT_DIR
),
// css中的'@/static/logo.png'会被转换成'./@/static/logo.png'加载
vue
$
:
getPlatformVue
(
vueOptions
),
'
uni-pages
'
:
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
pages.json
'
),
'
@dcloudio/uni-stat
'
:
require
.
resolve
(
'
@dcloudio/uni-stat
'
),
'
@dcloudio/uni-stat
'
:
process
.
env
.
UNI_USING_VUE3
?
require
.
resolve
(
'
@dcloudio/vue-cli-plugin-uni/packages/uni-stat
'
)
:
require
.
resolve
(
'
@dcloudio/uni-stat
'
),
'
uni-stat-config
'
:
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
'
pages.json
'
)
+
'
?
'
+
JSON
.
stringify
({
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录