解决落地页预览页面回显白屏
This commit is contained in:
parent
1e7997b3ef
commit
3395cfc61a
|
@ -12,6 +12,12 @@ import PreviewEffect from '../previewEffect/main'
|
||||||
import { handelResponse, getThemeList, delTheme } from '../../../assets/api.js'
|
import { handelResponse, getThemeList, delTheme } from '../../../assets/api.js'
|
||||||
import menu from '../../../assets/enum.js'
|
import menu from '../../../assets/enum.js'
|
||||||
var QRCode = require('qrcode.react')
|
var QRCode = require('qrcode.react')
|
||||||
|
let typeList={//1 白名单 3 兑换码 4优惠券 8 优惠券白名单
|
||||||
|
'1':'access_conf',
|
||||||
|
'3':'exchange',
|
||||||
|
'4':'coupon',
|
||||||
|
'8':'coupon',
|
||||||
|
}
|
||||||
const Column = [
|
const Column = [
|
||||||
{
|
{
|
||||||
title: '基本信息',
|
title: '基本信息',
|
||||||
|
@ -257,24 +263,12 @@ export default class acclist extends React.Component {
|
||||||
this.getTableList(data)
|
this.getTableList(data)
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
onPreview(e,row) {
|
onPreview(e,row) {
|
||||||
let rowdata = {}
|
let previewInfo=row[typeList[row.page]];
|
||||||
if (row.page == 1) {
|
this.setState({ preview_visible: true,previewData:previewInfo});
|
||||||
//白名单
|
|
||||||
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
|
|
||||||
})
|
|
||||||
this.setState({ previewData: rowdata, showType: row.page })
|
|
||||||
this.setState({ preview_url: row.href })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
closePhone(e) {
|
closePhone(e) {
|
||||||
this.setState({ preview_visible: false })
|
this.setState({ preview_visible: false })
|
||||||
}
|
}
|
||||||
|
@ -313,7 +307,7 @@ export default class acclist extends React.Component {
|
||||||
<div id='dislist'>
|
<div id='dislist'>
|
||||||
<TabPage tabs={this.state.tabList} tabChange={(e) => this.tabChange(e)}>
|
<TabPage tabs={this.state.tabList} tabChange={(e) => this.tabChange(e)}>
|
||||||
<div className='distable dflexj'>
|
<div className='distable dflexj'>
|
||||||
<div> </div>{' '}
|
<div> </div>
|
||||||
<Ipt
|
<Ipt
|
||||||
icon='search'
|
icon='search'
|
||||||
placeholder={'请输入关键字进行搜索'}
|
placeholder={'请输入关键字进行搜索'}
|
||||||
|
@ -335,8 +329,8 @@ export default class acclist extends React.Component {
|
||||||
wordSearch={(e) => {
|
wordSearch={(e) => {
|
||||||
this.sureFn()
|
this.sureFn()
|
||||||
}}
|
}}
|
||||||
/>{' '}
|
/>
|
||||||
</div>{' '}
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Grid
|
<Grid
|
||||||
isBorder={true}
|
isBorder={true}
|
||||||
|
@ -382,7 +376,7 @@ export default class acclist extends React.Component {
|
||||||
if (com == 'name') {
|
if (com == 'name') {
|
||||||
return (
|
return (
|
||||||
<Switch size='small' checked={true}>
|
<Switch size='small' checked={true}>
|
||||||
{' '}
|
|
||||||
</Switch>
|
</Switch>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -390,7 +384,7 @@ export default class acclist extends React.Component {
|
||||||
if (com == 'client') {
|
if (com == 'client') {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{' '}
|
|
||||||
<font
|
<font
|
||||||
className='icon'
|
className='icon'
|
||||||
style={{
|
style={{
|
||||||
|
@ -398,7 +392,7 @@ export default class acclist extends React.Component {
|
||||||
parseInt(rowData.client)
|
parseInt(rowData.client)
|
||||||
)
|
)
|
||||||
}}>
|
}}>
|
||||||
{' '}
|
|
||||||
</font>
|
</font>
|
||||||
{menu.pageStatus(parseInt(rowData.client))}
|
{menu.pageStatus(parseInt(rowData.client))}
|
||||||
</span>
|
</span>
|
||||||
|
@ -407,7 +401,7 @@ export default class acclist extends React.Component {
|
||||||
if (com == 'page') {
|
if (com == 'page') {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{' '}
|
|
||||||
<font
|
<font
|
||||||
className='icon'
|
className='icon'
|
||||||
style={{
|
style={{
|
||||||
|
@ -415,7 +409,7 @@ export default class acclist extends React.Component {
|
||||||
parseInt(rowData.page)
|
parseInt(rowData.page)
|
||||||
)
|
)
|
||||||
}}>
|
}}>
|
||||||
{' '}
|
|
||||||
</font>
|
</font>
|
||||||
{menu.pageTypeStatus(parseInt(rowData.page))}
|
{menu.pageTypeStatus(parseInt(rowData.page))}
|
||||||
</span>
|
</span>
|
||||||
|
@ -429,16 +423,15 @@ export default class acclist extends React.Component {
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
this.editFn(e, rowData)
|
this.editFn(e, rowData)
|
||||||
}}>
|
}}>
|
||||||
{' '}
|
编辑
|
||||||
编辑{' '}
|
</a>
|
||||||
</a>{' '}
|
|
||||||
<a
|
<a
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
this.onPreview(e, rowData)
|
this.onPreview(e, rowData)
|
||||||
}}
|
}}
|
||||||
className='grid-link'>
|
className='grid-link'>
|
||||||
{' '}
|
|
||||||
预览{' '}
|
预览
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
|
@ -448,14 +441,14 @@ export default class acclist extends React.Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Pop trigger='hover' content={content}>
|
<Pop trigger='hover' content={content}>
|
||||||
{' '}
|
|
||||||
<a href={rowData.href}>{rowData.href}</a>{' '}
|
<a href={rowData.href}>{rowData.href}</a>
|
||||||
</Pop>
|
</Pop>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>{' '}
|
</div>
|
||||||
</TabPage>
|
</TabPage>
|
||||||
{this.state.preview_visible ? (
|
{this.state.preview_visible ? (
|
||||||
<PreviewEffect
|
<PreviewEffect
|
||||||
|
|
Loading…
Reference in New Issue