不区分大小写的输入和ajax请求数据

来源:互联网 发布:行车记录仪支架淘宝 编辑:程序博客网 时间:2024/05/17 15:37
function invitation_list(code){    //邀请码(英文字母大写)    if (code == null || code == "") {        invitation_val = $("#invitation_val").val().toUpperCase();            //邀请码存入sessionStorage            sessionStorage.setItem("invitation_val", invitation_val);            if(invitation_val.length != 8){                $.MsgBox.Alert("提示", "请输入八位邀请码!");                return;            }    }else{        invitation_val = code;    }    $.ajax({        url: "/h5do/h5_financeProduct/mb6185",        type: "POST",        dataType: "json",        data: {            inviteCode: invitation_val,            tranflag:"0"        },        success: function(msg) {            if (!msg.return) {                $.MsgBox.Alert("提示","未知系统错误");                after();                return;            }            if (msg.return.retCode != "000000") {                //errorBranch(msg, "", "1", "理财产品", "", infoData);                financeErrorBranch(msg,"理财产品","goBack");            } else {                $("#haveId").hide();                $("#buyManageID1").show();                $("#buyManageID1").empty();                rlist = msg.return.list;                if (rlist == null || rlist.length == 0) {                    var noResult = "<div id=\"notreslut\"></div>";                    $("#buyManageID1").append(noResult);                    recordFun("notreslut", "对不起,没有满足条件的查询数据!");                    after();                    return;                }                for (var i = 0; i < rlist.length; i++) {                    publicFun(i,"buyManageID1");                }                after();            }        },        complete:function(XMLHttpRequest, textStatus){            after();        },        error: function(errorMsg) {            $.MsgBox.Alert("提示","网络错误。");        }    });}