Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
89b83259
U
uni-app
项目概览
DCloud
/
uni-app
大约 2 个月 前同步成功
通知
711
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
89b83259
编写于
5月 28, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(mp): mp-baidu ios onLoad args
上级
5e0d15df
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
13 deletion
+33
-13
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+14
-5
packages/uni-mp-baidu/package.json
packages/uni-mp-baidu/package.json
+1
-1
src/platforms/mp-baidu/runtime/wrapper/component-parser.js
src/platforms/mp-baidu/runtime/wrapper/component-parser.js
+7
-4
src/platforms/mp-baidu/runtime/wrapper/page-parser.js
src/platforms/mp-baidu/runtime/wrapper/page-parser.js
+8
-2
src/platforms/mp-baidu/runtime/wrapper/util.js
src/platforms/mp-baidu/runtime/wrapper/util.js
+3
-1
未找到文件。
packages/uni-mp-baidu/dist/index.js
浏览文件 @
89b83259
...
...
@@ -1105,7 +1105,9 @@ function isPage$1 () {
function
initRelation$1
(
detail
)
{
this
.
dispatch
(
'
__l
'
,
detail
);
}
}
const
isIOS$1
=
swan
.
getSystemInfoSync
().
platform
===
'
ios
'
;
function
parseApp
(
vm
)
{
return
parseBaseApp
(
vm
,
{
...
...
@@ -1210,9 +1212,11 @@ function parseComponent (vueOptions) {
// 百度 当组件作为页面时 pageinstancce 不是原来组件的 instance
this
.
pageinstance
.
$vm
=
this
.
$vm
;
this
.
$vm
.
$mp
.
query
=
this
.
pageinstance
.
_$args
;
// 兼容 mpvue
this
.
$vm
.
__call_hook
(
'
onLoad
'
,
this
.
pageinstance
.
_$args
);
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
if
(
!
isIOS$1
)
{
this
.
$vm
.
$mp
.
query
=
this
.
pageinstance
.
_$args
;
// 兼容 mpvue
this
.
$vm
.
__call_hook
(
'
onLoad
'
,
this
.
pageinstance
.
_$args
);
}
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
this
.
$vm
.
__call_hook
(
'
onShow
'
);
}
};
...
...
@@ -1274,7 +1278,12 @@ function parsePage (vuePageOptions) {
pageOptions
.
methods
.
onLoad
=
function
onLoad
(
args
)
{
// 百度 onLoad 在 attached 之前触发,先存储 args, 在 attached 里边触发 onLoad
this
.
pageinstance
.
_$args
=
args
;
this
.
pageinstance
.
_$args
=
args
;
if
(
isIOS$1
)
{
this
.
$vm
.
$mp
.
query
=
this
.
pageinstance
.
_$args
;
// 兼容 mpvue
this
.
$vm
.
__call_hook
(
'
onLoad
'
,
this
.
pageinstance
.
_$args
);
}
};
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
delete
pageOptions
.
methods
.
onShow
;
...
...
packages/uni-mp-baidu/package.json
浏览文件 @
89b83259
{
"name"
:
"@dcloudio/uni-mp-baidu"
,
"version"
:
"0.0.8
39
"
,
"version"
:
"0.0.8
40
"
,
"description"
:
"uni-app mp-baidu"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
...
...
src/platforms/mp-baidu/runtime/wrapper/component-parser.js
浏览文件 @
89b83259
import
{
isPage
,
isPage
,
isIOS
,
initRelation
}
from
'
./util
'
...
...
@@ -19,9 +20,11 @@ export default function parseComponent (vueOptions) {
// 百度 当组件作为页面时 pageinstancce 不是原来组件的 instance
this
.
pageinstance
.
$vm
=
this
.
$vm
this
.
$vm
.
$mp
.
query
=
this
.
pageinstance
.
_$args
// 兼容 mpvue
this
.
$vm
.
__call_hook
(
'
onLoad
'
,
this
.
pageinstance
.
_$args
)
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
if
(
!
isIOS
)
{
this
.
$vm
.
$mp
.
query
=
this
.
pageinstance
.
_$args
// 兼容 mpvue
this
.
$vm
.
__call_hook
(
'
onLoad
'
,
this
.
pageinstance
.
_$args
)
}
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
this
.
$vm
.
__call_hook
(
'
onShow
'
)
}
}
...
...
src/platforms/mp-baidu/runtime/wrapper/page-parser.js
浏览文件 @
89b83259
import
{
isPage
,
isPage
,
isIOS
,
initRelation
}
from
'
./util
'
...
...
@@ -27,7 +28,12 @@ export default function parsePage (vuePageOptions) {
pageOptions
.
methods
.
onLoad
=
function
onLoad
(
args
)
{
// 百度 onLoad 在 attached 之前触发,先存储 args, 在 attached 里边触发 onLoad
this
.
pageinstance
.
_$args
=
args
this
.
pageinstance
.
_$args
=
args
if
(
isIOS
)
{
this
.
$vm
.
$mp
.
query
=
this
.
pageinstance
.
_$args
// 兼容 mpvue
this
.
$vm
.
__call_hook
(
'
onLoad
'
,
this
.
pageinstance
.
_$args
)
}
}
// TODO 目前版本 百度 Component 作为页面时,methods 中的 onShow 不触发
delete
pageOptions
.
methods
.
onShow
...
...
src/platforms/mp-baidu/runtime/wrapper/util.js
浏览文件 @
89b83259
...
...
@@ -6,4 +6,6 @@ export function isPage () {
export
function
initRelation
(
detail
)
{
this
.
dispatch
(
'
__l
'
,
detail
)
}
}
export
const
isIOS
=
swan
.
getSystemInfoSync
().
platform
===
'
ios
'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录