//列表页click事件

$(document).on('click','#add_customer',function(){
                var url = "ap/controller/add";
                var data            = {
                    area:["1050px","588px"],
                    resize:false,
                    shadeClose:true,
                    shade:0.3,
                    maxmin:false,
                    callback:function(data){
                        alert(data)
                        $("#table").bootstrapTable('refresh', {
                            silent: true //静默刷新
                        });
                    }
                };
                window.top.Fast.api.open(url, ['添加','font-size:13px'], data);
            })
//表单提交js

Form.api.bindevent($("form[role=form]"), function(data, ret){
                //这里是表单提交处理成功后的回调函数,接收来自php的返回数据
                Fast.api.close();

            }, function(data, ret){
                window.top.notify.error(ret.msg);
                return false;
                //PHP返回失败时处理
            }, function(success, error){
                //bindevent的第三个参数为提交前的回调
                //如果我们需要在表单提交前做一些数据处理,则可以在此方法处理
                //注意如果我们需要阻止表单,可以在此使用return false;即可
                //如果我们处理完成需要再次提交表单则可以使用submit提交,如下
                // Form.api.submit(this, success, error);

                Form.api.submit(this,function (data,ret){
                    console.log(data);
                    console.log(ret);
                    Fast.api.close(1234567);
                },function(data,err){
                    console.log(data)
                    console.log(err);
                    alert(555);
                });
                return false;
            });