Merge branch 'couponV1.5' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend into couponV1.5
This commit is contained in:
commit
9e7cb54f82
|
@ -1,21 +1,13 @@
|
||||||
import ReactDOM from 'react-dom'
|
import React from 'react'
|
||||||
import React, { Component } from 'react'
|
|
||||||
import './main.less'
|
import './main.less'
|
||||||
import '../../../assets/comm.css'
|
import '../../../assets/comm.css'
|
||||||
import {
|
import {
|
||||||
Notify,
|
Notify,
|
||||||
BlockLoading,
|
BlockLoading,
|
||||||
Button,
|
Button,
|
||||||
Input,
|
|
||||||
onUpload,
|
|
||||||
RadioGroup,
|
RadioGroup,
|
||||||
RadioButton,
|
RadioButton
|
||||||
Dropdown,
|
|
||||||
Icon
|
|
||||||
} from 'zent'
|
} from 'zent'
|
||||||
import Ipt from '../../../components/input/main'
|
|
||||||
import Form from '../../../components/form/main'
|
|
||||||
import FormItem from '../../../components/form-item/main'
|
|
||||||
import {
|
import {
|
||||||
uploadImg,
|
uploadImg,
|
||||||
handelResponse,
|
handelResponse,
|
||||||
|
@ -88,7 +80,6 @@ export default class edittemplate extends React.Component {
|
||||||
activeHeight: 667,
|
activeHeight: 667,
|
||||||
pageStep: 1,
|
pageStep: 1,
|
||||||
showPage: 1,
|
showPage: 1,
|
||||||
fontSize: 10000 / (375 * 0.75),
|
|
||||||
setStyle: { width: '375px', height: '667px', transform: 'scale(0.75)' },
|
setStyle: { width: '375px', height: '667px', transform: 'scale(0.75)' },
|
||||||
detailType: 1 //详情页1 权益 2-立减金
|
detailType: 1 //详情页1 权益 2-立减金
|
||||||
}
|
}
|
||||||
|
@ -579,44 +570,9 @@ export default class edittemplate extends React.Component {
|
||||||
showactivedetail(c) {
|
showactivedetail(c) {
|
||||||
this.setState({ detailactiveshow: false })
|
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) {
|
handleSize(width, height) {
|
||||||
let style = { width: width + 'px', height: height + 'px' }
|
let style = { width: width + 'px', height: height + 'px' }
|
||||||
let fontSize = null
|
|
||||||
switch (height) {
|
switch (height) {
|
||||||
case 667:
|
case 667:
|
||||||
style = { width: '375px', height: '667px', transform: 'scale(0.75)' }
|
style = { width: '375px', height: '667px', transform: 'scale(0.75)' }
|
||||||
|
|
|
@ -23,7 +23,6 @@ export default class previewEffect extends React.Component {
|
||||||
}
|
}
|
||||||
handleSize(width, height) {
|
handleSize(width, height) {
|
||||||
let style = { width: width + 'px', height: height + 'px' }
|
let style = { width: width + 'px', height: height + 'px' }
|
||||||
let fontSize = null
|
|
||||||
switch (height) {
|
switch (height) {
|
||||||
case 667:
|
case 667:
|
||||||
style = { width: '375px', height: '667px', transform: 'scale(0.75)' }
|
style = { width: '375px', height: '667px', transform: 'scale(0.75)' }
|
||||||
|
|
Loading…
Reference in New Issue