yiming
2024-03-29 bc63cd0e8e9c380be145f23f3456235d124a50d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<view class="container">
  <view class="itemList">
    <view class="label">头像</view>
    <view class="contentImg">
      <t-avatar image="{{userInfo.icon}}" class="user-center-card__header__avatar" />
    </view>
    <view class="iconEdit" data-info="{{'icon'}}" bindtap="editIconInfo">
      <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
    </view>
  </view>
  <view class="itemList">
    <view class="label">用户名</view>
    <view class="content" data-info="{{'nickName'}}" bindtap="editUserInfo">{{userInfo.nickName || '微信用户'}}</view>
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
  </view>
  <view class="itemList">
    <view class="label">手机号码</view>
    <view class="content" data-info="{{'phone'}}" bindtap="editUserInfo">{{userInfo.phoneNumber || '未绑定手机号'}}</view>
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
  </view>
  <view class="itemList">
    <view class="label">邮箱</view>
    <view class="content" data-info="{{'email'}}" bindtap="editUserInfo">{{userInfo.Email}}</view>
    <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" />
  </view>
  <t-popup visible="{{userInfoBox}}" bind:visible-change="onVisibleChange" placement="bottom">
    <view class="block">
      <view class="body">
        <view class="from-item" wx:if="{{editType == 'nickName'}}">
          <view class="label"> 昵称: </view>
          <view class="item-content">
            <view class="inputBox1">
              <t-input placeholder="输入用户名" borderless value="{{userInfoForm.nickName}}" bindchange="onNameInput" />
            </view>
          </view>
        </view>
        <view class="from-item" wx:if="{{editType == 'phone'}}">
          <view class="label"> 手机号: </view>
          <view class="item-content">
            <view class="inputBox1">
              <t-input placeholder="输入手机号码" borderless value="{{userInfoForm.phone}}" type="number" tips="{{phoneError ? '手机号输入不正确' : ''}}" bindchange="onPhoneInput" />
            </view>
          </view>
        </view>
        <view class="from-item" wx:if="{{editType == 'email'}}">
          <view class=" label"> 邮箱: </view>
          <view class="item-content">
            <view class="inputBox1">
              <t-input placeholder="输入邮箱" borderless value="{{userInfoForm.email}}" type="number" tips="{{emailError ? '邮箱输入不正确' : ''}}" bindchange="onEmailInput" />
            </view>
          </view>
        </view>
        <view class="from-item" wx:if="{{editType !== 'nickName'}}">
          <view class="label"> 图形验证码: </view>
          <view class="item-content">
            <view class="inputBox">
              <t-input placeholder="输入图形验证码" borderless value="{{userInfoForm.captcha}}" type="number" bindchange="onCaptchaInput" />
            </view>
            <view class="code">
              <image src="{{imgCode}}" class="imgCode hover" bindtap="getImgCapcha" />
            </view>
          </view>
 
        </view>
        <view class="from-item" wx:if="{{editType == 'phone'}}">
          <view class="label"> 短信验证码: </view>
          <view class="item-content">
            <view class="inputBox">
              <t-input placeholder="输入短信验证码" borderless value="{{userInfoForm.code}}" type="number" bindchange="onCodeInput" />
            </view>
            <view class="code">
              <button class="btn" bindtap="getPhoneCode">{{countDown > 0 ? countDown : '获取短信验证码'}}</button>
            </view>
          </view>
        </view>
        <view class="from-item" wx:if="{{editType == 'email'}}">
          <view class="label"> 邮箱验证码: </view>
          <view class="item-content">
            <view class="inputBox">
              <t-input placeholder="输入邮箱验证码" borderless value="{{userInfoForm.code}}" type="number" bindchange="onCodeInput" />
            </view>
            <view class="code">
              <button class="btn" bindtap="getEmailCode">获取邮箱验证码</button>
            </view>
          </view>
        </view>
      </view>
    </view>
    <view class="footer">
      <button class="submit" bindtap="confirmInfo">确定</button>
    </view>
  </t-popup>
</view>