Authored by xuqi

unified ajax data attr

... ... @@ -45,8 +45,8 @@ $btnNext.on('touchstart', function() {
url: '/passport/back/sendcode',
type: 'POST',
data: {
area: country.split('+')[1],
mobile: pn
areaCode: country.split('+')[1],
phoneNum: pn
},
success: function(data) {
if (data.code === 200) {
... ...
... ... @@ -14,7 +14,7 @@ var tip = require('../../plugin/tip');
var trim = $.trim;
var showErrTip = tip.show;
var $mobile = $('#mobile');
var $phoneNum = $('#phone-num');
api.bindEyesEvt();
... ... @@ -40,13 +40,13 @@ $btnOk.on('touchstart', function() {
password: pwd
};
if ($mobile.length === 0) {
if ($phoneNum.length === 0) {
mobileBack = false;
}
if (mobileBack) {
$.extend(setting, {
mobile: $mobile.val(),
phoneNum: $phoneNum.val(),
areaCode: $('#areaCode').val(),
token: $('#token').val()
});
... ... @@ -72,7 +72,7 @@ $btnOk.on('touchstart', function() {
//1000ms后跳转页面
setTimeout(function() {
location.href = '/';
location.href = data.data;
}, 1000);
} else {
showErrTip(data.message);
... ...
... ... @@ -79,8 +79,8 @@ module.exports = function(useInRegister) {
type: 'POST',
url: '/passport/' + urlMid + '/verifycode',
data: {
mobile: mobile,
area: area,
phoneNum: mobile,
areaCode: area,
code: trim($captcha.val()),
token: $('#token').val()
},
... ...
... ... @@ -78,9 +78,9 @@ $loginBtn.on('touchstart', function() {
type: 'POST',
url: '/passport/signin/auth',
data: {
area: country.split('+')[1],
account: pn,
pwd: pwd
areaCode: country.split('+')[1],
phoneNum: pn,
password: pwd
},
success: function(data) {
if (data.code === 200) {
... ...
... ... @@ -83,7 +83,7 @@ $loginBtn.on('touchstart', function() {
url: '/passport/signin/auth',
data: {
account: acc,
pwd: pwd
password: pwd
},
success: function(data) {
if (data.code === 200) {
... ...
... ... @@ -39,8 +39,8 @@ $btnSure.on('touchstart', function() {
url: '/passport/reg/setpassword',
data: {
password: pwd,
mobile: $('#phone-num').val(),
area: $('#area-code').val(),
phoneNum: $('#phone-num').val(),
areaCode: $('#area-code').val(),
token: $('#token').val()
},
success: function(data) {
... ...
... ... @@ -45,8 +45,8 @@ $btnNext.on('touchstart', function() {
url: '/passport/reg/verifymobile',
type: 'POST',
data: {
area: country.split('+')[1],
mobile: pn
areaCode: country.split('+')[1],
phoneNum: pn
},
success: function(data) {
if (data.code === 200) {
... ...
... ... @@ -7,9 +7,9 @@
</div>
<span id="btn-ok" class="btn btn-ok disable">完成</span>
</div>
{{#if mobile}}
<input id="mobile" type="hidden" value={{mobile}}>
<input id="area" type="hidden" value={{areaCode}}>
{{#if phoneNum}}
<input id="phone-num" type="hidden" value={{phoneNum}}>
<input id="area-code" type="hidden" value={{areaCode}}>
<input id="token" type="hidden" value={{token}}>
{{/if}}
... ...
... ... @@ -11,7 +11,7 @@
<div id="captcha-tip" class="captcha-tip disable">重发验证码 (60秒)</div>
</div>
<span id="btn-next" class="btn btn-next disable row">下一步</span>
<input id="mobile" type="hidden" value={{phoneNum}}>
<input id="area" type="hidden" value={{areaCode}}>
<input id="phone-num" type="hidden" value={{phoneNum}}>
<input id="area-code" type="hidden" value={{areaCode}}>
<input id="token" type="hidden" value={{token}}>
</div>
\ No newline at end of file
... ...