<!-- <wxs src="../../pages/commonWxs/format.wxs" module="format" /> -->
<template name="courses">
    <view class="courses_container">
        <view class="course_item" bindtap="goToReading" wx:for="{{coursesData}}" data-id="{{item.userRead.exampleId}}" data-index="{{index}}" wx:key="index">
            <image class="course_icon" src="{{item.userRead.iconImg}}" lazy-load="true" />
            <image class="activity_tigs" wx:if="{{item.isActivity}}" src="../../static/activity/activity_tag_1/png" />
            <view class="course_info">
                <text class="course_title">{{item.userRead.title}}</text>
            </view>
            <view class="course_btn_wrapper">
                    <view class="collect course_btn" data-index="{{index}}" data-id="{{item.userRead.id}}" data-type="{{item.userRead.type}}">
                        <image class="comment_icon btn_icon" src="../../static/index/res_comment.png" />
                        <text class="collect_text btn_text">{{item.readAmount}}</text>
                    </view>
                    <view class="collect course_btn" data-index="{{index}}" data-id="{{item.userRead.id}}" data-type="{{item.userRead.type}}">
                        <image class="play_icon btn_icon" src="../../static/index/res_eye.png" />
                        <text class="collect_text btn_text">{{item.userRead.playAmount}}</text>
                    </view>
                    <view class="collect course_btn" data-index="{{index}}" data-id="{{item.userRead.id}}" data-type="{{item.userRead.type}}">
                        <image class="like_icon btn_icon" src="../../static/index/res_like.png" />
                        <text class="collect_text btn_text">{{item.userRead.likeAmount}}</text>
                    </view>
                    <view class="share course_btn"  data-author="{{item.user.nickName}}" data-index="{{index}}" data-id="{{item.userRead.id}}" data-avatar="{{item.user.avatar}}" data-uid="{{item.user.uid}}" data-shareImg="{{item.userRead.shareImg}}" data-icon="{{item.userRead.iconImg}}" data-title="{{item.userRead.title}}" data-type="{{item.userRead.type}}">
                        <image class="share_icon btn_icon" src="../../static/index/res_share.png" />
                        <text class="share_text btn_text">{{item.userRead.shareAmount}}</text>
                    </view>
                    <view class="collect course_btn" data-index="{{index}}" data-id="{{item.userRead.id}}" data-type="{{item.userRead.type}}" >
                        <image class="collect_icon btn_icon" src="../../static/index/res_star.png" />
                        <text class="collect_text btn_text">{{item.userRead.favoritesAmount}}</text>
                    </view>
                </view>
        </view>
        <view class="no_work" wx:if="{{noMoreWork}}">
            <text class="no_work_text">已经到底啦！</text>
        </view>
    </view>
</template>
