layer局部刷新用location.reload(); 刷新进首页用window.parent.location.reload();


function sends(info
        ) {
            var arr=info.split("@");
            var userid=+arr[4];
            var prefix = ctx+ "cw/integralInfo";
            var index = layer.open({            //打开layer弹出框
                type: 1,                     //类型
                skin: "layui-layer-rim",     //皮肤类型,在skin文件夹中
                area: ["400px", "300px"],    //范围大小
                title: "赠送积分"     ,        //定义标题

                content: '<div style="text-align:center;vertical-align:middle;margin-top: 30px;"><input id="sendjifen" style="width:200px;height:50px"type="text" placeholder="赠送数量"><br /><br /><input id="touserid"style="width:200px;height:50px"type="text" placeholder="请输入获赠用户的ID(序号)"></div>',       //输出的字符串,定义弹出框的html页面
                btn: ['确定', '取消'],    //按钮
                yes: function (index, layero) { //确定按钮的处理函数

                    $.ajax({
                        url: prefix+"/send"+"/"+userid+"/"+$("#sendjifen").val()+"/"+$("#touserid").val(),      //指向URL名称
                        type: 'GET' ,                   //页面传值类型

                    success: function (e) {          //提交数据成功后的处理函数,e是返回的值
                        if (e == 1) {
                            layer.close();
                            location.reload();
                            layer.msg("积分赠送成功");
                        } else {
                            layer.msg("积分赠送失败")
                        }
                    }
                });
                }
            });
        }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM