Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
op-web-service
Commits
da10c3ba
Commit
da10c3ba
authored
Jun 03, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature:企业认证列表接口对接完成
parent
6e4cbdc7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
121 additions
and
66 deletions
+121
-66
enterprise.js
server/controllers/enterprise.js
+11
-11
router.js
server/router.js
+10
-8
index.vue
src/pages/Enterprise/Certification/index.vue
+84
-38
enterprise.js
src/service/enterprise.js
+16
-9
No files found.
server/controllers/enterprise.js
View file @
da10c3ba
...
...
@@ -5,7 +5,7 @@ const req = require("../utils/request").httpReq;
exports
.
auditList
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/inner/audit_list`
;
const
opts
=
{
url
:
url
,
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
...
...
@@ -13,9 +13,9 @@ exports.auditList = async ctx => {
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 企业
信息提交
exports
.
entCommit
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/
inner/ent_commit
`
;
// 企业
认证获取验证码
exports
.
sendCode
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/
lifeinner/send_code
`
;
const
opts
=
{
url
,
method
:
"POST"
,
...
...
@@ -25,21 +25,21 @@ exports.entCommit = async ctx => {
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
//
生活号检查
exports
.
check
Lif
e
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/
enterprise/check_lif
e`
;
//
企业认证校验验证码
exports
.
check
Cod
e
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/
lifeinner/check_cod
e`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
)
;
ctx
.
body
=
await
req
(
ctx
,
opts
)
};
//
创建生活号
exports
.
createLife
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/
enterprise/create_life
`
;
//
企业信息提交
exports
.
entCommit
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/
inner/ent_commit
`
;
const
opts
=
{
url
,
method
:
"POST"
,
...
...
server/router.js
View file @
da10c3ba
...
...
@@ -10,16 +10,18 @@ const API_VERSION = "/api/v1";
// router.post(`${API_VERSION}/login`, system.login);
router
.
get
(
`
${
API_VERSION
}
/fetch_user`
,
system
.
fetch_user
);
router
.
get
(
`
${
API_VERSION
}
/user/:type`
,
user
.
query
)
router
.
get
(
`
${
API_VERSION
}
/user/:type`
,
user
.
query
);
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/role_list`
,
role
.
getRole_list
);
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/add_role`
,
role
.
getAdd_role
);
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/update_role`
,
role
.
getUpdate_role
);
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/get_role_list`
,
role
.
getAll_role_list
);
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/get_role_info`
,
role
.
get_role_info
);
/* 企业认证 */
router
.
post
(
`
${
API_VERSION
}
/certification`
,
enterprise
.
auditList
);
router
.
post
(
`
${
API_VERSION
}
/emterprise_commit`
,
enterprise
.
entCommit
);
router
.
post
(
`
${
API_VERSION
}
/check_life`
,
enterprise
.
checkLife
);
router
.
post
(
`
${
API_VERSION
}
/create_life`
,
enterprise
.
createLife
);
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/role_list`
,
role
.
getRole_list
)
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/add_role`
,
role
.
getAdd_role
)
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/update_role`
,
role
.
getUpdate_role
)
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/get_role_list`
,
role
.
getAll_role_list
)
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/get_role_info`
,
role
.
get_role_info
)
router
.
post
(
`
${
API_VERSION
}
/send_code`
,
enterprise
.
sendCode
);
router
.
post
(
`
${
API_VERSION
}
/check_code`
,
enterprise
.
checkCode
);
//生活号
router
.
post
(
`
${
API_VERSION
}
/merchant/lifeinner/life_info`
,
life
.
get_life_info
)
router
.
get
(
`
${
API_VERSION
}
/merchant/lifeinner/life_list`
,
life
.
get_life_list
)
...
...
src/pages/Enterprise/Certification/index.vue
View file @
da10c3ba
...
...
@@ -27,7 +27,7 @@
label=
"法人或经营者姓名:"
prop=
"userName"
>
<el-input
v-model=
"enterpriseForm.legal
P
erson"
></el-input>
<el-input
v-model=
"enterpriseForm.legal
_p
erson"
></el-input>
</el-form-item>
<el-form-item
label=
"审核状态:"
>
<el-select
...
...
@@ -56,10 +56,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"提交人账号:"
>
<el-input
type=
"text"
v-model=
"enterpriseForm.proxy_user_name"
></el-input>
<el-input
v-model=
"enterpriseForm.proxy_user_name"
></el-input>
</el-form-item>
</div>
<!-- 按钮区域 -->
...
...
@@ -68,6 +65,7 @@
<el-button
type=
"primary"
class=
"inquire"
@
click=
"queryMessage"
>
查询
</el-button>
</el-form-item>
<el-form-item>
...
...
@@ -85,13 +83,20 @@
>
<el-table-column
label=
"ID"
prop=
"id"
prop=
"
enterprise_auth_record_
id"
align=
"center"
></el-table-column>
<el-table-column
label=
"审核状态"
align=
"center"
></el-table-column>
>
<template
#
default=
"scope"
>
<span
v-if=
"scope.row.audit_status === 5"
>
编辑中
</span>
<span
v-if=
"scope.row.audit_status === 10"
>
身份证校验通过待平台审核
</span>
<span
v-if=
"scope.row.audit_status === 20"
>
审核成功
</span>
<span
v-if=
"scope.row.audit_status === 30"
>
审核失败
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"企业注册名称"
prop=
"name"
...
...
@@ -104,22 +109,28 @@
></el-table-column>
<el-table-column
label=
"法人或经营者姓名"
prop=
"
userName
"
prop=
"
legal_person
"
align=
"center"
></el-table-column>
<el-table-column
label=
"提交日期"
prop=
"
dat
e"
prop=
"
audit_tim
e"
align=
"center"
></el-table-column>
<el-table-column
label=
"提交类型"
prop=
"type"
align=
"center"
></el-table-column>
>
<
template
#
default=
"scope"
>
<span
v-if=
"scope.row.data_from === 1"
>
生活圈c端
</span>
<span
v-if=
"scope.row.data_from === 2"
>
销售端b端
</span>
<span
v-if=
"scope.row.data_from === 3"
>
内部代提交
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"提交人账号"
align=
"center"
prop=
"proxy_user_name"
></el-table-column>
<el-table-column
label=
"操作"
...
...
@@ -130,18 +141,19 @@
<el-button
size=
"mini"
type=
"primary"
@
click=
"goAuditPage('AUDIT', scope.row.id)"
@
click=
"goAuditPage('AUDIT', scope.row.
enterprise_auth_record_
id)"
>
审核
</el-button>
<el-button
disabled
size=
"mini"
type=
"success"
@
click=
"goAuditPage('EDIT', scope.row.id)"
@
click=
"goAuditPage('EDIT', scope.row.
enterprise_auth_record_
id)"
>
修改提交
</el-button>
<el-button
size=
"mini"
type=
"warning"
@
click=
"goAuditPage('DETAIL', scope.row.id)"
@
click=
"
goAuditPage('DETAIL', scope.row.enterprise_auth_record_id)
"
>
查看详情
</el-button>
</
template
>
</el-table-column>
...
...
@@ -152,7 +164,7 @@
v-model:currentPage=
"currentPage"
layout=
"total,prev,pager,next"
:page-size=
"pageSize"
:total=
"
100
"
:total=
"
totalCount
"
></el-pagination>
</el-card>
<!-- 修改提交验证码弹框 -->
...
...
@@ -163,6 +175,7 @@
<el-input
style=
"width:50%"
placeholder=
"请输入您收到的验证码"
v-model=
"checkIsCode"
></el-input>
<el-button
type=
"primary"
...
...
@@ -181,7 +194,7 @@
<
script
>
import
Layout
from
"@/layouts"
;
import
{
auditList
}
from
"@/service/enterprise"
;
import
{
auditList
,
sendCode
,
checkCode
}
from
"@/service/enterprise"
;
export
default
{
name
:
"Certification"
,
components
:
{
Layout
},
...
...
@@ -192,7 +205,6 @@ export default {
name
:
""
,
code
:
""
,
legal_person
:
""
,
type
:
""
,
audit_status
:
null
,
data_form
:
null
,
proxy_user_name
:
null
,
...
...
@@ -210,16 +222,16 @@ export default {
},
// 企业认证管理列表
enterpriseList
:
[
{
id
:
1
}
],
enterpriseList
:
[],
detailDialogVisible
:
false
,
// 跳转详情页弹窗
currentPage
:
1
,
// 当前页
detailDialogVisible
:
false
,
// 跳转详情页弹窗
currentPage
:
1
,
// 当前页
pageSize
:
20
,
// 每页条数
totalCount
:
0
// 总条数
totalCount
:
0
,
// 总条数
auditId
:
0
,
// 要操作的企业信息id
checkIsCode
:
""
// 用户修改操作的验证码
};
},
...
...
@@ -230,6 +242,7 @@ export default {
methods
:
{
// 获取商户认证检查信息
async
getEnterpriseList
()
{
this
.
enterpriseList
=
[];
// 重置表格
const
{
name
,
code
,
...
...
@@ -248,12 +261,16 @@ export default {
data_form
,
// 提交类型
proxy_user_name
// 提交人账号
};
console
.
log
(
params
);
const
res
=
await
auditList
(
params
);
console
.
log
(
res
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
result
);
this
.
enterpriseList
=
res
.
result
.
data
;
this
.
total
try
{
const
res
=
await
auditList
(
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
result
);
this
.
enterpriseList
=
res
.
result
.
data
;
this
.
totalCount
=
res
.
result
.
count
;
console
.
log
(
res
);
}
catch
(
err
)
{
this
.
$message
.
error
(
"发生未知错误"
);
console
.
log
(
err
);
}
},
// 重置表单
...
...
@@ -269,6 +286,8 @@ export default {
// 跳转到审核页面
goAuditPage
(
pageStatus
,
auditId
)
{
if
(
pageStatus
===
"EDIT"
)
{
console
.
log
(
auditId
);
this
.
auditId
=
auditId
;
return
(
this
.
detailDialogVisible
=
true
);
}
else
{
this
.
$router
.
push
({
name
:
"Audit"
,
params
:
{
pageStatus
,
auditId
}
});
...
...
@@ -276,19 +295,46 @@ export default {
},
// 获取验证码
getAuthCode
()
{
},
async
getAuthCode
()
{
console
.
log
(
this
.
auditId
);
try
{
const
res
=
await
sendCode
(
this
.
auditId
);
console
.
log
(
res
);
}
catch
(
err
)
{
console
.
log
(
err
);
}
},
// 校验验证码
checkAuthCode
()
{
this
.
$router
.
push
({
name
:
"Audit"
,
params
:
{
pageStatus
:
"EDIT"
,
auditId
:
1
}
});
async
checkAuthCode
()
{
if
(
this
.
checkIsCode
.
length
===
0
)
{
return
this
.
$message
.
error
(
"验证码不可为空"
);
}
else
{
try
{
const
parasm
=
{
enterprise_auth_record_id
:
this
.
auditId
,
code
:
parseInt
(
this
.
checkIsCode
)
};
const
res
=
await
checkCode
(
parasm
);
console
.
log
(
res
);
}
catch
(
error
)
{
console
.
log
(
error
);
}
this
.
$router
.
push
({
name
:
"Audit"
,
params
:
{
pageStatus
:
"EDIT"
,
auditId
:
this
.
auditId
}
});
}
},
// 换页操作
handleCurrentChange
(
e
)
{
this
.
currentPage
=
e
;
// 更换页码
this
.
getEnterpriseList
();
// 加载数据
},
// 查询列表
queryMessage
()
{
this
.
getEnterpriseList
();
// 加载数据
}
}
};
...
...
src/service/enterprise.js
View file @
da10c3ba
...
...
@@ -12,20 +12,27 @@ export async function auditList (params) {
return
res
;
}
// 发送企业信息认证
export
async
function
entCommit
(
query
)
{
const
res
=
await
axios
.
post
(
`/api/v1/emterprise_commit`
,
{
query
});
/**
* 企业认证审核获取验证码
* @param enterprise_auth_record_id 企业认证审核id
*/
export
async
function
sendCode
(
enterprise_auth_record_id
)
{
const
res
=
await
axios
.
post
(
`/api/v1/send_code`
,
enterprise_auth_record_id
);
return
res
;
}
// 检查生活号信息唯一性
export
async
function
checkLife
(
life_account_name
)
{
const
res
=
await
axios
.
post
(
`/api/v1/check_life`
,
{
life_account_name
});
/**
* 企业认证检测验证码
* @param enterprise_auth_record_id 企业认证审核id
* @param code 验证码
*/
export
async
function
checkCode
(
params
)
{
const
res
=
await
axios
.
post
(
`/api/v1/check_code`
,
params
);
return
res
;
}
//
创建生活号
export
async
function
createLife
(
params
)
{
const
res
=
await
axios
.
post
(
`/api/v1/
create_life`
,
{
params
}
);
//
发送企业信息认证
export
async
function
entCommit
(
query
)
{
const
res
=
await
axios
.
post
(
`/api/v1/
emterprise_commit`
,
query
);
return
res
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment