UNPKG
@tslsmart/magic-applet
Version:
latest (1.2.2)
1.2.2
1.2.1
1.2.0
1.1.0
1.0.2
1.0.1
1.0.0
特斯联移动端统一接口,抹平h5和wgt的差异
@tslsmart/magic-applet
/
src
/
h5
/
toScan.ts
16 lines
(13 loc)
•
280 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import
type
{
ScanParams
}
from
'../types'
import
{ action }
from
'./action'
export
const
toScan
= (
config
:
ScanParams
) => {
const
{ targetUrl, fail } = config
action
({
actionType
:
'scan'
, targetUrl }).
catch
(
(
err
) =>
{
if
(fail) {
fail
(err) } }) }