Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhu_wap_bridge
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
千变科技开源组件
zhu_wap_bridge
Commits
2e8f8d23
Commit
2e8f8d23
authored
Jan 22, 2021
by
westzmg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉不需要的接口定义
parent
65dd2393
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
_Bridge.js
components/_Bridge.js
+11
-10
No files found.
components/_Bridge.js
View file @
2e8f8d23
...
...
@@ -42,7 +42,8 @@ export const isNative = () => {
*/
export
const
takePhoto
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'takePhoto'
,
async
(
data
)
=>
{
resolve
(
data
)});
// invoke.define('takePhoto', async (data) => {resolve(data)});
alert
(
"adsfasdfasdf"
);
invoke
.
define
(
'takePhotoCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"takePhoto"
)(
opt
)
})
...
...
@@ -50,7 +51,7 @@ export const takePhoto = async (opt) => {
export
const
recordVideo
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'recordVideo'
,
async
(
data
)
=>
{
resolve
(
data
)});
//
invoke.define('recordVideo', async (data) => {resolve(data)});
invoke
.
define
(
'recordVideoCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"recordVideo"
)(
opt
)
})
...
...
@@ -63,7 +64,7 @@ export const recordVideo = async (opt) => {
*/
export
const
barCodeScan
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'barCodeScan'
,
async
(
data
)
=>
{
resolve
(
data
)});
//
invoke.define('barCodeScan', async (data) => {resolve(data)});
invoke
.
define
(
'barCodeScanCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"barCodeScan"
)(
opt
)
})
...
...
@@ -76,7 +77,7 @@ export const barCodeScan = async (opt) => {
*/
export
const
openWindow
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'openWindow'
,
async
(
data
)
=>
{
resolve
(
data
)});
//
invoke.define('openWindow', async (data) => {resolve(data)});
await
invoke
.
bind
(
"openWindow"
)(
opt
)
})
};
...
...
@@ -88,7 +89,7 @@ export const openWindow = async (opt) => {
*/
export
const
closeWindow
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'closeWindow'
,
async
(
data
)
=>
{
resolve
(
data
)});
//
invoke.define('closeWindow', async (data) => {resolve(data)});
await
invoke
.
bind
(
"closeWindow"
)(
opt
)
})
};
...
...
@@ -100,7 +101,7 @@ export const closeWindow = async (opt) => {
*/
export
const
getPosition
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'getPosition'
,
async
(
data
)
=>
{
resolve
(
data
)});
//
invoke.define('getPosition', async (data) => {resolve(data)});
invoke
.
define
(
'getPositionCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"getPosition"
)(
opt
)
})
...
...
@@ -113,7 +114,7 @@ export const getPosition = async (opt) => {
*/
export
const
launchCQDigitalSign
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'launchCQDigitalSign'
,
async
(
data
)
=>
{
resolve
(
data
)});
//
invoke.define('launchCQDigitalSign', async (data) => {resolve(data)});
invoke
.
define
(
'launchCQDigitalSignCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"launchCQDigitalSign"
)(
opt
)
})
...
...
@@ -126,7 +127,7 @@ export const launchCQDigitalSign = async (opt) => {
*/
export
const
launchFingerSign
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'launchFingerSign'
,
async
(
data
)
=>
{
resolve
(
data
)});
//
invoke.define('launchFingerSign', async (data) => {resolve(data)});
invoke
.
define
(
'launchFingerSignCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"launchFingerSign"
)(
opt
)
})
...
...
@@ -139,7 +140,7 @@ export const launchFingerSign = async (opt) => {
*/
export
const
launchShare
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'launchShare'
,
async
(
data
)
=>
{
resolve
(
data
)});
//
invoke.define('launchShare', async (data) => {resolve(data)});
invoke
.
define
(
'launchShareCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"launchShare"
)(
opt
)
})
...
...
@@ -152,7 +153,7 @@ export const launchShare = async (opt) => {
*/
export
const
getToken
=
async
()
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'getToken'
,
async
()
=>
{
resolve
()});
//
invoke.define('getToken', async () => {resolve()});
invoke
.
define
(
'getTokenCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"getToken"
)()
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment