faceauth.vue 869 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <view>
  3. <web-view :src="src"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. import { getToken } from '@/utils/auth'
  8. export default {
  9. data() {
  10. return {
  11. src:'',
  12. params: {},
  13. webviewStyles: {
  14. progress: {
  15. color: "#FF3333"
  16. }
  17. }
  18. }
  19. },
  20. props: {
  21. // src: {
  22. // type: [String],
  23. // default: null
  24. // }
  25. },
  26. onLoad(e) {
  27. var params = JSON.parse(decodeURIComponent(e.data))
  28. var token=getToken()
  29. params.token=token
  30. // const token = await tokenInvalidReturnInfo(3)
  31. let data = {
  32. idCard: this.params.idCard,
  33. realName: this.params.realName,
  34. returnUrl:this.params.returnUrl,
  35. // handel_type: this.params.handelType,
  36. token: token
  37. }
  38. this.src = '/hybrid/html/face.html?data='+encodeURIComponent(JSON.stringify(params))
  39. }
  40. }
  41. </script>