diff --git a/src/pages/exchangecode/add/add.js b/src/pages/exchangecode/add/add.js index 3b7d9004..72f7b0db 100644 --- a/src/pages/exchangecode/add/add.js +++ b/src/pages/exchangecode/add/add.js @@ -1053,7 +1053,7 @@ export default class acclist extends React.Component { }, ]; return ( -
+ 是否删除[{row.plan.title}]? +
+ ), + onConfirm: () => { + delTheme(row.id) + .then((res) => { + handelResponse( + res, + (response, msg) => { + Notify.clear(); + Notify.success(msg); + self.getAccountFn(); + }, + (err) => {} + ); + }) + .catch((err) => {}); + }, + onCancel: this.onCancel, + className: "questModal", + parentComponent: this, + }); + } - this.setState({ - dataCount: req.total - }) - this.setState({ - distdata: req.data - }) - }) - }); - } - countChange(e) { - this.setState({limit:e}) - let data = { - page: this.state.page, - limit: e, - title: this.state.key_word - } - this.getTableList(data) - } - pageChange(e) { - this.setState({page:e}) - let data = { - page: e, - limit:this.state.limit, - title: this.state.key_word, - status:this.state.status - } - this.getTableList(data) + tabChange(e) { + this.setState({ page: 1 }); + this.setState({ limit: 10 }); + this.setState({ key_word: "" }); + let data = { + page: 1, + limit: 10, + }; + let status = null; + if (e > 0) { + if (e == 3) { + status = 5; + } else if (e == 4) { + status = 3; + } else { + status = e; + } + } else { + status = null; + } + data.status = status; + this.setState({ status: status }); - } - clickFn() { - // let link = window.location.href.replace(window.location.hash, "#/home/mytempMould"); - // window.open(link, "_blank") - this.props.history.push('/home/myexchangetemplate'); - sessionStorage.setItem('pathname2','/home/myexchangetemplate') - let activerou=[{items:[ - { - "path": "/home/exchangepage", - "name": "落地页管理" - }, - { - "path": "/home/myexchangetemplate", - "name": "我的模板" - } - ]}] - sessionStorage.setItem('breaknav',JSON.stringify(activerou)); - } - editFn(e,row) - { - sessionStorage.setItem("mouldType",2) - sessionStorage.setItem("pageChange",1) - sessionStorage.setItem("pageInfo",JSON.stringify(row)) - // let link = window.location.href.replace(window.location.hash, "#/edittemplate"); - // window.open(link, "_blank") - window.location.href="/#/edittemplate"; - } - delFn(e,row){ - let self=this; - Sweetalert.confirm({ - type:'warning', - closeBtn:true, - title:'确认操作', - content:是否删除[{row.plan.title}]?
, - onConfirm:()=>{ - delTheme(row.id).then(res=>{ - handelResponse(res,(response,msg)=>{ - Notify.clear(); - Notify.success(msg); - self.getAccountFn(); - },(err)=>{ - - }) - }).catch(err=>{ - }); - }, - onCancel: this.onCancel, - className:'questModal', - parentComponent: this - }); - } - - tabChange(e) { - this.setState({page:1}) - this.setState({limit:10}) - this.setState({key_word:''}); - let data={ - page: 1, - limit:10, - } - let status = null; - if( e > 0) - { - if(e==3){ - status = 5; - }else if(e==4){ - status = 3; - }else{ - status = e; - } - - }else{ - status = null - } - data.status = status - this.setState({status:status}) - - setTimeout(() => { - this.getTableList(data) + setTimeout(() => { + this.getTableList(data); }, 10); - } - onPreview(e,row){ - let rowdata={}; - if(row.page==1){//白名单 - rowdata.model=row.access_conf.land; - rowdata.product_list=row.access_conf.product_list; - rowdata.product_detail=row.access_conf.product_detail; - }else if(row.page==3){ - rowdata.model=row.exchange.land; - rowdata.product_list=row.exchange.product_list; - rowdata.product_detail=row.exchange.product_detail; - } - - this.setState({preview_visible:true,pageStep:1,showPage:1,activeHeight:667, setStyle:{width:'375px',height:'667px',transform: 'scale(0.75)'}}) - this.setState({previewData:rowdata,showType:row.page}) - this.setState({preview_url:row.href}) - - } - closePhone(e){ - this.setState({preview_visible:false}) - } - - sureFn(){ - this.setState({page:1}) - this.setState({limit:10}) - let data={ - page: 1, - limit:10, - title:this.state.key_word, - status:this.state.status - } - - this.getTableList(data); - } - - - componentDidUpdate(prevProps,prevState){ - // 参数分别为改变之前的数据状态对象 - if(prevState.key_word!=this.state.key_word &&!this.state.key_word){ - - this.sureFn(); - } - } - componentWillMount(){ - this.setState({tableHeight:window.innerHeight-430}); } - onBack(){ - this.refs.preview.popPage() + onPreview(e, row) { + let rowdata = {}; + if (row.page == 1) { + //白名单 + rowdata.model = row.access_conf.land; + rowdata.product_list = row.access_conf.product_list; + rowdata.product_detail = row.access_conf.product_detail; + } else if (row.page == 3) { + rowdata.model = row.exchange.land; + rowdata.product_list = row.exchange.product_list; + rowdata.product_detail = row.exchange.product_detail; + } + + this.setState({ + preview_visible: true, + pageStep: 1, + showPage: 1, + activeHeight: 667, + setStyle: { width: "375px", height: "667px", transform: "scale(0.75)" }, + }); + this.setState({ previewData: rowdata, showType: row.page }); + this.setState({ preview_url: row.href }); } - onClose(){ - this.setState({preview_visible:false}) + closePhone(e) { + this.setState({ preview_visible: false }); } - render() { - const { - current, - pageSize - } = this.state; - return ( < - div id = "dislist" > - < - TabPage tabs = { - this.state.tabList - } - tabChange = { - (e) => this.tabChange(e) - } > - < - div className = "distable dflexj" > - < - div - > < /div> < - Ipt icon = "search" - placeholder = { - "请输入关键字进行搜索" - } - countShow = { - false - } - value={this.state.key_word} - - height = { - '36px' - } - width = { - '260px' - } - alignment = { - 'left' - } - onClearItem={ - (e)=>{ - console.log("清空") - - this.setState({key_word:""}) - - } - } - onChange={(e)=>{ - console.log(777777) - console.log(e) - this.setState({key_word:e}) - - }} - wordSearch={ - (e)=>{ - this.sureFn() - } - } - - /> < - /div> < - div > - < - Grid isBorder = { - true - } - spliteColor = { - '#fff' - } - page={this.state.page} - maxheight={this.state.tableHeight} - tableData = { - this.state.distdata - } - Column = { - Column - } - isMultiple = { - false - } - countbarVisible = { - false - } - isSwitch = { - false - } - dataCount = { - this.state.dataCount - } - countChange = { - (e) => { - this.countChange(e) - } - } - page={this.state.page} - pageChange = { - (e) => { - this.pageChange(e) - } - } - checkChange = { - (selection) => { - console.log(selection) - } - } - ComponentHandler = { - (com, rowData) => { - if(com=='thumb'){ - return落地页预览:
-页面类型:
-落地页预览:
+页面类型:
+落地页预览:
-落地页类型: