Commit b7fbbe93 by 梁建民

会员认证

parent 2660f4dc
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="inquiry_form"> <div class="inquiry_form">
<div class="clr"> <div class="clr">
<h3 class="bold">认证管理</h3> <h3 class="bold">认证管理</h3>
<p class="time fr">更新时间:2019-05-27 17:27</p> <p class="time fr">更新时间:</p>
</div> </div>
<div class="gb"> <div class="gb">
<span class="icon iconfont iconjuxing19 va-m"></span> <span class="icon iconfont iconjuxing19 va-m"></span>
...@@ -101,46 +101,44 @@ ...@@ -101,46 +101,44 @@
{{# } }} {{# } }}
</script> </script>
<script type="text/html" id="listHtml"> <script type="text/html" id="listHtml">
{{# layui.each(d, function(index, item){ }}
<div class="list clr" style="margin-bottom: 40px;"> <div class="list clr" style="margin-bottom: 40px;">
<div class="fl l"> <div class="fl l">
<div class="pic lineBlock va-m"> <div class="pic lineBlock va-m">
<img src="{{item.auth_img}}" alt="{{item.company_name}}" title="{{item.company_name}}"> <img src="{{d.auth_img}}" alt="{{d.company_name}}" title="{{d.company_name}}">
</div> </div>
<div class="lineBlock va-m"> <div class="lineBlock va-m">
<p class="t1">{{item.company_name}}</p> <p class="t1">{{d.company_name}}</p>
<p class="t2"> <p class="t2">
<span class="">资质:<em>{{item.auth_type_val}}</em></span> <span class="">资质:<em>{{d.auth_type_val}}</em></span>
<span style="margin-left:90px;" class="">性质:<em>{{item.company_type_val}}</em></span> <span style="margin-left:90px;" class="">性质:<em>{{d.company_type_val}}</em></span>
</p> </p>
<div style="white-space: nowrap"> <div style="white-space: nowrap">
{{# if (item.status== 2) { }} {{# if (d.status== 2) { }}
<a href="javascript:;" class="btn lineBlock edit_info" data-id="{{item.id}}">重新提交信息</a> <a href="javascript:;" class="btn lineBlock edit_info" data-id="{{d.id}}">重新提交信息</a>
{{# } else { }} {{# } else { }}
<a href="javascript:;" class="btn lineBlock edit_info" data-id="{{item.id}}">更新认证信息</a> <a href="javascript:;" class="btn lineBlock edit_info" data-id="{{d.id}}">更新认证信息</a>
{{# } }} {{# } }}
{{# if (item.status== 2) { }} {{# if (d.status== 2) { }}
<p class="lineBlock t3 va-b"> <p class="lineBlock t3 va-b">
<i class="iconfont iconjuxing20 va-m"></i> <i class="iconfont iconjuxing20 va-m"></i>
<span>驳回理由:{{item.reject_reason}}</span> <span>驳回理由:{{d.reject_reason}}</span>
</p> </p>
{{# } }} {{# } }}
</div> </div>
</div> </div>
</div> </div>
<div class="fr r"> <div class="fr r">
{{# if (item.status== 1) { }} {{# if (d.status== 1) { }}
<img src="__PUBLIC__/images/bb.png" alt="" width="180" height="180"> <img src="__PUBLIC__/images/bb.png" alt="" width="180" height="180">
{{# } else if(item.status== 2) { }} {{# } else if(d.status== 2) { }}
<img src="__PUBLIC__/images/cc.png" alt="" width="180" height="180"> <img src="__PUBLIC__/images/cc.png" alt="" width="180" height="180">
{{# } else if(item.status== 3) { }} {{# } else if(d.status== 3) { }}
<img src="__PUBLIC__/images/sa.png" alt="" width="180" height="180"> <img src="__PUBLIC__/images/sa.png" alt="" width="180" height="180">
{{# } else { }} {{# } else { }}
<img src="__PUBLIC__/images/bb.png" alt="" width="180" height="180"> <img src="__PUBLIC__/images/bb.png" alt="" width="180" height="180">
{{# } }} {{# } }}
</div> </div>
</div> </div>
{{# }); }}
</script> </script>
</body> </body>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
//默认获取省 //默认获取省
IcController.getData(apis.regionPcd, 'POST', {token: opt.token}, function (res) { IcController.getData(apis.regionPcd, 'POST', {token: opt.token}, function (res) {
if (res.errcode == 0) { if (res.errcode === 0) {
var getTpl = provinceHtml.innerHTML; var getTpl = provinceHtml.innerHTML;
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
//获取会员信息 //获取会员信息
IcController.getData(apis.userInfo, 'GET', {token: opt.token}, function (res) { IcController.getData(apis.userInfo, 'GET', {token: opt.token}, function (res) {
if (res.errcode == 0) { if (res.errcode === 0) {
//手机号 //手机号
$("input[name='mobile']").val(res.data.mobile); $("input[name='mobile']").val(res.data.mobile);
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
IcController.getData(apis.userAccount, 'GET', params, function (res) { IcController.getData(apis.userAccount, 'GET', params, function (res) {
if (res.errcode == 0) { if (res.errcode === 0) {
layer.msg(res.errmsg); layer.msg(res.errmsg);
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
IcController.getData(apis.regionPcd, 'GET', params, function (res) { IcController.getData(apis.regionPcd, 'GET', params, function (res) {
if (res.errcode == 0) { if (res.errcode === 0) {
layui.laytpl(tpl).render(res.data, function (html) { layui.laytpl(tpl).render(res.data, function (html) {
......
...@@ -9,19 +9,22 @@ ...@@ -9,19 +9,22 @@
var id = Util.getRequest('id'); var id = Util.getRequest('id');
IcController.getData(apis.authList, 'GET', {token: opt.token}, function (res) { IcController.getData(apis.authInfo, 'GET', {token: opt.token}, function (res) {
if (res.errcode === 0) { if (res.errcode === 0) {
//更新时间
$('.time').html('更新时间:'+res.data.update_time);
//更新认证信息 //更新认证信息
if (id) { if (id) {
$(".certisno").show(); $(".certisno").show();
layui.form.val("editauth", { layui.form.val("editauth", {
"auth_type": res.data[0].auth_type, "auth_type": res.data.auth_type,
"company_type":res.data[0].company_type, "company_type": res.data.company_type,
"company_name": res.data[0].company_name "company_name": res.data.company_name
}); });
layui.form.render(); layui.form.render();
...@@ -29,7 +32,7 @@ ...@@ -29,7 +32,7 @@
} else { } else {
if (res.data.length > 0) { if (res.data) {
$(".certis").show(); $(".certis").show();
...@@ -50,6 +53,10 @@ ...@@ -50,6 +53,10 @@
} }
}else if(res.errcode === 107012){
$(".certisno").show();
} }
}); });
...@@ -82,18 +89,34 @@ ...@@ -82,18 +89,34 @@
//新增会员认证信息 //新增会员认证信息
layui.form.on('submit(addauth)', function (data) { layui.form.on('submit(addauth)', function (data) {
//编辑id
var id = Util.getRequest('id'), url = '', params;
$(data.elem).addClass("layui-btn-disabled"); $(data.elem).addClass("layui-btn-disabled");
if (!opt.isClick) { if (!opt.isClick) {
opt.isClick = true; opt.isClick = true;
var params = $.extend({}, data.field, {token: opt.token}); var param_add = $.extend({}, data.field, {token: opt.token}); //新增参数
var param_edit = $.extend({}, data.field, {token: opt.token, id: id});//编辑参数
IcController.getData(apis.addAuth, 'GET', params, function (res) { id ? url = apis.editAuth : url = apis.addAuth;
id ? params = param_edit : params = param_add;
IcController.getData(url, 'GET', params, function (res) {
if (res.errcode === 0) { if (res.errcode === 0) {
layer.msg(res.errmsg, {time: 2000}, function () {
window.location.href = '/cert';
})
} else { } else {
...@@ -108,7 +131,7 @@ ...@@ -108,7 +131,7 @@
} }
}); });
//更新认证信息 //更新认证信息按钮
$(document).on('click', '.edit_info', function (e) { $(document).on('click', '.edit_info', function (e) {
var id = $(this).attr('data-id'); var id = $(this).attr('data-id');
......
...@@ -58,9 +58,9 @@ ...@@ -58,9 +58,9 @@
*/ */
editAuth: user_url + '/user/editauth', editAuth: user_url + '/user/editauth',
/*** /***
* 获取会员认证列表 * 获取会员认证信息
*/ */
authList: user_url + '/user/authlist', authInfo: user_url + '/user/authinfo',
/*** /***
* 上传文件的接口 * 上传文件的接口
*/ */
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
//商品数量获取 //商品数量获取
IcController.getData(apis.goodsCount, 'GET', {token: opt.token}, function (res) { IcController.getData(apis.goodsCount, 'GET', {token: opt.token}, function (res) {
if (res.errcode == 0) { if (res.errcode === 0) {
var getTpl = countHtml.innerHTML; var getTpl = countHtml.innerHTML;
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
var getTpl = listHtml.innerHTML; var getTpl = listHtml.innerHTML;
if (res.errcode == 0) { if (res.errcode === 0) {
layui.laytpl(getTpl).render(res.goods_list, function (html) { layui.laytpl(getTpl).render(res.goods_list, function (html) {
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
} }
}); });
}); });
} else if (res.errcode == 110001 || res.errcode == 103001) { } else if (res.errcode === 110001 || res.errcode === 103001) {
layui.laytpl(getTpl).render([], function (html) { layui.laytpl(getTpl).render([], function (html) {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
//获取短信验证码 //获取短信验证码
IcController.getData(apis.getRegistCode, 'POST', params, function (res) { IcController.getData(apis.getRegistCode, 'POST', params, function (res) {
if (res.err_code == 0) { if (res.err_code === 0) {
$verifiCode.hide(); $verifiCode.hide();
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
IcController.getData(apis.resetPassword, 'POST', params, function (res) { IcController.getData(apis.resetPassword, 'POST', params, function (res) {
if (res.err_code == 0) { if (res.err_code === 0) {
$(".status").find('li').eq(2).addClass('curr').siblings('li').removeClass('curr'); $(".status").find('li').eq(2).addClass('curr').siblings('li').removeClass('curr');
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
$(".success").show(); $(".success").show();
} else if (res.err_code == 501) { } else if (res.err_code === 501) {
layer.msg(res.err_msg); layer.msg(res.err_msg);
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
//获取短信验证码 //获取短信验证码
IcController.getData(apis.getRegistCode, 'POST', params, function (res) { IcController.getData(apis.getRegistCode, 'POST', params, function (res) {
if (res.err_code == 0) { if (res.err_code === 0) {
$verifiCode.hide(); $verifiCode.hide();
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
IcController.getData(apis.authMobilelogin, 'POST', data.field, function (res) { IcController.getData(apis.authMobilelogin, 'POST', data.field, function (res) {
if (res.err_code == 0) { if (res.err_code === 0) {
//注入token //注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname); Util.setCookie('token', res.data.access_token, 1, cookieHostname);
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
IcController.getData(apis.authlogin, 'POST', data.field, function (res) { IcController.getData(apis.authlogin, 'POST', data.field, function (res) {
if (res.err_code == 0) { if (res.err_code === 0) {
//注入token //注入token
Util.setCookie('token', res.data.access_token, 1, cookieHostname); Util.setCookie('token', res.data.access_token, 1, cookieHostname);
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
//获取短信验证码 //获取短信验证码
IcController.getData(apis.getRegistCode, 'POST', params, function (res) { IcController.getData(apis.getRegistCode, 'POST', params, function (res) {
if (res.err_code == 0) { if (res.err_code === 0) {
$verifiCode.hide(); $verifiCode.hide();
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
IcController.getData(apis.authRegister, 'POST', data.field, function (res) { IcController.getData(apis.authRegister, 'POST', data.field, function (res) {
if (res.err_code == 0) { if (res.err_code === 0) {
//注入token //注入token
Util.setCookie('token', res.access_token, 1, cookieHostname); Util.setCookie('token', res.access_token, 1, cookieHostname);
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
$(data.elem).removeClass("layui-btn-disabled"); $(data.elem).removeClass("layui-btn-disabled");
//处理验证码不正确的时候 //处理验证码不正确的时候
if (res.err_code == 501) { if (res.err_code === 501) {
$("#verifiCode").show(); $("#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