Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
ant-admin-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit ed67f1a0
authored
2018-02-07 14:55:09 +0800
by
ethanlamzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
通讯录树的显示+添加头像
1 parent
4345430d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
.roadhogrc.mock.js
src/routes/devutil/schoolmgr.js
src/routes/devutil/schoolmgr.less
.roadhogrc.mock.js
View file @
ed67f1a
...
...
@@ -133,7 +133,8 @@ const proxy = {
'GET /api/ywpt/wx/linkman/operation_cmd'
:
(
req
,
res
)
=>
{
res
.
send
({
status
:
'ok'
,
code
:
0
code
:
0
,
message
:
'功能触发成功...'
});
},
'GET /api/ywpt/wx/schinfo'
:(
req
,
res
)
=>
{
...
...
@@ -144,7 +145,8 @@ const proxy = {
members
:
427
,
status
:
"ok"
,
sysName
:
"明星宝贝惠州仲恺高新区潼侨光明学校"
,
unfollowed
:
359
unfollowed
:
359
,
wxqrcodeUrl
:
"http://shp.qpic.cn/bizmp/YdxBCvkOIrBxN45FNiauQSTyg0S8bEiayX9JcTZ2eUTZTcGlNEG7ia8Gw/"
,
});
},
'GET /api/500'
:
(
req
,
res
)
=>
{
...
...
src/routes/devutil/schoolmgr.js
View file @
ed67f1a
import
styles
from
'./schoolmgr.less'
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
,
Fragment
}
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
...
...
@@ -130,6 +130,15 @@ export default class schoolmgr extends Component{
}
//通讯录树的成员详情
renderLeafNodeItemContent
=
(
item
)
=>
(
<
Fragment
>
<
div
className
=
{
styles
.
linkman
}
>
<
Avatar
src
=
{
item
.
avatar
}
/
>
<
span
>&
nbsp
;
&
nbsp
;{
item
.
name
}
&
nbsp
;
&
nbsp
;
{
item
.
status
==
1
?
"已关注"
:
"未关注"
}
#
{
item
.
userid
}
<
/span>
<
/div
>
<
/Fragment
>
)
//加载对应的联系人节点
...
...
@@ -138,9 +147,7 @@ export default class schoolmgr extends Component{
if
(
linkmanMap
[
'g_'
+
groupid
]){
let
templist
=
linkmanMap
[
'g_'
+
groupid
].
sort
((
a
,
b
)
=>
(
a
.
name
>
b
.
name
?
-
1
:
1
));
return
templist
.
map
((
item
)
=>
{
let
status
=
item
.
status
;
let
showninfo
=
item
.
name
+
" # "
+
item
.
userid
+
" "
+
(
status
==
1
?
"已关注"
:
"未关注"
);
return
(
<
TreeNode
isLeaf
title
=
{
showninfo
}
key
=
{
`m_
${
item
.
userid
}
`
}
dataRef
=
{
item
}
/>
)
;
return
(
<
TreeNode
isLeaf
title
=
{
this
.
renderLeafNodeItemContent
(
item
)}
key
=
{
`m_
${
item
.
userid
}
`
}
dataRef
=
{
item
}
/>
)
;
});
}
else
...
...
src/routes/devutil/schoolmgr.less
View file @
ed67f1a
...
...
@@ -12,6 +12,9 @@
}
}
.linkman{
& > span{display: inline-block;vertical-align: middle;}
}
.applist{
padding: 5px 0;
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment