Merge branch 'master' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend
# Conflicts: # src/App.css
This commit is contained in:
commit
dd4a69872d
11
src/App.css
11
src/App.css
|
@ -179,4 +179,15 @@ resize: none;
|
|||
.zent-btn-primary.zent-btn-disabled.zent-btn
|
||||
{
|
||||
background-color: #f1f2f3 !important;
|
||||
}
|
||||
|
||||
.modal{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
z-index: 9999;
|
||||
|
||||
}
|
|
@ -563,8 +563,8 @@ export const addTheme= (data) => {
|
|||
return req('post', baseurl + "/plan/theme",data)
|
||||
}
|
||||
//编辑落地页模板
|
||||
export const putTheme= (data) => {
|
||||
return req('put', baseurl + "/plan/plan_theme",data)
|
||||
export const putTheme= (id,data) => {
|
||||
return req('put', baseurl + "/plan/plan_theme/"+id,data)
|
||||
}
|
||||
//我的模板列表查询
|
||||
export const getTheme= (data) => {
|
||||
|
|
|
@ -112,7 +112,7 @@ export default class acclist extends React.Component{
|
|||
total:0,
|
||||
page:1,
|
||||
limit:10,
|
||||
tabList:[{title:"全部"},{title:"进行中"},{title:"暂停中"},{title:"未开始"},{title:"已完结"},{title:"已作废"}],
|
||||
tabList:[{title:"全部",index:0},{title:"未开始",index:3},{title:"进行中",index:1},{title:"暂停中",index:2},{title:"已完结",index:4},{title:"已作废",index:5}],
|
||||
combinedValue:[],
|
||||
DateTime:'',//数据更新时间
|
||||
key_word:'',
|
||||
|
@ -170,7 +170,8 @@ export default class acclist extends React.Component{
|
|||
sessionStorage.setItem('breaknav',JSON.stringify(activerou));
|
||||
}
|
||||
tabFn(index){
|
||||
this.setState({tabIndex:index,key_word:''})
|
||||
|
||||
this.setState({tabIndex: index ,key_word:''})
|
||||
this.setState({page:1,limit:10})
|
||||
setTimeout(() => {
|
||||
this.getCodeListFn({},index);
|
||||
|
@ -281,17 +282,15 @@ export default class acclist extends React.Component{
|
|||
}
|
||||
if(menu){
|
||||
// 1:进行中 2:暂停中 4:已完结 5:已作废
|
||||
data.status = menu;
|
||||
console.log()
|
||||
data.status = this.state.tabList[menu].index;
|
||||
if(menu == 0)
|
||||
{
|
||||
data.status = null
|
||||
}
|
||||
|
||||
console.log(666,menu)
|
||||
if(menu == 6)
|
||||
{
|
||||
data.status = -1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Notify,Switch ,RadioGroup,RadioButton,Swiper,Dropdown,DropdownPosition,
|
|||
import Ipt from "../../../components/input/main"
|
||||
import Form from "../../../components/form/main"
|
||||
import FormItem from "../../../components/form-item/main"
|
||||
import {uploadImg,handelResponse,addTheme,putMyTheme} from "../../../assets/api.js"
|
||||
import {uploadImg,handelResponse,addTheme,putMyTheme,putTheme} from "../../../assets/api.js"
|
||||
import PreviewItem from "../template/preview.js"
|
||||
export default class edittemplate extends React.Component{
|
||||
constructor(props){
|
||||
|
@ -116,8 +116,21 @@ export default class edittemplate extends React.Component{
|
|||
formdata.link = this.state.model.link
|
||||
formdata.edit= this.state.model.edit
|
||||
formdata.href= this.state.model.href
|
||||
|
||||
|
||||
putTheme(this.state.model.id,formdata).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
Notify.success("保存成功")
|
||||
|
||||
this.props.history.push('/home/exchangepage');
|
||||
return
|
||||
},(err)=>{
|
||||
Notify.error(err)
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
else{
|
||||
|
||||
|
||||
|
||||
|
@ -132,7 +145,7 @@ export default class edittemplate extends React.Component{
|
|||
handelResponse(res,(req,msg)=>{
|
||||
Notify.success("保存成功")
|
||||
|
||||
this.props.history.push('/home/plan-list/');
|
||||
this.props.history.push('/home/exchangepage');
|
||||
},(err)=>{
|
||||
Notify.error(err)
|
||||
})
|
||||
|
@ -149,7 +162,7 @@ export default class edittemplate extends React.Component{
|
|||
handelResponse(res,(req,msg)=>{
|
||||
Notify.success("保存成功")
|
||||
setTimeout(() => {
|
||||
let link = window.location.href.replace(window.location.hash,"#/home/myexchangetemplate");
|
||||
let link = window.location.href.replace(window.location.hash,"/home/exchangepage");
|
||||
window.open(link, "_blank")
|
||||
}, 2000);
|
||||
|
||||
|
@ -161,7 +174,7 @@ export default class edittemplate extends React.Component{
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ export default class acclist extends React.Component {
|
|||
tabList: [{
|
||||
title: "全部"
|
||||
}, {
|
||||
title: "未进行"
|
||||
title: "未开始"
|
||||
}, {
|
||||
title: "进行中"
|
||||
}, {
|
||||
|
|
|
@ -247,15 +247,14 @@ export default class add extends React.Component{
|
|||
})
|
||||
}
|
||||
|
||||
onEditInfo(){
|
||||
async onEditInfo(){
|
||||
let plan_id = sessionStorage.getItem("plan_id")
|
||||
if(this.refs.step1.submit(plan_id))
|
||||
if( await this.refs.step1.submit(plan_id))
|
||||
{
|
||||
setTimeout(()=>{
|
||||
this.props.history.push('/home/plan-list/');
|
||||
},1500)
|
||||
}
|
||||
console.log("编辑和")
|
||||
}
|
||||
render(){
|
||||
return(
|
||||
|
|
|
@ -49,7 +49,8 @@ export default class acclist extends React.Component{
|
|||
rankoptions:[],
|
||||
tempdata:[],
|
||||
distdata:[],
|
||||
oldData:null
|
||||
oldData:null,
|
||||
uploading:false,
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -228,6 +229,15 @@ export default class acclist extends React.Component{
|
|||
}
|
||||
|
||||
|
||||
if(this.state.uploading )
|
||||
{
|
||||
|
||||
Notify.error("还有图片上传中,不可提交")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.setState({drawerVisible:false})
|
||||
let rank = _.map(this.state.rank,(item)=>{
|
||||
|
@ -328,8 +338,10 @@ export default class acclist extends React.Component{
|
|||
|
||||
|
||||
onUpload = (file, report,rowdata) => {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let count = 0;
|
||||
this.setState({uploading:true})
|
||||
const update = () => {
|
||||
if (count < 100) {
|
||||
count += 10;
|
||||
|
@ -343,6 +355,7 @@ export default class acclist extends React.Component{
|
|||
uploadImg(formdata).then((res)=>{
|
||||
handelResponse(res,(req,msg)=>{
|
||||
console.log("文件上传成功")
|
||||
this.setState({uploading:false})
|
||||
console.log(rowdata)
|
||||
if (req.path) {
|
||||
|
||||
|
@ -393,11 +406,7 @@ export default class acclist extends React.Component{
|
|||
|
||||
if(file.length > 0 && file[0].status == "success")
|
||||
{
|
||||
|
||||
let rowIndex =this.state.tempdata.findIndex((o)=>{return o.product_id == row.product_id})
|
||||
|
||||
|
||||
|
||||
let rowIndex =this.state.tempdata.findIndex((o)=>{return o.product_id == row.product_id})
|
||||
this.state.tempdata[rowIndex].describe_url =file[0].src;
|
||||
this.setState({tempdata:this.state.tempdata})
|
||||
|
||||
|
@ -406,13 +415,10 @@ export default class acclist extends React.Component{
|
|||
onUploadChange2(file,row){
|
||||
if(file.length > 0 && file[0].status == "success")
|
||||
{
|
||||
|
||||
|
||||
let rowIndex =this.state.tempdata.findIndex((o)=>{return o.product_id == row.product_id})
|
||||
|
||||
let rowIndex =this.state.tempdata.findIndex((o)=>{return o.product_id == row.product_id})
|
||||
|
||||
this.state.tempdata[rowIndex].describe_url =file[0].src;
|
||||
this.setState({tempdata:this.state.tempdata})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -500,9 +506,6 @@ export default class acclist extends React.Component{
|
|||
batch_name:[
|
||||
{ type: "required", message: "请输入key批次名称"},
|
||||
]
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -617,6 +617,9 @@ export default class acclist extends React.Component{
|
|||
];
|
||||
return(
|
||||
<div id="dislist">
|
||||
|
||||
|
||||
|
||||
<TabPage tabs={this.state.tabList}>
|
||||
<p className="distable dflexj">
|
||||
<Button type="primary" icon="plus" onClick={this.clickFn.bind(this)}>新建营销计划</Button>
|
||||
|
@ -691,15 +694,23 @@ export default class acclist extends React.Component{
|
|||
<a className="grid-link" onClick={(e)=>{this.onEdit(e,rowData)} } >编辑</a>
|
||||
<Dropdown position={DropdownPosition.RightTop }>
|
||||
<DropdownClickTrigger>
|
||||
<div className="linkmore"> 更多 <Icon type={"down"} /> </div>
|
||||
<div className="linkmore" onClick={(e)=>{
|
||||
|
||||
|
||||
|
||||
|
||||
}}> 更多 <Icon type={"down"} /> </div>
|
||||
</DropdownClickTrigger>
|
||||
<DropdownContent>
|
||||
|
||||
<Menu onClick={(e,key)=>this.menuItemClick(e,key,rowData)} >
|
||||
<MenuItem key="1">再次发送密码</MenuItem>
|
||||
<MenuItem key="2">再次发送key</MenuItem>
|
||||
<MenuItem key="3">修改接收邮箱发送</MenuItem>
|
||||
<MenuItem key="4">修改接收手机发送</MenuItem>
|
||||
</Menu>
|
||||
|
||||
|
||||
</DropdownContent>
|
||||
</Dropdown>
|
||||
</span>
|
||||
|
@ -707,7 +718,23 @@ export default class acclist extends React.Component{
|
|||
|
||||
|
||||
|
||||
|
||||
if(rowData.status ==6 ||rowData.status == 0 )
|
||||
{
|
||||
str = <span>
|
||||
<a className="grid-link" onClick={(e)=>{this.onEdit(e,rowData)} } >编辑</a>
|
||||
<Dropdown position={DropdownPosition.RightTop }>
|
||||
<DropdownClickTrigger>
|
||||
<div className="linkmore" onClick={(e)=>{
|
||||
Notify.error("该状态下的数据不允许编辑")
|
||||
return
|
||||
}}> 更多 <Icon type={"down"} /> </div>
|
||||
</DropdownClickTrigger>
|
||||
<DropdownContent>
|
||||
|
||||
</DropdownContent>
|
||||
</Dropdown>
|
||||
</span>
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
@ -718,7 +745,9 @@ export default class acclist extends React.Component{
|
|||
{
|
||||
|
||||
this.state.audit_visible ? (
|
||||
|
||||
<div className="audit-box" >
|
||||
|
||||
<Icon type="close" className="audit-close" onClick={(e)=>{this.cancel(e)}} />
|
||||
<div className="audit-box-title">发送</div>
|
||||
<div className="audit-box-question">是否立即发送key以及解压密码?</div>
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
top: 50%;
|
||||
margin-left: -125px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue