diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js
index d81a0b58..c63d67c1 100644
--- a/src/pages/exchangepage/edittemplate/main.js
+++ b/src/pages/exchangepage/edittemplate/main.js
@@ -1,21 +1,13 @@
-import ReactDOM from 'react-dom'
-import React, { Component } from 'react'
+import React from 'react'
import './main.less'
import '../../../assets/comm.css'
import {
Notify,
BlockLoading,
Button,
- Input,
- onUpload,
RadioGroup,
- RadioButton,
- Dropdown,
- Icon
+ RadioButton
} from 'zent'
-import Ipt from '../../../components/input/main'
-import Form from '../../../components/form/main'
-import FormItem from '../../../components/form-item/main'
import {
uploadImg,
handelResponse,
@@ -88,7 +80,6 @@ export default class edittemplate extends React.Component {
activeHeight: 667,
pageStep: 1,
showPage: 1,
- fontSize: 10000 / (375 * 0.75),
setStyle: { width: '375px', height: '667px', transform: 'scale(0.75)' },
detailType: 1 //详情页1 权益 2-立减金
}
@@ -579,44 +570,9 @@ export default class edittemplate extends React.Component {
showactivedetail(c) {
this.setState({ detailactiveshow: false })
}
- onUpload = (file, report) => {
- return new Promise((resolve, reject) => {
- let path = ''
- let formdata = new FormData()
- formdata.append('file', file)
- formdata.append('path', 'common_image')
- uploadImg(formdata).then((res) => {
- handelResponse(
- res,
- (req, msg) => {
- path = req.path
- },
- (err) => {
- reject()
- }
- )
- })
-
- let count = 0
- const update = () => {
- if (path) {
- resolve(path)
- } else {
- if (count < 100) {
- count += 2
- report(count)
- setTimeout(update, 500)
- } else {
- reject()
- }
- }
- }
- setTimeout(update, 500)
- })
- }
+
handleSize(width, height) {
let style = { width: width + 'px', height: height + 'px' }
- let fontSize = null
switch (height) {
case 667:
style = { width: '375px', height: '667px', transform: 'scale(0.75)' }
@@ -701,8 +657,8 @@ export default class edittemplate extends React.Component {
}
/>
) : (
-
- )}
+
+ )}
{!this.state.model.middle_image ? (
@@ -713,8 +669,8 @@ export default class edittemplate extends React.Component {
}
/>
) : (
-
- )}
+
+ )}
{this.state.showType == 1 ? (
) : (
-
- )}
+
+ )}
{this.state.model.describe &&
this.state.model.describe.bg_image ? (
-
- ) : null}
+
+ ) : null}
@@ -759,13 +715,13 @@ export default class edittemplate extends React.Component {
src={this.state.product_list.top_image}
/>
) : (
-
- )}
+
+ )}
{this.state.product_list.list == 2 ? (
) : (
-
- )}
+
+ )}
{this.state.product_list.list == 2 ? (
+
{this.state.product_detail.describe.type == 2 ? (
) : (
-
-
-
-
- )}
+
+
+
+
+ )}
) : (
-
- )}
+
+ )}
{!this.state.model.middle_image ? (
@@ -982,12 +938,12 @@ export default class edittemplate extends React.Component {
}
/>
) : (
-
- )}
+
+ )}
{this.state.showType == 1 ? (
) : (
-
- )}
+
+ )}
@@ -1012,29 +968,29 @@ export default class edittemplate extends React.Component {
this.state.model.describe.type == 0 ? null : this.state
.model.describe &&
this.state.model.describe.type == 1 ? (
+
+ ) : (
+
+ {this.state.model.describe &&
+ this.state.model.describe.bg_image ? (
- ) : (
-
- {this.state.model.describe &&
- this.state.model.describe.bg_image ? (
-
- ) : null}
- {this.state.model.describe &&
- this.state.model.describe.content ? (
-
- ) : null}
-
- )}
+ ) : null}
+ {this.state.model.describe &&
+ this.state.model.describe.content ? (
+
+ ) : null}
+
+ )}
@@ -1043,49 +999,49 @@ export default class edittemplate extends React.Component {
{this.state.activeNavStatus != 2 ? null : this.state.activeshow &&
this.state.product_list.describe.type == 2 &&
this.state.product_list.describe.content ? (
- this.showactiveIcon(c)}
- goodsdata={this.state.product_list}
- />
- ) : (
- this.setState({ activeshow: true })}
- goodsdata={this.state.product_list}
- />
- )}
+ this.showactiveIcon(c)}
+ goodsdata={this.state.product_list}
+ />
+ ) : (
+ this.setState({ activeshow: true })}
+ goodsdata={this.state.product_list}
+ />
+ )}
{this.state.activeNavStatus != 3 ? null : this.state
.detailactiveshow &&
this.state.product_detail.describe.type == 2 &&
this.state.product_detail.describe.content ? (
- this.showactivedetail(c)}
- goodsdata={this.state.product_detail}
- />
- ) : (
-
-
-
{
- this.ondetailTypeChange(e)
- }}
- value={this.state.detailType}>
-
- 权益
-
-
- 立减金
-
+ this.showactivedetail(c)}
+ goodsdata={this.state.product_detail}
+ />
+ ) : (
+
+
+ {
+ this.ondetailTypeChange(e)
+ }}
+ value={this.state.detailType}>
+
+ 权益
+
+
+ 立减金
+
-
-
- {
- this.state.detailType == 1 ?
this.setState({ detailactiveshow: true })}
- detaildata={this.state.product_detail}
- /> :
- }
+
- )}
+ {
+ this.state.detailType == 1 ? this.setState({ detailactiveshow: true })}
+ detaildata={this.state.product_detail}
+ /> :
+ }
+
+ )}
商品列表页设置
) : (
-
商品详情页设置
- )}
+ 商品详情页设置
+ )}
{this.state.showType == 3 ? (
this.state.activeNavStatus == 1 ? (
diff --git a/src/pages/exchangepage/previewEffect/main.js b/src/pages/exchangepage/previewEffect/main.js
index f6eedda4..c563b3ad 100644
--- a/src/pages/exchangepage/previewEffect/main.js
+++ b/src/pages/exchangepage/previewEffect/main.js
@@ -23,7 +23,6 @@ export default class previewEffect extends React.Component {
}
handleSize(width, height) {
let style = { width: width + 'px', height: height + 'px' }
- let fontSize = null
switch (height) {
case 667:
style = { width: '375px', height: '667px', transform: 'scale(0.75)' }