<template>
  <view class="content">
    <u-cell-group :border="false">
      <u-cell-item
        title="头像"
        hover-class="none"
        :arrow="false"
        :title-style="{ color: '#333' }"
      >
        <template slot="right-icon">
          <image
            style="width: 60rpx; height: 60rpx; border-radius: 30rpx"
            mode="aspectFit"
            :src="baseInfo.avatar"
          ></image>
        </template>
      </u-cell-item>
      <u-cell-item
        title="姓名"
        hover-class="none"
        :value="baseInfo.name"
        :arrow="false"
        :title-style="{ color: '#333' }"
      ></u-cell-item>
      <u-cell-item
        title="性别"
        hover-class="none"
        :value="baseInfo.gender ? '男' : '女'"
        :arrow="false"
        :title-style="{ color: '#333' }"
      ></u-cell-item>
      <u-cell-item
        title="任职周期"
        hover-class="none"
        :value="baseInfo.cycleTime"
        :arrow="false"
        :title-style="{ color: '#333' }"
      ></u-cell-item>
      <u-cell-item
        title="人员类型"
        hover-class="none"
        :value="baseInfo.personnelType"
        :arrow="false"
        :title-style="{ color: '#333' }"
      ></u-cell-item>
    </u-cell-group>
  </view>
</template>
<script>
import {
  toast,
  clearStorageSync,
  setStorageSync,
  getStorageSync,
  useRouter,
} from "@/utils/utils.js";
export default {
  data() {
    return {
      activeTab: "completed", // 默认选中已完成计划
      baseInfo: {
        name: "张三",
        avatar: "/static/images/pos-icon.png",
        gender: "0",
        cycleTime: "2017.11.11~2021.11.11",
        personnelType: "勤工岗",
      },
      auth_txt: "未实名",
    };
  },
  onLoad(op) {
    //this.id  = op.id
  },
  onShow() {},
  onReady() {
    // this.getUserInfo();
  },
  methods: {
    switchTab(tab) {
      this.activeTab = tab;
      // 这里可以添加切换逻辑，如加载不同数据等
    },
    getUserInfo() {
      this.$api.baseInfo().then((res) => {
        this.baseInfo = res.data;
      });
    },
  },
};
</script>
<style lang="scss" scoped>
page {
  background: #f6f8fc;
}

.content {
  padding-top: 32rpx;
}
</style>
