forked from Gitlink/forgeplus-react
编辑新闻后页面跳转地址中的id使用接口返回的字段
This commit is contained in:
parent
1bd70e9fdd
commit
3939044dc5
|
|
@ -97,11 +97,11 @@ function NewsCreate(props){
|
|||
if(isEdit){
|
||||
delete params.editorType;
|
||||
return updateDoc(newsId, params).then(res=>{
|
||||
const {data:{code, msg}} = res;
|
||||
const {data:{code, msg , data}} = res;
|
||||
setLoading(false);
|
||||
if(code === 200){
|
||||
message.success("提交成功");
|
||||
history.push(`/zone/${deptId}/newdetail/${newsId}`);
|
||||
history.push(`/zone/${deptId}/newdetail/${data}`);
|
||||
}else{
|
||||
message.error(msg || '提交失败,请联系管理员!')
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function beforeFetch(actionUrl){
|
|||
|
||||
service.interceptors.request.use(request => {
|
||||
let deptId = sessionStorage.getItem('deptId');
|
||||
// request.headers.Authorization = '8786c89c803fc2420f75c19895f0cee794b6f9a3'
|
||||
request.headers.Authorization = '8786c89c803fc2420f75c19895f0cee794b6f9a3'
|
||||
if (deptId) {
|
||||
// 用于权限区分
|
||||
request.headers['Dept-Id'] = deptId
|
||||
|
|
|
|||
Loading…
Reference in New Issue