This commit is contained in:
姜棚 2021-11-30 04:28:35 +08:00
parent 738ac200c4
commit 64b002b780
2 changed files with 18 additions and 4 deletions

View File

@ -585,6 +585,11 @@ export const postThemecustom= (data) => {
}
//添加定制化模板
export const copyThemecustom= (id,data) => {
return upload('post', baseurl + "/plan/theme/clone/"+id,data)
}

View File

@ -7,7 +7,7 @@ import { Switch ,Swiper,Dropdown,DropdownPosition,DropdownClickTrigger,Icon,Menu
import "../../../assets/comm.css"
import PreviewItem from "./preview.js"
import {handelResponse,getSystemTemplate,getTheme} from "../../../assets/api.js"
import {handelResponse,getSystemTemplate,getTheme,copyThemecustom} from "../../../assets/api.js"
// <div className="block-selector-list">
// <span className="block-selector-list-label">行业:</span>
// <div className="block-selector">
@ -108,10 +108,19 @@ export default class mytemplate extends React.Component{
Notify.error("该模板是定制模板无法编辑");
return
}
copyThemecustom(row.id).then(res=>{
handelResponse(res,(req,msg)=>{
row.id = req.id;
sessionStorage.setItem("pageInfo", JSON.stringify(row))
let link = window.location.href.replace(window.location.hash,"#/home/edittemplate");
window.open(link, "_blank")
},(err)=>{
})
}).catch(err=>{
});
sessionStorage.setItem("pageInfo", JSON.stringify(row))
let link = window.location.href.replace(window.location.hash,"#/home/edittemplate");
window.open(link, "_blank")
}
onBack(){