<view class="roll">
    <van-tabs active="{{ active }}" bind:change="onChange" animated swipeable>
        <van-tab title="公告详情"></van-tab>
        <van-tab title="公告设置"></van-tab>


    </van-tabs>
    <!-- 导航 -->
    <form bindsubmit="summit">

        <block>
            <view wx:if="{{active==0}}" style="width: 750rpx;  display: block; box-sizing: border-box; left: 0rpx; top: 0rpx; position: absolute">
                <!-- 内容页 -->
                <view class="maincon">
                    <view class="imgbox">
                        <view class="box_text" wx:if="{{!imgSrc}}" style="width: 720rpx; height: 600rpx; box-sizing: border-box; display: block">请上传封面</view>
                        <view wx:if="{{imgSrc}}" class="code_box">
                            <image class="code_img" src="{{imgSrc}}" name="votepage"></image>
                        </view>
                    </view>
                    <van-button color='#5500FF' size='large' bindtap="uploadImg">
                        上传公告封面
                    </van-button>
                    <!--详情-->
                    <view class="message">
                        <view class="toupiaomingcheng" style="flex-direction:row;">
                            <text style="font-weight: bold;font-size: 10pt;">公告名称：</text>
                            <input type="text" class="votename" placeholder="请输入公告名称" bindinput="votename" />
                        </view>
                        <view class="toupiaomingcheng" style="flex-direction:row;">
                            <text style="font-weight: bold;font-size: 10pt;">公告描述：</text>
                            <view class="text-box">
                                <textarea style="position: relative; left: 1rpx; top: 0rpx" class="votedetail" placeholder="请输入公告描述\(500字内\)" bindinput="votedetail" maxlength="500" />
                            </view>
                        </view>
                        <view class="toupiaomingcheng" style="flex-direction:row;">
                            <text style="font-weight: bold;font-size: 10pt;">关于公告：</text>
                            <!-- 选项 -->
                            <view class="ops" wx:for="{{options}}" wx:key="{{index}}">
                                <view class="opup">
                                    <text class="opsid" name="opsid">{{index+1}}</text>
                                    <input type="text" placeholder="请输入选项{{index+1}}名称" class="opsname" data-index="{{index}}" value="{{item.opsname}}" bindinput="getopsname" />
                                </view>

                                <view class="text-box1" hidden="{{opdhidden}}">
                                    <text>{{currentInput}}</text>
                                    <textarea class="votedetail1" placeholder="请输入选项描述\(200字内\)" maxlength="200" bindinput="getopsdetail" data-index="{{index}}" value="{{item.opsdetail}}" />
                                </view>

                                <view class="outter">
                                    <view class="upload-video">
                                        <block wx:if="{{item.opsvideo}}">
                                            <video src="{{item.opsvideo}}" class="img-li"></video>
                                            <image class="icon-deletes" src="../../images/删除.png" bindtap="deleteVideo" data-index="{{index}}"></image>
                                        </block>
                                    </view>
                                    <block>
                                        <view class="img-li" wx:if="{{item.opsimage}}" wx:key="{{index}}">


                                            <view class="img-li">
                                                <image class="uploading-icon" src="{{item.opsimage}}" bindtap="previewImg" data-index="{{index}}"></image>
                                            </view>
                                            <image class="icon-delete" src="../../images/删除.png" bindtap="deleteImg" data-index="{{index}}"></image>

                                        </view>
                                    </block>
                                </view>
                                <view class="opbtn">
                                    <button class="addopsdetail" bindtap="adddetail">描述</button>
                                    <button class="addopsadd" bindtap="addfujian" data-index="{{index}}">附件</button>
                                    <button class="delops" bindtap="deleteoptions" data-index="{{index}}">删除</button>
                                </view>
                            </view>




                            <button class="addopsbtn" bindtap="addoptions" data-index="{{index}}">
                                <image src="../../images/choose.png" class="addbtnimg"></image>
                                <text class="addbtn">添加</text>
                            </button>
                        </view>

                    </view>
                </view>


            </view>
            <view class="swi2" wx:if="{{active==1}}">
                <!-- 规则页 -->
                <scroll-view :scroll-y="true" :style="{height: clientHeight?clientHeight+'px':'auto'}">
                    <view class="setting">
                        <view class="tui-picker-content1">
                            <view class="tui-picker-name">公告开始时间</view>

                            <picker mode="date" value="{{date}}" start="2022-01-01" name="dateTime1" end="2032-01-01" bindchange="bindDateChange">
                                <view class="tui-picker-detail">
                                    {{sttime}}
                                </view>
                            </picker>
                        </view>

                        <view class="tui-picker-content">
                            <view class="tui-picker-name">公告注销时间</view>
                            <picker mode="date" value="{{date}}" start="2022-01-01" name="date" end="2032-01-01" bindchange="bindDateenChange" name="dateTime2">
                                <view class="tui-picker-detail">
                                    {{entime}}
                                </view>
                            </picker>

                        </view>
                    </view>
                </scroll-view>
                <view class="fabu">
                    <van-button size='large' color='#4682B4' type="default" round form-type="submit">立即发布</van-button>
                </view>
            </view>


        </block>

    </form>

</view>