Commit 2e8f8d23 authored by westzmg's avatar westzmg

去掉不需要的接口定义

parent 65dd2393
......@@ -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")()
})
......
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