Commit 9398e5f2 by wufan

fix:修复banner问题

parent fc3c5234
......@@ -203,7 +203,7 @@ class ChooseMembersModal extends React.Component {
title: '全选', // 实际为头像,但在表格上这行要求显示为全选
key: 'avatar',
dataIndex: 'avatar',
width: '40',
width: '30px',
render: (value, record) => {
return (
<div className='avatar'>
......@@ -220,7 +220,7 @@ class ChooseMembersModal extends React.Component {
key: 'adminNameLeft',
dataIndex: 'adminName',
width: '30%',
align: 'center',
align: 'left',
render: (value, record) => {
const { adminName } = record;
return (
......@@ -290,7 +290,7 @@ class ChooseMembersModal extends React.Component {
<div className='choose-container'>
{/* 拥有文件夹权限的成员列表 */}
<div className='container-left'>
<span className='container-left-header'>选择</span>
<div className='container-left-header'>选择</div>
<div className='container-left-body'>
<Search
placeholder='请输入姓名'
......
......@@ -7,10 +7,13 @@
margin-left: 10px;
.container-left-header{
margin-bottom: 10px;
margin-bottom: 12px;
}
.container-left-body{
border: 1px solid #E9E9E9;
.ant-table-thead > tr > th {
font-weight:400!important;
}
.search{
width: 305px;
padding: 7px 7px;
......
......@@ -194,7 +194,7 @@ class ManagingMembersModal extends React.Component {
title : '头像',
key : 'avatar',
dataIndex : 'avatar',
width : '13%',
width : '20%',
align : 'right',
render : (value, record) => {
return (
......
......@@ -5,7 +5,6 @@
.managing-left{
float: left;
margin-left: 10px;
.tool-tip-left{
cursor: pointer;
margin-left: 4px;
......@@ -17,7 +16,6 @@
.managing-right{
float: right;
color: #FFB714;
margin-right: 10px;
cursor: pointer;
.tool-tip-right{
margin-right: 4px;
......
......@@ -5,8 +5,8 @@ import { message } from 'antd';
/*
* @Author: 吴文洁
* @Date: 2020-08-11 11:47:14
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-15 17:57:31
* @LastEditors: wufan
* @LastEditTime: 2021-01-03 21:04:30
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
......@@ -23,7 +23,7 @@ class Upload {
const signInfo = res.result;
const { fileUrl } = res.result
return this.uploadBlobToNewOSS(Blob, name, dir, signInfo.signatureVO || signInfo).then(() => {
console.log('url2222222');
console.log('url2222222',fileUrl);
return dataType === 'url' ? fileUrl : signInfo
});
})
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-29 16:56:02
* @LastEditTime: 2021-01-03 22:37:32
* @Description: web店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -49,7 +49,8 @@ class StoreH5Decoration extends React.Component {
diskList: [],
photoclip: null,
preview: "",
cutImageBlob: null
cutImageBlob: null,
hasImgReady: false // 图片是否上传成功
};
}
......@@ -104,12 +105,12 @@ class StoreH5Decoration extends React.Component {
title: "操作",
dataIndex: "operation",
width: "20%",
render: (val, record) => {
render: (val, record, index) => {
return (
<div className="operation">
<span
className="edit"
onClick={() => this.handleReplaceDecoration(record)}
onClick={() => this.handleReplaceDecoration(record,index)}
>
替换
</span>
......@@ -128,7 +129,9 @@ class StoreH5Decoration extends React.Component {
};
handleToAddStoreDecoration = () => {
if (this.state.storeDecorationlist.length >= 5) {
const { choosedBannerId } = this.state;
if (this.state.storeDecorationlist.length >= 5 && !choosedBannerId) {
message.info("最多可添加5条");
return;
}
......@@ -139,10 +142,11 @@ class StoreH5Decoration extends React.Component {
});
};
handleReplaceDecoration = (record) => {
handleReplaceDecoration = (record, index) => {
this.setState({
showSelectFileModal: true,
choosedBannerId: record.id,
choosedBannerItem:record
});
};
......@@ -259,6 +263,7 @@ class StoreH5Decoration extends React.Component {
const _dataUrl = this.clip()
self.setState({
dataUrl: _dataUrl,
hasImgReady: true
})
}, 100)
......@@ -351,7 +356,8 @@ class StoreH5Decoration extends React.Component {
showSelectFileModal,
diskList,
visible,
cutImageBlob
cutImageBlob,
hasImgReady
} = this.state;
const DraggableContainer = (props) => (
<SortableContainer
......@@ -421,7 +427,7 @@ class StoreH5Decoration extends React.Component {
key="back"
onClick={() => {
this.setState({ visible: false });
this.handleToAddStoreDecoration();
this.state.choosedBannerId ? this.handleReplaceDecoration(this.state.choosedBannerItem):this.handleToAddStoreDecoration();
}}
>
重新上传
......@@ -429,6 +435,7 @@ class StoreH5Decoration extends React.Component {
<Button
key="submit"
type="primary"
disabled={!hasImgReady}
onClick={() => {
if (!cutFlag) {
cutFlag = true;
......
......@@ -2,7 +2,7 @@
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2020-12-29 16:56:29
* @LastEditTime: 2021-01-03 22:40:31
* @Description: web店铺banner页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......@@ -49,7 +49,8 @@ class StoreWebDecoration extends React.Component {
diskList: [],
photoclip: null,
preview: "",
cutImageBlob: null
cutImageBlob: null,
hasImgReady: false // 图片是否上传成功
};
}
......@@ -128,7 +129,8 @@ class StoreWebDecoration extends React.Component {
};
handleToAddStoreDecoration = () => {
if (this.state.storeDecorationlist.length >= 5) {
const { choosedBannerId } = this.state;
if (this.state.storeDecorationlist.length >= 5 && !choosedBannerId) {
message.info("最多可添加5条");
return;
}
......@@ -143,6 +145,7 @@ class StoreWebDecoration extends React.Component {
this.setState({
showSelectFileModal: true,
choosedBannerId: record.id,
choosedBannerItem:record
});
};
......@@ -259,6 +262,7 @@ class StoreWebDecoration extends React.Component {
const _dataUrl = this.clip()
self.setState({
dataUrl: _dataUrl,
hasImgReady: true
})
}, 100)
......@@ -421,7 +425,7 @@ class StoreWebDecoration extends React.Component {
key="back"
onClick={() => {
this.setState({ visible: false });
this.handleToAddStoreDecoration();
this.state.choosedBannerId ? this.handleReplaceDecoration(this.state.choosedBannerItem):this.handleToAddStoreDecoration();
}}
>
重新上传
......@@ -429,6 +433,7 @@ class StoreWebDecoration extends React.Component {
<Button
key="submit"
type="primary"
disabled={!hasImgReady}
onClick={() => {
if (!cutFlag) {
cutFlag = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment