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 897e8ab8
authored
2018-02-09 14:46:33 +0800
by
ethanlamzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加企业号创建者 userid 的修改功能
1 parent
c024e7c6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
14 deletions
.roadhogrc.mock.js
.vscode/settings.json
src/models/linkman.js
src/routes/devutil/schoolmgr.js
src/routes/devutil/schoolmgr.less
src/services/devutil.js
.roadhogrc.mock.js
View file @
897e8ab
...
...
@@ -207,6 +207,13 @@ const proxy = {
]
});
},
'GET /api/ywpt/wx/mdf_admin'
:(
req
,
res
)
=>
{
res
.
send
({
status
:
'ok'
,
code
:
0
,
message
:
'功能触发成功...'
});
},
};
//export default noProxy ? { "GET /*": "http://www.weixiao100.cn/","POST /*": "http://www.weixiao100.cn/" } : delay(proxy, 1000);
...
...
.vscode/settings.json
0 → 100644
View file @
897e8ab
{
}
\ No newline at end of file
src/models/linkman.js
View file @
897e8ab
...
...
@@ -2,7 +2,8 @@ import {queryWxSchLkGroup,
querySchoolMember
,
querySchoolMemberDetail
,
sysOperationCmd
,
checkSchinfo
checkSchinfo
,
wxadminUseridMdf
}
from
'../services/devutil'
import
linkman
from
'../../mock/linkman'
;
...
...
@@ -66,6 +67,11 @@ export default{
});
},
*
changeUserid
({
payload
,
callback
},{
call
,
put
}){
const
response
=
yield
call
(
wxadminUseridMdf
,
payload
);
if
(
callback
)
callback
(
response
);
}
},
...
...
@@ -112,9 +118,7 @@ export default{
...
state
,
schoolDetail
:
action
.
payload
};
}
},
}
...
...
src/routes/devutil/schoolmgr.js
View file @
897e8ab
...
...
@@ -57,6 +57,8 @@ export default class schoolmgr extends Component{
state
=
{
checkedKeys
:[],
groupsMap
:{},
oldUserid
:
''
,
newUserid
:
''
,
};
...
...
@@ -226,10 +228,33 @@ export default class schoolmgr extends Component{
content
:
""
},
callback
:(
response
)
=>
{
message
.
success
(
response
.
message
);
},
if
(
response
.
code
==
1
)
message
.
success
(
response
.
message
);
else
message
.
error
(
response
.
message
);
},
});
}
else
if
(
action
==
4
){
//针对修改创建管理员的userid方法的相应处理
const
{
oldUserid
,
newUserid
}
=
this
.
state
;
if
(
oldUserid
&&
newUserid
){
dispatch
({
type
:
'linkman/changeUserid'
,
payload
:{
schoolCode
:
schoolCode
,
oldUserid
:
oldUserid
,
newUserid
:
newUserid
,
},
callback
:(
response
)
=>
{
if
(
response
.
code
==
1
)
message
.
success
(
response
.
message
);
else
message
.
error
(
response
.
message
);
},
});
}
else
{
message
.
warning
(
"需要填写完整的信息才能进行修改"
);
}
}
}
...
...
@@ -243,7 +268,7 @@ export default class schoolmgr extends Component{
dispatch
({
type
:
'linkman/findUser'
,
payload
:{
phone
:
content
,
content
:
content
,
schoolCode
:
schoolCode
},
});
...
...
@@ -312,6 +337,15 @@ export default class schoolmgr extends Component{
)
//处理输入框的值变化
handleInputChange
=
(
e
)
=>
{
let
new_value
=
{};
new_value
[
e
.
target
.
id
]
=
e
.
target
.
value
;
this
.
setState
(
new_value
);
console
.
log
(
this
.
state
);
}
render
(){
const
{
linkman
:{
groups
,
schoolDetail
},
wxdata
:{
applist
}}
=
this
.
props
;
...
...
@@ -345,11 +379,11 @@ export default class schoolmgr extends Component{
<
br
/>
<
ChartCard
bordered
=
{
true
}
title
=
'信息检索(
根据手机号码查找uc是否存在对应的学校用户
)'
title
=
'信息检索(
可输入“手机号码”查找uc是否存在对应的学校用户,“用户名” 或 “userid” 直接搜索企业号的通讯录
)'
>
<
Search
className
=
{
styles
.
extraContentSearch
}
placeholder
=
"请输入手机号码"
placeholder
=
"请输入手机号码
、用户名或 userid
"
onSearch
=
{
this
.
findUser
}
/
>
{
this
.
renderFoundUserResult
()}
...
...
@@ -391,11 +425,17 @@ export default class schoolmgr extends Component{
<
ChartCard
bordered
=
{
false
}
title
=
'操作/功能区'
contentHeight
=
{
4
0
}
>
contentHeight
=
{
17
0
}
>
<
div
className
=
{
styles
.
func_block
}
>
<
Button
onClick
=
{()
=>
this
.
specopation
(
1
)}
>
删除已选的人
<
/Button
>
<
Button
onClick
=
{()
=>
this
.
specopation
(
2
)}
>
头像
/
关注强刷
<
/Button>
<
Button
onClick
=
{()
=>
this
.
specopation
(
3
)}
>
通讯录缓存强刷
<
/Button
>
<
Button
type
=
"danger"
onClick
=
{()
=>
this
.
specopation
(
1
)}
>
删除已选的人
<
/Button
>
<
Button
type
=
"danger"
onClick
=
{()
=>
this
.
specopation
(
2
)}
>
头像
/
关注强刷
<
/Button>
<
Button
type
=
"danger"
onClick
=
{()
=>
this
.
specopation
(
3
)}
>
通讯录缓存强刷
<
/Button
>
<
/div
>
<
div
>
<
span
><
font
size
=
"2"
color
=
"red"
>**
重置企业号创建者的
userid
为
uc
平台的
userid
**<
/font></
span
>
<
Input
id
=
'oldUserid'
placeholder
=
"需要被重置的userid"
value
=
{
this
.
state
.
oldUserid
}
onChange
=
{(
e
)
=>
this
.
handleInputChange
(
e
)}
/
>
<
Input
id
=
'newUserid'
placeholder
=
"变更后的userid"
value
=
{
this
.
state
.
newUserid
}
onChange
=
{(
e
)
=>
this
.
handleInputChange
(
e
)}
/
>
<
Button
type
=
"danger"
onClick
=
{()
=>
this
.
specopation
(
4
)}
>
确认重置
<
/Button
>
<
/div
>
<
/ChartCard
>
<
br
/>
...
...
src/routes/devutil/schoolmgr.less
View file @
897e8ab
...
...
@@ -23,7 +23,7 @@
.func_block{
margin:
2px 0
;
margin:
4px 4px
;
vertical-align: middle;
.ant-btn{
padding-top: 4px;
...
...
src/services/devutil.js
View file @
897e8ab
...
...
@@ -61,3 +61,9 @@ export async function wxCorpAppSetUpInfo(params){
params
=
availToken
(
params
);
return
request
(
`/api/ywpt/wx/appinfo?
${
stringify
(
params
)}
`
);
}
//修改企业好上创建者的userid
export
async
function
wxadminUseridMdf
(
params
){
params
=
availToken
(
params
);
return
request
(
`/api/ywpt/wx/mdf_admin?
${
stringify
(
params
)}
`
)
}
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