|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view id="barcode"></view>
|
|
|
+ <view id="barcode" style="background-color: #18B566;width: 100%;height: 100%"></view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
@@ -12,10 +12,12 @@
|
|
|
plus.barcode.CODE93,
|
|
|
plus.barcode.CODE128,
|
|
|
], //码类型
|
|
|
+ bug:'',
|
|
|
// #endif
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+
|
|
|
var statusBarHeight = uni.getSystemInfoSync().statusBarHeight; //状态栏
|
|
|
var height = statusBarHeight + 44 + 144 + 'px';
|
|
|
var pages = getCurrentPages();
|
|
@@ -23,15 +25,15 @@
|
|
|
// #ifdef APP-PLUS
|
|
|
var currentWebview = page.$getAppWebview();
|
|
|
this.barcode = plus.barcode.create('barcode', this.barcode, {
|
|
|
- top: '12%',
|
|
|
- left: '10%',
|
|
|
- width: '80%',
|
|
|
- height: '31.5%', //180px
|
|
|
+ top: '0',
|
|
|
+ left: '0',
|
|
|
+ width: '100%',
|
|
|
+ height: '50%', //180px
|
|
|
position: 'static',
|
|
|
- background:'#ffffff',
|
|
|
- frameColor:'#00A0EA',
|
|
|
- scanbarColor:'#00A0EA'
|
|
|
-
|
|
|
+ background: '#ffffff',
|
|
|
+ frameColor: '#00A0EA',
|
|
|
+ scanbarColor: '#00A0EA'
|
|
|
+
|
|
|
});
|
|
|
this.barcode.onmarked = this.onmarked;
|
|
|
currentWebview.append(this.barcode);
|
|
@@ -39,10 +41,10 @@
|
|
|
if (res.platform == 'android') { //安卓机
|
|
|
this.barcode.start();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.barcode.setStyle({
|
|
|
-
|
|
|
- });
|
|
|
+
|
|
|
+ });
|
|
|
// #endif
|
|
|
},
|
|
|
onUnload() {
|