51 lines
2.3 KiB
Plaintext
51 lines
2.3 KiB
Plaintext
<view class="container">
|
|
<view wx:if="{{!loggedIn}}" class="center">
|
|
<button class="login-btn" type="primary" bindtap="goToLogin">登录</button>
|
|
<view class="hint">登录后可查看我的信息与实名认证状态</view>
|
|
</view>
|
|
|
|
<view wx:else>
|
|
<view class="card profile-card">
|
|
<view class="row">
|
|
<image class="avatar" wx:if="{{profile && profile.avatar}}" src="{{profile.avatar}}" mode="aspectFill" />
|
|
<view class="avatar placeholder" wx:else>头像</view>
|
|
<view class="profile-main">
|
|
<view class="nick">{{profile && profile.nickName ? profile.nickName : '用户'}}</view>
|
|
<view class="sub">积分:{{profile && profile.points != null ? profile.points : '-'}}</view>
|
|
<view class="sub">证书:{{profile && profile.certificateCount != null ? profile.certificateCount : '-'}}</view>
|
|
<view class="sub">实名认证:{{authStatusText}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="actions">
|
|
<button size="mini" type="default" bindtap="goToPoints">积分</button>
|
|
<button size="mini" type="default" bindtap="goToCert">证书</button>
|
|
<button size="mini" type="default" bindtap="goToRecords">参赛记录</button>
|
|
<button size="mini" type="primary" bindtap="toggleAuthForm">
|
|
{{showAuthForm ? '收起实名认证' : '实名认证'}}
|
|
</button>
|
|
</view>
|
|
|
|
<view class="card" wx:if="{{showAuthForm}}">
|
|
<view class="section-title">实名认证提交</view>
|
|
<view class="form-item">
|
|
<text class="label">姓名</text>
|
|
<input class="input" placeholder="请输入姓名" value="{{authForm.name}}" bindinput="onAuthInput" data-key="name" />
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="label">手机号</text>
|
|
<input class="input" placeholder="请输入手机号" value="{{authForm.mobile}}" bindinput="onAuthInput" data-key="mobile" />
|
|
</view>
|
|
<view class="form-item">
|
|
<text class="label">身份证号</text>
|
|
<input class="input" placeholder="请输入身份证号" value="{{authForm.idCardNumber}}" bindinput="onAuthInput" data-key="idCardNumber" />
|
|
</view>
|
|
|
|
<button class="submit-btn" type="primary" bindtap="submitAuth">提交审核</button>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
|