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

34 lines
1.0 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 = () => {
$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>