Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ripplebb
uni-app
提交
5b34a62a
U
uni-app
项目概览
ripplebb
/
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,发现更多精彩内容 >>
提交
5b34a62a
编写于
8月 05, 2020
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build v3
上级
4d3e494c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
84 addition
and
45 deletion
+84
-45
packages/uni-app-plus/dist/index.v3.js
packages/uni-app-plus/dist/index.v3.js
+84
-45
未找到文件。
packages/uni-app-plus/dist/index.v3.js
浏览文件 @
5b34a62a
...
...
@@ -120,7 +120,9 @@ var serviceContext = (function () {
'
getBLEDeviceServices
'
,
'
getBLEDeviceCharacteristics
'
,
'
createBLEConnection
'
,
'
closeBLEConnection
'
,
'
closeBLEConnection
'
,
'
setBLEMTU
'
,
'
getBLEDeviceRSSI
'
,
'
onBeaconServiceChange
'
,
'
onBeaconUpdate
'
,
'
getBeacons
'
,
...
...
@@ -2137,6 +2139,9 @@ var serviceContext = (function () {
},
selectedIconPath
:
{
type
:
String
},
pagePath
:
{
type
:
String
}
};
...
...
@@ -2995,7 +3000,11 @@ var serviceContext = (function () {
let
lastStatusBarStyle
;
const
oldSetStatusBarStyle
=
plus
.
navigator
.
setStatusBarStyle
;
let
oldSetStatusBarStyle
=
plus
.
navigator
.
setStatusBarStyle
;
function
restoreOldSetStatusBarStyle
(
setStatusBarStyle
)
{
oldSetStatusBarStyle
=
setStatusBarStyle
;
}
function
newSetStatusBarStyle
(
style
)
{
lastStatusBarStyle
=
style
;
...
...
@@ -3768,8 +3777,8 @@ var serviceContext = (function () {
getCenterLocation
(
ctx
,
cbs
)
{
return
invokeVmMethodWithoutArgs
(
ctx
,
'
getCenterLocation
'
,
cbs
)
},
moveToLocation
(
ctx
)
{
return
invokeVmMethod
WithoutArgs
(
ctx
,
'
moveToLocation
'
)
moveToLocation
(
ctx
,
args
)
{
return
invokeVmMethod
(
ctx
,
'
moveToLocation
'
,
args
)
},
translateMarker
(
ctx
,
args
)
{
return
invokeVmMethod
(
ctx
,
'
translateMarker
'
,
args
,
[
'
animationEnd
'
])
...
...
@@ -4302,6 +4311,14 @@ var serviceContext = (function () {
function
writeBLECharacteristicValue
(
data
,
callbackId
)
{
bluetoothExec
(
'
writeBLECharacteristicValue
'
,
callbackId
,
data
);
}
function
setBLEMTU
(
data
,
callbackId
)
{
bluetoothExec
(
'
setBLEMTU
'
,
callbackId
,
data
);
}
function
getBLEDeviceRSSI
(
data
,
callbackId
)
{
bluetoothExec
(
'
getBLEDeviceRSSI
'
,
callbackId
,
data
);
}
function
getScreenBrightness
()
{
...
...
@@ -4407,28 +4424,14 @@ var serviceContext = (function () {
}
}
let
beaconUpdateState
=
false
;
function
onBeaconUpdate
()
{
if
(
!
beaconUpdateState
)
{
plus
.
ibeacon
.
onBeaconUpdate
(
function
(
data
)
{
publish
(
'
onBeaconUpdated
'
,
data
);
});
beaconUpdateState
=
true
;
}
function
onBeaconUpdate
(
callbackId
)
{
plus
.
ibeacon
.
onBeaconUpdate
(
data
=>
invoke$1
(
callbackId
,
data
));
}
let
beaconServiceChangeState
=
false
;
function
onBeaconServiceChange
()
{
if
(
!
beaconServiceChangeState
)
{
plus
.
ibeacon
.
onBeaconServiceChange
(
function
(
data
)
{
publish
(
'
onBeaconServiceChange
'
,
data
);
publish
(
'
onBeaconServiceChanged
'
,
data
);
});
beaconServiceChangeState
=
true
;
}
function
onBeaconServiceChange
(
callbackId
)
{
plus
.
ibeacon
.
onBeaconServiceChange
(
data
=>
invoke$1
(
callbackId
,
data
));
}
const
onBeaconServiceChanged
=
onBeaconServiceChange
;
function
getBeacons
(
params
,
callbackId
)
{
plus
.
ibeacon
.
getBeacons
({
...
...
@@ -6575,13 +6578,35 @@ var serviceContext = (function () {
delete
requestTasks
[
requestTaskId
];
};
const
cookiesPrase
=
header
=>
{
let
cookiesStr
=
header
[
'
Set-Cookie
'
];
let
cookiesArr
=
[];
if
(
!
cookiesStr
)
{
return
[]
}
if
(
cookiesStr
[
0
]
===
'
[
'
&&
cookiesStr
[
cookiesStr
.
length
-
1
]
===
'
]
'
)
{
cookiesStr
=
cookiesStr
.
slice
(
1
,
-
1
);
}
const
handleCookiesArr
=
cookiesStr
.
split
(
'
;
'
);
for
(
let
i
=
0
;
i
<
handleCookiesArr
.
length
;
i
++
)
{
if
(
handleCookiesArr
[
i
].
indexOf
(
'
Expires=
'
)
!==
-
1
)
{
cookiesArr
.
push
(
handleCookiesArr
[
i
].
replace
(
'
,
'
,
''
));
}
else
{
cookiesArr
.
push
(
handleCookiesArr
[
i
]);
}
}
cookiesArr
=
cookiesArr
.
join
(
'
;
'
).
split
(
'
,
'
);
return
cookiesArr
};
function
createRequestTaskById
(
requestTaskId
,
{
url
,
data
,
header
,
method
=
'
GET
'
,
responseType
,
sslVerify
=
true
,
sslVerify
=
true
,
firstIpv4
=
false
}
=
{})
{
const
stream
=
requireNativePlugin
(
'
stream
'
);
...
...
@@ -6635,7 +6660,7 @@ var serviceContext = (function () {
// weex 官方文档未说明实际支持 timeout,单位:ms
timeout
:
timeout
||
6
e5
,
// 配置和weex模块内相反
sslVerify
:
!
sslVerify
,
sslVerify
:
!
sslVerify
,
firstIpv4
:
firstIpv4
};
if
(
method
!==
'
GET
'
)
{
...
...
@@ -6661,7 +6686,8 @@ var serviceContext = (function () {
state
:
'
success
'
,
data
:
ok
&&
responseType
===
'
arraybuffer
'
?
base64ToArrayBuffer$2
(
data
)
:
data
,
statusCode
,
header
:
headers
header
:
headers
,
cookies
:
cookiesPrase
(
headers
)
});
}
else
{
publishStateChange$1
({
...
...
@@ -7469,7 +7495,8 @@ var serviceContext = (function () {
console
.
log
(
`[restoreGlobal][
${
Date
.
now
()}
]`
);
}
weex
=
newWeex
;
plus
=
newPlus
;
plus
=
newPlus
;
restoreOldSetStatusBarStyle
(
plus
.
navigator
.
setStatusBarStyle
);
plus
.
navigator
.
setStatusBarStyle
=
newSetStatusBarStyle
;
/* eslint-disable no-global-assign */
setTimeout
=
newSetTimeout
;
...
...
@@ -8701,7 +8728,7 @@ var serviceContext = (function () {
routeOptions
.
meta
.
visible
=
true
;
}
if
(
routeOptions
.
meta
.
isTabBar
&&
webview
.
id
!==
'
1
'
)
{
if
(
routeOptions
.
meta
.
isTabBar
)
{
tabBar$1
.
append
(
webview
);
}
...
...
@@ -9600,14 +9627,21 @@ var serviceContext = (function () {
index
,
text
,
iconPath
,
selectedIconPath
selectedIconPath
,
pagePath
})
{
if
(
!
isTabBarPage
())
{
return
{
errMsg
:
'
setTabBarItem:fail not TabBar page
'
tabBar$1
.
setTabBarItem
(
index
,
text
,
iconPath
,
selectedIconPath
);
const
route
=
pagePath
&&
__uniRoutes
.
find
(({
path
})
=>
path
===
pagePath
);
if
(
route
)
{
const
meta
=
route
.
meta
;
meta
.
isTabBar
=
true
;
meta
.
tabBarIndex
=
index
;
meta
.
isQuit
=
true
;
const
tabBar
=
__uniConfig
.
tabBar
;
if
(
tabBar
&&
tabBar
.
list
&&
tabBar
.
list
[
index
])
{
tabBar
.
list
[
index
].
pagePath
=
pagePath
.
startsWith
(
'
/
'
)
?
pagePath
.
substring
(
1
)
:
pagePath
;
}
}
tabBar$1
.
setTabBarItem
(
index
,
text
,
iconPath
,
selectedIconPath
);
return
{
errMsg
:
'
setTabBarItem:ok
'
}
...
...
@@ -9948,6 +9982,8 @@ var serviceContext = (function () {
notifyBLECharacteristicValueChanged
:
notifyBLECharacteristicValueChanged
,
readBLECharacteristicValue
:
readBLECharacteristicValue
,
writeBLECharacteristicValue
:
writeBLECharacteristicValue
,
setBLEMTU
:
setBLEMTU
,
getBLEDeviceRSSI
:
getBLEDeviceRSSI
,
getScreenBrightness
:
getScreenBrightness
,
setScreenBrightness
:
setScreenBrightness
,
setKeepScreenOn
:
setKeepScreenOn
,
...
...
@@ -9957,6 +9993,7 @@ var serviceContext = (function () {
getNetworkType
:
getNetworkType
,
onBeaconUpdate
:
onBeaconUpdate
,
onBeaconServiceChange
:
onBeaconServiceChange
,
onBeaconServiceChanged
:
onBeaconServiceChanged
,
getBeacons
:
getBeacons
,
startBeaconDiscovery
:
startBeaconDiscovery
,
stopBeaconDiscovery
:
stopBeaconDiscovery
,
...
...
@@ -11908,7 +11945,8 @@ var serviceContext = (function () {
data
,
statusCode
,
header
,
errMsg
errMsg
,
cookies
})
{
const
{
args
,
...
...
@@ -11925,7 +11963,8 @@ var serviceContext = (function () {
data
,
statusCode
,
header
,
errMsg
:
'
request:ok
'
errMsg
:
'
request:ok
'
,
cookies
},
args
));
break
case
'
fail
'
:
...
...
@@ -11957,16 +11996,16 @@ var serviceContext = (function () {
}
}
function
request$1
(
args
,
callbackId
)
{
let
contentType
;
for
(
const
name
in
args
.
header
)
{
if
(
name
.
toLowerCase
()
===
'
content-type
'
)
{
contentType
=
args
.
header
[
name
];
break
}
}
if
(
args
.
method
!==
'
GET
'
&&
contentType
.
indexOf
(
'
application/json
'
)
===
0
&&
isPlainObject
(
args
.
data
))
{
args
.
data
=
JSON
.
stringify
(
args
.
data
);
function
request$1
(
args
,
callbackId
)
{
let
contentType
;
for
(
const
name
in
args
.
header
)
{
if
(
name
.
toLowerCase
()
===
'
content-type
'
)
{
contentType
=
args
.
header
[
name
];
break
}
}
if
(
args
.
method
!==
'
GET
'
&&
contentType
.
indexOf
(
'
application/json
'
)
===
0
&&
isPlainObject
(
args
.
data
))
{
args
.
data
=
JSON
.
stringify
(
args
.
data
);
}
const
{
requestTaskId
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录