12
This commit is contained in:
+46
-13
@@ -1,7 +1,25 @@
|
||||
<template>
|
||||
<view class="scan_page">
|
||||
<uni-nav-bar left-icon="back" fixed backgroundColor="transparent" statusBar></uni-nav-bar>
|
||||
<barcode id='1' class="barcode" autostart="true" ref="barcode" background="rgb(0,0,0)" frameColor="#1C86EE" scanbarColor="#1C86EE" :filters="fil" @marked="success1" @error="fail1"></barcode>
|
||||
<view class="scan_page" :style="{height:windowHeight+'px'}">
|
||||
<uni-nav-bar
|
||||
left-icon="back"
|
||||
@clickLeft="back"
|
||||
fixed
|
||||
backgroundColor="#FFF"
|
||||
statusBar
|
||||
>
|
||||
</uni-nav-bar>
|
||||
<barcode id='1'
|
||||
class="barcode"
|
||||
ref="barcode"
|
||||
:autostart="true"
|
||||
background="rgb(0,0,0)"
|
||||
frameColor="#07c160"
|
||||
scanbarColor="#07c160"
|
||||
:style="{height:windowHeight+'px'}"
|
||||
:filters="fil"
|
||||
@marked="success"
|
||||
@error="fail">
|
||||
</barcode>
|
||||
<view class="overlay">
|
||||
<button class="btn" @click="toStart">开始扫码识别</button>
|
||||
<button class="btn" @click="tocancel">取消扫码识别</button>
|
||||
@@ -13,20 +31,30 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fil: [0, 2, 1]
|
||||
fil: [0, 2, 1,3,4,12],
|
||||
windowHeight:500,
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
uni.scanCode({
|
||||
complete(res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
created() {
|
||||
const info = uni.getSystemInfoSync();
|
||||
console.log(info);
|
||||
this.windowHeight = info.screenHeight;
|
||||
},
|
||||
methods: {
|
||||
success1(e) {
|
||||
success(e) {
|
||||
console.log("success1:" + JSON.stringify(e));
|
||||
},
|
||||
fail1(e) {
|
||||
fail(e) {
|
||||
console.log("fail1:" + JSON.stringify(e));
|
||||
},
|
||||
toStart: function() {
|
||||
@@ -49,6 +77,9 @@
|
||||
,(e)=>{
|
||||
console.log("scan_error:"+JSON.stringify(e));
|
||||
});
|
||||
},
|
||||
back(){
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,12 +88,9 @@
|
||||
<style lang="scss" scoped>
|
||||
.scan_page{
|
||||
width: 750rpx;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
background: #800000;
|
||||
.barcode {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
width: 750rpx;
|
||||
background-color: #808080;
|
||||
}
|
||||
|
||||
@@ -76,6 +104,11 @@
|
||||
}
|
||||
.overlay{
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
position: absolute;
|
||||
bottom: 100rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 200rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
linkUrl: "",
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.linkUrl = 'https://doc.rentsoft.cn/'
|
||||
onLoad(opt) {
|
||||
if(opt.url){
|
||||
this.linkUrl = opt.url;
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
// #ifdef APP-PLUS
|
||||
|
||||
Reference in New Issue
Block a user