Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
20岁爱吃必胜客
uni-app
提交
2cb1aa0e
U
uni-app
项目概览
20岁爱吃必胜客
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
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,发现更多精彩内容 >>
提交
2cb1aa0e
编写于
12月 12, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(v3): mp runtime
上级
dbb1884c
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
72 addition
and
23 deletion
+72
-23
packages/uni-app-plus/dist/index.v3.js
packages/uni-app-plus/dist/index.v3.js
+44
-15
packages/uni-app-plus/dist/view.umd.min.js
packages/uni-app-plus/dist/view.umd.min.js
+2
-2
packages/uni-mp-weixin/dist/mp.js
packages/uni-mp-weixin/dist/mp.js
+1
-1
src/core/runtime/mp/parser/behaviors-parser.js
src/core/runtime/mp/parser/behaviors-parser.js
+1
-1
src/core/service/bridge/index.js
src/core/service/bridge/index.js
+1
-1
src/core/view/bridge/index.js
src/core/view/bridge/index.js
+1
-1
src/platforms/app-plus/service/framework/plugins/data.js
src/platforms/app-plus/service/framework/plugins/data.js
+12
-2
src/platforms/app-plus/service/framework/plugins/vdom-sync.js
...platforms/app-plus/service/framework/plugins/vdom-sync.js
+4
-0
src/platforms/app-plus/view/framework/plugins/data.js
src/platforms/app-plus/view/framework/plugins/data.js
+2
-0
src/platforms/app-plus/view/framework/plugins/vdom-sync.js
src/platforms/app-plus/view/framework/plugins/vdom-sync.js
+4
-0
未找到文件。
packages/uni-app-plus/dist/index.v3.js
浏览文件 @
2cb1aa0e
...
...
@@ -6552,10 +6552,15 @@ var serviceContext = (function () {
code
:
err
.
code
,
errMsg
:
'
login:fail:
'
+
err
.
message
});
});
}
,
{
scope
:
'
email
'
}
);
}
// 先注销再登录
loginServices
[
provider
].
logout
(
login
,
login
);
// apple登录logout之后无法重新触发获取email,fullname
if
(
provider
===
'
apple
'
)
{
login
();
}
else
{
loginServices
[
provider
].
logout
(
login
,
login
);
}
};
/**
* 微信登录
...
...
@@ -6594,7 +6599,7 @@ var serviceContext = (function () {
errMsg
:
'
operateWXData:fail:请先调用 uni.login
'
})
}
loginService
.
getUserInfo
(
res
=>
{
loginService
.
getUserInfo
(
res
=>
{
let
userInfo
;
if
(
provider
===
'
weixin
'
)
{
const
wechatUserInfo
=
loginService
.
userInfo
;
...
...
@@ -6608,28 +6613,38 @@ var serviceContext = (function () {
avatarUrl
:
wechatUserInfo
.
headimgurl
,
unionId
:
wechatUserInfo
.
unionid
};
}
else
if
(
provider
===
'
apple
'
)
{
const
appleInfo
=
loginService
.
appleInfo
;
userInfo
=
{
openId
:
appleInfo
.
user
,
fullName
:
appleInfo
.
fullName
,
email
:
appleInfo
.
email
,
authorizationCode
:
appleInfo
.
authorizationCode
,
identityToken
:
appleInfo
.
identityToken
,
realUserStatus
:
appleInfo
.
realUserStatus
};
}
else
{
loginService
.
userInfo
.
openId
=
loginService
.
userInfo
.
openId
||
loginService
.
userInfo
.
openid
||
loginService
.
authResult
.
openid
;
loginService
.
userInfo
.
nickName
=
loginService
.
userInfo
.
nickName
||
loginService
.
userInfo
.
nickname
;
loginService
.
userInfo
.
avatarUrl
=
loginService
.
userInfo
.
avatarUrl
||
loginService
.
userInfo
.
avatarUrl
||
loginService
.
userInfo
.
headimgurl
;
loginService
.
userInfo
.
headimgurl
;
userInfo
=
loginService
.
userInfo
;
}
const
result
=
{
errMsg
:
'
operateWXData:ok
'
};
if
(
params
.
data
&&
params
.
data
.
api_name
===
'
webapi_getuserinfo
'
)
{
}
const
result
=
{
errMsg
:
'
operateWXData:ok
'
};
if
(
params
.
data
&&
params
.
data
.
api_name
===
'
webapi_getuserinfo
'
)
{
result
.
data
=
{
data
:
JSON
.
stringify
(
userInfo
),
rawData
:
''
,
signature
:
''
,
encryptedData
:
''
,
iv
:
''
};
}
else
{
result
.
userInfo
=
userInfo
;
}
};
}
else
{
result
.
userInfo
=
userInfo
;
}
invoke$1
(
callbackId
,
result
);
},
err
=>
{
invoke$1
(
callbackId
,
{
...
...
@@ -12245,6 +12260,10 @@ var serviceContext = (function () {
this
.
batchData
.
push
([
type
,
typeData
]);
}
find
(
type
,
cid
)
{
return
this
.
batchData
.
find
(
data
=>
data
[
0
]
===
type
&&
data
[
1
][
0
]
===
cid
)
}
sendPageCreate
(
data
)
{
this
.
pageCreateData
=
data
;
UniServiceJSBridge
.
publishHandler
(
VD_SYNC
,
{
...
...
@@ -12467,8 +12486,18 @@ var serviceContext = (function () {
if
(
!
this
.
_$vd
)
{
return
}
this
.
_$vdUpdatedData
=
Object
.
create
(
null
);
this
.
_$setData
(
UPDATED_DATA
,
this
.
_$vdUpdatedData
);
// 当已存在 _$vdMountedData 时,使用重置后的 _$vdMountedData
const
mountedData
=
this
.
_$vd
.
find
(
MOUNTED_DATA
,
this
.
_$id
);
if
(
mountedData
)
{
this
.
_$data
=
Object
.
create
(
null
);
// 清空已有数据
this
.
_$vdUpdatedData
=
mountedData
[
1
][
1
]
=
Object
.
create
(
null
);
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
console
.
log
(
'
updated=>mounted:
'
+
this
.
_$id
);
}
}
else
{
this
.
_$vdUpdatedData
=
Object
.
create
(
null
);
this
.
_$setData
(
UPDATED_DATA
,
this
.
_$vdUpdatedData
);
}
this
.
_$newData
=
Object
.
create
(
null
);
},
beforeDestroy
()
{
...
...
packages/uni-app-plus/dist/view.umd.min.js
浏览文件 @
2cb1aa0e
此差异已折叠。
点击以展开。
packages/uni-mp-weixin/dist/mp.js
浏览文件 @
2cb1aa0e
...
...
@@ -227,7 +227,7 @@ const BEHAVIORS = {
}
if
(
!
props
.
value
)
{
props
.
value
=
{
type
:
null
type
:
String
// 默认类型为 String,否则默认值为 null,导致一些自定义 input 显示不正确
};
}
}
...
...
src/core/runtime/mp/parser/behaviors-parser.js
浏览文件 @
2cb1aa0e
...
...
@@ -61,7 +61,7 @@ const BEHAVIORS = {
}
if
(
!
props
.
value
)
{
props
.
value
=
{
type
:
null
type
:
String
// 默认类型为 String,否则默认值为 null,导致一些自定义 input 显示不正确
}
}
}
...
...
src/core/service/bridge/index.js
浏览文件 @
2cb1aa0e
...
...
@@ -22,7 +22,7 @@ export function unsubscribe (event, callback) {
export
function
subscribeHandler
(
event
,
args
,
pageId
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
console
.
log
(
`[subscribeHandler][
${
Date
.
now
()}
]:
`
,
event
,
args
,
pageId
)
console
.
log
(
`[subscribeHandler][
${
Date
.
now
()}
]:
${
event
}
,
${
JSON
.
stringify
(
args
)}
,
${
pageId
}
`
)
}
return
emit
(
'
view.
'
+
event
,
args
,
pageId
)
}
...
...
src/core/view/bridge/index.js
浏览文件 @
2cb1aa0e
...
...
@@ -19,7 +19,7 @@ export function unsubscribe (event, callback) {
export
function
subscribeHandler
(
event
,
args
,
pageId
)
{
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
console
.
log
(
`[subscribeHandler][
${
Date
.
now
()}
]:
`
,
event
,
args
,
pageId
)
console
.
log
(
`[subscribeHandler][
${
Date
.
now
()}
]:
${
event
}
,
${
JSON
.
stringify
(
args
)}
,
${
pageId
}
`
)
}
emit
(
'
service.
'
+
event
,
args
,
pageId
)
}
...
...
src/platforms/app-plus/service/framework/plugins/data.js
浏览文件 @
2cb1aa0e
...
...
@@ -99,8 +99,18 @@ export function initData (Vue) {
if
(
!
this
.
_$vd
)
{
return
}
this
.
_$vdUpdatedData
=
Object
.
create
(
null
)
this
.
_$setData
(
UPDATED_DATA
,
this
.
_$vdUpdatedData
)
// 当已存在 _$vdMountedData 时,使用重置后的 _$vdMountedData
const
mountedData
=
this
.
_$vd
.
find
(
MOUNTED_DATA
,
this
.
_$id
)
if
(
mountedData
)
{
this
.
_$data
=
Object
.
create
(
null
)
// 清空已有数据
this
.
_$vdUpdatedData
=
mountedData
[
1
][
1
]
=
Object
.
create
(
null
)
if
(
process
.
env
.
NODE_ENV
!==
'
production
'
)
{
console
.
log
(
'
updated=>mounted:
'
+
this
.
_$id
)
}
}
else
{
this
.
_$vdUpdatedData
=
Object
.
create
(
null
)
this
.
_$setData
(
UPDATED_DATA
,
this
.
_$vdUpdatedData
)
}
this
.
_$newData
=
Object
.
create
(
null
)
},
beforeDestroy
()
{
...
...
src/platforms/app-plus/service/framework/plugins/vdom-sync.js
浏览文件 @
2cb1aa0e
...
...
@@ -160,6 +160,10 @@ export class VDomSync {
this
.
batchData
.
push
([
type
,
typeData
])
}
find
(
type
,
cid
)
{
return
this
.
batchData
.
find
(
data
=>
data
[
0
]
===
type
&&
data
[
1
][
0
]
===
cid
)
}
sendPageCreate
(
data
)
{
this
.
pageCreateData
=
data
UniServiceJSBridge
.
publishHandler
(
VD_SYNC
,
{
...
...
src/platforms/app-plus/view/framework/plugins/data.js
浏览文件 @
2cb1aa0e
...
...
@@ -96,6 +96,8 @@ function vdSync ({
})
vd
.
flush
()
Vue
.
nextTick
(()
=>
{
// 清空本次 addBatchData
vd
.
clearAddBatchVData
()
updateView
()
isVdCallback
&&
UniViewJSBridge
.
publishHandler
(
VD_SYNC_CALLBACK
)
})
...
...
src/platforms/app-plus/view/framework/plugins/vdom-sync.js
浏览文件 @
2cb1aa0e
...
...
@@ -49,6 +49,10 @@ export class VDomSync {
})
}
clearAddBatchVData
()
{
this
.
addBatchVData
.
length
=
0
}
flush
()
{
this
.
updateBatchVData
.
forEach
(([
cid
,
data
])
=>
{
const
vm
=
this
.
vms
[
cid
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录