<template>
  <view class="content">
    <div class="item">
      <div>姓名</div>
      <div>{{ userInfo.name }}</div>
    </div>
    <div class="item">
      <div>身份证号</div>
      <div>{{ userInfo.idcard }}</div>
    </div>
    <div class="item">
      <div>年龄</div>
      <div>{{ userInfo.age }}</div>
    </div>
    <div class="item">
      <div>性别</div>
      <div>{{ userInfo.sex }}</div>
    </div>
    <div class="item">
      <div>联系方式</div>
      <div>{{ userInfo.phone }}</div>
    </div>
    <div class="item">
      <div>部门</div>
      <div>{{ userInfo.departName }}</div>
    </div>
  </view>
</template>

<script>
export default {
  data() {
    return {
      userInfo: {}
    }
  },
  onLoad(opt) {
    opt = JSON.parse(opt.params)
    console.log('🚀 ~ onLoad ~ opt:', opt)
    this.userInfo = opt
  }
}
</script>

<style lang="scss" scoped>
.content {
  margin: 10px;
  padding: 10px;

	.item {
		padding: 10px;
		margin-bottom: 10px;
		font-size: 16px;
		height: 40px;
		background: #fff;
		border-radius: 5px;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
}
</style>
