redirect.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. data() {
  28. return {
  29. userInfo: null
  30. }
  31. },
  32. onLoad(options) {
  33. console.log(options, 'redirect')
  34. if (options.ticket) {
  35. this.getUserInfo(options)
  36. }
  37. },
  38. methods: {
  39. getUserInfo(data) {
  40. this.$http.post('/auth/getUserByTicket', data).then(res => {
  41. if (res.code == 200) {
  42. this.userInfo = res.data
  43. console.log('userInfo===>', res)
  44. }
  45. })
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. .container {
  52. width: 100vw;
  53. height: 100vh;
  54. overflow: hidden;
  55. background-size: contain;
  56. position: relative;
  57. .box {
  58. padding: 30rpx;
  59. padding-top: 200rpx;
  60. word-break: break-all;
  61. }
  62. }
  63. </style>