<!--pages/personalInformation/personalInformation.wxml-->
<navBar></navBar>
<van-notify id="van-notify" />
<van-popup
  show="{{ show }}"
  closeable
  position="bottom"
  custom-style="height: auto;margin-bottom:20px"
  bind:close="onClose"
>
  <view class="popup">
    <view class="popup_head">修改{{fieldMessage.label}}</view>
    <view class="popup_content">
        <wux-input label="{{fieldMessage.label}}" value="{{fieldMessage.value}}" placeholder="请输入" catch:change="changeInput"/>
    </view>
    <view class="popup_btn" catch:tap="saveMessage">保存</view>
  </view>
</van-popup>
<view class="information">
  <view class="head">
    编辑个人信息
  </view>
  <wux-divider wux-class="line" show-text="{{ false }}" />
  <view>
      <wux-cell
        wux-class="wuxCell"
        title="头像"
        is-link
        open-type="chooseAvatar"
        bindchooseavatar="getUserInfo"
      >
        <view slot="footer">
          <wux-avatar size="large" wx:if="{{userinfo.fileGuid}}" src="{{imgHttp}}{{userinfo.fileGuid}}"></wux-avatar>
          <wux-avatar size="large" wx:elif="{{userinfo.avatarUrl}}" src="{{userinfo.avatarUrl}}"></wux-avatar>
          <wux-avatar size="large" wx:else src="/static/image/unlogin.jpeg"></wux-avatar>
        </view>
      </wux-cell>
      <wux-cell wux-class="wuxCell" title="用户名" is-link data-field="name" data-label="用户名"
        bind:click="fieldEdit">
        <view slot="footer">{{userinfo.name}}</view>
      </wux-cell>
      <!-- <wux-cell
        wux-class="wuxCell"
        title="性别"
        is-link
        open-type="getUserInfo"
        bind:getuserinfo="onGotUserInfo"
      ></wux-cell> -->
      <wux-cell
        wux-class="wuxCell"
        title="电话"
        is-link
      >
        <view slot="footer">{{userinfo.phoneNum}}</view>
      </wux-cell>
      <wux-cell
        wux-class="wuxCell"
        title="邮箱"
        is-link
        data-field="email"
        data-label="邮箱"
        bind:click="fieldEdit"
      >
        <view slot="footer">{{userinfo.email}}</view>
      </wux-cell>
      <!-- <wux-cell
        wux-class="wuxCell"
        title="地区"
        is-link
        open-type="getPhoneNumber"
        bind:getphonenumber="onGotPhoneNumber"
      ></wux-cell> -->
  </view>
  <view class="foot">
    <view class="btn" bind:tap="logout">退出登录</view>
  </view>
</view>