扫码页:改回.vue(WebView)+plus.barcode,全透明无取景框

This commit is contained in:
97694732@qq.com 2026-06-04 16:19:31 +08:00
parent f61adecf02
commit a52a8cc404
3 changed files with 7 additions and 7 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
node_modules/ node_modules/
unpackage/ unpackage/
.hbuilderx/ .hbuilderx/
hybrid/
.DS_Store .DS_Store

View File

@ -58,10 +58,7 @@
"path": "pages/upload/scan-isbn", "path": "pages/upload/scan-isbn",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom", "navigationStyle": "custom"
"app-plus": {
"render": "native"
}
} }
} }
], ],

View File

@ -15,8 +15,10 @@
scanned: false scanned: false
} }
}, },
onReady() { mounted() {
this.$nextTick(() => {
this.initBarcode() this.initBarcode()
})
}, },
onUnload() { onUnload() {
this.destroyBarcode() this.destroyBarcode()
@ -27,7 +29,6 @@
uni.showToast({ title: '扫码初始化失败', icon: 'none' }) uni.showToast({ title: '扫码初始化失败', icon: 'none' })
return return
} }
//
var options = { var options = {
top: '0px', top: '0px',
left: '0px', left: '0px',
@ -80,6 +81,7 @@
flex: 1; flex: 1;
background-color: #000; background-color: #000;
position: relative; position: relative;
overflow: hidden;
} }
.barcode-container { .barcode-container {
position: absolute; position: absolute;