Review by:@梁志锋
Showing
3 changed files
with
20 additions
and
3 deletions
@@ -83,12 +83,20 @@ $loginBtn.on('touchstart', function() { | @@ -83,12 +83,20 @@ $loginBtn.on('touchstart', function() { | ||
83 | password: pwd | 83 | password: pwd |
84 | }, | 84 | }, |
85 | success: function(data) { | 85 | success: function(data) { |
86 | + var res; | ||
87 | + | ||
86 | if (data.code === 200) { | 88 | if (data.code === 200) { |
89 | + res = data.data; | ||
87 | showErrTip('登录成功'); | 90 | showErrTip('登录成功'); |
88 | 91 | ||
92 | + $.ajax({ | ||
93 | + url: res.session, | ||
94 | + dataType: 'jsonp' | ||
95 | + }); | ||
96 | + | ||
89 | //1000ms后跳转页面 | 97 | //1000ms后跳转页面 |
90 | setTimeout(function() { | 98 | setTimeout(function() { |
91 | - location.href = data.data; | 99 | + location.href = res.href; |
92 | }, 1000); | 100 | }, 1000); |
93 | } else { | 101 | } else { |
94 | showErrTip(data.message); | 102 | showErrTip(data.message); |
@@ -94,7 +94,8 @@ $loginBtn.on('touchstart', function() { | @@ -94,7 +94,8 @@ $loginBtn.on('touchstart', function() { | ||
94 | showErrTip('登录成功'); | 94 | showErrTip('登录成功'); |
95 | 95 | ||
96 | $.ajax({ | 96 | $.ajax({ |
97 | - url: res.session | 97 | + url: res.session, |
98 | + dataType: 'jsonp' | ||
98 | }); | 99 | }); |
99 | 100 | ||
100 | //1s后跳转页面 | 101 | //1s后跳转页面 |
@@ -46,12 +46,20 @@ $btnSure.on('touchstart', function() { | @@ -46,12 +46,20 @@ $btnSure.on('touchstart', function() { | ||
46 | token: $('#token').val() | 46 | token: $('#token').val() |
47 | }, | 47 | }, |
48 | success: function(data) { | 48 | success: function(data) { |
49 | + var res; | ||
50 | + | ||
49 | if (data.code === 200) { | 51 | if (data.code === 200) { |
52 | + res = data.data; | ||
50 | showErrTip('注册成功'); | 53 | showErrTip('注册成功'); |
51 | 54 | ||
55 | + $.ajax({ | ||
56 | + url: res.session, | ||
57 | + dataType: 'jsonp' | ||
58 | + }); | ||
59 | + | ||
52 | //1000ms后跳转页面 | 60 | //1000ms后跳转页面 |
53 | setTimeout(function() { | 61 | setTimeout(function() { |
54 | - location.href = data.data; | 62 | + location.href = res.href; |
55 | }, 1000); | 63 | }, 1000); |
56 | } else { | 64 | } else { |
57 | showErrTip(data.message); | 65 | showErrTip(data.message); |
-
Please register or login to post a comment