You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<template>
|
|
|
|
|
<view class="wrap">
|
|
|
|
|
<view class="footbox">
|
|
|
|
|
<tabbar :page="page"></tabbar>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import tabbar from "@/components/tabbar/tabbar.vue";
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
page: ""
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
this.QR();
|
|
|
|
|
// setInterval(() => {
|
|
|
|
|
// this.QR(); // 定时刷新数据
|
|
|
|
|
// }, 3000); // 每隔3秒刷新一次
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.page= "scan"
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
QR() {
|
|
|
|
|
uni.scanCode({
|
|
|
|
|
onlyFromCamera: true,
|
|
|
|
|
success: (res) => {
|
|
|
|
|
console.log('扫描二维码成功,结果:' + res.result);
|
|
|
|
|
},
|
|
|
|
|
error: (res) => {
|
|
|
|
|
console.log('扫描二维码出现错误')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
tabbar
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
@import url("@/static/base_css.css");
|
|
|
|
|
|
|
|
|
|
</style>
|