diff --git a/.gitignore b/.gitignore index 2370852..5263955 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ unpackage/ .hbuilderx/ +hybrid/ .DS_Store diff --git a/pages.json b/pages.json index 6f964e8..b813f0b 100644 --- a/pages.json +++ b/pages.json @@ -58,10 +58,7 @@ "path": "pages/upload/scan-isbn", "style": { "navigationBarTitleText": "", - "navigationStyle": "custom", - "app-plus": { - "render": "native" - } + "navigationStyle": "custom" } } ], diff --git a/pages/upload/scan-isbn.nvue b/pages/upload/scan-isbn.vue similarity index 95% rename from pages/upload/scan-isbn.nvue rename to pages/upload/scan-isbn.vue index 4eaf0a5..ab1beeb 100644 --- a/pages/upload/scan-isbn.nvue +++ b/pages/upload/scan-isbn.vue @@ -15,8 +15,10 @@ scanned: false } }, - onReady() { - this.initBarcode() + mounted() { + this.$nextTick(() => { + this.initBarcode() + }) }, onUnload() { this.destroyBarcode() @@ -27,7 +29,6 @@ uni.showToast({ title: '扫码初始化失败', icon: 'none' }) return } - // 创建原生条码扫描控件,全透明无取景框 var options = { top: '0px', left: '0px', @@ -80,6 +81,7 @@ flex: 1; background-color: #000; position: relative; + overflow: hidden; } .barcode-container { position: absolute;