museum-H5/pages/scan/index.vue
2023-12-21 14:04:08 +08:00

41 lines
1.2 KiB
Vue

<template>
<div>
<mumuGetQrcode @success="qrcodeSucess" @error="qrcodeError"></mumuGetQrcode>
<!-- <up-button type="primary" text="xxx" shape="circle" color="#000" style="width:436rpx ;"
@click="qrcodeSucess"></up-button> -->
</div>
</template>
<script setup>
import mumuGetQrcode from "../../components/mumu-getQrcode/mumu-getQrcode.vue";
import { ref, getCurrentInstance } from 'vue';
const currentInstance = getCurrentInstance();
const { $request } =
currentInstance.appContext.config.globalProperties;
const qrcodeSucess = (id) => {
uni.showModal({
title: id,
content: id,
success: () => {
uni.navigateBack({});
},
});
// $request.qrCodeInfo({ appointmentUid: '245fa520-3724-4151-82a9-dd84d6838b68' }).then((res) => {
// if (res.status === 0) {
// }
// })
}
const qrcodeError = (err) => {
console.log(err);
uni.showModal({
title: "摄像头授权失败",
content: "摄像头授权失败,请检测当前浏览器是否有摄像头权限。",
success: () => {
uni.navigateBack({});
},
});
}
</script>
<style lang="scss" scoped></style>