Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
touchx
uni-app
提交
259fb90e
U
uni-app
项目概览
touchx
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
259fb90e
编写于
9月 24, 2019
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'alpha'
上级
941c2b8d
4f56168a
变更
27
展开全部
隐藏空白更改
内联
并排
Showing
27 changed file
with
107 addition
and
77 deletion
+107
-77
docs/api/request/request.md
docs/api/request/request.md
+3
-1
lerna.json
lerna.json
+1
-1
packages/uni-app-plus-nvue/dist/index.js
packages/uni-app-plus-nvue/dist/index.js
+32
-13
packages/uni-app-plus-nvue/package.json
packages/uni-app-plus-nvue/package.json
+2
-2
packages/uni-app-plus/package.json
packages/uni-app-plus/package.json
+2
-2
packages/uni-cli-shared/package.json
packages/uni-cli-shared/package.json
+2
-2
packages/uni-h5-ui/package.json
packages/uni-h5-ui/package.json
+2
-2
packages/uni-h5/dist/index.umd.min.js
packages/uni-h5/dist/index.umd.min.js
+1
-1
packages/uni-h5/package.json
packages/uni-h5/package.json
+2
-2
packages/uni-mp-alipay/package.json
packages/uni-mp-alipay/package.json
+2
-2
packages/uni-mp-baidu/package.json
packages/uni-mp-baidu/package.json
+2
-2
packages/uni-mp-qq/package.json
packages/uni-mp-qq/package.json
+2
-2
packages/uni-mp-toutiao/dist/index.js
packages/uni-mp-toutiao/dist/index.js
+8
-9
packages/uni-mp-toutiao/package.json
packages/uni-mp-toutiao/package.json
+2
-2
packages/uni-mp-weixin/package.json
packages/uni-mp-weixin/package.json
+2
-2
packages/uni-stat/package.json
packages/uni-stat/package.json
+2
-2
packages/uni-template-compiler/package.json
packages/uni-template-compiler/package.json
+2
-2
packages/vue-cli-plugin-hbuilderx/package.json
packages/vue-cli-plugin-hbuilderx/package.json
+2
-2
packages/vue-cli-plugin-uni-optimize/package.json
packages/vue-cli-plugin-uni-optimize/package.json
+2
-2
packages/vue-cli-plugin-uni/package.json
packages/vue-cli-plugin-uni/package.json
+3
-3
packages/webpack-uni-mp-loader/package.json
packages/webpack-uni-mp-loader/package.json
+2
-2
packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js
.../webpack-uni-pages-loader/lib/platforms/app-plus/index.js
+4
-0
packages/webpack-uni-pages-loader/package.json
packages/webpack-uni-pages-loader/package.json
+3
-3
src/core/view/bridge/subscribe/index.js
src/core/view/bridge/subscribe/index.js
+4
-4
src/core/view/bridge/subscribe/scroll.js
src/core/view/bridge/subscribe/scroll.js
+5
-1
src/platforms/app-plus/service/api/network/request.js
src/platforms/app-plus/service/api/network/request.js
+5
-2
src/platforms/mp-toutiao/runtime/api/protocols.js
src/platforms/mp-toutiao/runtime/api/protocols.js
+8
-9
未找到文件。
docs/api/request/request.md
浏览文件 @
259fb90e
...
...
@@ -13,6 +13,7 @@
|method|String|否|GET|有效值详见下方说明||
|dataType|String|否|json |如果设为 json,会尝试对返回的数据做一次 JSON.parse||
|responseType|String|否|text |设置响应的数据类型。合法值:text、arraybuffer|5+App和支付宝小程序不支持|
|sslVerify|Boolean|否|true|验证 ssl 证书|仅5+App安卓端支持(HBuilderX 2.3.4+)|
|success|Function|否||收到开发者服务成功返回的回调函数||
|fail|Function|否||接口调用失败的回调函数||
|complete|Function|否||接口调用结束的回调函数(调用成功、失败都会执行)|
|
...
...
@@ -122,5 +123,6 @@ requestTask.abort();
-
debug 模式,安卓端暂时无法获取响应头,url中含有非法字符(如未编码为%20的空格)时会请求失败
-
iOS App第一次安装启动后,会弹出是否允许联网的询问框,在用户点击同意前,调用联网API会失败。请注意判断这种情况。比如官方提供的新闻模板示例(HBuilderX新建项目可选择),会判断如果无法联网,则提供一个错误页,提示用户设置网络及下拉刷新重试。
-
良好体验的App,还会判断当前是否处于飞行模式(
[
参考
](
https://ext.dcloud.net.cn/plugin?id=594
)
)、是wifi还是3G(
[
参考
](
https://uniapp.dcloud.io/api/system/network
)
)
-
部分Android设备,真机运行或debug模式下的网络,低于release模式很多。
-
部分安卓设备,真机运行或debug模式下的网络,低于release模式很多。
-
使用一些比较小众的证书机构(如:CFCA OV OCA)签发的 ssl 证书在安卓设备请求会失败,因为这些机构的根证书不在系统内置根证书库,可以更换其他常见机构签发的证书(如:Let's Encrypt),或者配置 sslVerify 为 false 关闭 ssl 证书验证(不推荐)。
-
单次网络请求数据量建议控制在50K以下(仅指json数据,不含图片),过多数据应分页获取,以提升应用体验。
lerna.json
浏览文件 @
259fb90e
...
...
@@ -12,5 +12,5 @@
"message"
:
"chore(release): publish %s"
}
},
"version"
:
"2.0.0-23
220190921001
"
"version"
:
"2.0.0-23
320190923002
"
}
packages/uni-app-plus-nvue/dist/index.js
浏览文件 @
259fb90e
...
...
@@ -101,10 +101,6 @@ var serviceContext = (function () {
var
base64Arraybuffer_1
=
base64Arraybuffer
.
encode
;
var
base64Arraybuffer_2
=
base64Arraybuffer
.
decode
;
function
pack
(
args
)
{
return
args
}
function
unpack
(
args
)
{
return
args
}
...
...
@@ -4387,7 +4383,7 @@ var serviceContext = (function () {
/**
* 执行蓝牙相关方法
*/
function
bluetoothExec
(
method
,
callbackId
,
data
=
{})
{
function
bluetoothExec
(
method
,
callbackId
,
data
=
{}
,
beforeSuccess
)
{
var
deviceId
=
data
.
deviceId
;
if
(
deviceId
)
{
data
.
deviceId
=
deviceId
.
toUpperCase
();
...
...
@@ -4399,7 +4395,10 @@ var serviceContext = (function () {
plus
.
bluetooth
[
method
.
replace
(
'
Changed
'
,
'
Change
'
)](
Object
.
assign
(
data
,
{
success
(
data
)
{
invoke
(
callbackId
,
Object
.
assign
({},
pack
(
data
),
{
if
(
typeof
beforeSuccess
===
'
function
'
)
{
beforeSuccess
(
data
);
}
invoke
(
callbackId
,
Object
.
assign
({},
data
,
{
errMsg
:
`
${
method
}
:ok`
,
code
:
undefined
,
message
:
undefined
...
...
@@ -4416,9 +4415,12 @@ var serviceContext = (function () {
/**
* 监听蓝牙相关事件
*/
function
bluetoothOn
(
method
)
{
function
bluetoothOn
(
method
,
beforeSuccess
)
{
plus
.
bluetooth
[
method
.
replace
(
'
Changed
'
,
'
Change
'
)](
function
(
data
)
{
publish
(
method
,
Object
.
assign
({},
pack
(
data
),
{
if
(
typeof
beforeSuccess
===
'
function
'
)
{
beforeSuccess
(
data
);
}
publish
(
method
,
Object
.
assign
({},
data
,
{
code
:
undefined
,
message
:
undefined
}));
...
...
@@ -4426,6 +4428,16 @@ var serviceContext = (function () {
return
true
}
function
checkDevices
(
data
)
{
data
.
devices
=
data
.
devices
.
map
(
device
=>
{
var
advertisData
=
device
.
advertisData
;
if
(
advertisData
&&
typeof
advertisData
!==
'
string
'
)
{
device
.
advertisData
=
arrayBufferToBase64
(
advertisData
);
}
return
device
});
}
var
onBluetoothAdapterStateChange
;
var
onBluetoothDeviceFound
;
var
onBLEConnectionStateChange
;
...
...
@@ -4446,7 +4458,7 @@ var serviceContext = (function () {
}
function
startBluetoothDevicesDiscovery
(
data
,
callbackId
)
{
onBluetoothDeviceFound
=
onBluetoothDeviceFound
||
bluetoothOn
(
'
onBluetoothDeviceFound
'
);
onBluetoothDeviceFound
=
onBluetoothDeviceFound
||
bluetoothOn
(
'
onBluetoothDeviceFound
'
,
checkDevices
);
bluetoothExec
(
'
startBluetoothDevicesDiscovery
'
,
callbackId
,
data
);
}
...
...
@@ -4455,7 +4467,7 @@ var serviceContext = (function () {
}
function
getBluetoothDevices
(
data
,
callbackId
)
{
bluetoothExec
(
'
getBluetoothDevices
'
,
callbackId
,
{});
bluetoothExec
(
'
getBluetoothDevices
'
,
callbackId
,
{}
,
checkDevices
);
}
function
getConnectedBluetoothDevices
(
data
,
callbackId
)
{
...
...
@@ -4481,12 +4493,18 @@ var serviceContext = (function () {
}
function
notifyBLECharacteristicValueChange
(
data
,
callbackId
)
{
onBLECharacteristicValueChange
=
onBLECharacteristicValueChange
||
bluetoothOn
(
'
onBLECharacteristicValueChange
'
);
onBLECharacteristicValueChange
=
onBLECharacteristicValueChange
||
bluetoothOn
(
'
onBLECharacteristicValueChange
'
,
data
=>
{
data
.
value
=
arrayBufferToBase64
(
data
.
value
);
});
bluetoothExec
(
'
notifyBLECharacteristicValueChange
'
,
callbackId
,
data
);
}
function
notifyBLECharacteristicValueChanged
(
data
,
callbackId
)
{
onBLECharacteristicValueChange
=
onBLECharacteristicValueChange
||
bluetoothOn
(
'
onBLECharacteristicValueChange
'
);
onBLECharacteristicValueChange
=
onBLECharacteristicValueChange
||
bluetoothOn
(
'
onBLECharacteristicValueChange
'
,
data
=>
{
data
.
value
=
arrayBufferToBase64
(
data
.
value
);
});
bluetoothExec
(
'
notifyBLECharacteristicValueChanged
'
,
callbackId
,
data
);
}
...
...
@@ -4495,7 +4513,8 @@ var serviceContext = (function () {
}
function
writeBLECharacteristicValue
(
data
,
callbackId
)
{
bluetoothExec
(
'
writeBLECharacteristicValue
'
,
callbackId
,
unpack
(
data
));
data
.
value
=
base64ToArrayBuffer
(
data
.
value
);
bluetoothExec
(
'
writeBLECharacteristicValue
'
,
callbackId
,
data
);
}
function
getScreenBrightness
()
{
...
...
packages/uni-app-plus-nvue/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-app-plus-nvue"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app app-plus-nvue"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-app-plus/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-app-plus"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app app-plus"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-cli-shared/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-cli-shared"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-cli-shared"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
@@ -20,5 +20,5 @@
"hash-sum"
:
"^1.0.2"
,
"strip-json-comments"
:
"^2.0.1"
},
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-h5-ui/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-h5-ui"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app h5 ui"
,
"main"
:
"dist/index.umd.min.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-h5/dist/index.umd.min.js
浏览文件 @
259fb90e
此差异已折叠。
点击以展开。
packages/uni-h5/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-h5"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app h5"
,
"main"
:
"dist/index.umd.min.js"
,
"repository"
:
{
...
...
@@ -18,5 +18,5 @@
"intersection-observer"
:
"^0.7.0"
,
"safe-area-insets"
:
"^1.4.1"
},
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-mp-alipay/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-mp-alipay"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app mp-alipay"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-mp-baidu/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-mp-baidu"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app mp-baidu"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-mp-qq/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-mp-qq"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app mp-qq"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-mp-toutiao/dist/index.js
浏览文件 @
259fb90e
...
...
@@ -386,21 +386,16 @@ var previewImage = {
// 不支持的 API 列表
const
todos
=
[
'
getBackgroundAudioManager
'
,
'
createCameraContext
'
,
'
createLivePlayerContext
'
,
'
getSavedFileInfo
'
,
'
openDocument
'
,
'
chooseLocation
'
,
'
createMapContext
'
,
'
canIUse
'
,
'
onMemoryWarning
'
,
'
onGyroscopeChange
'
,
'
startGyroscope
'
,
'
stopGyroscope
'
,
'
setScreenBrightness
'
,
'
getScreenBrightness
'
,
'
onUserCaptureScreen
'
,
'
addPhoneContact
'
,
'
openBluetoothAdapter
'
,
'
startBluetoothDevicesDiscovery
'
,
...
...
@@ -439,8 +434,6 @@ const todos = [
'
setBackgroundColor
'
,
'
setBackgroundTextStyle
'
,
'
chooseInvoiceTitle
'
,
'
navigateToMiniProgram
'
,
'
navigateBackMiniProgram
'
,
'
addTemplate
'
,
'
deleteTemplate
'
,
'
getTemplateLibraryById
'
,
...
...
@@ -450,13 +443,12 @@ const todos = [
'
setEnableDebug
'
,
'
onWindowResize
'
,
'
offWindowResize
'
,
'
compressImage
'
,
'
createOffscreenCanvas
'
,
'
vibrate
'
];
// 存在兼容性的 API 列表
// 头条小程序
不
支持canIUses
// 头条小程序
自1.35.0+
支持canIUses
const
canIUses
=
[
// 'createIntersectionObserver',
// 'getSavedFileList',
...
...
@@ -472,6 +464,13 @@ const canIUses = [
// 'onSocketClose',
// 'getExtConfig',
// 'getExtConfigSync',
// 'navigateToMiniProgram',
// 'navigateBackMiniProgram',
// 'compressImage',
// 'chooseLocation',
// 'openDocument',
// 'onUserCaptureScreen',
// 'getBackgroundAudioManager',
];
// 需要做转换的 API 列表
...
...
packages/uni-mp-toutiao/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-mp-toutiao"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app mp-toutiao"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-mp-weixin/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-mp-weixin"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app mp-weixin"
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-stat/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-stat"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
""
,
"main"
:
"dist/index.js"
,
"repository"
:
{
...
...
@@ -34,5 +34,5 @@
"rollup-plugin-replace"
:
"^2.2.0"
,
"rollup-plugin-uglify"
:
"^6.0.2"
},
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/uni-template-compiler/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/uni-template-compiler"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-template-compiler"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
@@ -22,5 +22,5 @@
"@babel/types"
:
"^7.3.3"
,
"vue-template-compiler"
:
"^2.6.10"
},
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/vue-cli-plugin-hbuilderx/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/vue-cli-plugin-hbuilderx"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"HBuilderX plugin for vue-cli 3"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
@@ -18,5 +18,5 @@
"css"
:
"~2.2.1"
,
"escodegen"
:
"^1.8.1"
},
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/vue-cli-plugin-uni-optimize/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/vue-cli-plugin-uni-optimize"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app optimize plugin for vue-cli 3"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
@@ -13,5 +13,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/vue-cli-plugin-uni/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/vue-cli-plugin-uni"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app plugin for vue-cli 3"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
@@ -17,7 +17,7 @@
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"dependencies"
:
{
"@dcloudio/uni-stat"
:
"^2.0.0-23
220190921001
"
,
"@dcloudio/uni-stat"
:
"^2.0.0-23
320190923002
"
,
"copy-webpack-plugin"
:
"^4.6.0"
,
"cross-env"
:
"^5.2.0"
,
"envinfo"
:
"^6.0.1"
,
...
...
@@ -34,5 +34,5 @@
"wrap-loader"
:
"^0.2.0"
,
"xregexp"
:
"4.0.0"
},
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/webpack-uni-mp-loader/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/webpack-uni-mp-loader"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"webpack-uni-mp-loader"
,
"main"
:
"index.js"
,
"repository"
:
{
...
...
@@ -16,5 +16,5 @@
},
"author"
:
"fxy060608"
,
"license"
:
"Apache-2.0"
,
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
packages/webpack-uni-pages-loader/lib/platforms/app-plus/index.js
浏览文件 @
259fb90e
...
...
@@ -394,6 +394,10 @@ module.exports = function (pagesJson, userManifestJson) {
}
}
if
(
!
process
.
env
.
UNI_USING_COMPONENTS
)
{
manifestJson
.
plus
.
launchwebview
.
kernel
=
'
UIWebview
'
}
manifest
.
content
=
manifestJson
// 分包合并
...
...
packages/webpack-uni-pages-loader/package.json
浏览文件 @
259fb90e
{
"name"
:
"@dcloudio/webpack-uni-pages-loader"
,
"version"
:
"2.0.0-23
220190921001
"
,
"version"
:
"2.0.0-23
320190923002
"
,
"description"
:
"uni-app pages.json loader"
,
"main"
:
"lib/index.js"
,
"repository"
:
{
...
...
@@ -21,7 +21,7 @@
"strip-json-comments"
:
"^2.0.1"
},
"uni-app"
:
{
"compilerVersion"
:
"2.3.
2
"
"compilerVersion"
:
"2.3.
3
"
},
"gitHead"
:
"
a9dfc1e2b7a5608e010228c06a040b8f267aace2
"
"gitHead"
:
"
10184426b19cb76e01c93fb25c982c72887557e8
"
}
src/core/view/bridge/subscribe/index.js
浏览文件 @
259fb90e
...
...
@@ -39,7 +39,7 @@ function updateCssVar (vm) {
}
}
export
default
function
initSubscribe
(
subscribe
)
{
export
default
function
initSubscribe
(
subscribe
)
{
Object
.
keys
(
subscribeApis
).
forEach
(
name
=>
{
subscribe
(
name
,
subscribeApis
[
name
])
})
...
...
@@ -88,10 +88,10 @@ export default function initSubscribe (subscribe) {
onReachBottomDistance
,
enableTransparentTitleNView
})
setTimeout
(
function
()
{
// 避免监听太早,直接触发了 scroll
requestAnimationFrame
(
function
()
{
// 避免监听太早,直接触发了 scroll
document
.
addEventListener
(
'
scroll
'
,
scrollListener
)
}
,
10
)
})
}
})
}
}
}
src/core/view/bridge/subscribe/scroll.js
浏览文件 @
259fb90e
...
...
@@ -91,6 +91,10 @@ export function createScrollListener (pageId, {
}
function
trigger
()
{
const
pages
=
getCurrentPages
()
if
(
!
pages
.
length
||
pages
[
pages
.
length
-
1
].
$page
.
id
!==
pageId
)
{
return
}
// publish
const
scrollTop
=
window
.
pageYOffset
if
(
enablePageScroll
)
{
// 向 Service 发送 onPageScroll 事件
...
...
@@ -121,4 +125,4 @@ export function createScrollListener (pageId, {
}
ticking
=
true
}
}
}
src/platforms/app-plus/service/api/network/request.js
浏览文件 @
259fb90e
...
...
@@ -17,7 +17,8 @@ export function createRequestTaskById (requestTaskId, {
data
,
header
,
method
=
'
GET
'
,
responseType
responseType
,
sslVerify
=
true
}
=
{})
{
const
stream
=
requireNativePlugin
(
'
stream
'
)
const
headers
=
{}
...
...
@@ -57,7 +58,9 @@ export function createRequestTaskById (requestTaskId, {
headers
,
type
:
responseType
===
'
arraybuffer
'
?
'
base64
'
:
'
text
'
,
// weex 官方文档未说明实际支持 timeout,单位:ms
timeout
:
timeout
||
6
e5
timeout
:
timeout
||
6
e5
,
// 配置和weex模块内相反
sslVerify
:
!
sslVerify
}
if
(
method
!==
'
GET
'
)
{
options
.
body
=
data
...
...
src/platforms/mp-toutiao/runtime/api/protocols.js
浏览文件 @
259fb90e
...
...
@@ -2,21 +2,16 @@ import previewImage from '../../../mp-weixin/helpers/normalize-preview-image'
// 不支持的 API 列表
const
todos
=
[
'
getBackgroundAudioManager
'
,
'
createCameraContext
'
,
'
createLivePlayerContext
'
,
'
getSavedFileInfo
'
,
'
openDocument
'
,
'
chooseLocation
'
,
'
createMapContext
'
,
'
canIUse
'
,
'
onMemoryWarning
'
,
'
onGyroscopeChange
'
,
'
startGyroscope
'
,
'
stopGyroscope
'
,
'
setScreenBrightness
'
,
'
getScreenBrightness
'
,
'
onUserCaptureScreen
'
,
'
addPhoneContact
'
,
'
openBluetoothAdapter
'
,
'
startBluetoothDevicesDiscovery
'
,
...
...
@@ -55,8 +50,6 @@ const todos = [
'
setBackgroundColor
'
,
'
setBackgroundTextStyle
'
,
'
chooseInvoiceTitle
'
,
'
navigateToMiniProgram
'
,
'
navigateBackMiniProgram
'
,
'
addTemplate
'
,
'
deleteTemplate
'
,
'
getTemplateLibraryById
'
,
...
...
@@ -66,13 +59,12 @@ const todos = [
'
setEnableDebug
'
,
'
onWindowResize
'
,
'
offWindowResize
'
,
'
compressImage
'
,
'
createOffscreenCanvas
'
,
'
vibrate
'
]
// 存在兼容性的 API 列表
// 头条小程序
不
支持canIUses
// 头条小程序
自1.35.0+
支持canIUses
const
canIUses
=
[
// 'createIntersectionObserver',
// 'getSavedFileList',
...
...
@@ -88,6 +80,13 @@ const canIUses = [
// 'onSocketClose',
// 'getExtConfig',
// 'getExtConfigSync',
// 'navigateToMiniProgram',
// 'navigateBackMiniProgram',
// 'compressImage',
// 'chooseLocation',
// 'openDocument',
// 'onUserCaptureScreen',
// 'getBackgroundAudioManager',
]
// 需要做转换的 API 列表
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录