Commit 6b8bf725 authored by westzmg's avatar westzmg

getProjectEnterprise获取项目参建单位,

getProjectUser获取项目用户
parent f915efc8
...@@ -457,6 +457,31 @@ export const takeIdCardAndDiscern = async (opt) => { ...@@ -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 = { export const EVENTS_TYPE = {
keyboardWillShow: 'keyboardWillShow', // 键盘即将出现 keyboardWillShow: 'keyboardWillShow', // 键盘即将出现
keyboardDidShow: 'keyboardDidShow', // 键盘已经出现 keyboardDidShow: 'keyboardDidShow', // 键盘已经出现
...@@ -500,6 +525,8 @@ export default { ...@@ -500,6 +525,8 @@ export default {
discernIdCardFront, discernIdCardFront,
discernIdCardBack, discernIdCardBack,
takeIdCardAndDiscern, takeIdCardAndDiscern,
getProjectEnterprise,
getProjectUser,
} }
...@@ -1948,6 +1948,139 @@ export var takeIdCardAndDiscern = /*#__PURE__*/function () { ...@@ -1948,6 +1948,139 @@ export var takeIdCardAndDiscern = /*#__PURE__*/function () {
return _ref81.apply(this, arguments); 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 = { export var EVENTS_TYPE = {
keyboardWillShow: 'keyboardWillShow', keyboardWillShow: 'keyboardWillShow',
// 键盘即将出现 // 键盘即将出现
...@@ -1992,5 +2125,7 @@ export default { ...@@ -1992,5 +2125,7 @@ export default {
scanBusinessLicense: scanBusinessLicense, scanBusinessLicense: scanBusinessLicense,
discernIdCardFront: discernIdCardFront, discernIdCardFront: discernIdCardFront,
discernIdCardBack: discernIdCardBack, discernIdCardBack: discernIdCardBack,
takeIdCardAndDiscern: takeIdCardAndDiscern takeIdCardAndDiscern: takeIdCardAndDiscern,
getProjectEnterprise: getProjectEnterprise,
getProjectUser: getProjectUser
}; };
\ No newline at end of file
...@@ -68,6 +68,22 @@ export default class extends React.Component { ...@@ -68,6 +68,22 @@ export default class extends React.Component {
<Button style={{marginBottom: 20}}>获取Token</Button> <Button style={{marginBottom: 20}}>获取Token</Button>
</Link> </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 <Button
style={{marginBottom: 20}} style={{marginBottom: 20}}
onClick={async ()=>{ onClick={async ()=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment