修复找回密码token的问题,原来写的时候本来是想用index变量确定token的位置,结果一不小心写死了

This commit is contained in:
sxw 2015-12-10 13:09:03 +08:00
parent 3dbcf49516
commit 52f62df383

View File

@ -2,8 +2,8 @@ require(["jquery", "bsAlert", "csrfToken", "validator"], function ($, bsAlert, c
var applied_captcha = false;
$('form').validator().on('submit', function (e) {
if (!e.isDefaultPrevented()) {
var index = location.href.indexOf("/t/");
var token = location.href.substr(36+3, 32);
var loca = location.href.split("/");
var token = loca[loca.length-2];
var captcha = $("#captcha").val();
var password = $("#new_password").val();
$.ajax({