Component({
  mixins: [],
  data: {
    image: {
      src: 'data:image/gif;base64,[encoded data, 6100 characters]'
    },
    component: {
      type: 'ghost',
      shape: 'capsule',
      capsuleSize: 'small'
    },
    showDesc: false,
    subDesc: ''
  },
  props: {
    doctor: {
      name: '',
      desc: '',
      picUrl: '',
      remain: 0
    }
  },

  didMount() {
    const {
      desc = ''
    } = this.props.doctor;
    this.setData({
      subDesc: desc.substr(0, 50),
      descLength: desc.length
    });
  },

  didUpdate() {},

  didUnmount() {},

  methods: {
    onDesc() {
      const {
        showDesc
      } = this.data;
      const {
        desc
      } = this.props.doctor;
      this.setData({
        showDesc: !showDesc,
        subDesc: desc.substr(0, showDesc ? 50 : desc.length)
      });
    }

  }
});