<view class='CourseDetail'>
  <view class='noDetail' wx:if="{{is_show}}">
    <view class="title">{{goodTit}}</view>
    <view class="title">售价：{{language['money']}}{{ vip_level_status && vip_level_status.status == 1 ?vip_level_status.word : goodPrice }}</view>
    <view>
      <button wx:if="{{isLook}}" class="yellow_btn" bindtap='study'>立即观看</button>
      <button wx:if="{{!isLook}}" class="yellow_btn" bindtap='buy'>立即购买</button>
    </view>
  </view>
  <view class='noDetail' wx:if="{{!isVideo}}">
    <view class="tips">本视频不是mp4等视频格式，需要到web版观看</view>
  </view>
  <view class='Detail' wx:if="{{is_vshow}}" style="{{questionnaire_is_open?'z-index: 0;':'z-index: 99;'}}">
    <view>
      <video id="polyvLiveVideo" class="myVideo" src="{{islive?is_bisrc:vedioSrc}}" binderror="videoErr" bindwaiting="changeLoading" object-fit="contain" play-btn-position="center" enable-play-gesture="true" controls poster="{{poster?poster:coverImg}}" ></video>
    </view>
  </view>
  <!-- <view class="{{is_vshow?'course_people_top course_title':'course_title'}}">
    <text class="bold_title">课程名称：</text>
    <text class="nobold_title">{{goodTit}}</text>
  </view>
  <view class="course_people">
    <view class="left">
      <image class="people_pic" src="{{teacherImg}}"></image>
      <view class="people_title">
        <text class="up">主讲</text>
        <text class='down'>{{ teacherName}}</text>
      </view>
    </view>
    <view class="right" wx:if="{{rewardBtnShow}}" bindtap="moneyShow">
      <icon class="iconfont icon-giftfill"></icon>
      <text class='icon_text'>打赏</text>
    </view>
  </view> -->
  <view class="newlsit_course {{is_vshow&&videoErr?'course_people_top':''}}">
    <view class="newlist_master">
      <view class="newlist_left">
        <view class="master_photo"><image src="{{teacherImg}}"></image></view>
        <view class="master_name">讲师：{{ teacherName}}</view>
      </view>
      <view class="master_like" wx:if="{{rewardBtnShow}}" bindtap="moneyShow">
        <icon class="iconfont icon-kc_gift"></icon>
        <view style="font-size: 24rpx;">打赏</view>
      </view>
    </view>
    <view class="class_title">{{goodTit}}</view>
    <view class="newlist_bottom">
      <view class="newlist_left">共{{chapterNum}}节</view>
      <view class="newlist_right">{{language['money']}}{{goodPrice}}</view>
    </view>
  </view>
  <view class="live" bindtap="addzhibo" wx:if="{{live}}">
    <view class="acr_left">{{live_title}}</view>
    <!-- <van-icon class="arrow" name="arrow" size='32rpx' /> {{live_title}} -->
    <view class="act_right">进入直播</view>
  </view>
  <view class="spanbiew" wx:if="{{!live}}"></view>
  <view style="padding-bottom:80rpx">
    <van-tabs custom-class="course_tabs" active="{{ courseTabsActive }}">
      <van-tab title="课程简介">
        <view wx-if="{{goodsContent}}" style="margin:0 35rpx;">
          <view class="class_one">
            <icon class="iconfont icon-kc_detail"></icon>
            课程介绍
          </view>
          <rich-text nodes="{{goodsContent}}"></rich-text>
        </view>

      </van-tab>
      <van-tab title="课程目录">
        <view wx-if="{{chapterdigList}}" style="margin:0 35rpx;">
          <view class="class_two">
            <icon class="iconfont icon-kc_mulu"></icon>
            目录
          </view>
        </view>
				<van-collapse accordion value="{{ activeNames }}" bind:change="onChange">
				  <van-collapse-item title="{{digListitem.chapter_name}}" name="{{digListindex+1}}" wx:for-index="digListindex" wx:for-item="digListitem" wx:for="{{chapterdigList}}" wx:key="this">
				    <block wx:for="{{digListitem.has_many_chapter}}" wx:for-index="index" wx:for-item="item" wx:key="this">
				      <view class="{{item.id === active ?'course_list choose':'course_list'}}" data-index="{{index}}" data-item="{{item}}" catchtap='viewPermissionBtn'>
				        <icon class="iconfont icon-bofang"></icon>
				        <text class="course_list_word">第{{ index + 1 }}节 {{ item.chapter_name }}</text>
				        <text class="course_list_test" wx:if="{{item.is_audition}}">【免费试听】</text>
				      </view>
				    </block>
				  </van-collapse-item>
				</van-collapse>
      </van-tab>

    </van-tabs>
  </view>
  <view wx:if="{{pushGoodList.length>0}}">
    <van-cell title="猜你喜欢" />
    <block wx:for="{{pushGoodList}}" wx:key="item.goods_id">
      <view class="course" data-item="{{item}}" catchtap='pushGoodGoto'>
        <view class="course-content">
          <view class="course-img">
            <image src="{{item.thumb}}"></image>
          </view>
          <view class="course-text">
            <text class="name">课程名称：{{item.title}}</text>
          </view>
          <view class="money">{{language['money']}} {{ item.vip_level_status && item.vip_level_status.status == 1 ?item.vip_level_status.word : item.price }}</view>
        </view>
      </view>
    </block>
  </view>
  <view class="qrCode " wx:if="{{codeUrl}}">
    <text class='qr'>【二维码】</text>
    <view class="code-content ">
      <view>
        <image class='codeUrl' src="{{codeUrl}} " data-src='{{codeUrl}}' bindtap='previewImage' mode="scaleToFill "></image>
      </view>
    </view>
  </view>
  <view class="bottom_box">
    <view class="box_item" bindtap='toMyCourse'>
      <icon class="iconfont icon-gerenzhongxin"></icon>
      <text>我的</text>
    </view>
    <view wx:if="{{is_update}}" class="box_btn" bindtap='update'>升级会员</view>
    <view wx:if="{{is_buy}}" class="box_btn red" bindtap='buy'>单次购买</view>
  </view>
  <van-popup show="{{ showPopup }}" position="bottom" close-on-click-overlay="true" bind:close="onClose">
    <van-cell title="打赏金额" />
    <view class="reward_btn_list">
      <button class="{{ rewardMoney ==='5'?'reward_btn red':'reward_btn'}}" data-money="5" bindtap='chooseMoney'>
        5{{language['元']}}
      </button>
      <button class="{{ rewardMoney ==='10'?'reward_btn red':'reward_btn'}}" data-money="10" bindtap='chooseMoney'>
        10{{language['元']}}
      </button>
      <button class="{{ rewardMoney ==='20'?'reward_btn red':'reward_btn'}}" data-money="20" bindtap='chooseMoney'>
        20{{language['元']}}
      </button>
      <button class="reward_btn" bindtap='openInputReward'>其他金额</button>
    </view>
    <button class="reward_sure_btn" bindtap='confirmReward'>确定打赏</button>
  </van-popup>
  <van-popup show="{{  rewardMoneyBtn }}" position="bottom" close-on-click-overlay="true" bind:close="onClose">
    <van-cell title="打赏金额" />
    <van-field model:value="{{  rewardMoney }}" label="{{language['money']}}" placeholder="请输入打赏金额" border="{{ false }}" bind:input="moneyInput" clearable="{{true}}" />
    <button class="reward_sure_btn" bindtap='confirmReward'>确定打赏</button>
  </van-popup>
  <!-- <van-action-sheet show="{{ actionSheetShow }}" actions="{{ actionSheetItems }}" bind:close="onClose" cancel-text="取消" bind:cancel="onClose" bind:select="payPost" /> -->
  <van-dialog id="van-dialog" />
  <van-popup show="{{ questionnaire_is_open }}" close-on-click-overlay="true" bind:close="onClose" custom-style="background-color:transparent;">
    <view class="surveyBox">
      <view >
        <image style="width:583rpx;" mode="widthFix" src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/wj_popupbg@2x.png"></image>
      </view>
      <view class="centen">
        <text>{{shopName}}</text>
        <text>请您填写有奖问卷</text>
        <text>参与问卷调查，获得{{plugin_point_name}}奖励!</text>
        <view class="btn">
          <view catchtap="onClose">放弃</view>
          <view catchtap="goSurvey">接受邀请</view>
        </view>
      </view>

    </view>
  </van-popup>
</view>

<van-popup show="{{rewardPayshow}}" position="bottom" overlay="{{true}}" bind:close="rewardPayshowClose">
    <view class="rewardPay">
        <view class="payMode">
            <view class="ul">
                <view class="li" data-info="{{item}}" catchtap="payPost" wx:for="{{btnData}}" wx:key="index">
                    {{ item.name }}
                </view>
            </view>
        </view>
        <view class="cancel" catchtap="rewardPayCancelBtn">取消</view>
    </view>
</van-popup>

<pay-keyboard show="{{popupSpecs}}" wx:if="{{popupSpecs}}" bindclose="payKeyboardClose" bindcomplete="payKeyboardComplete"></pay-keyboard>

<view class="fixed-box" style="width: 80rpx;height: 80rpx;" bindtap="setPosterShow">
  <image class="img" mode="aspectFit" src="https://www.yunzmall.com//min_img/bc_eweima.png"></image>
</view>


<!--海报-->
<goods-qrcode isshow="{{posterShow}}" goodsId="{{goods_id}}"></goods-qrcode>
<!--海报end-->