<!--pages/personal/personal.wxml-->
<view class="container">
	<view class="page-body">
		<view class="page-user">
			<cover-image src="{{userInfo.avatarUrl ? userInfo.avatarUrl  : '../../img/moren.png' }}"></cover-image>
			<view bindtap="getUser">
				<button size="mini" class="btnUser" wx:if="{{!userInfo.nickName|| !userInfo.avatarUrl}}" bindtap="onAuth">登录</button>
				<view wx:if="{{userInfo.nickName}}" class="user-title">
					{{userInfo.nickName?userInfo.nickName:'微信名称'}}
				</view>
				<view style="font-size: 24rpx;">{{userInfo.area_str?userInfo.area_str:'请设置地址'}}</view>
			</view>

		</view>
	</view>
	<view class="zhengshu" bindtap="goUser"  mark:url="/pages/certificate/certificate">
        <cover-image style="width:26rpx; height: 31rpx;"  src="../../img/nav/zhengshu.png"></cover-image>
        <view class="title"> 
            修改个人信息
        </view>
    </view>

	<!--内容-->
	<view class="badge">
		<view class="badge-title">
			<view style=" text-align: center; ">
				<!--   <text class="num" wx:if="{{usesDetails.total_certificate>0 && usesDetails.total_medal>0}}">2</text>
                <text class="num" wx:if="{{usesDetails.total_certificate<=0 && usesDetails.total_medal>0}}">1</text>
                <text class="num" wx:if="{{usesDetails.total_certificate>0 && usesDetails.total_medal<=0}}">1</text>
                <text class="num" wx:if="{{usesDetails.total_certificate<=0 && usesDetails.total_medal<=0}}">0</text> -->
				<text class="num">{{usesDetails.total_medal}}</text>

				<!--   <text class="all">/2</text> -->
			</view>
			<view>
				我的勋章
			</view>
		</view>

		<view class="badge-img">
			<scroll-view scroll-x scroll-with-animation  scroll-into-view="{{id}}">
					<view class="icon" wx:for="{{AllUserMedal}}" wx:key="unique" wx:for-index="unique"  id="{{'m'+ unique}}">
						<image bindtap="gocertificate_detail"
							data-url='/pages/certificate_detail/certificate_detail?imgurl={{host}}{{item.cert_img}}'
							style="width:100rpx; height: 100rpx;" src="{{item.type == 1 ? '/img/nav/jianpaiIndex.png' : '/img/nav/zhongheIndex.png'}}"></image>
					</view>
			</scroll-view>
		</view>
	</view>
	<!--作品列表-->
	<view class="works">
		<block wx:for="{{works_list}}" wx:key="index">
			<view class="works-list" mark:url="{{item.url}}" bindtap="getRoute">
				<view class="item-list">
					{{item.title}}
				</view>
				<cover-image class="works-icon" style="width:16rpx; height: 28rpx;" src="../../img/nav/arrow.png">
				</cover-image>
			</view>
		</block>

	</view>

</view>
