ASEMiniProgram/pages/my-honors/my-honors.wxml

110 lines
4.8 KiB
Plaintext
Raw Normal View History

2021-04-01 14:16:23 +00:00
<view class="page" data-weui-theme="{{theme}}">
<view class="page__hd" wx:if="{{!showHonor}}">
<view class="page__title" wx:if="{{!isParent}}">我的荣誉</view>
<view class="page__title" wx:else>孩子荣誉</view>
2021-04-01 14:16:23 +00:00
<view class="page__desc">科研竞赛社会工作等情况</view>
</view>
<view class="page__bd" wx:if="{{showCreate}}">
<view class="weui-form__control-area">
<view class="weui-cells__group weui-cells__group_form">
<view class="weui-cells__title">荣誉基本信息</view>
<view class="weui-cells weui-cells_form">
<view class="weui-cell weui-cell_active">
<view class="weui-cell__hd"><label class="weui-label">荣誉名称</label></view>
<view class="weui-cell__bd">
<input class="weui-input" placeholder="填写荣誉名称" placeholder-class="weui-input__placeholder" bindinput="onTitleInput" value="{{honorTitle}}"/>
</view>
</view>
<view class="weui-cell weui-cell_active">
<view class="weui-cell__hd">
<label class="weui-label">荣誉类别</label>
</view>
<view class="weui-cell__bd">
<input class="weui-input" placeholder="科研、竞赛、社会工作" placeholder-class="weui-input__placeholder" bindinput="onCategoryInput" value="{{honorCategory}}"/>
</view>
</view>
<view class="weui-cell weui-cell_active">
<view class="weui-cell__hd">
<label class="weui-label">荣誉等级</label>
</view>
<view class="weui-cell__bd">
<input class="weui-input" placeholder="校级、省级、国家级、国际级" type="number" placeholder-class="weui-input__placeholder" bindinput="onClassInput" value="{{honorClass}}"/>
</view>
</view>
</view>
</view>
<view class="weui-cells__group weui-cells__group_form">
<view class="weui-cells__title">荣誉描述</view>
<view class="weui-cells weui-cells_form">
<view class="weui-cell">
<view class="weui-cell__bd">
<textarea class="weui-textarea" placeholder="请描述你获得的荣誉" placeholder-class="weui-input__placeholder" rows="3" bindinput="onDescriptionInput" value="{{honorDescription}}"></textarea>
<view class="weui-textarea-counter"><span>0</span>/200</view>
</view>
</view>
</view>
</view>
</view>
<view class="weui-form__opr-area">
<a class="weui-btn weui-btn_primary" bindtap="createHonor">确定</a>
<a class="weui-btn weui-btn_disabled weui-btn_default" bindtap="showHonorsList">返回列表</a>
</view>
</view>
<view class="page__bd" wx:if="{{!showHonor && !showCreate}}" >
<view class="page__bd">
<view class="weui-form-preview">
<view class="weui-form-preview__hd">
<view class="weui-form-preview__item">
<label class="weui-form-preview__label">荣誉数目</label>
<em class="weui-form-preview__value">{{honorsInfo.length}}</em>
2021-04-01 14:16:23 +00:00
</view>
</view>
<view class="weui-form-preview__bd">
<view class="weui-form-preview__item">
<label class="weui-form-preview__label">已认证荣誉数目</label>
<text class="weui-form-preview__value">0</text>
</view>
</view>
<view class="weui-form-preview__ft">
<a class="weui-form-preview__btn weui-form-preview__btn_primary" bindtap="onClickAdd" wx:if="{{!isParent}}">添加荣誉</a>
2021-04-01 14:16:23 +00:00
</view>
</view>
</view>
<view class="weui-panel">
<view class="weui-panel__hd">荣誉列表</view>
<view class="weui-panel__bd" wx:for="{{honorsInfo}}" wx:key="index" bindtap="onClickMessage" data-index="{{index}}">
<view class="weui-media-box weui-media-box_text">
<h4 class="weui-media-box__title">{{item.title}}</h4>
<view class="weui-media-box__desc">{{item.category}}</view>
<view class="weui-media-box__info">
<view class="weui-media-box__info__meta">创建时间 {{item.creationTime}}</view>
<view class="weui-media-box__info__meta">等级 {{item.honorClass}}</view>
<view class="weui-media-box__info__meta weui-media-box__info__meta_extra">认证 {{item.read ? "已认证" : "未认证"}}</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{!showHonor && !showCreate}}">
<view class="page__bd">
<view class="weui-article">
<view class="weui-article__section">
<view class="weui-article__section">
<view class="weui-article__p">
{{honorsInfo[showIndex].context}}
</view>
</view>
</view>
</view>
</view>
</view>
<view class="fadeIn {{hideToast ? 'fadeOut' : ''}}" wx:if="{{toast}}">
<view class="weui-mask_transparent"></view>
<view class="weui-toast">
<i class="weui-icon-success-no-circle weui-icon_toast"></i>
<view class="weui-toast__content">添加成功</view>
</view>
</view>
</view>