Browse Source

收藏优化

liting2017 6 years ago
parent
commit
bc83f46090

+ 5 - 5
js/component/account/index/collection.jsx

@@ -200,16 +200,16 @@ class Collection extends Component {
             </div>
             <div>
                 <Radio.Group className="btnGroup" value={this.state.nub} onChange={this.tabFun.bind(this)}>
-                    <Radio.Button value="1">科技服务</Radio.Button>
-                    <Radio.Button value="2">科技需求</Radio.Button>
-                    <Radio.Button value="3">科技成果</Radio.Button>
+                    <Radio.Button value="1">运用</Radio.Button>
+                    <Radio.Button value="2">需求</Radio.Button>
+                    <Radio.Button value="3">成果</Radio.Button>
                 </Radio.Group>
             </div>
             <div className="imgList">
                 <Spin spinning={this.state.loading}>
                     {dataList.length?<Row>
                         {dataList.map((item,index)=>{
-                            return<Col span={6} key={index} onClick={(e)=>{this.jump(item)}}>
+                            return<Col span={5} key={index} onClick={(e)=>{this.jump(item)}}>
                                     <div className="img">
                                         <div className="imgHeader">
                                             <div className="imgBj">
@@ -226,7 +226,7 @@ class Collection extends Component {
                     </Row>:
                     <Row style={{color:'#333'}}>暂无数据</Row>}
                 </Spin>
-                {this.state.total?<Pagination className="page" pageSize={this.props.nub?4:8} current={this.state.current} total={this.state.total} onChange={this.onShowSizeChange.bind(this)}/>:''}
+                {this.state.total?<Pagination className="page" pageSize={this.props.nub?4:8} current={this.state.current} total={this.state.total} onChange={(e,pageSize)=>{this.onShowSizeChange(e,pageSize)}}/>:''}
             </div>
         </div>
 	}

+ 17 - 11
js/component/account/index/follow.jsx

@@ -2,6 +2,7 @@ import React, { Component } from 'react';
 import { Button,Radio ,message,Row,Col, Spin,Pagination} from 'antd';
 import axios from 'axios';
 import './collection.less';
+import {getAdviserType} from '@/tools.js'
 
 class Collection extends Component {
 	constructor(props) {
@@ -39,6 +40,7 @@ class Collection extends Component {
                         id: thisdata.uid,
                         name:thisdata.username,
                         expert:thisdata.expert,
+                        consultantType:thisdata.consultantType,
                         introduce:thisdata.introduction&&thisdata.introduction.length>40?thisdata.introduction.substr(0,40)+'...':thisdata.introduction,
                         img: thisdata.headPortraitUrl, //编号
                     });
@@ -68,17 +70,22 @@ class Collection extends Component {
             current:current,
             pageSize:pageSize
         })
+        this.loadDataService(current)
     }
     jump(item){
         let url='';
-        switch(item.expert){
-            case 1:
-                url = globalConfig.context+`/portal/subscriberDetail.html?uid=${item.id}&type=0`;
-                break;
-            case 2:
-                url = globalConfig.context+`/portal/adviser/adviserDetail?id=${item.id}`;
-                break;
-            default:return;
+        if(item.consultantType=='4'){
+            url = globalConfig.context+`/portal/service/safeguardingDetail?id=${item.id}`;
+        }else{
+            switch(item.expert){
+                case 1:
+                    url = globalConfig.context+`/portal/subscriberDetail.html?uid=${item.id}&type=0`;
+                    break;
+                case 2:
+                    url = globalConfig.context+`/portal/adviser/adviserDetail?id=${item.id}`;
+                    break;
+                default:return;
+            }
         }
         window.open(url);
     }
@@ -103,7 +110,7 @@ class Collection extends Component {
                                             </div>
                                             <div className="divP"><p>{item.introduce}</p></div>
                                         </div>  
-                                        <p className="txt">{item.name?item.name:'佚名'}<span>{item.expert==1?' - (专家)':' - (顾问)'}</span></p>
+                                        <p className="txt">{item.name?item.name:'佚名'}<span>{item.expert==1?' - (专家)':' - ('+getAdviserType(item.consultantType)+')'}</span></p>
                                     </div>
                                 </Col>
                         })
@@ -111,9 +118,8 @@ class Collection extends Component {
                     </Row>:
                     <Row style={{color:'#333'}}>暂无数据</Row>}
                 </Spin>
-                {this.state.total?<Pagination className="page" pageSize={8} current={this.state.current} total={this.state.total} onChange={this.onShowSizeChange.bind(this)}/>:''}
+                {this.state.total?<Pagination className="page" pageSize={8} current={this.state.current} total={this.state.total} onChange={(e,pageSize)=>{this.onShowSizeChange(e,pageSize)}}/>:''}
             </div>
-           
         </div>
 	}
 }

+ 4 - 6
js/component/administration/authentication/techAuth.jsx

@@ -5,7 +5,7 @@ import moment from 'moment';
 import './techDemand.less';
 import TechDemandDesc from './authDesc.jsx';
 import { industry,authState } from '@/dataDic.js';
-import { getAuthState,getIndustry } from '@/tools.js';
+import { getAuthState,getIndustry ,getAdviserType} from '@/tools.js';
 
 const DemandList = React.createClass({
     loadData(pageNo) {
@@ -117,11 +117,9 @@ const DemandList = React.createClass({
                     render: (text,recard) => { 
                         if(text=='1'){
                             return '专家认证';
-                        }else if(text=='2'&&recard.consultantType=='4'){
-                            return '法律顾问认证';
-                        }else if(text=='2'&&recard.consultantType!='4'){
-                            return '顾问认证';
-                        }else{
+                        }else if(text=='2'){
+                            return getAdviserType(recard.consultantType)
+                        }else {
                             return '未认证';
                         }
                     }