Merge branch 'couponV1.5' of codeup.aliyun.com:5f9118049cffa29cfdd3be1c/marketing/frontend into couponV1.5

This commit is contained in:
wangsongsole 2022-08-25 14:24:35 +08:00
commit 9e7cb54f82
2 changed files with 126 additions and 171 deletions

View File

@ -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)' }

View File

@ -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)' }