扫码页:改回.vue(WebView)+plus.barcode,全透明无取景框
This commit is contained in:
parent
f61adecf02
commit
a52a8cc404
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
unpackage/
|
unpackage/
|
||||||
.hbuilderx/
|
.hbuilderx/
|
||||||
|
hybrid/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
@ -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"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -15,8 +15,10 @@
|
|||||||
scanned: false
|
scanned: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReady() {
|
mounted() {
|
||||||
this.initBarcode()
|
this.$nextTick(() => {
|
||||||
|
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;
|
||||||
Loading…
Reference in New Issue
Block a user