<!--pages/admin/index.wxml-->
<view class="page">
  <view class="page__bd">
    <view class="weui-cells weui-cells_after-title" style="margin-top:0px">
      <view class="weui-panel__bd">
        <view class="weui-media-box weui-media-box_appmsg">
          <view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
            <view class="weui-media-box__title">
              <span>账号:</span>
              <span style="font-weight:bold;">{{admininfo.username}}</span>
            </view>
            <view class="weui-media-box__desc">昵称:
              <span>{{ admininfo.name }}</span>
            </view>
            <view class="weui-media-box__desc">角色:
              <span>{{ admininfo.roles }}</span>
            </view>
            <view class="weui-media-box__desc" wx:if="{{admininfo.mpopenid}}">
              已绑定微信
            </view>
          </view>
        </view>
        <view style="text-align:right;padding-right:8rpx">
          <button type="primary" size="mini" bindtap="bindmp" wx:if="{{!admininfo.mpopenid}}">绑定微信</button>
          <button type="default" size="mini" bindtap="unbindmp" wx:else>解绑</button>
          <button type="warn" size="mini" bindtap="logout" style="margin-left:4rpx">退出</button>
        </view>
      </view>
    </view>
    <view class="weui-cells__title">功能列表</view>
    <view class="weui-cells weui-cells_after-title">
		<view class="weui-grids">
			<navigator class="weui-grid" url="/pages/admin/exam/add2">
				<view class="weui-grid__icon">
					<image src="/images/suiji.svg" alt></image>
				</view>
				<view class="weui-grid__label">发布考试</view>
			</navigator>
			<navigator class="weui-grid" url="/pages/admin/exam/index">
				<view class="weui-grid__icon">
					<image src="/images/examtest.svg" alt></image>
				</view>
				<view class="weui-grid__label">考试记录</view>
			</navigator>
			<navigator class="weui-grid" url="/pages/admin/candidate/index">
				<view class="weui-grid__icon">
					<image src="/images/candidate.svg" alt></image>
				</view>
				<view class="weui-grid__label">出证记录</view>
			</navigator>
		</view>
	</view>
  </view>
</view>