yuedaxia76 · GitHub

when by jquery ajax post ,the session cookite not send,bug 2.X is ok.

function sm2login(logInfo, callback) {
    $.ajax({
        type: "POST",
        url: getContextPath() + "/do/login/getSm2key",
        dataType: "json",
        //cache:false,
        success: function (data) {
            var pubkeyHex = data.pubkey;
            var cipherMode = 1;
            var u =sm2Encrypt(logInfo.loId, pubkeyHex, cipherMode);
            var p =sm2Encrypt(logInfo.pwd, pubkeyHex, cipherMode);
           **/////this post cookie not send**
            $.post(getContextPath() + "/do/login/validateSm2", {
                "loginId": u,
                "password": p,
                "serVety": logInfo.serVe,
                "IMG_CHECK": logInfo.imgV
            }, callback );
        },
        error: function (data) {
            console.log(data);
        }
    });
}

Read the original on github.com ↗