<!--pages/lianxi/index.wxml-->
<view class="page">
<view class="page__bd">
<view class="weui-panel__hd">所有学科</view>
    <view class="weui-panel__bd">
      <block wx:for="{{subjectData}}" wx:key="unique">
        <view class="weui-media-box weui-media-box_appmsg" bindtap="chooseSubject" data-id="{{item.id}}" data-name="{{item.name}}" data-is_paid="{{item.is_paid}}">
          <view class="weui-media-box__hd">
            <image class="weui-media-box__thumb" src="/images/fushe.svg" alt></image>
          </view>
          <view class="weui-media-box__bd">
            <h4 class="weui-media-box__title">{{item.name}}</h4>
            <view class="weui-media-box__desc">
                          <span style="font-weight:bold;color:darkblue" wx:if="{{item.is_paid}}">已购买</span>
              <a class="weui-btn weui-btn_mini weui-btn_primary" bindtap="buy" id="{{item.id}}" wx:else>购买</a>
            </view>
          </view>
        </view>
      </block>
    </view>
</view>
</view>
