<template>
  <view>
    <web-view :src="src"></web-view>
  </view>
</template>

<script>
import { getToken } from '@/utils/auth'
export default {
    data() {
      return {
			src:'',
        params: {},
        webviewStyles: {
          progress: {
            color: "#FF3333"
          }
        }
      }
    },
    props: {
      // src: {
      //   type: [String],
      //   default: null
      // }
    },
    onLoad(e) {
		var params = JSON.parse(decodeURIComponent(e.data))
		var token=getToken()
		params.token=token
		// const token = await tokenInvalidReturnInfo(3)
		let data = {
			idCard: this.params.idCard,
			realName: this.params.realName,
			returnUrl:this.params.returnUrl,
			// handel_type: this.params.handelType,
			token: token
		}
		this.src = '/hybrid/html/face.html?data='+encodeURIComponent(JSON.stringify(params))
    }
  }
</script>
