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