| | |
| | | import auditDialog from '@/views/h5/faceAuth/components/auditDialog.vue'; |
| | | import { useSessionStore } from '@/stores/session.js' |
| | | import { storeToRefs } from 'pinia'; |
| | | import { chooseImage } from '@/utils/wxjssdk.js' |
| | | export default { |
| | | components: { |
| | | camera, |
| | |
| | | data() { |
| | | return { |
| | | tipItems: [ |
| | | { label: '标准拍摄', isCheck: true }, |
| | | { label: '标准拍摄', isCheck: true }, |
| | | { label: '标准拍摄', isCheck: true }, |
| | | { label: '标准拍摄', isCheck: true }, |
| | | { label: '标准拍摄' }, |
| | | { label: '遮挡脸部' }, |
| | | { label: '拍摄不全' }, |
| | | { label: '光线不足' }, |
| | | ], |
| | | openCameraFlag: false, |
| | | base64: '', |
| | |
| | | 'border-color': '#f8f8f8' |
| | | } |
| | | } |
| | | }, |
| | | appId() { |
| | | return this.$route.query.appId |
| | | } |
| | | }, |
| | | async mounted() { |
| | |
| | | getUserPositionStatus(evt) { |
| | | this.userPositionStatus = evt |
| | | }, |
| | | startCapture() { |
| | | async startCapture() { |
| | | if (isWeixin) { |
| | | console.log('') |
| | | const photo = await chooseImage() |
| | | this.shootSuccess('data:image/jpg;base64,' + photo) |
| | | } else { |
| | | this.openCameraFlag = true |
| | | } |
| | |
| | | this.auditDialogFlag = true |
| | | } |
| | | }, |
| | | auditSuccess() { |
| | | localStorage.setItem('isFace', true) |
| | | if (!this.getIsSignup()) { |
| | | this.$router.replace({ path: '/h5/signup', query: { appId: this.appId } }) |
| | | } else { |
| | | this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }}) |
| | | } |
| | | auditSuccess(evt) { |
| | | this.$router.replace({ path: '/h5/signup', query: { appId: this.appId, url: evt } }) |
| | | }, |
| | | getIsSignup() { |
| | | return Boolean(localStorage.getItem('isSignup')) |
| | | } |
| | | } |
| | | } |
| | | </script> |