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
6b8bf725
Commit
6b8bf725
authored
Mar 19, 2021
by
westzmg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getProjectEnterprise获取项目参建单位,
getProjectUser获取项目用户
parent
f915efc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
180 additions
and
1 deletion
+180
-1
_Bridge.js
components/_Bridge.js
+27
-0
_Bridge.js
lib/_Bridge.js
+137
-1
index.js
pages/index.js
+16
-0
No files found.
components/_Bridge.js
View file @
6b8bf725
...
...
@@ -457,6 +457,31 @@ export const takeIdCardAndDiscern = async (opt) => {
})
};
/**
* @name getProjectEnterprise 获取项目参建单位
* options {
* onSelect: func, --选择了一行项目参建单位后的回调
* }
*/
export
const
getProjectEnterprise
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'getProjectEnterpriseCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"getProjectEnterprise"
)(
opt
)
})
};
/**
* @name getProjectUser 获取项目用户
* options {
* }
*/
export
const
getProjectUser
=
async
(
opt
)
=>
{
return
new
Promise
(
async
(
resolve
)
=>
{
invoke
.
define
(
'getProjectUserCompleted'
,
async
(
result
)
=>
{
resolve
(
result
)});
await
invoke
.
bind
(
"getProjectUser"
)(
opt
)
})
};
export
const
EVENTS_TYPE
=
{
keyboardWillShow
:
'keyboardWillShow'
,
// 键盘即将出现
keyboardDidShow
:
'keyboardDidShow'
,
// 键盘已经出现
...
...
@@ -500,6 +525,8 @@ export default {
discernIdCardFront
,
discernIdCardBack
,
takeIdCardAndDiscern
,
getProjectEnterprise
,
getProjectUser
,
}
lib/_Bridge.js
View file @
6b8bf725
...
...
@@ -1948,6 +1948,139 @@ export var takeIdCardAndDiscern = /*#__PURE__*/function () {
return
_ref81
.
apply
(
this
,
arguments
);
};
}();
/**
* @name getProjectEnterprise 获取项目参建单位
* options {
* onSelect: func, --选择了一行项目参建单位后的回调
* }
*/
export
var
getProjectEnterprise
=
/*#__PURE__*/
function
()
{
var
_ref84
=
_asyncToGenerator
(
/*#__PURE__*/
_regeneratorRuntime
.
mark
(
function
_callee86
(
opt
)
{
return
_regeneratorRuntime
.
wrap
(
function
_callee86$
(
_context86
)
{
while
(
1
)
{
switch
(
_context86
.
prev
=
_context86
.
next
)
{
case
0
:
return
_context86
.
abrupt
(
"return"
,
new
Promise
(
/*#__PURE__*/
function
()
{
var
_ref85
=
_asyncToGenerator
(
/*#__PURE__*/
_regeneratorRuntime
.
mark
(
function
_callee85
(
resolve
)
{
return
_regeneratorRuntime
.
wrap
(
function
_callee85$
(
_context85
)
{
while
(
1
)
{
switch
(
_context85
.
prev
=
_context85
.
next
)
{
case
0
:
invoke
.
define
(
'getProjectEnterpriseCompleted'
,
/*#__PURE__*/
function
()
{
var
_ref86
=
_asyncToGenerator
(
/*#__PURE__*/
_regeneratorRuntime
.
mark
(
function
_callee84
(
result
)
{
return
_regeneratorRuntime
.
wrap
(
function
_callee84$
(
_context84
)
{
while
(
1
)
{
switch
(
_context84
.
prev
=
_context84
.
next
)
{
case
0
:
resolve
(
result
);
case
1
:
case
"end"
:
return
_context84
.
stop
();
}
}
},
_callee84
);
}));
return
function
(
_x84
)
{
return
_ref86
.
apply
(
this
,
arguments
);
};
}());
_context85
.
next
=
3
;
return
invoke
.
bind
(
"getProjectEnterprise"
)(
opt
);
case
3
:
case
"end"
:
return
_context85
.
stop
();
}
}
},
_callee85
);
}));
return
function
(
_x83
)
{
return
_ref85
.
apply
(
this
,
arguments
);
};
}()));
case
1
:
case
"end"
:
return
_context86
.
stop
();
}
}
},
_callee86
);
}));
return
function
getProjectEnterprise
(
_x82
)
{
return
_ref84
.
apply
(
this
,
arguments
);
};
}();
/**
* @name getProjectUser 获取项目用户
* options {
* }
*/
export
var
getProjectUser
=
/*#__PURE__*/
function
()
{
var
_ref87
=
_asyncToGenerator
(
/*#__PURE__*/
_regeneratorRuntime
.
mark
(
function
_callee89
(
opt
)
{
return
_regeneratorRuntime
.
wrap
(
function
_callee89$
(
_context89
)
{
while
(
1
)
{
switch
(
_context89
.
prev
=
_context89
.
next
)
{
case
0
:
return
_context89
.
abrupt
(
"return"
,
new
Promise
(
/*#__PURE__*/
function
()
{
var
_ref88
=
_asyncToGenerator
(
/*#__PURE__*/
_regeneratorRuntime
.
mark
(
function
_callee88
(
resolve
)
{
return
_regeneratorRuntime
.
wrap
(
function
_callee88$
(
_context88
)
{
while
(
1
)
{
switch
(
_context88
.
prev
=
_context88
.
next
)
{
case
0
:
invoke
.
define
(
'getProjectUserCompleted'
,
/*#__PURE__*/
function
()
{
var
_ref89
=
_asyncToGenerator
(
/*#__PURE__*/
_regeneratorRuntime
.
mark
(
function
_callee87
(
result
)
{
return
_regeneratorRuntime
.
wrap
(
function
_callee87$
(
_context87
)
{
while
(
1
)
{
switch
(
_context87
.
prev
=
_context87
.
next
)
{
case
0
:
resolve
(
result
);
case
1
:
case
"end"
:
return
_context87
.
stop
();
}
}
},
_callee87
);
}));
return
function
(
_x87
)
{
return
_ref89
.
apply
(
this
,
arguments
);
};
}());
_context88
.
next
=
3
;
return
invoke
.
bind
(
"getProjectUser"
)(
opt
);
case
3
:
case
"end"
:
return
_context88
.
stop
();
}
}
},
_callee88
);
}));
return
function
(
_x86
)
{
return
_ref88
.
apply
(
this
,
arguments
);
};
}()));
case
1
:
case
"end"
:
return
_context89
.
stop
();
}
}
},
_callee89
);
}));
return
function
getProjectUser
(
_x85
)
{
return
_ref87
.
apply
(
this
,
arguments
);
};
}();
export
var
EVENTS_TYPE
=
{
keyboardWillShow
:
'keyboardWillShow'
,
// 键盘即将出现
...
...
@@ -1992,5 +2125,7 @@ export default {
scanBusinessLicense
:
scanBusinessLicense
,
discernIdCardFront
:
discernIdCardFront
,
discernIdCardBack
:
discernIdCardBack
,
takeIdCardAndDiscern
:
takeIdCardAndDiscern
takeIdCardAndDiscern
:
takeIdCardAndDiscern
,
getProjectEnterprise
:
getProjectEnterprise
,
getProjectUser
:
getProjectUser
};
\ No newline at end of file
pages/index.js
View file @
6b8bf725
...
...
@@ -68,6 +68,22 @@ export default class extends React.Component {
<
Button
style
=
{{
marginBottom
:
20
}}
>
获取
Token
<
/Button
>
<
/Link
>
<
Button
style
=
{{
marginBottom
:
20
}}
onClick
=
{
async
()
=>
{
const
data
=
await
_Bridge
.
getProjectEnterprise
();
alert
(
JSON
.
stringify
(
data
))
}}
>
参照项目参建单位
<
/Button
>
<
Button
style
=
{{
marginBottom
:
20
}}
onClick
=
{
async
()
=>
{
const
data
=
await
_Bridge
.
getProjectUser
();
alert
(
JSON
.
stringify
(
data
))
}}
>
参照项目用户
<
/Button
>
<
Button
style
=
{{
marginBottom
:
20
}}
onClick
=
{
async
()
=>
{
...
...
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