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
1141b317
Commit
1141b317
authored
Jun 01, 2021
by
zhangtong5@yidian-inc.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:生活号接口联调完善&&用户详情接口完善&&角色创建&&列表接口完善
parent
04e74b14
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
281 additions
and
168 deletions
+281
-168
life-no.js
server/controllers/life-no.js
+14
-1
role.js
server/controllers/role.js
+11
-12
user.js
server/controllers/user.js
+18
-2
router.js
server/router.js
+4
-3
lifeNoInfo.vue
src/pages/Life-no/components/lifeNoInfo.vue
+0
-97
index.vue
src/pages/Life-no/index.vue
+4
-3
life-no-detail.vue
src/pages/Life-no/life-no-detail.vue
+85
-6
add-role.vue
src/pages/Role/add-role.vue
+16
-15
role-detail.vue
src/pages/Role/role-detail.vue
+77
-0
user-detail.vue
src/pages/User/user-detail.vue
+30
-27
index.js
src/router/index.js
+6
-0
life-no.js
src/service/life-no.js
+7
-0
role.js
src/service/role.js
+2
-2
user.js
src/service/user.js
+7
-0
No files found.
server/controllers/life-no.js
View file @
1141b317
const
LOGIN_URI
=
require
(
'../config.js'
).
LOGIN_URI
const
API_INTERNAL_URI
=
require
(
'../config.js'
).
API_INTERNAL_URI
//生活号列表
const
req
=
require
(
'../utils/request'
).
httpReq
exports
.
get_life_list
=
async
(
ctx
,
next
)
=>
{
...
...
@@ -11,4 +12,16 @@ exports.get_life_list = async (ctx, next) => {
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
\ No newline at end of file
}
//生活号详情
exports
.
get_life_info
=
async
(
ctx
,
next
)
=>
{
var
url
=
`
${
API_INTERNAL_URI
}
/merchant/lifeinner/life_info`
;
var
opts
=
{
url
:
url
,
method
:
'POST'
,
json
:
true
,
timeout
:
8000
,
body
:
ctx
.
request
.
body
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
server/controllers/role.js
View file @
1141b317
...
...
@@ -17,25 +17,30 @@ exports.getRole_list = async (ctx, next) => {
var
opts
=
{
url
:
url
,
method
:
'POST'
,
json
:
true
,
body
:
ctx
.
request
.
body
}
console
.
log
(
'server getlist_role::::'
,
opts
)
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
exports
.
get
_role_info
=
async
(
ctx
,
next
)
=>
{
var
url
=
`
${
API_INTERNAL_URI
}
/merchant/authority/
get_role_info
`
;
exports
.
get
Add_role
=
async
(
ctx
,
next
)
=>
{
var
url
=
`
${
API_INTERNAL_URI
}
/merchant/authority/
add_role
`
;
var
opts
=
{
url
:
url
,
method
:
'POST'
,
json
:
true
,
body
:
ctx
.
request
.
body
}
console
.
log
(
'server getAdd_role::::'
,
opts
)
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
exports
.
get
Add_role
=
async
(
ctx
,
next
)
=>
{
var
url
=
`
${
API_INTERNAL_URI
}
/merchant/authority/
add_role
`
;
exports
.
get
_role_info
=
async
(
ctx
,
next
)
=>
{
var
url
=
`
${
API_INTERNAL_URI
}
/merchant/authority/
get_role_info
`
;
var
opts
=
{
url
:
url
,
method
:
'POST'
,
json
:
true
,
timeout
:
8000
,
body
:
ctx
.
request
.
body
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
...
...
@@ -45,14 +50,8 @@ exports.getUpdate_role = async (ctx, next) => {
var
opts
=
{
url
:
url
,
method
:
'POST'
,
json
:
true
,
body
:
ctx
.
request
.
body
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
exports
.
getUser_detail
=
async
(
ctx
,
next
)
=>
{
var
url
=
`
${
API_INTERNAL_URI
}
/merchant/lifeinner/life_info`
;
var
opts
=
{
url
:
url
,
method
:
'POST'
,
}
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
\ No newline at end of file
server/controllers/user.js
View file @
1141b317
const
{
API_INTERNAL_URI
}
=
require
(
"../config.js"
);
const
req
=
require
(
"../utils/request"
).
httpReq
;
const
API_INTERNAL_URI
=
require
(
'../config.js'
).
API_INTERNAL_URI
const
req
=
require
(
'../utils/request'
).
httpReq
//用户详情
exports
.
getUser_detail
=
async
(
ctx
,
next
)
=>
{
var
url
=
`
${
API_INTERNAL_URI
}
/merchant/authority/get_user_info`
;
var
opts
=
{
url
:
url
,
method
:
'POST'
,
json
:
true
,
timeout
:
8000
,
body
:
ctx
.
request
.
body
}
console
.
log
(
ctx
,
'ctxctxctx'
)
console
.
log
(
opts
,
'optsoptsopts'
)
ctx
.
body
=
await
req
(
ctx
,
opts
)
}
var
query
=
{
async
get_permissions
(
ctx
)
{
// http://bp-test.ini.yidian-inc.com/merchant/authority/get_role_list?user_email=jianghaiming@126.com
...
...
@@ -35,3 +50,4 @@ exports.query = async (ctx, next) => {
};
}
};
server/router.js
View file @
1141b317
...
...
@@ -15,14 +15,15 @@ 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
.
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
}
/merchant/lifeinner/life_info`
,
role
.
getUser_detail
)
//生活号
router
.
post
(
`
${
API_VERSION
}
/merchant/lifeinner/life_info`
,
life
.
get_life_info
)
router
.
get
(
`
${
API_VERSION
}
/merchant/lifeinner/life_list`
,
life
.
get_life_list
)
//用户
router
.
post
(
`
${
API_VERSION
}
/merchant/authority/get_user_info`
,
user
.
getUser_detail
)
module
.
exports
=
router
;
src/pages/Life-no/components/lifeNoInfo.vue
deleted
100644 → 0
View file @
04e74b14
<
template
>
<div
class=
"lifeNoInfo"
>
<!-- 状态、生活号名称、创建时间、创建人(账号信息,昵称+账号) -->
<el-descriptions
class=
"margin-top"
title=
"生活号信息"
:column=
"3"
border
>
<template
#
extra
>
</
template
>
<el-descriptions-item>
<
template
#
label
>
ID
</
template
>
00001
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
状态
</
template
>
想吃饭
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
创建人
</
template
>
张三
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
创建时间
</
template
>
2020-03-21
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
生活号名称
</
template
>
生活号名称生活号名称生活号名称
</el-descriptions-item>
</el-descriptions>
<el-descriptions
class=
"margin-top"
title=
"类型信息"
:column=
"3"
border
>
<
template
#
extra
>
</
template
>
<el-descriptions-item>
<
template
#
label
>
职业表标签
</
template
>
运动员
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
姓名
</
template
>
张三
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
身份证号
</
template
>
XXXXXXXXXX
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
统一社会信用代码(注册码)
</
template
>
00019
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
企业注册名称
</
template
>
不二杂货铺
</el-descriptions-item>
</el-descriptions>
<el-descriptions
class=
"margin-top"
title=
"用户信息"
:column=
"3"
border
>
<
template
#
extra
>
</
template
>
<el-descriptions-item>
<
template
#
label
>
管理员昵称
</
template
>
派大星
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
管理员账号
</
template
>
0001
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
管理员账号ID
</
template
>
9203201993
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
子账号昵称
</
template
>
子账号昵称
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
子账号账号
</
template
>
0002
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
子账号账号ID
</
template
>
0002ID
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
lifeNoId
:
this
.
$route
.
query
.
lifeId
}
},
created
()
{
console
.
log
(
this
.
$route
.
query
.
lifeId
,
this
.
lifeNoId
,
'0000'
)
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.lifeNoInfo {
.margin-top {
margin-top: 10px;
}
}
</
style
>
\ No newline at end of file
src/pages/Life-no/index.vue
View file @
1141b317
...
...
@@ -31,7 +31,8 @@
<el-table-column
prop=
"life_account_id"
label=
"ID"
>
</el-table-column>
<el-table-column
prop=
"life_account_name"
label=
"生活号名称"
>
</el-table-column>
<el-table-column
prop=
"life_account_type"
label=
"类型"
>
</el-table-column>
<el-table-column
prop=
"life_account_type"
label=
"类型"
>
</el-table-column>
<el-table-column
prop=
"life_account_auth_status"
label=
"状态"
>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"创建时间"
>
</el-table-column>
...
...
@@ -82,7 +83,7 @@ export default {
page
,
page_size
,
life_account_name
:
name
,
life_account_type
:
type
==
"个人"
?
1
:
2
life_account_type
:
type
==
"个人"
?
1
:
type
==
"企业"
?
2
:
''
}
reqGetLifeNoList
(
params
).
then
(
res
=>
{
this
.
totalNum
=
res
.
count
...
...
@@ -97,6 +98,7 @@ export default {
onReset
()
{
this
.
life_account
.
name
=
""
,
this
.
life_account
.
type
=
""
this
.
getLifeNoListFn
()
},
update
(
obj
)
{
Object
.
assign
(
this
.
params
,
obj
)
...
...
@@ -104,7 +106,6 @@ export default {
},
toLifeDetail
(
row
)
{
this
.
$router
.
push
({
name
:
'LifeNoDetail'
,
query
:
{
lifeId
:
row
.
life_account_id
}
});
console
.
log
(
row
.
life_account_id
,
'eee去详情'
)
},
}
}
...
...
src/pages/Life-no/life-no-detail.vue
View file @
1141b317
<
template
>
<div
class=
"life-no-detail"
>
<lifeNoInfo
/>
<h4
class=
"titleInfo"
>
生活号信息
</h4>
<el-descriptions
:column=
"3"
border
>
<template
#
extra
>
</
template
>
<el-descriptions-item>
<
template
#
label
>
ID
</
template
>
{{ life_account.life_account_id }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
状态
</
template
>
{{ life_account.life_account_status == 1 ? "上线" : "下线" }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
创建人
</
template
>
{{ life_account.create_user_nick_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
创建时间
</
template
>
{{ life_account.create_time }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
生活号名称
</
template
>
{{ life_account.life_account_name }}
</el-descriptions-item>
</el-descriptions>
<h4
class=
"titleInfo"
>
类型信息
</h4>
<el-descriptions
:column=
"3"
border
>
<
template
#
extra
>
</
template
>
<el-descriptions-item>
<
template
#
label
>
职业表标签
</
template
>
{{ personal_auth_record.occupation }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
姓名
</
template
>
{{ personal_auth_record.full_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
身份证号
</
template
>
{{ personal_auth_record.id_card }}
</el-descriptions-item>
<div
v-if=
"company_auth_record"
>
<el-descriptions-item>
<
template
#
label
>
统一社会信用代码(注册码)
</
template
>
{{ company_auth_record.code }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
企业注册名称
</
template
>
{{ company_auth_record.name }}
</el-descriptions-item>
</div>
</el-descriptions>
<h4
class=
"title"
>
用户信息
</h4>
<el-table
:data=
"accountRoleList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"nick_name"
label=
"昵称"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"mobile"
label=
"账号"
width=
"180"
>
</el-table-column>
<el-table-column
:formatter=
"roleRangeFormat"
label=
"管理员"
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
import
lifeNoInfo
from
'./components/lifeNoInfo'
import
{
getLife_info
as
reqGetLife_info
}
from
"../../service/life-no"
;
export
default
{
components
:
{
lifeNoInfo
,
},
data
()
{
return
{
lifeNoInfo
:
{}
accountRoleList
:
[],
//用户信息
life_account
:
{},
//生活号信息
company_auth_record
:
[],
//企业生活号
personal_auth_record
:
{},
//个人生活号
life_account_id
:
null
,
}
},
created
()
{
this
.
life_account_id
=
this
.
$route
.
query
.
lifeId
reqGetLife_info
(
this
.
life_account_id
).
then
(
res
=>
{
this
.
personal_auth_record
=
res
.
personal_auth_record
this
.
life_account
=
res
.
life_account
this
.
company_auth_record
=
res
.
company_auth_record
this
.
accountRoleList
=
res
.
accountRoleList
})
},
methods
:
{
roleRangeFormat
(
row
)
{
return
row
.
role_type
==
1
?
'是'
:
'否'
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.life-no-detail {
.title {
margin: 10px;
}
.titleInfo {
margin-top: 10px;
}
margin: 50px;
.box-card {
width: 100%;
...
...
src/pages/Role/add-role.vue
View file @
1141b317
...
...
@@ -6,17 +6,17 @@
:data=
"roleDataList"
style=
"width: 100%; margin-top: 10px"
:header-cell-style=
"
{ background: '#e1e4e5', color: '#80878f' }"
@row-click="toLifeDetail"
>
<el-table-column
prop=
"role_name"
label=
"角色名称"
width=
"180"
>
</el-table-column>
<el-table-column
:formatter=
"roleRangeFormat"
label=
"角色范围"
>
</el-table-column>
<el-table-column
prop=
"role_range"
label=
"角色范围"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
#
default=
"scope"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"handleModify(scope.$index, scope.row)"
@
click
.
stop
=
"handleModify(scope.$index, scope.row)"
>
修改
</el-button
>
</
template
>
...
...
@@ -152,12 +152,8 @@ export default {
})
},
methods
:
{
roleRangeFormat
(
row
)
{
let
arr
=
[]
for
(
let
i
in
row
.
role_range
)
{
arr
.
push
(
row
.
role_range
[
i
]);
}
return
arr
.
join
(
'/'
)
toLifeDetail
(
row
)
{
this
.
$router
.
push
({
name
:
'RoleDetail'
,
query
:
{
roleId
:
row
.
role_id
}
});
},
newAddRole
()
{
this
.
dialogFormVisible
=
true
...
...
@@ -187,10 +183,11 @@ export default {
return
false
}
let
role_name
=
this
.
roleName
,
permissions
=
this
.
currentRolePrivilege
console
.
log
(
JSON
.
stringify
(
role_name
),
'1111'
)
console
.
log
(
JSON
.
stringify
(
permissions
),
'2222'
)
reqGetAdd_role
(
role_name
,
permissions
).
then
(
res
=>
{
console
.
log
(
res
,
'resresres999'
)
if
(
res
.
status
===
"success"
)
{
this
.
dialogFormVisible
=
false
this
.
getGetRole_list
()
}
})
},
checkFn
()
{
...
...
@@ -206,7 +203,7 @@ export default {
this
.
edit
=
true
this
.
roleTitle
=
'角色修改'
this
.
dialogFormVisible
=
true
this
.
getRole_info_detail
(
row
.
role_id
)
this
.
getRole_info_detail
(
String
(
row
.
role_id
)
)
},
//角色详情数据
getRole_info_detail
(
role_id
)
{
...
...
@@ -229,7 +226,6 @@ export default {
},
//遍历回显值selectedOptions
editEchoData
(
permissions
)
{
console
.
log
(
permissions
,
'permissionspermissions'
)
let
parentArr
=
[]
let
childArr
=
[]
permissions
.
forEach
(
item
=>
{
...
...
@@ -253,8 +249,13 @@ export default {
return
false
}
let
{
role_name
,
role_id
}
=
this
.
role_info_detail
role_name
=
this
.
roleName
reqGetUpdate_role
(
role_name
,
role_id
,
this
.
permissionsUpdate
).
then
(
res
=>
{
console
.
log
(
res
,
'esesesoo111'
)
if
(
res
.
status
===
"success"
)
{
this
.
dialogFormVisible
=
false
this
.
edit
=
true
this
.
getGetRole_list
()
}
})
},
//确定
...
...
src/pages/Role/role-detail.vue
0 → 100644
View file @
1141b317
<
template
>
<div
class=
"user-detail"
>
<h3
style=
"margin-bottom: 10px"
>
角色详情
</h3>
<el-descriptions
class=
"margin-top"
:column=
"2"
:size=
"size"
border
>
<el-descriptions-item>
<template
#
label
>
状态
</
template
>
{{ role_info_detail.role_status }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
ID
</
template
>
{{ role_info_detail.role_id }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
角色名称
</
template
>
{{ role_info_detail.role_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
创建人账号
</
template
>
{{ role_info_detail.update_user_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
创建时间
</
template
>
{{ role_info_detail.create_time }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
最后修改人账号
</
template
>
{{ role_info_detail.update_user_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
最后修改时间
</
template
>
{{ role_info_detail.update_time }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
角色账号
</
template
>
{{ role_info_detail.role_status }}
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<
script
>
import
{
get_role_info
as
reqGet_role_info
}
from
'../../service/role'
export
default
{
data
()
{
return
{
roleId
:
this
.
$route
.
query
.
roleId
,
role_info_detail
:
{
//详情非编辑项
role_id
:
""
,
role_name
:
""
,
role_status
:
""
,
update_time
:
""
,
update_user_name
:
""
,
create_time
:
""
,
create_user_name
:
""
},
}
},
created
()
{
reqGet_role_info
(
this
.
roleId
).
then
((
res
)
=>
{
const
{
role_id
,
role_name
,
role_status
,
update_time
,
update_user_name
,
create_time
,
create_user_name
}
=
res
this
.
role_info_detail
=
{
role_id
,
role_name
,
role_status
,
update_time
,
update_user_name
,
create_time
,
create_user_name
}
})
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.user-detail {
margin: 50px;
}
</
style
>
\ No newline at end of file
src/pages/User/user-detail.vue
View file @
1141b317
...
...
@@ -4,70 +4,73 @@
<el-descriptions
class=
"margin-top"
:column=
"3"
:size=
"size"
border
>
<el-descriptions-item>
<template
#
label
>
用户姓名
</
template
>
kooriookami
{{ user_info.user_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
手机号
</
template
>
18100000000
{{ user_info.user_mobile }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
所属组织
</
template
>
研发部
{{ user_info.organization }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
添加人账号
</
template
>
XXXX
{{ user_info.create_user_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
添加时间
</
template
>
2020-12-01
{{ user_info.create_time }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
最后修改人账号
</
template
>
张三
{{ user_info.update_user_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
最后修改时间
</
template
>
2021-05-21
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
已拥有角色池
</
template
>
角色池
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
角色名称
</
template
>
管理员
{{ user_info.update_user_name }}
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
敏感词权限
</
template
>
敏感词权限
</el-descriptions-item>
<el-descriptions-item>
<
template
#
label
>
数据权限
</
template
>
数据权限
{{ user_info.is_sensitive_authority == 1 ? "有" : "无" }}
</el-descriptions-item>
</el-descriptions>
<div
class=
"role"
>
已拥有角色池
</div>
<el-table
:data=
"role_list"
border
style=
"width: 100%"
>
<el-table-column
prop=
"role_id"
label=
"ID"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"role_name"
label=
"角色名称"
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
// import { getUser_detail as reqGetUser_detail } from '../../service/user'
import
{
getUser_detail
as
reqGetUser_detail
}
from
"../../service/user"
;
export
default
{
data
()
{
return
{
user_id
:
1
,
user
InfoList
:
[{
}]
user_id
:
'1'
,
user
_info
:
{},
role_list
:
[]
//角色池
}
},
created
()
{
// reqGetUser_detail(this.user_id).then((res) => {
// console.log(res, '000')
// })
this
.
getUser_date
()
},
methods
:
{
getUser_date
()
{
reqGetUser_detail
(
this
.
user_id
).
then
((
res
)
=>
{
this
.
user_info
=
res
.
user_info
this
.
role_list
=
res
.
role_list
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.user-detail {
margin: 50px;
.role {
margin: 10px;
font-weight: bold;
}
}
</
style
>
\ No newline at end of file
src/router/index.js
View file @
1141b317
...
...
@@ -7,6 +7,7 @@ import LifeNoDetail from '../pages/Life-no/life-no-detail.vue'
import
UserDetail
from
'../pages/User/user-detail.vue'
import
AddRole
from
'../pages/Role/add-role.vue'
import
ManageRole
from
'../pages/Role/manage-role.vue'
import
RoleDetail
from
'../pages/Role/role-detail.vue'
const
routes
=
[
{
...
...
@@ -74,6 +75,11 @@ const routes = [
path
:
'/roleManageRole'
,
name
:
'ManageRole'
,
component
:
ManageRole
},
{
path
:
'/roleRoleDetail'
,
name
:
'RoleDetail'
,
component
:
RoleDetail
}
];
...
...
src/service/life-no.js
View file @
1141b317
...
...
@@ -5,4 +5,11 @@ export async function getLifeNoList (params) {
params
})
return
res
.
result
;
}
//生活号详情
export
async
function
getLife_info
(
life_account_id
)
{
const
res
=
await
axios
.
post
(
`/api/v1/merchant/lifeinner/life_info`
,
{
life_account_id
})
return
res
.
result
;
}
\ No newline at end of file
src/service/role.js
View file @
1141b317
...
...
@@ -12,14 +12,14 @@ export async function getAdd_role (role_name, permissions) {
const
res
=
await
axios
.
post
(
"/api/v1/merchant/authority/add_role"
,
{
role_name
,
permissions
})
return
res
.
result
;
return
res
;
}
//角色编辑
export
async
function
getUpdate_role
(
role_name
,
role_id
,
permissions
)
{
const
res
=
await
axios
.
post
(
"/api/v1/merchant/authority/update_role"
,
{
role_name
,
role_id
,
permissions
})
return
res
.
result
;
return
res
;
}
//角色详情
export
async
function
get_role_info
(
role_id
)
{
...
...
src/service/user.js
View file @
1141b317
...
...
@@ -15,3 +15,10 @@ export async function getPermissions (email) {
console
.
log
(
"fe service, getPermissions:::"
,
email
)
return
await
axios
.
get
(
"/api/v1/user/get_permissions"
,
{
params
:
{
email
}
});
}
//用户详情
export
async
function
getUser_detail
(
user_id
)
{
const
res
=
await
axios
.
post
(
`/api/v1/merchant/authority/get_user_info`
,
{
user_id
})
return
res
.
result
;
}
\ No newline at end of file
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