feat: kotlin version

This commit is contained in:
陶林 2023-09-11 11:58:32 +08:00
parent 3e05196fc5
commit f8999ef0be
2 changed files with 6 additions and 0 deletions

View File

@ -16,4 +16,9 @@
<icon src="logo.png"></icon> <icon src="logo.png"></icon>
</platform> </platform>
<plugin name="phonegap-plugin-barcodescanner" /> <plugin name="phonegap-plugin-barcodescanner" />
<preference name="GradlePluginKotlinEnabled" value="true" />
<preference name="GradlePluginKotlinCodeStyle" value="official" />
<preference name="GradlePluginKotlinVersion" value="1.3.50" />
<preference name="AndroidXEnabled" value="true" />
</widget> </widget>

View File

@ -118,6 +118,7 @@
scanCode() { scanCode() {
cordova.plugins.barcodeScanner.scan( cordova.plugins.barcodeScanner.scan(
function (result) { function (result) {
console.log("扫码结果", result);
try { try {
if (result.text) { if (result.text) {
alert(result.text); alert(result.text);