Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
anyefeiyu
uni-app
提交
8690a6b6
U
uni-app
项目概览
anyefeiyu
/
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,发现更多精彩内容 >>
提交
8690a6b6
编写于
4月 29, 2019
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build uni runtime(caniuse)
上级
60146762
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
81 addition
and
41 deletion
+81
-41
packages/uni-mp-alipay/dist/index.js
packages/uni-mp-alipay/dist/index.js
+24
-17
packages/uni-mp-alipay/package.json
packages/uni-mp-alipay/package.json
+1
-1
packages/uni-mp-baidu/dist/index.js
packages/uni-mp-baidu/dist/index.js
+19
-9
packages/uni-mp-baidu/package.json
packages/uni-mp-baidu/package.json
+1
-1
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+19
-9
packages/uni-mp-toutiao/package.json
packages/uni-mp-toutiao/package.json
+1
-1
packages/uni-mp-weixin/dist/index.js
packages/uni-mp-weixin/dist/index.js
+15
-2
packages/uni-mp-weixin/package.json
packages/uni-mp-weixin/package.json
+1
-1
未找到文件。
packages/uni-mp-alipay/dist/index.js
浏览文件 @
8690a6b6
...
...
@@ -40,7 +40,7 @@ const camelize = cached((str) => {
return
str
.
replace
(
camelizeRE
,
(
_
,
c
)
=>
c
?
c
.
toUpperCase
()
:
''
)
});
const
SYNC_API_RE
=
/requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$/
;
const
SYNC_API_RE
=
/
subNVue|
requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
...
@@ -145,7 +145,7 @@ function upx2px (number, newDeviceWidth) {
}
// 不支持的 API 列表
const
TODOS
=
[
const
todos
=
[
'
saveImageToPhotosAlbum
'
,
'
getRecorderManager
'
,
'
getBackgroundAudioManager
'
,
...
...
@@ -170,7 +170,6 @@ const TODOS = [
'
hideTabBarRedDot
'
,
'
setBackgroundColor
'
,
'
setBackgroundTextStyle
'
,
'
startPullDownRefresh
'
,
'
createIntersectionObserver
'
,
'
authorize
'
,
'
openSetting
'
,
...
...
@@ -191,6 +190,11 @@ const TODOS = [
'
offWindowResize
'
];
// 存在兼容性的 API 列表
const
canIUses
=
[
'
startPullDownRefresh
'
];
function
_handleNetworkInfo
(
result
)
{
switch
(
result
.
networkType
)
{
case
'
NOTREACHABLE
'
:
...
...
@@ -462,7 +466,7 @@ const protocols = { // 需要做转换的 API 列表
requestPayment
:
{
name
:
'
tradePay
'
,
args
:
{
orderInfo
:
'
orderStr
'
orderInfo
:
'
tradeNO
'
}
},
getBLEDeviceServices
:
{
...
...
@@ -503,11 +507,7 @@ const protocols = { // 需要做转换的 API 列表
brightness
:
'
value
'
}
}
};
TODOS
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
};
const
CALLBACKS
=
[
'
success
'
,
'
fail
'
,
'
cancel
'
,
'
complete
'
];
...
...
@@ -586,7 +586,7 @@ function wrapper (methodName, method) {
const
todoApis
=
Object
.
create
(
null
);
const
TODOS
$1
=
[
const
TODOS
=
[
'
subscribePush
'
,
'
unsubscribePush
'
,
'
onPush
'
,
...
...
@@ -607,7 +607,7 @@ function createTodoApi (name) {
}
}
TODOS
$1
.
forEach
(
function
(
name
)
{
TODOS
.
forEach
(
function
(
name
)
{
todoApis
[
name
]
=
createTodoApi
(
name
);
});
...
...
@@ -655,12 +655,8 @@ function getStorageSync (key) {
const
result
=
my
.
getStorageSync
({
key
});
// 不知道会不会出现 success 为 false 情况,暂时这样处理下。
if
(
result
.
success
)
{
return
result
.
data
||
''
}
else
{
return
''
}
// 支付宝平台会返回一个 success 值,但是目前测试的结果这个始终是 true。当没有存储数据的时候,其它平台会返回空字符串。
return
result
.
data
!==
null
?
result
.
data
:
''
}
function
removeStorageSync
(
key
)
{
return
my
.
removeStorageSync
({
...
...
@@ -1547,6 +1543,17 @@ function createComponent (vueOptions) {
return
initComponent
(
componentOptions
,
vueOptions
)
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
canIUses
.
forEach
(
canIUseApi
=>
{
const
apiName
=
protocols
[
canIUseApi
]
&&
protocols
[
canIUseApi
].
name
?
protocols
[
canIUseApi
].
name
:
canIUseApi
;
if
(
!
my
.
canIUse
(
apiName
))
{
protocols
[
canIUseApi
]
=
false
;
}
});
let
uni
=
{};
if
(
typeof
Proxy
!==
'
undefined
'
)
{
...
...
packages/uni-mp-alipay/package.json
浏览文件 @
8690a6b6
{
"name"
:
"@dcloudio/uni-mp-alipay"
,
"version"
:
"0.0.80
1
"
,
"version"
:
"0.0.80
2
"
,
"description"
:
"uni-app mp-alipay"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
...
...
packages/uni-mp-baidu/dist/index.js
浏览文件 @
8690a6b6
...
...
@@ -40,7 +40,7 @@ const camelize = cached((str) => {
return
str
.
replace
(
camelizeRE
,
(
_
,
c
)
=>
c
?
c
.
toUpperCase
()
:
''
)
});
const
SYNC_API_RE
=
/requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$/
;
const
SYNC_API_RE
=
/
subNVue|
requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
...
@@ -145,7 +145,7 @@ function upx2px (number, newDeviceWidth) {
}
// 不支持的 API 列表
const
TODOS
=
[
const
todos
=
[
'
hideKeyboard
'
,
'
onGyroscopeChange
'
,
'
startGyroscope
'
,
...
...
@@ -178,6 +178,9 @@ const TODOS = [
'
offWindowResize
'
];
// 存在兼容性的 API 列表
const
canIUses
=
[];
function
createTodoMethod
(
contextName
,
methodName
)
{
return
function
unsupported
()
{
console
.
error
(
`百度小程序
${
contextName
}
暂不支持
${
methodName
}
`
);
...
...
@@ -237,11 +240,7 @@ const protocols = {
showShareMenu
:
{
name
:
'
openShare
'
}
};
TODOS
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
};
const
CALLBACKS
=
[
'
success
'
,
'
fail
'
,
'
cancel
'
,
'
complete
'
];
...
...
@@ -320,7 +319,7 @@ function wrapper (methodName, method) {
const
todoApis
=
Object
.
create
(
null
);
const
TODOS
$1
=
[
const
TODOS
=
[
'
subscribePush
'
,
'
unsubscribePush
'
,
'
onPush
'
,
...
...
@@ -341,7 +340,7 @@ function createTodoApi (name) {
}
}
TODOS
$1
.
forEach
(
function
(
name
)
{
TODOS
.
forEach
(
function
(
name
)
{
todoApis
[
name
]
=
createTodoApi
(
name
);
});
...
...
@@ -1159,6 +1158,17 @@ function createComponent (vueOptions) {
return
initComponent$1
(
componentOptions
,
vueOptions
)
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
canIUses
.
forEach
(
canIUseApi
=>
{
const
apiName
=
protocols
[
canIUseApi
]
&&
protocols
[
canIUseApi
].
name
?
protocols
[
canIUseApi
].
name
:
canIUseApi
;
if
(
!
swan
.
canIUse
(
apiName
))
{
protocols
[
canIUseApi
]
=
false
;
}
});
let
uni
=
{};
if
(
typeof
Proxy
!==
'
undefined
'
)
{
...
...
packages/uni-mp-baidu/package.json
浏览文件 @
8690a6b6
{
"name"
:
"@dcloudio/uni-mp-baidu"
,
"version"
:
"0.0.82
7
"
,
"version"
:
"0.0.82
8
"
,
"description"
:
"uni-app mp-baidu"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
...
...
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
8690a6b6
...
...
@@ -40,7 +40,7 @@ const camelize = cached((str) => {
return
str
.
replace
(
camelizeRE
,
(
_
,
c
)
=>
c
?
c
.
toUpperCase
()
:
''
)
});
const
SYNC_API_RE
=
/requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$/
;
const
SYNC_API_RE
=
/
subNVue|
requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
...
@@ -145,7 +145,7 @@ function upx2px (number, newDeviceWidth) {
}
// 不支持的 API 列表
const
TODOS
=
[
const
todos
=
[
'
hideKeyboard
'
,
'
onSocketOpen
'
,
'
onSocketError
'
,
...
...
@@ -227,6 +227,9 @@ const TODOS = [
'
offWindowResize
'
];
// 存在兼容性的 API 列表
const
canIUses
=
[];
// 需要做转换的 API 列表
const
protocols
=
{
chooseImage
:
{
...
...
@@ -298,11 +301,7 @@ const protocols = {
requestPayment
:
{
orderInfo
:
'
data
'
}
};
TODOS
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
};
const
CALLBACKS
=
[
'
success
'
,
'
fail
'
,
'
cancel
'
,
'
complete
'
];
...
...
@@ -381,7 +380,7 @@ function wrapper (methodName, method) {
const
todoApis
=
Object
.
create
(
null
);
const
TODOS
$1
=
[
const
TODOS
=
[
'
subscribePush
'
,
'
unsubscribePush
'
,
'
onPush
'
,
...
...
@@ -402,7 +401,7 @@ function createTodoApi (name) {
}
}
TODOS
$1
.
forEach
(
function
(
name
)
{
TODOS
.
forEach
(
function
(
name
)
{
todoApis
[
name
]
=
createTodoApi
(
name
);
});
...
...
@@ -1166,6 +1165,17 @@ function createComponent (vueOptions) {
return
initComponent$1
(
componentOptions
,
vueOptions
)
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
canIUses
.
forEach
(
canIUseApi
=>
{
const
apiName
=
protocols
[
canIUseApi
]
&&
protocols
[
canIUseApi
].
name
?
protocols
[
canIUseApi
].
name
:
canIUseApi
;
if
(
!
tt
.
canIUse
(
apiName
))
{
protocols
[
canIUseApi
]
=
false
;
}
});
let
uni
=
{};
if
(
typeof
Proxy
!==
'
undefined
'
)
{
...
...
packages/uni-mp-toutiao/package.json
浏览文件 @
8690a6b6
{
"name"
:
"@dcloudio/uni-mp-toutiao"
,
"version"
:
"0.0.32
5
"
,
"version"
:
"0.0.32
6
"
,
"description"
:
"uni-app mp-toutiao"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
...
...
packages/uni-mp-weixin/dist/index.js
浏览文件 @
8690a6b6
...
...
@@ -40,7 +40,7 @@ const camelize = cached((str) => {
return
str
.
replace
(
camelizeRE
,
(
_
,
c
)
=>
c
?
c
.
toUpperCase
()
:
''
)
});
const
SYNC_API_RE
=
/requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$/
;
const
SYNC_API_RE
=
/
subNVue|
requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$/
;
const
CONTEXT_API_RE
=
/^create|Manager$/
;
...
...
@@ -144,7 +144,9 @@ function upx2px (number, newDeviceWidth) {
return
number
<
0
?
-
result
:
result
}
var
protocols
=
{};
const
protocols
=
{};
const
todos
=
[];
const
canIUses
=
[];
const
CALLBACKS
=
[
'
success
'
,
'
fail
'
,
'
cancel
'
,
'
complete
'
];
...
...
@@ -1004,6 +1006,17 @@ function createComponent (vueOptions) {
return
initComponent
(
componentOptions
,
vueOptions
)
}
todos
.
forEach
(
todoApi
=>
{
protocols
[
todoApi
]
=
false
;
});
canIUses
.
forEach
(
canIUseApi
=>
{
const
apiName
=
protocols
[
canIUseApi
]
&&
protocols
[
canIUseApi
].
name
?
protocols
[
canIUseApi
].
name
:
canIUseApi
;
if
(
!
wx
.
canIUse
(
apiName
))
{
protocols
[
canIUseApi
]
=
false
;
}
});
let
uni
=
{};
if
(
typeof
Proxy
!==
'
undefined
'
)
{
...
...
packages/uni-mp-weixin/package.json
浏览文件 @
8690a6b6
{
"name"
:
"@dcloudio/uni-mp-weixin"
,
"version"
:
"0.0.9
49
"
,
"version"
:
"0.0.9
50
"
,
"description"
:
"uni-app mp-weixin"
,
"main"
:
"dist/index.js"
,
"scripts"
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录