File tree Expand file tree Collapse file tree 7 files changed +47
-84
lines changed Expand file tree Collapse file tree 7 files changed +47
-84
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,4 @@ node_modules
3
3
.eslintcache
4
4
5
5
example
6
- screenshots
7
- sources
8
- index.js
6
+ src
Original file line number Diff line number Diff line change 10
10
"@types/node" : " ^12.0.0" ,
11
11
"@types/react" : " ^16.9.0" ,
12
12
"@types/react-dom" : " ^16.9.0" ,
13
+ "callapp-lib" : " ^2.1.8" ,
13
14
"react" : " ^16.13.1" ,
14
15
"react-dom" : " ^16.13.1" ,
15
16
"react-scripts" : " 3.4.1" ,
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
+ import CallApp from 'callapp-lib' ;
2
3
import './App.css' ;
3
4
5
+ const option = {
6
+ scheme : {
7
+ protocol : 'ykshortvideo' ,
8
+ } ,
9
+ outChain : {
10
+ protocol : 'ykshortvideo' ,
11
+ path : 'temporary' ,
12
+ key : 'url' ,
13
+ } ,
14
+ intent : {
15
+ package : 'com.youku.shortvideo' ,
16
+ scheme : 'ykshortvideo' ,
17
+ } ,
18
+ universal : {
19
+ host : 'flash-link.youku.com' ,
20
+ pathKey : 'action' ,
21
+ } ,
22
+ appstore : 'https://itunes.apple.com/cn/app/id1383186862' ,
23
+ yingyongbao : '//a.app.qq.com/o/simple.jsp?pkgname=com.youku.shortvideo' ,
24
+ fallback : 'https://dianliu.youku.com/service/download' ,
25
+ timeout : 2000 ,
26
+ } ;
27
+
28
+ const lib = new CallApp ( option ) ;
29
+
4
30
function App ( ) {
5
- return < div className = "App" > 333</ div > ;
31
+ return (
32
+ < div className = "App" >
33
+ < button
34
+ onClick = { ( ) => {
35
+ lib . open ( { path : '' } ) ;
36
+ } }
37
+ >
38
+ 点击唤端
39
+ </ button >
40
+ </ div >
41
+ ) ;
6
42
}
7
43
8
44
export default App ;
Original file line number Diff line number Diff line change @@ -2703,6 +2703,11 @@ call-me-maybe@^1.0.1:
2703
2703
resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
2704
2704
integrity sha1-JtII6onje1y95gJQoV8DHBak1ms=
2705
2705
2706
+ callapp-lib@^2.1.8 :
2707
+ version "2.1.8"
2708
+ resolved "https://registry.yarnpkg.com/callapp-lib/-/callapp-lib-2.1.8.tgz#a8d4003a7ff63462d598e3f6a360302fcb361df2"
2709
+ integrity sha512-9FUmTz0LCCF43LhiMEN3CJ4RuLGppu8hOn0u9UzUFyd7TU7AXW82Zc9qTq4Mfes36yOGqNYO1v8DJdkQY7+7rA==
2710
+
2706
2711
caller-callsite@^2.0.0 :
2707
2712
version "2.0.0"
2708
2713
resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " callapp-lib" ,
3
- "version" : " 2.1.8 " ,
3
+ "version" : " 3.0.0 " ,
4
4
"description" : " call native webview from webpage" ,
5
5
"main" : " dist/index.cjs.js" ,
6
6
"module" : " dist/index.esm.js" ,
7
- "browser" : " dist/index.iife .js" ,
7
+ "browser" : " dist/index.umd .js" ,
8
8
"types" : " dist/type/index.d.ts" ,
9
9
"directories" : {
10
10
"dist" : " dist"
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default {
19
19
} ,
20
20
{
21
21
file : pkg . browser ,
22
- format : 'iife ' ,
22
+ format : 'umd ' ,
23
23
name : 'CallApp' ,
24
24
} ,
25
25
] ,
You can’t perform that action at this time.
0 commit comments