redirect.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="container">
  3. <view class="box" v-if="userInfo">
  4. <view class="">
  5. 手机号:{{userInfo.mobile}}
  6. </view>
  7. <view class="">
  8. 唯一身份标识:{{userInfo.yige_open_id}}
  9. </view>
  10. <view class="">
  11. 姓名:{{userInfo.real_name}}
  12. </view>
  13. <view class="">
  14. 身份证号:{{userInfo.identity_card}}
  15. </view>
  16. <view class="">
  17. 昵称:{{userInfo.nickname}}
  18. </view>
  19. <view class="">
  20. 头像{{userInfo.head_photo}}
  21. </view>
  22. <block v-if="userInfo.current_ent">
  23. <view class="">
  24. 企业名称{{userInfo.current_ent.ent_name}}
  25. </view>
  26. <view class="">
  27. 统一社会信用代码{{userInfo.current_ent.credit_code}}
  28. </view>
  29. </block>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. userInfo: null
  38. }
  39. },
  40. onLoad(options) {
  41. console.log(options, 'redirect')
  42. if (options.ticket) {
  43. this.getUserInfo(options)
  44. }
  45. },
  46. methods: {
  47. getUserInfo(data) {
  48. this.$http.post('/auth/getUserByTicket', data).then(res => {
  49. if (res.code == 200) {
  50. this.userInfo = res.data
  51. console.log('userInfo===>', res)
  52. }
  53. })
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. .container {
  60. width: 100vw;
  61. height: 100vh;
  62. overflow: hidden;
  63. background-size: contain;
  64. position: relative;
  65. .box {
  66. padding: 30rpx;
  67. padding-top: 200rpx;
  68. word-break: break-all;
  69. }
  70. }
  71. </style>