Commit b0811500cdd4cfb56fb94503b6549362963edfcb

Authored by 王富生
1 parent 37a8f017

登录模块提交

resource/js/unit.js
... ... @@ -328,19 +328,16 @@ function sysAjax(opts) {
328 328 xhr.setRequestHeader("X-Auth-Token", fn.getToken());
329 329 },
330 330 success: function (res, status, xhr) {
331   - //console.log('获取header:'+xhr.getAllResponseHeaders());
332   - // console.log("服务器响应信息:");
333   - // console.log(res)
334 331 var msg = (typeof res.msg == 'string') && (res.msg.constructor == String) ? res.msg : res.errMsg;
335 332 //成功
336   - if (res.code == "2003") {
  333 + if (res.errCode == "2003" || res.code=='2003') {
337 334 //授权令牌不存在或已失效,请重新登录后在尝试
338   - window.location.href = '../login.html'
339   - } else if (res.code == "2004") {
  335 + window.location.href = '../../workreport/login/login.html'
  336 + } else if (res.errCode == "2004" || res.code=='2004') {
340 337 //授权令牌不合法,请重新登录收尝试
341 338 //alert(res.msg);
342   - window.location.href = '../login.html'
343   - } else if (res.code == "2005") {
  339 + window.location.href = '../../workreport/login/login.html'
  340 + } else if (res.errCode == "2005" || res.code=='2005') {
344 341 //无此权限
345 342 alert(msg);
346 343 } else {
... ...
topages/workfill/workfill.js
... ... @@ -5,7 +5,7 @@ var weekOfday = Number(moment().format('E'));//计算今天是这周第几天
5 5 var clicknum = 0;//定义上下周点击次数
6 6 var fun = {
7 7 init:function () {
8   - debugger;
  8 + //debugger;
9 9 $("#loginName").text(fn.getUserName());
10 10 //初始化项目
11 11 $('.work-projectName').selectpicker('render');
... ...