wwf
12 小时以前 9a6cd220224fd3a9a6c84b5bb37c6410a470969f
src/views/h5/faceAuth/index.vue
@@ -51,6 +51,7 @@
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,
@@ -63,10 +64,10 @@
  data() {
    return {
      tipItems: [
        { label: '标准拍摄', isCheck: true },
        { label: '标准拍摄', isCheck: true },
        { label: '标准拍摄', isCheck: true },
        { label: '标准拍摄', isCheck: true },
        { label: '标准拍摄' },
        { label: '遮挡脸部' },
        { label: '拍摄不全' },
        { label: '光线不足' },
      ],
      openCameraFlag: false,
      base64: '',
@@ -86,6 +87,9 @@
          'border-color': '#f8f8f8'
        }
      }
    },
    appId() {
      return this.$route.query.appId
    }
  },
  async mounted() {
@@ -95,9 +99,10 @@
    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
      }
@@ -108,17 +113,9 @@
        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>