<!-- pages/renzheng/renzheng.wxml -->
<view class="page-container">
  <!-- 未注册或异常：邀请码注册 + 联系客服 -->
  <view class="card" wx:if="{{pageState === 'need_register'}}">
    <view class="card-title">{{authName}}认证</view>
    <view class="card-desc">您尚未注册此角色或账号已被封禁，请输入邀请码注册或联系客服</view>
    <view class="input-box">
      <input class="invite-input" placeholder="请输入邀请码" value="{{inviteCode}}" bindinput="onInviteCodeInput" maxlength="100"/>
    </view>
    <view class="btn-primary" bindtap="onRegister">
      {{isLoading ? '注册中…' : '立即注册'}}
    </view>
    <view class="kefu-link" bindtap="goToKefu">联系客服</view>
  </view>

  <!-- 已注册：切换引导 -->
  <view class="card done-card" wx:if="{{pageState === 'done'}}">
    <view class="done-icon">✓</view>
    <view class="card-title">认证成功</view>
    <view class="done-tip">
      您已是<text class="highlight">{{authName}}</text>身份，
      <text class="highlight">请退出此页面</text>点击底部导航栏左侧的
      <text class="highlight">「切换」</text>
      按钮，选择
      <text class="highlight">「{{authName}}」</text>
      即可开始使用。
    </view>
  </view>
</view>