分享添加

This commit is contained in:
saplf
2019-09-07 22:12:57 +08:00
parent 5611bdb69e
commit 1c0e5ddb66
7 changed files with 32 additions and 16 deletions

View File

@@ -28,7 +28,7 @@ const scan = () => {
webview.currentWebview().append(bc);
bc.start();
});
}
};
const firstPaths = [
'/check',
@@ -53,17 +53,26 @@ const backButtonHandler = () => {
const init = () => {
if (!isApp()) return;
plus.key.addEventListener('backbutton', backButtonHandler);
}
};
const destory = () => {
if (!isApp()) return;
plus.key.removeEventListener('backbutton', backButtonHandler);
}
};
const share = (content: string) => {
if (!isApp()) return;
plus.share.sendWithSystem({
type: 'text',
content,
}, () => { });
};
export {
init,
isApp,
scan,
share,
destory,
};
@@ -71,5 +80,6 @@ export default {
init,
isApp,
scan,
share,
destory,
};