Commit ed67f1a0 by ethanlamzs

通讯录树的显示+添加头像

1 parent 4345430d
...@@ -133,7 +133,8 @@ const proxy = { ...@@ -133,7 +133,8 @@ const proxy = {
'GET /api/ywpt/wx/linkman/operation_cmd' : (req,res)=>{ 'GET /api/ywpt/wx/linkman/operation_cmd' : (req,res)=>{
res.send({ res.send({
status: 'ok', status: 'ok',
code: 0 code: 0,
message:'功能触发成功...'
}); });
}, },
'GET /api/ywpt/wx/schinfo':(req,res)=>{ 'GET /api/ywpt/wx/schinfo':(req,res)=>{
...@@ -144,7 +145,8 @@ const proxy = { ...@@ -144,7 +145,8 @@ const proxy = {
members:427, members:427,
status:"ok", status:"ok",
sysName:"明星宝贝惠州仲恺高新区潼侨光明学校", sysName:"明星宝贝惠州仲恺高新区潼侨光明学校",
unfollowed:359 unfollowed:359,
wxqrcodeUrl: "http://shp.qpic.cn/bizmp/YdxBCvkOIrBxN45FNiauQSTyg0S8bEiayX9JcTZ2eUTZTcGlNEG7ia8Gw/",
}); });
}, },
'GET /api/500': (req, res) => { 'GET /api/500': (req, res) => {
......
import styles from './schoolmgr.less' import styles from './schoolmgr.less'
import React, { Component } from 'react'; import React, { Component,Fragment} from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { import {
...@@ -130,6 +130,15 @@ export default class schoolmgr extends Component{ ...@@ -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{ ...@@ -138,9 +147,7 @@ export default class schoolmgr extends Component{
if(linkmanMap['g_'+groupid]){ if(linkmanMap['g_'+groupid]){
let templist = linkmanMap['g_'+groupid].sort((a, b) => ( a.name > b.name ? -1:1 )); let templist = linkmanMap['g_'+groupid].sort((a, b) => ( a.name > b.name ? -1:1 ));
return templist.map((item)=>{ return templist.map((item)=>{
let status = item.status; return (<TreeNode isLeaf title={this.renderLeafNodeItemContent(item)} key={`m_${item.userid}`} dataRef={item}/>);
let showninfo = item.name+" # "+item.userid+" "+(status==1?"已关注":"未关注");
return (<TreeNode isLeaf title={showninfo} key={`m_${item.userid}`} dataRef={item}/>);
}); });
} }
else else
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
} }
} }
.linkman{
& > span{display: inline-block;vertical-align: middle;}
}
.applist{ .applist{
padding: 5px 0; padding: 5px 0;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!