/**
 * [OElove] (C)2010-2099 oelove.com Inc.biz
 * Email: service@phpcoo.com ,phpcoo@qq.com
 * This is NOT a freeware, use is subject to license terms
 * $ Last update 2019/10/15 by CL $
*/
$(function(){
    
    //弹出二维码
    $("[f='but_open_play']").on("mouseover", function(){
        $id = $(this).attr("data-id");
        $qr_url = _ROOT_PATH+"index.php?c=scan&a=scan&size=4&mod=video&id="+$id;
        $("#qr_"+$id).find("img").attr("src", $qr_url);
        $("#qr_"+$id).show();
    }).on("mouseout", function(){
        $id = $(this).attr("data-id");
        $("#qr_"+$id).hide();
    });
      
    //关闭二维码
    $("[f='but_close_play']").on("mouseout", function(){
        $id = $(this).attr("data-id");
        $("#qr_"+$id).hide();
    });
    

    //form表单
    layui.use('form', function(){
        $form = layui.form;
        
        //选择性别
        $form.on('radio(sergender)', function(data){
            $val = 0;
            if (this.checked) {
                $val = data.value;
            }
            $("#s_gender").val($val);
        });
        
        //提交搜索
        $form.on('submit(videoserform)', function(data){
            $("#video_form").submit();
        });
        

    });
    
});