Kaynağa Gözat

修改页面

Csy817 7 yıl önce
ebeveyn
işleme
c21858e3ed

+ 4 - 1
src/app/basicVersion/caseShow/CaseDetail.js

@@ -152,12 +152,15 @@ class CaseDetail extends Component {
                                                                 <div>
                                                                     <div className={'schema-name'}><FormattedMessage id='detail'/></div>
                                                                     <div className={'case-detail-attention'}> {thisCase.detailAttention? <div><Icon type="alert" />{thisCase.detailAttention}</div> : ''}</div>
+                                                                    <div className={"case-detail-result"}>
+                                                                        <img alt="案例展示" src={thisCase.img}/>
+                                                                    </div>
                                                                     <div className={'case-detail-description'}>{thisCase.detailDescription ? thisCase.detailDescription : '暂无简介'}</div>
                                                                     <div className={'detail-images'}>
                                                                         {
                                                                             thisCase.detailImages.map(img => (
                                                                                 <img key={img} src={img} alt=""
-                                                                                     height="500"/>
+                                                                                     height="500" />
                                                                             ))
                                                                         }
                                                                     </div>

+ 35 - 35
src/app/basicVersion/caseShow/CaseShow.jsx

@@ -85,41 +85,41 @@ class CaseShow extends Component {
                                 }
                             </div>
                         </div>
-                        <div>
-                            <div className={'schema-name'}><FormattedMessage id='other developer case'/></div>
-                            <div className="caseAllShow">
-                                {
-                                    this.state.examplesOthers.length === 0 ?
-                                        <Spin/>
-                                        :
-                                        this.state.examplesOthers.map((item, index) => (
-                                            <span key={index} style={{padding: '10px 0'}}>
-                                        <Card
-                                            key={index}
-                                            style={{width: 300}}
-                                            cover={<div className='cover-div'><img className='cover-img' src={item.img} alt={item.title + '' + item.description}/></div>}
-                                            actions={[
-                                                <span>已部署: {item.deployedNum}</span>,
-                                                <span><Icon type="like" />: {item.like}</span>,
-                                                <Button type="primary" onClick={() => {
-                                                    this.props.history.push({
-                                                        pathname: `/common/deploy-cloud-choose`,
-                                                        state: {caseID: item.id,}
-                                                    });
-                                                }}><FormattedMessage id='step more'/></Button>
-                                            ]}
-                                        >
-                                            <Meta
-                                                avatar={<Avatar src={item.user_id.avatar}/>}
-                                                title={item.title}
-                                                description={item.description}
-                                            />
-                                        </Card>
-                                    </span>
-                                        ))
-                                }
-                            </div>
-                        </div>
+                        {/*<div>*/}
+                            {/*<div className={'schema-name'}><FormattedMessage id='other developer case'/></div>*/}
+                            {/*<div className="caseAllShow">*/}
+                                {/*{*/}
+                                    {/*this.state.examplesOthers.length === 0 ?*/}
+                                        {/*<Spin/>*/}
+                                        {/*:*/}
+                                        {/*this.state.examplesOthers.map((item, index) => (*/}
+                                            {/*<span key={index} style={{padding: '10px 0'}}>*/}
+                                        {/*<Card*/}
+                                            {/*key={index}*/}
+                                            {/*style={{width: 300}}*/}
+                                            {/*cover={<div className='cover-div'><img className='cover-img' src={item.img} alt={item.title + '' + item.description}/></div>}*/}
+                                            {/*actions={[*/}
+                                                {/*<span>已部署: {item.deployedNum}</span>,*/}
+                                                {/*<span><Icon type="like" />: {item.like}</span>,*/}
+                                                {/*<Button type="primary" onClick={() => {*/}
+                                                    {/*this.props.history.push({*/}
+                                                        {/*pathname: `/common/deploy-cloud-choose`,*/}
+                                                        {/*state: {caseID: item.id,}*/}
+                                                    {/*});*/}
+                                                {/*}}><FormattedMessage id='step more'/></Button>*/}
+                                            {/*]}*/}
+                                        {/*>*/}
+                                            {/*<Meta*/}
+                                                {/*avatar={<Avatar src={item.user_id.avatar}/>}*/}
+                                                {/*title={item.title}*/}
+                                                {/*description={item.description}*/}
+                                            {/*/>*/}
+                                        {/*</Card>*/}
+                                    {/*</span>*/}
+                                        {/*))*/}
+                                {/*}*/}
+                            {/*</div>*/}
+                        {/*</div>*/}
                     </Content>
                 </Layout>
             </div>

+ 3 - 1
src/app/basicVersion/caseShow/UserCustom.js

@@ -7,6 +7,7 @@ import {FormattedMessage} from 'react-intl';
 import {request} from 'graphql-request'
 import {idGen} from "../../../func";
 import axios from 'axios';
+import './index.css';
 
 const RadioGroup = Radio.Group;
 axios.defaults.withCredentials = true;
@@ -219,7 +220,8 @@ class UserCustom extends Component {
                 <div className="column-menu" onClick={() => {
                     this.props.backToMe()
                 }}>
-                    <Icon type="left" style={{color: '#3187FA'}}/> <FormattedMessage id="back to case show"/>
+                    <Icon type="left" style={{color: '#3187FA'}}/>
+                    <FormattedMessage id="back to case show"/>
                 </div>
 
                 <div>

+ 8 - 3
src/app/basicVersion/caseShow/index.css

@@ -10,12 +10,11 @@
 }
 
 .cover-div {
-    height: 180px;
+    height: 200px;
     text-align: center;
-    padding-top: 10px;
+    margin-top: 20px;
 }
 
-
 .cover-img {
     width: auto;
     height: auto;
@@ -66,4 +65,10 @@
 
 .case-detail-description {
     color: #3f536e;
+    font-size: 16px;
+}
+
+.column-menu span{
+    font-size: 18px;
+    padding-left: 10px;
 }

+ 1 - 0
src/gql.js

@@ -1057,6 +1057,7 @@ const SHOW_CASE = `
                     schema_id {
                         id
                     }   
+                    img
                     detailDescription
                     detailImages
                     user_id {

BIN
src/images/lo.png