<!--pages/video/video.wxml-->
<navigation-bar title="" back="{{false}}" bind:handleBack="handleBack" color="black" background="#FFF">
    <view slot="left" class="report-nav-btn" bind:tap="handleCustomReport">举报</view>
</navigation-bar>



<scroll-view class="scrollarea" scroll-y type="list">
    <view style="display: flex; align-items: center; padding: 0 20rpx; height: 70rpx; background: #FFF7E6;">
        <view style="font-size: 22rpx; color: #999;">本视频仅用于科普，无任何恶意引导行为</view>
    </view>
    <my-video id="myVideo" src="{{dataList.url}}" backgroundUrl="{{dataList.background}}"></my-video>

    <block wx:if="{{dataList.tipUrl}}">
        <image alt="提示" mode="widthFix" src="{{dataList.tipUrl}}" style="width: 100%" />
    </block>

    <van-tabs active="{{ active }}" bind:change="onChange" animated class="tabs" id="tabs">
        <van-tab wx:if="{{dataList.questions.length != 0}}" title="答题">
            <!-- 答题有多选单选 -->
            <form bindsubmit="handleSubmit" form-id="quizForm">
                <my-quiz id="quizComponent" questions="{{dataList.questions}}" answerList="{{dataList.answerList}}" bind:change="onAnswerChange" />
                <button wx:if="{{active === 0}}" class="btn" form-type="submit" style="bottom:{{safeBottom===0?24:safeBottom}}rpx">
                    {{canSubmit ? '提交答案领取红包' : '请观看完视频再前往互动'}}
                </button>
            </form>
        </van-tab>
        <van-tab title="介绍{{dataList.cusId ? '(' + dataList.cusId + ')' : ''}}">
            <scroll-view class="scrollarea-inner" scroll-y type="list">
                <view class="scrollarea-inner-text">
                    <rich-text nodes="{{nodes}}"></rich-text>
                </view>
            </scroll-view>
        </van-tab>
        <view class="history" bind:tap="handleViewHitory">
            <image class="icon" src="./assets/1.png" />
        </view>
    </van-tabs>
</scroll-view>