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.

49 lines
815 B

3 years ago
<template>
<view class="wrap">
<view class="footbox">
<tabbar :page="page"></tabbar>
</view>
3 years ago
</view>
</template>
<script>
import tabbar from "@/components/tabbar/tabbar.vue";
3 years ago
export default {
3 years ago
data() {
return {
page: ""
3 years ago
};
},
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
}
3 years ago
}
</script>
<style lang="scss">
@import url("@/static/base_css.css");
3 years ago
</style>