diff --git a/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js b/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js index 615e1a39..bac7b71f 100644 --- a/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js @@ -2,9 +2,35 @@ import React, {Component} from 'react'; import {Link} from "react-router-dom"; import axios from 'axios'; import { Input ,Icon,Button,Pagination} from 'antd'; +import moment from 'moment'; import '../packageconcnet.css'; const { Search } = Input; +let categorylist=[ + {name:"全部",value:undefined}, + {name:"前端开发",value:"front"}, + {name:"后端开发",value:"backend"}, + {name:"移动开发",value:"mobile"}, + {name:"数据库",value:"database"}, + {name:"云计算和大数据",value:"cloud_compute_and_big_data"}, + {name:"人工智能",value:"ai"}, + {name:"其他",value:"other"}, +] + +function setcategorylist(val){ + let vals="" + categorylist.some((item,key)=> { + if (item.value === val) { + vals=item.name + return true + } + } + ) + + return vals +} + + class PackageConcent extends Component { constructor(props) { @@ -95,17 +121,8 @@ class PackageConcent extends Component { this.setdatas(category,keyword,value,sort_directionvalue,page) } render() { - let {data,page,category,sort_by,sort_direction}=this.state; - let categorylist=[ - {name:"全部",value:undefined}, - {name:"前端开发",value:"front"}, - {name:"后端开发",value:"backend"}, - {name:"移动开发",value:"mobile"}, - {name:"数据库",value:"database"}, - {name:"云计算和大数据",value:"cloud_compute_and_big_data"}, - {name:"人工智能",value:"ai"}, - {name:"其他",value:"other"}, - ] + let {data,page,category,sort_by,sort_direction,project_packages}=this.state; + return (
@@ -178,64 +195,68 @@ class PackageConcent extends Component {
-
+ {project_packages&&project_packages.map((item,key)=>{ + return( +
-
+
-
- -
+
+ +
-
+
- -
-
人工智能
-
+
+
{setcategorylist(item.category)}
+
-
-
- - 人浏览 -
-
+
+
+ + {item.visit_count}人浏览 +
+
- - 内竞标截止 + + {moment(item.deadline_at).endOf('day').fromNow()}竞标截止 -
-
+
+
- - 人竞标 + + {item.bidding_users_count}人竞标 + +
+
+
+ 发布于:{moment(item.published_at).format("YYYY-MM-DD HH:mm")} +
+
-
-
- 发布于: -
-
-
-
+ ) + })}
diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index 22058df5..e42606e2 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -6,7 +6,7 @@ import { handleDateString,getUrl} from 'educoder'; import locale from 'antd/lib/date-picker/locale/zh_CN'; import MDEditors from '../MDEditors'; import PhoneModel from './PhoneModel'; -import moment from 'moment' +import moment from 'moment'; import '../packageconcnet.css'; const { Search } = Input; const $ = window.$; @@ -105,8 +105,8 @@ class PackageIndexNEIBannerConcent extends Component { var url = `/account/get_verification_code.json`; axios.get((url), { params: { - login: contact_phone, - type: code, + value: contact_phone, + type: 9, } }).then((result) => { //验证有问题{"status":1,"message":"success"}