museum-H5/pages/scan/index.vue

41 lines
1.2 KiB
Vue
Raw Normal View History

2023-12-20 11:14:20 +00:00
<template>
<div>
2023-12-21 06:04:08 +00:00
<mumuGetQrcode @success="qrcodeSucess" @error="qrcodeError"></mumuGetQrcode>
<!-- <up-button type="primary" text="xxx" shape="circle" color="#000" style="width:436rpx ;"
@click="qrcodeSucess"></up-button> -->
2023-12-20 11:14:20 +00:00
</div>
</template>
<script setup>
import mumuGetQrcode from "../../components/mumu-getQrcode/mumu-getQrcode.vue";
2023-12-21 02:08:51 +00:00
import { ref, getCurrentInstance } from 'vue';
const currentInstance = getCurrentInstance();
const { $request } =
currentInstance.appContext.config.globalProperties;
2023-12-21 06:04:08 +00:00
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) {
2023-12-21 02:08:51 +00:00
2023-12-21 06:04:08 +00:00
// }
// })
2023-12-20 11:14:20 +00:00
}
const qrcodeError = (err) => {
console.log(err);
uni.showModal({
title: "摄像头授权失败",
content: "摄像头授权失败,请检测当前浏览器是否有摄像头权限。",
success: () => {
uni.navigateBack({});
},
});
}
</script>
<style lang="scss" scoped></style>