Commit f4186410 by 梁建民

errcode改

parent 43b35f93
......@@ -34,7 +34,7 @@ $(function () {
IcController.getData(apis.authme, 'GET', {
"token": Util.getCookie('token') || '',
}, function (res) {
if (res.err_code == 0) {
if (res.errcode == 0) {
self.img = res.data.avatar;
self.name = res.data.company_name || '--';
self.id = res.data.user_id + '';
......
......@@ -46,7 +46,7 @@
success: function (data) {
//处理token失效的情况
if (data.errcode === 501 || data.err_code === 501) {
if (data.errcode === 501 || data.errcode === 501) {
layer.msg('登录已失效,请重新登录', {
time: 600
......@@ -194,7 +194,7 @@
opt.getData(apis.authLogout, 'POST', null, function (res) {
if (res.err_code === 0) {
if (res.errcode === 0) {
Util.delCookie('token', cookieHostname);
......
......@@ -65,10 +65,13 @@
setTimeout(function () {
if (res['goods_list'][id].delivery_time.indexOf('天') != -1 ) {
layui.form.val("goodsave", {
"day": res['goods_list'][id].delivery_time.replace('天', '')
});
}
}, 1000);
......
......@@ -15,7 +15,7 @@ $(function () {
},
function (res) {
var hotHtml = hotTpl.innerHTML;
if (res.err_code === 0) {
if (res.errcode === 0) {
if (res.data.length) {
layui.laytpl(hotHtml).render(res.data, function (html) {
$(".search_command").empty().html(html);
......
......@@ -43,7 +43,7 @@
//获取短信验证码
IcController.getData(apis.getRegistCode, 'POST', params, function (res) {
if (res.err_code === 0) {
if (res.errcode === 0) {
$verifiCode.hide();
......@@ -287,7 +287,7 @@
IcController.getData(apis.resetPassword, 'POST', params, function (res) {
if (res.err_code === 0) {
if (res.errcode === 0) {
$(".status").find('li').eq(2).addClass('curr').siblings('li').removeClass('curr');
......@@ -297,7 +297,7 @@
$(".success").show();
} else if (res.err_code === 501) {
} else if (res.errcode === 501) {
layer.msg(res.err_msg);
......
......@@ -56,7 +56,7 @@
//获取短信验证码
IcController.getData(apis.getRegistCode, 'POST', params, function (res) {
if (res.err_code === 0) {
if (res.errcode === 0) {
$verifiCode.hide();
......@@ -272,7 +272,7 @@
IcController.getData(apis.authMobilelogin, 'POST', data.field, function (res) {
if (res.err_code === 0) {
if (res.errcode === 0) {
//注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname);
......@@ -308,7 +308,7 @@
IcController.getData(apis.authlogin, 'POST', data.field, function (res) {
if (res.err_code === 0) {
if (res.errcode === 0) {
//注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname);
......
......@@ -43,7 +43,7 @@
//获取短信验证码
IcController.getData(apis.getRegistCode, 'POST', params, function (res) {
if (res.err_code === 0) {
if (res.errcode === 0) {
$verifiCode.hide();
......@@ -267,7 +267,7 @@
IcController.getData(apis.authRegister, 'POST', data.field, function (res) {
if (res.err_code === 0) {
if (res.errcode === 0) {
//注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname);
......@@ -284,7 +284,7 @@
$(data.elem).removeClass("layui-btn-disabled");
//处理验证码不正确的时候
if (res.err_code === 501) {
if (res.errcode === 501) {
$("#verifiCode").show();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment