Commit 6b1a42df by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsales

parents 31b0d1c9 9b294834
...@@ -2,79 +2,59 @@ ...@@ -2,79 +2,59 @@
<html lang="zh-CN"> <html lang="zh-CN">
<head> <head>
<include file="public/header" /> <include file="public/header"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/certification.css"> <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/certification.css">
</head> </head>
<body> <body>
<div class="wrapper"> <div class="wrapper">
<include file="public/navleft" /> <include file="public/navleft"/>
<div class="wrapper_right"> <div class="wrapper_right">
<include file="public/top" /> <include file="public/top"/>
<div class="right_content certification_content"> <div class="right_content certification_content">
<div class="content layui-form"> <div class="content layui-form">
<div class="nav_title">认证管理 > 我的认证 > 添加认证</div> <div class="nav_title">认证管理 > 我的认证 > 添加认证</div>
<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>
<span>请如实填写认证信息,不符合的认证将被拒绝</span> <span>请如实填写认证信息,不符合的认证将被拒绝</span>
</div> </div>
<div class="certification-show clr" style="display: none"> <div class="certis certification-show clr" style="display: none"></div>
<div class="fl l"> <div class="certisno form_content clr layui-form" style="display: none;" lay-filter="editauth">
<div class="pic lineBlock va-m"> <div class="form_left fl">
<img src="__PUBLIC__/images/test.jpg" alt=""> <div class="hq input_div">
</div>
<div class="lineBlock va-m">
<p class="t1">深圳市猎芯科技有限公司</p>
<p class="t2">
<span class="">资质:<em>企业认证</em></span>
<span style="margin-left:90px;" class="">性质:<em>贸易商</em></span>
</p>
<div style="white-space: nowrap">
<a href="javascript:;" class="btn lineBlock">更新认证信息</a>
<p class="lineBlock t3 va-b">
<i class="iconfont iconjuxing20 va-m"></i>
<span>驳回理由:上传的资料不清晰,无法确认资质。</span>
</p>
</div>
</div>
</div>
<div class="fr r">
<img src="__PUBLIC__/images/sa.png" alt="" width="180" height="180">
</div>
</div>
<div class="form_content clr" style="display: block;">
<div class="form_left fl layui-form">
<div class="hq input_div ">
<span class="input_title lineBlock">认证类型:</span> <span class="input_title lineBlock">认证类型:</span>
<div class="input_parent"> <div class="input_parent">
<input type="radio" name="auth_type" value="2" title="企业"> <input type="radio" name="auth_type" value="2" title="企业" lay-filter="auth_type"/>
<input type="radio" name="auth_type" value="1" title="个人" checked> <input type="radio" name="auth_type" value="1" title="个人" checked lay-filter="auth_type"/>
</div> </div>
</div> </div>
<div class="hq input_div "> <div class="cert_data">
<span class="input_title lineBlock">经营性质:</span> <div class="hq input_div ">
<div class="input_parent"> <span class="input_title lineBlock">经营性质:</span>
<input type="radio" name="sex" value="" title="个人" checked> <div class="input_parent">
<input type="radio" name="company_type" value="5" title="个人" checked>
</div>
</div> </div>
</div> <div class="xh input_div ">
<div class="xh input_div "> <span class="input_title lineBlock">个人名称:</span>
<span class="input_title lineBlock">个人名称:</span> <div class="input_parent">
<div class="input_parent"> <input type="text" placeholder="请输入个人名称" class="input boxsiz" name="company_name">
<input type="text" placeholder="请输入个人名称" class="input boxsiz"> </div>
</div> </div>
</div> </div>
<div class="btn_div"> <div class="btn_div">
<span class="lineBlock fb boxsiz">提交认证</span> <span class="lineBlock fb boxsiz" lay-submit lay-filter="addauth">提交认证</span>
<span class="lineBlock cz boxsiz">重置</span> <span class="lineBlock cz boxsiz">重置</span>
</div> </div>
</div> </div>
<div class="form_right fl "> <div class="form_right fl ">
<div class="sc"> <div class="sc">
<input type="hidden" name="auth_img" value="1.jpg">
<div class="icon iconfont iconjuxing16"></div> <div class="icon iconfont iconjuxing16"></div>
<p>上传资料</p> <p>上传资料</p>
</div> </div>
...@@ -86,7 +66,80 @@ ...@@ -86,7 +66,80 @@
</div> </div>
</div> </div>
</div> </div>
<include file="public/foot" /> <include file="public/foot"/>
<script src="__PUBLIC__/js/certification/index.js"></script>
<script type="text/html" id="certtHtml">
{{# if (d == '1') { }}
<div class="hq input_div ">
<span class="input_title lineBlock">经营性质:</span>
<div class="input_parent">
<input type="radio" name="company_type" value="5" title="个人" checked>
</div>
</div>
<div class="xh input_div ">
<span class="input_title lineBlock">个人名称:</span>
<div class="input_parent">
<input type="text" placeholder="请输入个人名称" class="input boxsiz" name="company_name">
</div>
</div>
{{# } else { }}
<div class="hq input_div ">
<span class="input_title lineBlock">经营性质:</span>
<div class="input_parent">
<input type="radio" name="company_type" value="1" title="贸易商" checked/>
<input type="radio" name="company_type" value="2" title="代理商"/>
<input type="radio" name="company_type" value="3" title="原厂"/>
<input type="radio" name="company_type" value="4" title="制造商"/>
</div>
</div>
<div class="xh input_div ">
<span class="input_title lineBlock">个人名称:</span>
<div class="input_parent">
<input type="text" placeholder="请输入公司名称" class="input boxsiz" name="company_name">
</div>
</div>
{{# } }}
</script>
<script type="text/html" id="listHtml">
<div class="list clr" style="margin-bottom: 40px;">
<div class="fl l">
<div class="pic lineBlock va-m">
<img src="{{d.auth_img}}" alt="{{d.company_name}}" title="{{d.company_name}}">
</div>
<div class="lineBlock va-m">
<p class="t1">{{d.company_name}}</p>
<p class="t2">
<span class="">资质:<em>{{d.auth_type_val}}</em></span>
<span style="margin-left:90px;" class="">性质:<em>{{d.company_type_val}}</em></span>
</p>
<div style="white-space: nowrap">
{{# if (d.status== 2) { }}
<a href="javascript:;" class="btn lineBlock edit_info" data-id="{{d.id}}">重新提交信息</a>
{{# } else { }}
<a href="javascript:;" class="btn lineBlock edit_info" data-id="{{d.id}}">更新认证信息</a>
{{# } }}
{{# if (d.status== 2) { }}
<p class="lineBlock t3 va-b">
<i class="iconfont iconjuxing20 va-m"></i>
<span>驳回理由:{{d.reject_reason}}</span>
</p>
{{# } }}
</div>
</div>
</div>
<div class="fr r">
{{# if (d.status== 1) { }}
<img src="__PUBLIC__/images/bb.png" alt="" width="180" height="180">
{{# } else if(d.status== 2) { }}
<img src="__PUBLIC__/images/cc.png" alt="" width="180" height="180">
{{# } else if(d.status== 3) { }}
<img src="__PUBLIC__/images/sa.png" alt="" width="180" height="180">
{{# } else { }}
<img src="__PUBLIC__/images/bb.png" alt="" width="180" height="180">
{{# } }}
</div>
</div>
</script>
</body> </body>
</html> </html>
\ No newline at end of file
No preview for this file type
...@@ -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);
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
//监听消息推送 //监听消息推送
Observer.on('switch', function (e) { Observer.on('switch', function (e) {
IcController.getData(apis.userSetmsg, 'POST', {token: opt.token, type: e.args.type, is_open: e.args.data}, function (res) { IcController.getData(apis.userSetmsg, 'GET', {token: opt.token, type: e.args.type, is_open: e.args.data}, function (res) {
if (res.errcode == 0) { if (res.errcode == 0) {
...@@ -141,9 +141,9 @@ ...@@ -141,9 +141,9 @@
var params = $.extend({}, data.field, {token: opt.token}); var params = $.extend({}, data.field, {token: opt.token});
IcController.getData(apis.userAccount, 'POST', 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);
...@@ -203,9 +203,9 @@ ...@@ -203,9 +203,9 @@
}; };
IcController.getData(apis.regionPcd, 'POST', 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) {
......
!function () {
window.CertificationController = {
isClick: false,
token: Util.getCookie('token') || '',
init: function () {
this.created(this).mounted(this).handleBind(this);
},
created: function (opt) {
var id = Util.getRequest('id');
IcController.getData(apis.authInfo, 'GET', {token: opt.token}, function (res) {
if (res.errcode === 0) {
//更新时间
$('.time').html('更新时间:' + res.data.update_time);
//更新认证信息
if (id) {
$(".certisno").show();
layui.form.val("editauth", {
"auth_type": res.data.auth_type,
"company_type": res.data.company_type,
"company_name": res.data.company_name
});
layui.form.render();
} else {
if (res.data) {
$(".certis").show();
var getTpl = listHtml.innerHTML;
layui.laytpl(getTpl).render(res.data, function (html) {
$(".certis").empty().html(html);
});
} else {
$(".certisno").show();
}
}
} else if (res.errcode === 107012) {
$(".certisno").show();
}
});
return this;
},
mounted: function (opt) {
return this;
},
handleBind: function (opt) {
//认证类型
layui.form.on('radio(auth_type)', function (data) {
var getTpl = certtHtml.innerHTML;
layui.laytpl(getTpl).render(data.value, function (html) {
$(".cert_data").empty().html(html);
layui.form.render();
});
});
//新增会员认证信息
layui.form.on('submit(addauth)', function (data) {
$(data.elem).addClass("layui-btn-disabled");
if (!opt.isClick) {
opt.isClick = true;
var params = $.extend({}, data.field, {token: opt.token}); //新增参数
IcController.getData(apis.addAuth, 'GET', params, function (res) {
if (res.errcode === 0) {
layer.msg(res.errmsg, {time: 2000}, function () {
window.location.href = '/cert';
})
} else {
layer.msg(res.errmsg);
opt.isClick = false;
$(data.elem).removeClass("layui-btn-disabled");
}
});
}
});
//更新认证信息按钮
$(document).on('click', '.edit_info', function (e) {
var id = $(this).attr('data-id');
window.location.href = '/cert?id=' + id;
});
return this;
},
}, $(function () {
CertificationController.init();
})
}();
\ No newline at end of file
...@@ -50,6 +50,18 @@ ...@@ -50,6 +50,18 @@
*/ */
authme: auth_url + '/auth/me', authme: auth_url + '/auth/me',
/*** /***
* 新增会员认证信息
*/
addAuth: user_url + '/user/addauth',
/***
* 更新会员认证信息
*/
editAuth: user_url + '/user/editauth',
/***
* 获取会员认证信息
*/
authInfo: user_url + '/user/authinfo',
/***
* 上传文件的接口 * 上传文件的接口
*/ */
ossupload: goods_url + '/oss/upload', ossupload: goods_url + '/oss/upload',
...@@ -70,9 +82,12 @@ ...@@ -70,9 +82,12 @@
*/ */
goodsAdd: goods_url + '/goods/add', goodsAdd: goods_url + '/goods/add',
/** /**
* 商品修改 * 批量上传
*/ */
bulkupload: goods_url + '/goods/upload', bulkupload: goods_url + '/goods/upload',
/**
* 商品修改
*/
goodsSave: goods_url + '/goods/save', goodsSave: goods_url + '/goods/save',
/**** /****
* 询价搜索 不需要token * 询价搜索 不需要token
......
...@@ -71,8 +71,7 @@ ...@@ -71,8 +71,7 @@
//获取用户信息 //获取用户信息
this.getData(apis.userInfo, 'GET', {token: Util.getCookie('token') || ''}, function (res) { this.getData(apis.userInfo, 'GET', {token: Util.getCookie('token') || ''}, function (res) {
if (res.errcode === 0) {
if (res.errcode == 0) {
//消息数量 //消息数量
$("#count_num").empty().html(res.data['msg_notification']); $("#count_num").empty().html(res.data['msg_notification']);
...@@ -135,7 +134,7 @@ ...@@ -135,7 +134,7 @@
opt.getData(apis.authLogout, 'POST', null, function (res) { opt.getData(apis.authLogout, 'POST', null, function (res) {
if (res.err_code == 0) { if (res.err_code === 0) {
Util.delCookie('token', cookieHostname); Util.delCookie('token', cookieHostname);
......
...@@ -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) {
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
IcController.getData(apis.goodsAdd, 'POST', params, function (res) { IcController.getData(apis.goodsAdd, 'POST', params, function (res) {
if (res.errcode == 0) { if (res.errcode === 0) {
layer.msg('上传商品成功', {time: 2000}, function () { layer.msg('上传商品成功', {time: 2000}, function () {
......
...@@ -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