java-mall-app/seller/order/scan.vue
2024-11-01 16:35:40 +08:00

48 lines
848 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<!-- #ifdef H5 -->
<mumu-get-qrcode @success='qrcodeSucess' @error="qrcodeError" ></mumu-get-qrcode>
<!-- #endif -->
</view>
</template>
<script>
// #ifdef H5
import mumuGetQrcode from '../components/mumu-getQrcode/mumu-getQrcode.vue'
// #endif
export default {
data() {
return {
}
},
// #ifdef H5
components: {
mumuGetQrcode
},
// #endif
methods: {
qrcodeSucess(data) {
uni.$emit("scanCode", data)
uni.navigateBack({
delta: 1, //返回层数2则上上页
})
},
qrcodeError(err) {
console.log(err)
uni.showModal({
title: '摄像头授权失败',
content: '摄像头授权失败,请检测当前浏览器是否有摄像头权限。',
success: () => {
uni.navigateBack({})
}
})
}
}
}
</script>
<style>
</style>