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
26b4e91f
Commit
26b4e91f
authored
Jun 03, 2021
by
zhangtong5@yidian-inc.com
Browse files
Options
Browse Files
Download
Plain Diff
update:合并冲突
parents
49a5f22c
558bec75
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
425 additions
and
192 deletions
+425
-192
enterprise.js
server/controllers/enterprise.js
+17
-20
router.js
server/router.js
+7
-5
main.js
src/main.js
+14
-14
index.vue
src/pages/Enterprise/Audit/index.vue
+0
-11
index.vue
src/pages/Enterprise/Certification/index.vue
+130
-72
index.vue
src/pages/Enterprise/Establish/index.vue
+235
-53
enterprise.js
src/service/enterprise.js
+22
-17
No files found.
server/controllers/enterprise.js
View file @
26b4e91f
const
API_INTERNAL_URI
=
require
(
"../config.js"
).
API_INTERNAL_URI
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
// 获取企业信息验证
exports
.
entCheck
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/inner/ent_check`
;
// const url = `http://bp-test.ini.yidian-inc.com/merchant/inner/ent_check`;
const
{
user_id
}
=
ctx
.
request
.
query
;
// 获取企业信息列表
exports
.
auditList
=
async
ctx
=>
{
const
url
=
`
${
API_INTERNAL_URI
}
/merchant/inner/audit_list`
;
const
opts
=
{
url
:
url
,
method
:
"GET"
,
qs
:
{
user_id
}
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
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"
,
...
...
@@ -28,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 @
26b4e91f
...
...
@@ -10,11 +10,7 @@ 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
}
/certification`
,
enterprise
.
entCheck
);
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
.
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
)
...
...
@@ -22,6 +18,12 @@ 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
}
/merchant/authority/delete_role`
,
role
.
getDelete_role
)
/* 企业认证 */
router
.
post
(
`
${
API_VERSION
}
/certification`
,
enterprise
.
auditList
);
router
.
post
(
`
${
API_VERSION
}
/emterprise_commit`
,
enterprise
.
entCommit
);
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/main.js
View file @
26b4e91f
import
{
createApp
}
from
'vue'
;
import
App
from
'./App.vue'
;
import
router
from
'./router'
;
import
store
from
'./store'
;
import
ElementPlus
from
'element-plus'
;
import
{
createApp
}
from
"vue"
;
import
App
from
"./App.vue"
;
import
router
from
"./router"
;
import
store
from
"./store"
;
import
ElementPlus
from
"element-plus"
;
import
'element-plus/lib/theme-chalk/index.css'
;
import
'dayjs/locale/zh-cn'
;
import
locale
from
'element-plus/lib/locale/lang/zh-cn'
;
import
"element-plus/lib/theme-chalk/index.css"
;
import
"dayjs/locale/zh-cn"
;
import
locale
from
"element-plus/lib/locale/lang/zh-cn"
;
import
{
fetchCurrentUser
}
from
'./service/user'
;
import
{
checkPathAuth
}
from
'./utils/authUtil'
;
import
{
redirectToLogin
}
from
'./utils/util'
;
/* import { fetchCurrentUser } from "./service/user"
;
import { checkPathAuth } from
"./utils/authUtil"
;
import { redirectToLogin } from
"./utils/util"; */
// 处理路由权限
router
.
beforeResolve
(
async
(
to
,
from
,
next
)
=>
{
/*
router.beforeResolve(async (to, from, next) => {
if (to.meta.requireAuth && !store.state.permissions) {
const { status, user } = await fetchCurrentUser();
if (status === 'success') {
...
...
@@ -31,10 +31,10 @@ router.beforeResolve(async (to, from, next) => {
} else {
next()
}
})
})
*/
createApp
(
App
)
.
use
(
router
)
.
use
(
store
)
.
use
(
ElementPlus
,
{
locale
})
.
mount
(
'#app'
);
.
mount
(
"#app"
);
src/pages/Enterprise/Audit/index.vue
View file @
26b4e91f
...
...
@@ -290,17 +290,6 @@
align=
"center"
prop=
"adminId"
></el-table-column>
<el-table-column
label=
"创建生活号"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-button
type=
"primary"
@
click=
"onCreateLife(scope.row)"
>
创建生活号
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-card>
<!-- 查看详情__创建生活号表单 -->
...
...
src/pages/Enterprise/Certification/index.vue
View file @
26b4e91f
This diff is collapsed.
Click to expand it.
src/pages/Enterprise/Establish/index.vue
View file @
26b4e91f
This diff is collapsed.
Click to expand it.
src/service/enterprise.js
View file @
26b4e91f
...
...
@@ -3,31 +3,36 @@
*/
import
axios
from
"../utils/request"
;
// 获取审核列表
// export async function auditList (params) {
// const res = await axios.post(``)
// }
// 企业信息检查
export
async
function
entCheck
(
user_id
)
{
const
res
=
await
axios
.
get
(
`/api/v1/certification`
,
{
params
:
{
user_id
}
});
/**
* 获取企业信息列表
* @param query
*/
export
async
function
auditList
(
params
)
{
const
res
=
await
axios
.
post
(
`/api/v1/certification`
,
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