Commit 7f6e3ece authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:修改商品查看部分问题,新增云鲜采式商品描述模板

parent 6f33ac82
...@@ -86,9 +86,9 @@ const AddProducts: React.FC<{}> = (props) => { ...@@ -86,9 +86,9 @@ const AddProducts: React.FC<{}> = (props) => {
// 切换模板 // 切换模板
const renderTemplate = () => { const renderTemplate = () => {
// if(currentTemplateName === 'science') // if(currentTemplateName === 'science')
// return <ProductDescFormDefualt /> return <ProductDescFormDefualt />
// else if(currentTemplateName === 'cloud') // else if(currentTemplateName === 'cloud')
return <ProductDescFormCloud /> // return <ProductDescFormCloud />
} }
const onSave = () => { const onSave = () => {
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
// productDescFormCloud // productDescFormCloud // yunxiancai template
.cloud-container{ .cloud-container{
width: 790px; width: 790px;
} }
...@@ -66,14 +66,15 @@ ...@@ -66,14 +66,15 @@
border:1px solid rgba(235,236,240,1); border:1px solid rgba(235,236,240,1);
text-align: center; text-align: center;
color:rgba(151,160,175,1); color:rgba(151,160,175,1);
height: 148px; // height: 148px;
height: 48px;
p{ p{
height: 128px; height: 128px;
line-height: 128px; line-height: 128px;
} }
.cloudPVideo, .cloudMiddleAddBtn{ .cloudPVideo, .cloudMiddleAddBtn{
height: 44px; // height: 44px;
line-height: 1.5; // line-height: 1.5;
position: absolute; position: absolute;
top:50%; top:50%;
left:50%; left:50%;
......
...@@ -145,11 +145,13 @@ ...@@ -145,11 +145,13 @@
padding: 12px 0; padding: 12px 0;
border:1px solid rgba(235,236,240,1); border:1px solid rgba(235,236,240,1);
display: flex; display: flex;
flex-flow: wrap;
justify-content: left; justify-content: left;
.imgItem{ .imgItem{
width:180px; width:180px;
height:180px; height:180px;
margin-left: 16px; margin-left: 16px;
margin-bottom: 12px;
border:1px solid rgba(235,236,240,1); border:1px solid rgba(235,236,240,1);
img{ img{
width: 100%; width: 100%;
...@@ -161,11 +163,18 @@ ...@@ -161,11 +163,18 @@
height:240px; height:240px;
margin-left: 16px; margin-left: 16px;
border:1px solid rgba(235,236,240,1); border:1px solid rgba(235,236,240,1);
video {
width: 100%;
height: 100%;
}
} }
p{ p{
padding: 16px; padding: 0 16px;
} }
} }
.description-word-box{
flex-direction: column;
}
.product-img-box{ .product-img-box{
margin: 24px; margin: 24px;
padding: 12px 0; padding: 12px 0;
...@@ -192,6 +201,9 @@ ...@@ -192,6 +201,9 @@
border-radius:4px; border-radius:4px;
color:rgba(0,179,122,1); color:rgba(0,179,122,1);
} }
.descript-null {
opacity: 0.6;
}
// 修改单价 // 修改单价
.site-input-right { .site-input-right {
......
...@@ -8,6 +8,7 @@ import { ...@@ -8,6 +8,7 @@ import {
UserOutlined UserOutlined
} from '@ant-design/icons' } from '@ant-design/icons'
import { ColumnType } from 'antd/lib/table/interface' import { ColumnType } from 'antd/lib/table/interface'
import cx from 'classnames'
import ReutrnEle from '@/components/ReturnEle' import ReutrnEle from '@/components/ReturnEle'
import styles from "./index.less" import styles from "./index.less"
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
...@@ -583,10 +584,14 @@ const viewProducts: React.FC<{}> = () => { ...@@ -583,10 +584,14 @@ const viewProducts: React.FC<{}> = () => {
</Space> </Space>
<Space direction="vertical" style={{width:'100%'}}> <Space direction="vertical" style={{width:'100%'}}>
<Card headStyle={{borderBottom:'none'}} title="商品描述"> <Card headStyle={{borderBottom:'none'}} title="商品描述">
{/* 预留 文字区块 */} {/* 文字区块 */}
{/* <div className={styles.descriptionBox}> <div className={cx(styles.descriptionBox, styles.descriptionWordBox)}>
<p>商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述商品描述</p> {
</div> */} productDetail?.commodityRemark?.word?.length>0 ? productDetail?.commodityRemark?.word.map((_item, _index) =>
_item && <p>{_item}</p>
) : <p className={styles.descriptNull}>暂无文字数据</p>
}
</div>
{/* 视频区块 */} {/* 视频区块 */}
<div className={styles.descriptionBox}> <div className={styles.descriptionBox}>
{ {
...@@ -594,15 +599,15 @@ const viewProducts: React.FC<{}> = () => { ...@@ -594,15 +599,15 @@ const viewProducts: React.FC<{}> = () => {
<video src={_item} controls={true}> <video src={_item} controls={true}>
您的浏览器不支持视频标签,请及时升级。 您的浏览器不支持视频标签,请及时升级。
</video> </video>
</div>) : <p>暂无数据</p> </div>) : <p className={styles.descriptNull}>暂无视频数据</p>
} }
</div> </div>
{/* 图片区块 */} {/* 图片区块 */}
<div className={styles.descriptionBox}> <div className={styles.descriptionBox}>
{ {
productDetail?.commodityRemark?.image?.length>0 ? productDetail?.commodityRemark?.image.map((_item, _index)=> <div key={_index} className={styles.imgItem}> productDetail?.commodityRemark?.image?.length>0 ? productDetail?.commodityRemark?.image.map((_item, _index)=> _item && <div key={_index} className={styles.imgItem}>
<img src={_item} /> <img src={_item} />
</div>) : <p>暂无数据</p> </div>) : <p className={styles.descriptNull}>暂无图片数据</p>
} }
</div> </div>
</Card> </Card>
......
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