Merge branch 'newVersion_forge' into dev_chain

This commit is contained in:
sylor_huang@126.com 2020-06-22 17:49:37 +08:00
commit c24a1eca51
62 changed files with 1304 additions and 3500 deletions

View File

@ -1266,14 +1266,16 @@ a.shixun-task-btn {
/*-------------学员统计 通关排行榜------------*/
/*-----------实训配置、评测脚本-------------*/body {
/*-----------实训配置、评测脚本-------------*/
html body {
font-size: 14px;
line-height: 2.0;
background: #fafafa !important;
background: #fafafa;
font-family: "微软雅黑", "宋体";
color: #05101a;
height: 100%;
position: relative;
padding-right: 0px!important;
}
html,

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,97 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "15465934",
"name": "组织项目",
"font_class": "zuzhixiangmu",
"unicode": "e77f",
"unicode_decimal": 59263
},
{
"icon_id": "15465923",
"name": "组织成员",
"font_class": "zuzhichengyuan",
"unicode": "e774",
"unicode_decimal": 59252
},
{
"icon_id": "14332762",
"name": "合并请求",
"font_class": "hebingqingqiu",
"unicode": "e7f2",
"unicode_decimal": 59378
},
{
"icon_id": "15226856",
"name": "实训详情",
"font_class": "shixunxiangqing",
"unicode": "e775",
"unicode_decimal": 59253
},
{
"icon_id": "15226857",
"name": "立即发布",
"font_class": "lijifabu",
"unicode": "e776",
"unicode_decimal": 59254
},
{
"icon_id": "15226858",
"name": "开启中",
"font_class": "kaiqizhong",
"unicode": "e777",
"unicode_decimal": 59255
},
{
"icon_id": "15226859",
"name": "导出",
"font_class": "daochu",
"unicode": "e778",
"unicode_decimal": 59256
},
{
"icon_id": "15226860",
"name": "一键点评",
"font_class": "yijiandianping",
"unicode": "e779",
"unicode_decimal": 59257
},
{
"icon_id": "15226861",
"name": "查看实训报告",
"font_class": "chakanshixunbaogao",
"unicode": "e77a",
"unicode_decimal": 59258
},
{
"icon_id": "15226862",
"name": "提交总结",
"font_class": "tijiaozongjie",
"unicode": "e77b",
"unicode_decimal": 59259
},
{
"icon_id": "15226863",
"name": "代码查重",
"font_class": "daimachazhong",
"unicode": "e77c",
"unicode_decimal": 59260
},
{
"icon_id": "15226864",
"name": "编辑作业",
"font_class": "bianjizuoye",
"unicode": "e77d",
"unicode_decimal": 59261
},
{
"icon_id": "15226865",
"name": "立即截止",
"font_class": "lijijiezhi",
"unicode": "e77e",
"unicode_decimal": 59262
},
{
"icon_id": "15115208",
"name": "镜像",

View File

@ -20,6 +20,45 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="zuzhixiangmu" unicode="&#59263;" d="M487.619048-128c-243.809524 0-438.857143 195.047619-438.857143 438.857143s195.047619 438.857143 438.857143 438.857143 438.857143-195.047619 438.857142-438.857143-195.047619-438.857143-438.857142-438.857143z m0 799.695238c-199.92381 0-360.838095-160.914286-360.838096-360.838095 0-199.92381 160.914286-360.838095 360.838096-360.838095 199.92381 0 360.838095 160.914286 360.838095 360.838095 0 199.92381-160.914286 360.838095-360.838095 360.838095zM195.047619 67.047619m-156.038095 0a156.038095 156.038095 0 1 1 312.07619 0 156.038095 156.038095 0 1 1-312.07619 0ZM195.047619-128c-107.27619 0-195.047619 87.771429-195.047619 195.047619s87.771429 195.047619 195.047619 195.047619 195.047619-87.771429 195.047619-195.047619-87.771429-195.047619-195.047619-195.047619z m0 312.07619c-63.390476 0-117.028571-53.638095-117.028571-117.028571s53.638095-117.028571 117.028571-117.028571 117.028571 53.638095 117.028571 117.028571-53.638095 117.028571-117.028571 117.028571zM390.095238 700.952381m-156.038095 0a156.038095 156.038095 0 1 1 312.07619 0 156.038095 156.038095 0 1 1-312.07619 0ZM390.095238 505.904762C282.819048 505.904762 195.047619 593.67619 195.047619 700.952381s87.771429 195.047619 195.047619 195.047619 195.047619-87.771429 195.047619-195.047619-87.771429-195.047619-195.047619-195.047619z m0 312.07619C326.704762 817.980952 273.066667 764.342857 273.066667 700.952381S326.704762 583.92381 390.095238 583.92381s117.028571 53.638095 117.028572 117.028571S453.485714 817.980952 390.095238 817.980952zM926.47619 310.857143m-156.038095 0a156.038095 156.038095 0 1 1 312.076191 0 156.038095 156.038095 0 1 1-312.076191 0ZM926.47619 115.809524c-107.27619 0-195.047619 87.771429-195.047619 195.047619s87.771429 195.047619 195.047619 195.047619 195.047619-87.771429 195.04762-195.047619-87.771429-195.047619-195.04762-195.047619z m0 312.07619c-63.390476 0-117.028571-53.638095-117.028571-117.028571s53.638095-117.028571 117.028571-117.028572 117.028571 53.638095 117.028572 117.028572-53.638095 117.028571-117.028572 117.028571z" horiz-adv-x="1121" />
<glyph glyph-name="zuzhichengyuan" unicode="&#59252;" d="M1029.389474-117.221053H231.747368c-70.063158 0-123.957895 53.894737-123.957894 123.957895v102.4h86.231579v-102.4c0-21.557895 16.168421-37.726316 37.726315-37.726316h797.642106c21.557895 0 37.726316 16.168421 37.726315 37.726316v754.526316c0 21.557895-16.168421 37.726316-37.726315 37.726316H231.747368c-16.168421 0-32.336842-16.168421-32.336842-37.726316v-199.410526H113.178947V761.263158c0 70.063158 53.894737 123.957895 123.957895 123.957895h797.642105c70.063158 0 123.957895-53.894737 123.957895-123.957895v-759.91579c-5.389474-64.673684-59.284211-118.568421-129.347368-118.568421zM635.742316 305.152c-102.4 0-188.631579 86.231579-188.631579 188.631579s86.231579 188.631579 188.631579 188.631579 188.631579-86.231579 188.631579-188.631579-86.231579-188.631579-188.631579-188.631579z m0 291.031579c-53.894737 0-102.4-48.505263-102.4-102.4 0-53.894737 48.505263-102.4 102.4-102.4 53.894737 0 102.4 48.505263 102.4 102.4 0 53.894737-48.505263 102.4-102.4 102.4zM872.879158 78.794105c-21.557895 0-43.115789 21.557895-43.11579 43.11579 0 107.789474-86.231579 194.021053-194.021052 194.021052s-194.021053-86.231579-194.021053-194.021052c0-21.557895-21.557895-43.115789-43.115789-43.11579s-43.115789 21.557895-43.11579 43.11579c0 156.294737 129.347368 280.252632 280.252632 280.252631 156.294737 0 280.252632-129.347368 280.252631-280.252631 0-26.947368-21.557895-43.115789-43.115789-43.11579zM231.747368 518.736842h-161.68421c-21.557895 0-43.115789 21.557895-43.11579 43.11579s21.557895 43.115789 43.11579 43.115789h161.68421c21.557895 0 43.115789-21.557895 43.11579-43.115789s-16.168421-43.115789-43.11579-43.11579zM231.747368 82.189474h-161.68421c-21.557895 0-43.115789 21.557895-43.11579 43.115789s21.557895 43.115789 43.11579 43.11579h161.68421c21.557895 0 43.115789-21.557895 43.11579-43.11579s-16.168421-43.115789-43.11579-43.115789zM231.747368 319.326316h-161.68421c-21.557895 0-43.115789 21.557895-43.11579 43.115789s21.557895 43.115789 43.11579 43.11579h161.68421c21.557895 0 43.115789-21.557895 43.11579-43.11579s-16.168421-43.115789-43.11579-43.115789z" horiz-adv-x="1185" />
<glyph glyph-name="hebingqingqiu" unicode="&#59378;" d="M224 832c88.366 0 160-71.634 160-160 0-75.987-52.97-139.602-124-155.934v-264.132C331.03 235.602 384 171.987 384 96c0-88.366-71.634-160-160-160S64 7.634 64 96c0 75.987 52.97 139.602 124 155.934V516.066C116.97 532.398 64 596.013 64 672c0 88.366 71.634 160 160 160z m0-648c-48.601 0-88-39.399-88-88s39.399-88 88-88 88 39.399 88 88-39.399 88-88 88z m0 576c-48.601 0-88-39.399-88-88s39.399-88 88-88 88 39.399 88 88-39.399 88-88 88z m416-232.855c0-11.046-8.954-20-20-20a20 20 0 0 0-12.925 4.737L436.023 656.737c-8.43 7.139-9.476 19.759-2.338 28.188a20 20 0 0 0 2.338 2.338L607.075 832.118c8.43 7.138 21.05 6.091 28.188-2.338A20 20 0 0 0 640 816.855V708h68c69.986 0 126.853-56.167 127.983-125.883L836 580v-328.066C907.03 235.602 960 171.987 960 96c0-88.366-71.634-160-160-160s-160 71.634-160 160c0 75.987 52.97 139.602 124 155.934V580c0 30.619-24.573 55.498-55.074 55.992L708 636h-68v-108.855zM800 184c-48.601 0-88-39.399-88-88s39.399-88 88-88 88 39.399 88 88-39.399 88-88 88z" horiz-adv-x="1024" />
<glyph glyph-name="shixunxiangqing" unicode="&#59253;" d="M928.036571 832c17.627429 0 31.963429-14.336 31.963429-32.036571v-636.928a31.963429 31.963429 0 0 0-32.036571-32.036572l-272.822858 0.073143v-126.171429h47.835429a35.986286 35.986286 0 0 0 6.509714-71.460571l-6.509714-0.585143H322.998857a35.986286 35.986286 0 0 0-6.436571 71.387429l6.436571 0.585143 74.093714 0.073142v126.171429l-301.129142-0.073143a31.963429 31.963429 0 0 0-31.963429 32.036572V800.036571c0 17.627429 14.336 31.963429 32.036571 31.963429h831.926858zM583.021714 4.9005710000000136v126.171429H469.138286v-126.171429h113.956571z m304.859429 248.978286H135.972571v-50.834286H887.954286v50.834286z m0 506.148572H135.972571v-434.176H887.954286V760.027429z m-310.125714-60.269715c16.237714-6.729143 25.014857-24.137143 21.357714-40.813714l-1.901714-6.217143-101.010286-244.004571a35.986286 35.986286 0 0 0-68.461714 21.357714l1.901714 6.217143L530.724571 680.228571a35.986286 35.986286 0 0 0 47.030858 19.456z m114.541714-29.184a35.986286 35.986286 0 0 0 50.907428 1.682286l86.674286-81.188571 5.851429-6.217143a68.022857 68.022857 0 0 0-2.706286-89.965715c-2.267429-2.340571-2.267429-2.340571-4.754286-4.608l-85.942857-75.337142-5.266286-3.803429a35.986286 35.986286 0 0 0-45.568 7.094857l-3.803428 5.266286a35.986286 35.986286 0 0 0 7.168 45.568l82.651428 72.484571-83.529142 78.189715-4.388572 4.827428a35.986286 35.986286 0 0 0 2.706286 46.08z m-342.601143 0a35.986286 35.986286 0 0 0 2.633143-46.006857l-4.315429-4.827428-83.529143-78.189715 82.651429-72.411428c13.312-11.702857 15.945143-31.012571 7.168-45.641143l-3.803429-5.266286a35.986286 35.986286 0 0 0-45.568-7.094857l-5.266285 3.803429-87.771429 77.019428-2.925714 2.925714a68.022857 68.022857 0 0 0-2.706286 89.965715l5.851429 6.217143 86.674285 81.188571a35.986286 35.986286 0 0 0 50.907429-1.682286z" horiz-adv-x="1024" />
<glyph glyph-name="lijifabu" unicode="&#59254;" d="M846.375385 822.902154a70.262154 70.262154 0 0 0 98.067692-73.255385l-1.890462-9.452307-188.022153-691.357539a70.262154 70.262154 0 0 0-100.43077-43.795692l-6.537846 3.938461-107.047384 71.837539-51.751385-134.537846a70.262154 70.262154 0 0 0-82.471385-42.929231l-8.428307 2.599384a70.262154 70.262154 0 0 0-44.347077 56.083693l-0.630154 9.452307V239.852308c0 18.904615 7.640615 37.021538 20.952615 50.09723l7.089231 6.144 303.261538 227.485539a37.179077 37.179077 0 0 0 49.624616-55.059692l-4.962462-4.489847-301.607384-226.146461v-244.105846l45.686154 118.626461a70.262154 70.262154 0 0 0 3.308307 7.168l3.938462 6.774154a70.262154 70.262154 0 0 0 89.954461 23.630769l7.561846-4.489846 106.496-71.364923 184.241231 677.415385L137.058462 428.268308l131.623384-84.519385c15.36-9.846154 21.031385-29.144615 14.336-45.449846l-3.150769-5.907692a37.179077 37.179077 0 0 0-45.449846-14.336l-5.907693 3.150769L90.427077 369.82153800000003a70.262154 70.262154 0 0 0 2.284308 119.729231l7.325538 3.702154L846.375385 822.902154z" horiz-adv-x="1024" />
<glyph glyph-name="kaiqizhong" unicode="&#59255;" d="M941.312 625.493333h-298.666667V757.333333a37.290667 37.290667 0 0 1-37.290666 37.376H129.365333V841.301333a9.386667 9.386667 0 0 1-9.386666 9.386667H54.698667a9.386667 9.386667 0 0 1-9.386667-9.386667v-914.602666c0-5.12 4.266667-9.386667 9.386667-9.386667h65.28c5.12 0 9.386667 4.266667 9.386666 9.386667V234.666667h289.28v-131.84c0-20.650667 16.725333-37.290667 37.376-37.290667h485.290667a37.290667 37.290667 0 0 1 37.376 37.290667V588.202667a37.290667 37.290667 0 0 1-37.376 37.290666zM129.365333 318.634667V710.656h429.226667v-392.021333h-429.226667z m765.269334-169.130667H502.698667V234.666667h130.56c5.205333 0 9.386667 4.266667 9.386666 9.386666V541.44h251.989334v-392.021333z" horiz-adv-x="1024" />
<glyph glyph-name="daochu" unicode="&#59256;" d="M651.946667 166.656l165.546666 130.645333a9.386667 9.386667 0 0 1 0 14.677334L651.946667 442.709333a9.386667 9.386667 0 0 1-15.104-7.338666v-88.746667h-378.026667a9.386667 9.386667 0 0 1-9.386667-9.301333v-65.365334c0-5.12 4.266667-9.301333 9.386667-9.301333h378.026667V174.08a9.386667 9.386667 0 0 1 15.189333-7.338667z m304.896 472.490667L767.146667 828.842667a74.325333 74.325333 0 0 1-31.146667 18.688V850.688H82.688A37.290667 37.290667 0 0 1 45.226667 813.226667v-324.266667c0-5.12 4.266667-9.386667 9.386666-9.386667h65.28c5.12 0 9.386667 4.266667 9.386667 9.386667V766.549333h158.634667v-158.634666c0-20.650667 16.725333-37.376 37.376-37.376h373.248a37.290667 37.290667 0 0 1 37.376 37.376V741.205333l158.72-158.634666V488.96c0-5.12 4.181333-9.301333 9.301333-9.301333h65.28c5.12 0 9.386667 4.266667 9.386667 9.386666V586.325333a74.410667 74.410667 0 0 1-21.845334 52.736zM661.333333 645.290667h-298.666666V766.634667h298.666666v-121.258667z m308.053334-508.586667h-65.365334a9.386667 9.386667 0 0 1-9.386666-9.386667v-125.952H129.365333V127.317333a9.386667 9.386667 0 0 1-9.386666 9.386667H54.698667a9.386667 9.386667 0 0 1-9.386667-9.386667v-172.629333c0-20.650667 16.725333-37.376 37.376-37.376H941.226667a37.290667 37.290667 0 0 1 37.376 37.376V127.317333a9.386667 9.386667 0 0 1-9.386667 9.386667z" horiz-adv-x="1024" />
<glyph glyph-name="yijiandianping" unicode="&#59257;" d="M260.010667 689.664a9.386667 9.386667 0 0 1-9.386667-9.386667v-55.978666c0-5.12 4.266667-9.301333 9.386667-9.301334h448c5.12 0 9.386667 4.266667 9.386666 9.386667v55.978667a9.386667 9.386667 0 0 1-9.386666 9.301333h-448z m214.613333-168.021333H260.010667a9.386667 9.386667 0 0 1-9.386667-9.386667v-55.893333c0-5.12 4.266667-9.386667 9.386667-9.386667h214.613333c5.12 0 9.386667 4.266667 9.386667 9.386667v55.978666a9.386667 9.386667 0 0 1-9.386667 9.386667z m-55.978667-534.272H157.354667V808.704H810.666667v-373.333333c0-5.12 4.266667-9.386667 9.386666-9.386667h65.28c5.12 0 9.386667 4.266667 9.386667 9.386667V855.296a37.290667 37.290667 0 0 1-37.376 37.376h-746.666667a37.290667 37.290667 0 0 1-37.376-37.376v-914.602667c0-20.650667 16.725333-37.376 37.376-37.376h308.053334c5.12 0 9.301333 4.266667 9.301333 9.386667v65.28a9.386667 9.386667 0 0 1-9.386667 9.386667z m513.365334 102.656H763.989333v42.666666a130.730667 130.730667 0 1 1-74.666666 0v-42.666666H521.386667a18.773333 18.773333 0 0 1-18.602667-18.773334v-177.237333c0-10.24 8.362667-18.688 18.602667-18.688h410.709333a18.773333 18.773333 0 0 1 18.688 18.688V71.33866699999999a18.773333 18.773333 0 0 1-18.773333 18.688z m-263.68 167.936a58.368 58.368 0 1 0 116.736 0 58.368 58.368 0 0 0-116.736 0z m210.005333-310.272H574.976v69.973333h303.36v-69.973333z" horiz-adv-x="1024" />
<glyph glyph-name="chakanshixunbaogao" unicode="&#59258;" d="M717.312 673.28a9.386667 9.386667 0 0 1-9.386667 9.386667h-448a9.386667 9.386667 0 0 1-9.216-9.386667v-55.978667c0-5.12 4.181333-9.301333 9.301334-9.301333h448c5.12 0 9.386667 4.266667 9.386666 9.386667V673.28z m-9.386667-158.634667h-448a9.386667 9.386667 0 0 1-9.216-9.386666v-55.893334c0-5.12 4.181333-9.386667 9.301334-9.386666h448c5.12 0 9.386667 4.266667 9.386666 9.386666v55.978667a9.386667 9.386667 0 0 1-9.386666 9.386667zM474.794667 346.709333H259.925333a9.386667 9.386667 0 0 1-9.386666-9.386666v-55.978667c0-5.12 4.266667-9.386667 9.386666-9.386667h214.613334c5.12 0 9.386667 4.266667 9.386666 9.386667v55.978667a9.386667 9.386667 0 0 1-9.386666 9.386666z m-56.064-359.338666H157.354667V808.704H810.666667v-401.408c0-5.12 4.266667-9.301333 9.386666-9.301333h65.28c5.12 0 9.386667 4.266667 9.386667 9.386666V855.296a37.290667 37.290667 0 0 1-37.376 37.290667h-746.666667a37.290667 37.290667 0 0 1-37.376-37.376v-914.602667c0-20.650667 16.725333-37.376 37.376-37.376h308.053334c5.12 0 9.301333 4.266667 9.301333 9.386667v65.28a9.386667 9.386667 0 0 1-9.386667 9.386666z m416.256 86.784a168.106667 168.106667 0 1 1-225.877334 0 229.290667 229.290667 0 0 1-115.712-189.098667 9.386667 9.386667 0 0 1 9.386667-9.728h56.064a9.386667 9.386667 0 0 1 9.386667 8.874667c4.522667 80.725333 71.850667 145.066667 153.856 145.066666s149.333333-64.341333 153.856-145.066666a9.386667 9.386667 0 0 1 9.386666-8.874667h56.064a9.301333 9.301333 0 0 1 9.386667 9.728 228.864 228.864 0 0 1-115.797333 189.098667z m-112.896 217.6a93.269333 93.269333 0 1 0 0-186.538667 93.269333 93.269333 0 0 0 0 186.624z" horiz-adv-x="1024" />
<glyph glyph-name="tijiaozongjie" unicode="&#59259;" d="M717.312 617.301333v56.064a9.386667 9.386667 0 0 1-9.386667 9.301334h-448a9.386667 9.386667 0 0 1-9.216-9.386667v-55.978667c0-5.12 4.181333-9.301333 9.301334-9.301333h448c5.12 0 9.386667 4.266667 9.386666 9.386667z m-457.386667-102.656a9.386667 9.386667 0 0 1-9.216-9.386666v-55.893334c0-5.12 4.181333-9.386667 9.301334-9.386666h214.613333c5.12 0 9.386667 4.266667 9.386667 9.386666v55.978667a9.386667 9.386667 0 0 1-9.386667 9.386667H260.010667z m438.784-135.338666a251.989333 251.989333 0 1 1 0-503.978667 251.989333 251.989333 0 0 1 0 503.978667z m125.44-377.429334a176.213333 176.213333 0 0 0-125.44-51.882666 176.213333 176.213333 0 0 0-125.44 51.882666 176.213333 176.213333 0 0 0-51.968 125.44c0 47.36 18.432 91.989333 51.968 125.44a176.213333 176.213333 0 0 0 125.44 51.882667c47.36 0 91.904-18.432 125.44-51.882667 33.450667-33.450667 51.882667-78.08 51.882667-125.44 0-47.36-18.432-91.904-51.968-125.44z m-21.674666 214.186667H750.933333a9.216 9.216 0 0 1-7.68-3.925333l-73.984-102.4-26.965333 37.205333a9.216 9.216 0 0 1-7.68 3.84h-51.370667a9.386667 9.386667 0 0 1-7.594666-14.848l86.186666-119.125333c3.669333-5.12 11.264-5.12 14.933334 0l133.290666 184.32a9.301333 9.301333 0 0 1-7.509333 14.848z m-374.442667-228.693333H157.354667V808.704H810.666667v-401.408c0-5.12 4.266667-9.301333 9.386666-9.301333h65.28c5.12 0 9.386667 4.266667 9.386667 9.386666V855.296a37.290667 37.290667 0 0 1-37.376 37.290667h-746.666667a37.290667 37.290667 0 0 1-37.376-37.376v-914.602667c0-20.650667 16.725333-37.376 37.376-37.376h317.354667c5.12 0 9.301333 4.266667 9.301333 9.386667v65.28a9.386667 9.386667 0 0 1-9.386666 9.386666z" horiz-adv-x="1024" />
<glyph glyph-name="daimachazhong" unicode="&#59260;" d="M810.377846 284.435692c97.910154 0 171.480615-51.672615 219.136-152.339692a46.158769 46.158769 0 0 0-0.078769-38.990769c-47.576615-100.352-121.147077-152.182154-218.978462-152.182154-97.988923 0-171.480615 51.672615-219.136 152.024615a46.473846 46.473846 0 0 0 0 39.384616c47.655385 100.352 121.147077 152.103385 219.057231 152.103384z m0-68.923077c-66.875077 0-115.790769-32.295385-151.945846-102.793846 36.233846-70.577231 85.070769-102.872615 152.024615-102.872615 66.796308 0 115.712 32.295385 151.867077 102.872615-36.233846 70.498462-85.070769 102.793846-151.945846 102.793846z m0.551385-43.086769a60.337231 60.337231 0 1 0 0-120.516923 60.337231 60.337231 0 0 0 0 120.516923zM947.593846 836.923077c19.062154 0 34.500923-15.438769 34.500923-34.500923v-315.470769h-77.587692V759.414154H146.510769V147.692308h336.029539v-77.508923H103.345231a34.422154 34.422154 0 0 0-34.422154 34.422153v697.895385c0 18.983385 15.438769 34.422154 34.500923 34.422154zM667.805538 622.907077l2.756924-1.181539 152.260923-120.123076a11.342769 11.342769 0 0 0 0-17.644308L670.562462 363.756308a5.513846 5.513846 0 0 0-3.465847-1.181539 5.592615 5.592615 0 0 0-5.513846 5.592616v57.028923c0 1.811692 0.787692 3.387077 2.126769 4.411077l79.95077 63.172923-79.95077 63.094154a5.513846 5.513846 0 0 0-2.126769 4.411076v57.028924a5.513846 5.513846 0 0 0 1.181539 3.465846 5.513846 5.513846 0 0 0 7.798154 0.94523z m-304.521846-1.181539a5.513846 5.513846 0 0 0 7.798154-0.94523 5.513846 5.513846 0 0 0 1.181539-3.465846v-57.028924c0-1.732923-0.787692-3.387077-2.12677-4.411076l-80.029538-63.094154 80.029538-63.172923a5.513846 5.513846 0 0 0 2.12677-4.411077V368.246154c0-3.072-2.520615-5.513846-5.513847-5.513846a5.513846 5.513846 0 0 0-3.465846 1.102769L211.101538 484.036923a11.421538 11.421538 0 0 0 0 17.644308z m226.776616-0.94523l-22.134154-64.827077-18.825846-55.217231-1.417846-4.174769-1.181539-3.387077-1.181538-3.465846-1.024-3.072-0.945231-2.678154-18.510769-54.272-1.496616-4.411077-19.456-57.028923-0.787692-2.205539-0.551385-1.732923-0.157538-0.472615-0.315077-0.787692v-0.07877l-35.682462-104.448-0.315077-0.866461-0.315076-0.945231v-0.393846l-0.551385-1.417846a5.592615 5.592615 0 0 0-5.277539-3.859693h-47.104a5.592615 5.592615 0 0 0-5.513846 5.671385c0 0.630154 0 1.260308 0.236308 1.811692l160.925538 471.197539a5.592615 5.592615 0 0 0 5.277539 3.859692h46.946461a5.671385 5.671385 0 0 0 5.356308-7.561846l-5.198769-14.966154-0.236308-1.181538-29.932307-87.276308-0.630154-1.811692z" horiz-adv-x="1102" />
<glyph glyph-name="bianjizuoye" unicode="&#59261;" d="M969.386667 384h-65.365334a9.386667 9.386667 0 0 1-9.386666-9.386667v-373.248H129.365333V766.634667H502.613333c5.12 0 9.301333 4.266667 9.301334 9.386666V841.301333a9.386667 9.386667 0 0 1-9.386667 9.386667H82.773333A37.290667 37.290667 0 0 1 45.226667 813.226667V-45.226667c0-20.650667 16.725333-37.376 37.376-37.376H941.226667a37.290667 37.290667 0 0 1 37.376 37.376V374.613333a9.386667 9.386667 0 0 1-9.386667 9.301334zM329.898667 357.290667L327.68 218.453333a18.773333 18.773333 0 0 1 18.688-18.858666h0.426667l137.642666 3.413333a9.642667 9.642667 0 0 1 6.314667 2.56l485.205333 484.266667a9.386667 9.386667 0 0 1 0 13.141333L830.890667 847.957333a9.642667 9.642667 0 0 1-13.312 0L332.629333 363.776a9.728 9.728 0 0 1-2.645333-6.485333z m74.069333-27.562667L824.32 749.226667l52.736-52.565334-420.608-419.669333-53.333333-1.28 0.853333 54.101333z" horiz-adv-x="1024" />
<glyph glyph-name="lijijiezhi" unicode="&#59262;" d="M1018.53952 500.650667h-298.666667a9.386667 9.386667 0 0 1-9.386666-9.386667v-55.893333c0-5.12 4.266667-9.386667 9.386666-9.386667h298.666667c5.12 0 9.386667 4.266667 9.386667 9.386667v55.978666a9.386667 9.386667 0 0 1-9.386667 9.386667z m-156.330667-158.72H719.872853a9.386667 9.386667 0 0 1-9.386666-9.301334v-55.978666c0-5.12 4.266667-9.386667 9.386666-9.386667h142.336c5.12 0 9.386667 4.266667 9.386667 9.386667v55.978666a9.386667 9.386667 0 0 1-9.386667 9.386667zM472.918187 605.184h-50.517334a13.056 13.056 0 0 1-13.141333-13.056v-289.28c0-4.266667 2.048-8.106667 5.376-10.581333L588.45952 165.461333c5.802667-4.181333 13.994667-2.986667 18.176 2.816l30.037333 40.96v0.085334a13.056 13.056 0 0 1-2.901333 18.261333L485.80352 334.421333V592.042667a12.970667 12.970667 0 0 1-12.885333 13.056z m382.037333-409.941333h-67.413333a19.2 19.2 0 0 1-16.213334-9.045334 374.528 374.528 0 0 0-170.154666-144.64 369.664 369.664 0 0 0-144.64-29.184 370.005333 370.005333 0 0 0-262.826667 108.885334A370.005333 370.005333 0 0 0 84.822187 384a369.237333 369.237333 0 0 0 108.885333 262.826667 370.005333 370.005333 0 0 0 262.826667 108.885333 370.005333 370.005333 0 0 0 262.826666-108.885333c19.882667-19.797333 37.12-41.472 51.968-64.938667a19.2 19.2 0 0 1 16.213334-9.045333h67.413333a10.666667 10.666667 0 0 1 9.557333 15.530666A456.277333 456.277333 0 0 1 461.99552 840.106667C209.920853 843.093333 0.512853 636.757333 0.000853 384.853333a456.362667 456.362667 0 0 1 456.448-457.130666 456.362667 456.362667 0 0 1 408.064 251.733333 10.666667 10.666667 0 0 1-9.557333 15.616z" horiz-adv-x="1110" />
<glyph glyph-name="jingxiang" unicode="&#59251;" d="M776.084211 1.347368H258.694737c-75.452632 0-134.736842 59.284211-134.736842 134.736843V734.315789C123.957895 809.768421 183.242105 869.052632 258.694737 869.052632h517.389474c75.452632 0 134.736842-59.284211 134.736842-134.736843v-598.231578c0-75.452632-59.284211-134.736842-134.736842-134.736843zM258.694737 815.157895c-43.115789 0-80.842105-37.726316-80.842105-80.842106v-598.231578c0-43.115789 37.726316-80.842105 80.842105-80.842106h517.389474c43.115789 0 80.842105 37.726316 80.842105 80.842106V734.315789c0 43.115789-37.726316 80.842105-80.842105 80.842106H258.694737zM334.147368 146.863158h194.021053v-264.084211l-97.010526 70.063158-97.010527-70.063158zM420.378947 772.042105h107.789474v-107.789473h-107.789474zM420.378947 637.305263h107.789474v-107.789474h-107.789474zM420.378947 507.957895h107.789474v-107.789474h-107.789474zM420.378947 378.610526h107.789474v-107.789473h-107.789474zM123.957895 286.989474h776.08421v-53.894737H123.957895zM274.863158 847.494737h53.894737v-609.010526h-53.894737z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 467 KiB

After

Width:  |  Height:  |  Size: 487 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -19,7 +19,7 @@ import Certifiedprofessional from './modules/modals/Certifiedprofessional';
import Loading from './Loading'
import Loadable from 'react-loadable';
import marked from './common/marked';
import marked from './common/marked';
import moment from 'moment'
import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
@ -83,7 +83,7 @@ class App extends Component {
mygetHelmetapi: null,
}
}
HideAddcoursestypess = (i) => {
this.setState({
Addcoursestype: false,
@ -217,33 +217,33 @@ class App extends Component {
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy} ModalshowCancelsy={this.ModalshowCancelsy} />
<Router>
<Switch>
{/*项目*/}
<Route
path={"/projects"}
render={
(props) => {
return (<Projects {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/*项目*/}
<Route
path={"/projects"}
render={
(props) => {
return (<Projects {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/*403*/}
<Route path="/403" component={Shixunauthority} />
<Route path="/500" component={http500} />
<Route path={"/organize"}
render={
(props) => {
return (<OrganizeIndex {...this.props} {...props} {...this.state} />)
}
}>
</Route>
<Route path={"/organize"}
render={
(props) => {
return (<OrganizeIndex {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/*404*/}
<Route path="/nopage" component={Shixunnopage} />
{/* 个人主页 */}
{/* 个人主页 */}
<Route path="/users/:username"
render={
(props) => {
return (<InfosIndex {...this.props} {...props} {...this.state} />)
return (<InfosIndex {...this.props} {...this.state} />)
}
}></Route>
<Route exact path="/"

View File

@ -123,15 +123,15 @@ export function initAxiosInterceptors(props) {
let url = `/api${config.url}`;
//qq登录去掉api
if (config.params && config.params.redirect_uri != undefined) {
if (config.params.redirect_uri.indexOf('otherloginqq') != -1) {
if (config.params && config.params.redirect_uri !== undefined) {
if (config.params.redirect_uri.indexOf('otherloginqq') !== -1) {
url = `${config.url}`;
}
}
if (`${config[0]}` != `true`) {
if (`${config[0]}` !== `true`) {
if (window.location.port === "3007") {
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
if (config.url.indexOf('?') === -1) {
config.url = `${config.url}?debug=${debugType}`;
} else {
config.url = `${config.url}&debug=${debugType}`;

View File

@ -1,6 +1,6 @@
import React , { Component } from 'react';
import { Dropdown , Menu , Icon , Pagination , Spin } from 'antd';
import '../css/index.css';
import '../css/index.scss';
import '../Branch/branch.css';
import './activity.css';
import NoneData from '../Nodata';

View File

@ -0,0 +1,27 @@
import React from 'react';
import { Link } from 'react-router-dom';
/**
* nav:{list:[],active:0} */
export default(({ header , nav })=>{
return(
<ul className="list-l-Menu">
{header}
{
nav && nav.list && nav.list.length>0 ?
nav.list.map((item,key)=>{
return(
<li key={key} className={nav.active === key?"active":''}>
<p>
<Link to={item.href}>
<i className={`iconfont ${item.icon || 'icon-huabanfuben'} font-18 mr10`}></i>{item.name}
</Link>
</p>
</li>
)
})
:""
}
</ul>
)
})

View File

@ -7,6 +7,9 @@ const Nav = styled.div`{
border-bottom:1px solid #eee;
font-size:16px;
color:#333;
display:flex;
justify-content: space-between;
align-items:center;
}`
export default (({children})=>{

View File

@ -48,13 +48,35 @@ export const WhiteBack = styled.div`{
border-radius:5px;
}`
export const Blueline = styled.a`{
height:30px;
line-height:30px;
border-radius:5px;
height:32px;
line-height:32px;
border-radius:2px;
border:1px solid rgba(80,145,255,1);
color:rgba(80,145,255,1);
padding:0px 12px;
}`
export const Redline = styled.a`{
height:32px;
line-height:32px;
border-radius:2px;
border:1px solid #F73030;
color:#F73030;
padding:0px 12px;
display:inline-block;
min-width:80px;
text-align:center;
}`
export const Greenline = styled.a`{
height:32px;
line-height:32px;
border-radius:2px;
border:1px solid #28BD6C;
color:#28BD6C;
padding:0px 12px;
display:inline-block;
min-width:80px;
text-align:center;
}`
export const NumUl = styled.ul`{
padding-left: 20px;
& > li{
@ -77,3 +99,15 @@ export const GreenUnder = styled.a`{
background:#28BD6C;
}
}`
export const Cancel = styled.a`{
height:32px;
line-height:32px;
border-radius:2px;
background-color:#BBBBBB;
color:#fff;
padding:0px 12px;
display:inline-block;
min-width:64px;
text-align:center;
letter-spacing: 4px;
}`

View File

@ -1,9 +1,13 @@
import axios from 'axios';
//
export const getBranch = async (id)=>{
return (await axios.get(`/projects/${id}/branches.json`)).data;
}
//
export const getTag = async (id)=>{
return (await axios.get(`/repositories/${id}/tags.json`)).data;
}
// hooks-web
export const getHooks = async (id,params)=>{
return (await axios.get(`/projects/${id}/hooks.json`,{params})).data;
}

View File

@ -7,7 +7,7 @@ import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
import "./css/index.css";
import "./css/index.scss";
import Loadable from "react-loadable";
import Loading from "../Loading";
@ -33,6 +33,7 @@ const Infos = Loadable({
});
class Index extends Component {
render() {
return (
<div className="newMain clearfix">
@ -61,7 +62,7 @@ class Index extends Component {
path="/"
render={(props) => (
this.props.current_user && this.props.current_user.login ?
<Infos {...this.props} {...props} />
<Infos {...this.props} {...props} />
:
<ProjectIndex {...this.props} {...props} />
)}

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { Spin, Tooltip } from 'antd';
import { Link, Route, Switch } from 'react-router-dom';
import '../css/index.css'
import '../css/index.scss'
import './list.css';
import Loadable from 'react-loadable';
@ -416,7 +416,7 @@ class Detail extends Component {
<li className={url.indexOf("merge") > -1 ? "active" : ""}>
<Link to={{ pathname: `/projects/${projectsId}/merge`, state }}>
<img alt="" src={img_3} width="13" />合并请求
{ projectDetail && projectDetail.pull_requests_count ? <span>{projectDetail.issues_count}</span> : "" }
{ projectDetail && projectDetail.pull_requests_count ? <span>{projectDetail.pull_requests_count}</span> : "" }
</Link>
</li>
<li className={(url.indexOf("Milepost") > -1 || url.indexOf("meilpost") > -1) ? "active" : ""}>

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Menu, Input , Spin, Pagination , Popover } from 'antd';
import '../css/index.css'
import '../css/index.scss'
import './list.css';
import ListItem from './IndexItem'
import axios from 'axios';

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { Tooltip } from 'antd';
import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom';
import '../css/index.css'
import '../css/index.scss'
import './list.css';
import img_parise from '../Images/parise.png';
@ -44,16 +44,12 @@ class IndexItem extends Component {
</span>:""
}
</Link>
{
item.is_public ? "" :
<span className="p-r-tags"><span>私有</span></span>
}
<span className="p-r-tags">
<span className="pariseTag"><img src={img_parise} alt="" className="pariseImg" /> ({item.praises_count})</span>
<span><i className="iconfont icon-fork mr3 font-16" style={{ color: "#1B8FFF" }} />fork ({item.forked_count})</span>
</span>
</div>
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "40px" }}>{item.description}</p>
<p className="break_word task-hide-2 mt10" style={{ maxHeight: "44px",lineHeight:"22px" }}>{item.description}</p>
<div className="p-r-about">
<span className="p-r-detail">

View File

@ -23,61 +23,7 @@
background: #fff;
padding:10px;
}
.list-l-Menu{
margin-bottom: 12px;
border-radius:2px;
border:1px solid rgba(221,221,221,1);
background-color: #fff;
}
.list-l-Menu>li{
font-size: 1rem;
padding:0px 0px 0px 20px;
box-sizing: border-box;
color: #333;
position: relative;
}
.list-l-Menu>li > p{
height: 62px;
line-height: 62px;
width: 100%;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
cursor: pointer;
padding-right: 20px;
}
.list-l-Menu>li:last-child > p{
border-bottom: none;
}
.list-l-Menu li p span:last-child{
color: #999;
}
.list-l-Menu .MenuTitle{
font-size: 16px;
background-size: 100% 100%;
color: #333!important;
height: 62px;
line-height: 62px;
border-bottom: 1px solid #E0E0E0;
font-weight: 400;
}
.list-l-Menu > li:not(.MenuTitle):hover{
background-color: #fafafa;
}
/* 左侧menu */
.list-l-Menu .ant-menu-inline{
border:none;
}
.list-l-Menu .ant-menu-inline .ant-menu-item{
width:100%!important;
}
.list-l-Menu .ant-menu-item-group-title{
padding:0px;
}
.list-l-Menu li.active{
background-color: #fafafa;
}
/* 首页列表的新建和排序的下拉列表 */
.ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left{
@ -95,16 +41,6 @@
}
.list-l-Menu li.active::before{
position: absolute;
left: 0px;
top: 15px;
width: 6px;
content: '';
height: 33px;
background: #4CACFF;
}
.list-r-operation{
display: flex;
justify-content: space-between;

View File

@ -316,7 +316,7 @@ class merge extends Component {
className={status_type === "2" ? "active" : ""}
onClick={() => this.openorder("2")}
>
<label>关闭</label>
<label>拒绝</label>
<span>{data && data.close_count}</span>
</li>
</ul>

View File

@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
import { Input, Form, Select, Checkbox, Button, Divider, Spin, AutoComplete } from 'antd';
import { Base64 } from 'js-base64';
import '../css/index.css';
import '../css/index.scss';
import './new.css'
import axios from 'axios';

View File

@ -0,0 +1,60 @@
import React , { forwardRef , useCallback } from 'react';
import { Form , Input , Select , Button } from 'antd';
import Title from '../Component/Title';
import { WhiteBack , Cancel } from '../Component/layout';
import styled from 'styled-components';
const {Option} = Select;
const Div = styled.div`{
padding:20px 30px;
}`
export default Form.create()(
forwardRef(( { form })=>{
const { getFieldDecorator } = form;
const helper = useCallback(
(label, name, rules, widget , className , isRequired ) => (
<div className={className}>
<span className={isRequired?"required":""}>{label}</span>
<Form.Item>
{getFieldDecorator(name, { rules, validateFirst: true })(widget)}
</Form.Item>
</div>
),
[]
);
return(
<WhiteBack>
<Title>新建保护分支规则</Title>
<Div>
{helper(
"设置分支/通配符",
"sign",
[{ required: true, message: "请输入分支/通配符" }],
<Input placeholder="请输入分支名称或通配符规则" />,'setStyleRule'
)}
<p className="color-grey-8 mb20">例如设置为master则对名称为master的分支生效设置为*-stable release*则对名称符合此通配符的所有保护分支生效</p>
{helper(
"可推送代码成员",
"psuhmember",
[],
<Select placeholder="请选择仓库成员" >
<Option value="0">请选择仓库成员</Option>
</Select>,'setSelectWidth'
)}
{helper(
"可合并Pull Request成员",
"pullmember",
[],
<Select placeholder="请选择仓库成员" >
<Option value="0">请选择仓库成员</Option>
</Select>,'setSelectWidth'
)}
<div className="df pb30">
<Button type="primary">保存</Button>
<Cancel className="ml30">取消</Cancel>
</div>
</Div>
</WhiteBack>
)
})
)

View File

@ -1,13 +1,17 @@
import React, { Component } from "react";
import { Link, Route, Switch } from "react-router-dom";
import "../css/index.css";
import "../css/index.scss";
import "./setting.scss";
import Loadable from "react-loadable";
import Loading from "../../Loading";
import { Box , Long , Short , Gap , WhiteBack} from '../Component/layout';
import { Box, Long, Short, Gap } from '../Component/layout';
const BranchNew = Loadable({
loader: () => import("./BranchRule"),
loading: Loading,
});
const Branch = Loadable({
loader: () => import("./Branch"),
loading: Loading,
@ -24,6 +28,14 @@ const Tags = Loadable({
loader: () => import("./new_tags"),
loading: Loading,
});
const Manage = Loadable({
loader: () => import("./ManageWeb"),
loading: Loading,
});
const ManageNew = Loadable({
loader: () => import("./ManageWebNew"),
loading: Loading,
});
class Index extends Component {
render() {
const { projectsId } = this.props.match.params;
@ -37,8 +49,8 @@ class Index extends Component {
<li className={flag ? "active" : ""}>
<p>
<Link to={`/projects/${projectsId}/setting`} className="w-100">
<i className="iconfont icon-huabanfuben font-18 mr10"></i>
<i className="iconfont icon-huabanfuben font-18 mr10"></i>
</Link>
</p>
</li>
@ -49,7 +61,7 @@ class Index extends Component {
>
<p>
<Link to={`/projects/${projectsId}/setting/collaborator`} className="w-100">
<i className="iconfont icon-chengyuan font-18 mr10"></i>
<i className="iconfont icon-chengyuan font-18 mr10"></i>
协作者管理
</Link>
</p>
@ -71,7 +83,7 @@ class Index extends Component {
>
<p>
<Link to={`/projects/${projectsId}/setting/tags`} className="w-100">
<i className="iconfont icon-biaoqian3 font-18 mr10"></i>
<i className="iconfont icon-biaoqian3 font-18 mr10"></i>
项目标签
</Link>
</p>
@ -79,11 +91,11 @@ class Index extends Component {
{/* <li
className={
pathname.indexOf("setting/hooks") > -1 ? "active" : ""
pathname.indexOf("setting/manage") > -1 ? "active" : ""
}
>
<p>
<Link to={"javascript:void(0)"} className="w-100">
<Link to={""} className="w-100">
<i className="iconfont icon-zhongqingdianxinicon10 font-18 mr10"></i>
管理Web钩子
</Link>
@ -93,7 +105,7 @@ class Index extends Component {
</Short>
<Long>
<Gap>
<Switch {...this.props}>
<Switch {...this.props}>
{/* 协作者 */}
<Route
path="/projects/:projectsId/setting/collaborator"
@ -108,12 +120,30 @@ class Index extends Component {
<Tags {...this.props} {...props} {...this.state} />
)}
></Route>
<Route
path="/projects/:projectsId/setting/branch/new"
render={(props) => (
<BranchNew {...this.props} {...props} {...this.state} />
)}
></Route>
<Route
path="/projects/:projectsId/setting/branch"
render={(props) => (
<Branch {...this.props} {...props} {...this.state} />
)}
></Route>
<Route
path="/projects/:projectsId/setting/manage/new"
render={(props) => (
<ManageNew {...this.props} {...props} {...this.state} />
)}
></Route>
<Route
path="/projects/:projectsId/setting/manage"
render={(props) => (
<Manage {...this.props} {...props} {...this.state} />
)}
></Route>
{/* 修改仓库信息 */}
<Route
path="/projects/:projectsId/setting"

View File

@ -0,0 +1,84 @@
import React, { useState, useEffect } from "react";
import { WhiteBack, Greenline, Redline, FlexAJ } from "../Component/layout";
import { getHooks } from "../GetData/getData";
import Title from "../Component/Title";
import { Button } from "antd";
import { Link } from "react-router-dom";
import styled from "styled-components";
import "./setting.scss";
const Div = styled.div`
{
padding: 0px 30px;
min-height: 400px;
}
`;
const P = styled.p`
{
padding: 22px 0px;
border-bottom: 1px solid #eee;
}
`;
const Manage = styled.div`
{
padding: 12px 0px;
}
`;
export default ((props) => {
const [page, setPage] = useState(1);
const [limit, setLimit] = useState(20);
const [data, setData] = useState(undefined);
const {projectsId} = props.match.params;
// useEffect(() => {
// if(projectsId){
// getHook(projectsId);
// }
// },[projectsId]);
async function getHook(id) {
const params = {
page,
limit
};
let data = await getHooks(id, params);
data && setData(data);
}
return (
<WhiteBack>
<Title>
<span>管理web钩子</span>
<Button type="primary">添加web钩子</Button>
</Title>
<Div>
<P>
当Gitea事件发生时Web钩子自动发出HTTP POST请求{" "}
<Link to="" className="color-blue">
指南
</Link>{" "}
中阅读更多内容
</P>
<Manage>
<FlexAJ className="manageItem">
<span className="webName">
https://gitea.com/zxf/homebrew-cask-versions/settings/hooks/gitea/new
</span>
<span>
<Redline>删除</Redline>
<Greenline className="ml30">编辑</Greenline>
</span>
</FlexAJ>
<FlexAJ className="manageItem">
<span className="webName">
https://gitea.com/zxf/homebrew-cask-versions/settings/hooks/gitea/new
</span>
<span>
<Redline>删除</Redline>
<Greenline className="ml30">编辑</Greenline>
</span>
</FlexAJ>
</Manage>
</Div>
</WhiteBack>
);
});

View File

@ -0,0 +1,98 @@
import React , { forwardRef , useCallback } from 'react';
import { Form , Input , Radio , Checkbox , Button , Select } from 'antd';
import { Link } from 'react-router-dom';
import { WhiteBack , Cancel } from '../Component/layout';
import Title from '../Component/Title';
import styled from 'styled-components';
const { Option } = Select;
const Div = styled.div`{
padding:0px 30px
}`
const radioStyle = {
display: 'block',
height: '30px',
lineHeight: '30px',
};
export default Form.create()(
forwardRef(({ form })=>{
const { getFieldDecorator } = form;
const helper = useCallback(
(label, name, rules, widget, isRequired ) => (
<React.Fragment>
<span className={isRequired?"required":""}>{label}</span>
<Form.Item>
{getFieldDecorator(name, { rules, validateFirst: true })(widget)}
</Form.Item>
</React.Fragment>
),
[]
);
return(
<WhiteBack className="hooksNew">
<Title>
<span>管理web钩子</span>
</Title>
<Div>
<p className="mt15 mb15 color-grey-8">Gitea 将向目标 URL 发送具有指定内容类型的 POST 请求 <Link to={""} className="color-blue">webhooks 指南</Link> 中阅读更多内容</p>
{helper(
"目标URL",
"URL",
[{ required: true, message: "请输入目标URL" }],
<Input placeholder="目标URL" />,true
)}
{helper(
"HTTP方法",
"HTTP",
[],
<Select placeholder="HTTP方法" >
<Option value="0">请选择HTTP方法</Option>
</Select>
)}
{helper(
"POST Content Type",
"Type",
[],
<Select placeholder="POST Content Type" >
<Option value="0">请选择POST Content Type</Option>
</Select>
)}
{helper(
"秘钥文本",
"passwordtext",
[],
<Input type="password" />
)}
{helper(
"触发条件:",
"condition",
[],
<Radio.Group>
<Radio value={"0"} style={radioStyle}>推送事件</Radio>
<Radio value={"1"} style={radioStyle}>所有事件</Radio>
<Radio value={"2"} style={radioStyle}>自定义事件</Radio>
</Radio.Group>
)}
{helper(
"分支过滤",
"branch",
[],
<Input type="password" />
)}
<p className="font-12 mt10 pb15" style={{borderBottom:"1px solid #eee"}}>推送创建删除分支事件白名单支持匹配符如果为空或者 *所有分支的事件均被触发<br/>语法参见 <Link to="github.com/gobwas/glob" className="color-blue" target="_blank">github.com/gobwas/glob</Link> 示例 Master, ${'{master,release*}'}</p>
{helper(
"",
"active",
[],
<Checkbox>激活<span className="ml30 color-grey-8">触发事件的信息将发送到此 webhook 网址</span></Checkbox>
)}
<div className="df pb30">
<Button type="primary">保存</Button>
<Cancel className="ml30">取消</Cancel>
</div>
</Div>
</WhiteBack>
)
})
)

View File

@ -374,7 +374,7 @@ class NewTags extends Component {
if (data && data.issue_tags && data.issue_tags.length > 0) {
return (
<div>
<div className="topWrapper">
<div className="topWrapper" style={{borderBottom:"1px solid #eee"}}>
<span>{data && data.issue_tags_count}个标签</span>
<ul className="topWrapper_select">
<li>
@ -394,37 +394,13 @@ class NewTags extends Component {
</div>
<div>
<Table
className="setTables"
showHeader={false}
pagination={false}
columns={columns}
dataSource={data.issue_tags}
rowKey={(record) => record.id}
></Table>
{/* {
data.issue_tags.map((item,key)=>{
return(
<div>
<span className="width20 mr10">
<span style={{backgroundColor:`${item.color}`}} className="tagColor"></span>
{item.name}
</span>
<span className="hide-1 width50 mr10">{item.description}</span>
<span className="width15 mr10">{item.issues_count}个开启的任务</span>
{
data && data.user_admin_or_member ?
<div className="width15 text-right">
<a onClick={()=>this.editshow(item)} className="topWrapper_btn fr" >编辑</a>
<Popconfirm placement="bottom" title={'删除标签会将其从所有引用中删除。继续?'} okText="是" cancelText="否" onConfirm={()=>this.deletetag(item.id)}>
<a className="a_btn delete_btn fr" >删除</a>
</Popconfirm>
</div>
: ''
}
</div>
)
})
} */}
</div>
</div>
);
@ -509,7 +485,7 @@ class NewTags extends Component {
</div>
</Form>
</div>
<div className="padding15">
<div className="padding20-30">
{renderList()}
{Paginations}
</div>
@ -520,7 +496,8 @@ class NewTags extends Component {
visible={this.state.isShow}
onOk={this.handleok}
mask={true}
width="60%"
width="600px"
closable={false}
>
<div className="dialogdiv">
<Input

View File

@ -94,6 +94,24 @@
border-radius: 4px;
}
}
.manageItem{
padding:11px 0px;
.webName{
position: relative;
color:#4CACFF;
padding-left: 25px;
&::before{
position: absolute;
content: '';
width:6px;
height:6px;
border-radius: 50%;
left: 0px;
top:8px;
background-color: #FFA802;
}
}
}
.dangerousTitle{
padding:10px;
@ -148,4 +166,36 @@
line-height: 32px;
border-radius: 4px;
}
.setTables{
.ant-table-tbody > tr:hover > td{
background-color: #fff!important;
}
.ant-table-tbody > tr > td{
border-bottom: none;
}
}
.required{
position: relative;
&::before{
content: "*";
color: red;
position: absolute;
left: -10px;
top: -2px;
}
}
.hooksNew{
.ant-select.ant-select-enabled{
width: 100%;
}
}
.setStyleRule{
.ant-row.ant-form-item{
margin-bottom: 10px;
}
}
.setSelectWidth{
.ant-select.ant-select-enabled{
width: 100%;
}
}

View File

@ -11,6 +11,10 @@ const DetailIndex = Loadable({
loader: () => import("./List"),
loading: Loading,
});
const Setting = Loadable({
loader: () => import("./TeamSettingIndex"),
loading: Loading,
});
export default ((props)=>{
return(
<div className="teamDetail">
@ -21,6 +25,12 @@ export default ((props)=>{
img={`https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=4193840146,2109186388&fm=26&gp=0.jpg`}
/>
<Switch {...props}>
<Route
path="/organize/:organizeId/setting"
render={(props) => {
return <Setting {...props} />
}}
></Route>
<Route
path="/organize/:organizeId"
render={(props) => {

View File

@ -8,9 +8,11 @@ const Box=styled.div`{
const Div = styled.div`{
display:flex;
align-items: center;
margin-left:10px;
padding:25px 0px;
border-bottom:1px solid #eee;
&:last-child{
border-bottom:none;
}
}`
const Imgs = styled.img`{
width:30px;

View File

@ -9,7 +9,7 @@ import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC"
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
import '../css/index.css';
import '../css/index.scss';
const New = Loadable({
loader: () => import("./New"),

View File

@ -259,6 +259,7 @@
min-height: 100px;
}
.g-tip{
color:#888;
padding:28px 20px;
border-top: 1px solid #eee;
&>p{

View File

@ -0,0 +1,26 @@
import React from 'react';
import { Box , Long , Short , Gap } from '../Component/layout';
import Title from '../Component/Title';
import Setnav from '../Component/Setnav';
export default (()=>{
const array = {list:[
{name:'基本设置',icon:"icon-base",href:""},
{name:'组织成员',icon:"icon-zuzhichengyuan",href:""},
{name:'组织团队',icon:"icon-zuzhixiangmu",href:""},
{name:'管理web钩子',icon:"icon-zhongqingdianxinicon10",href:""}
],
active:0
}
return(
<Box>
<Short>
<Setnav header={<Title>组织设置</Title>} nav={array}></Setnav>
</Short>
<Long>
<Gap>
</Gap>
</Long>
</Box>
)
})

View File

@ -116,4 +116,70 @@ ul,ol,dl{
.ver-middle{
vertical-align: middle;
}
.pd510{padding: 5px 10px;}
.pd510{padding: 5px 10px;}
.list-l-Menu{
margin-bottom: 12px;
border-radius:2px;
border:1px solid rgba(221,221,221,1);
background-color: #fff;
&>li{
font-size: 1rem;
padding:0px 0px 0px 20px;
box-sizing: border-box;
color: #333;
position: relative;
& > p{
height: 62px;
line-height: 62px;
width: 100%;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
cursor: pointer;
padding-right: 20px;
a{
width:100%;
}
& span:last-child{
color: #999;
}
}
&:last-child > p{
border-bottom: none;
}
&:not(.MenuTitle):hover{
background-color: #fafafa;
}
}
& li.active{
background-color: #fafafa;
}
& li.active::before{
position: absolute;
left: 0px;
top: 15px;
width: 6px;
content: '';
height: 33px;
background: #4CACFF;
}
.MenuTitle{
font-size: 16px;
background-size: 100% 100%;
color: #333!important;
height: 62px;
line-height: 62px;
border-bottom: 1px solid #E0E0E0;
font-weight: 400;
}
.ant-menu-inline{
border:none;
.ant-menu-item{
width:100%!important;
}
}
.ant-menu-item-group-title{
padding:0px;
}
}

View File

@ -13,12 +13,12 @@ const Infos = Loadable({
export default withRouter(
(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC((props)=>{
return(
<Switch {...props}>
<Route
<Switch>
<Route
path="/users/:username"
render={(props) => {
return <Infos {...props} />;
}}
render={() => (
<Infos {...props} />
)}
></Route>
</Switch>
)

View File

@ -41,4 +41,30 @@ $flex:flex;
color: #888;
margin-top: 3px;
}
}
.infosType{
padding:20px 30px 0px 30px;
display: flex;
justify-content: space-between;
.infoStatus{
height:30px;
background:rgba(255,255,255,1);
border-radius:15px;
border:1px solid rgba(221,221,221,1);
line-height: 30px;
font-size: 12px;
color: #888;
display: flex;
& > span{
display: block;
padding:0px 12px;
border-radius:15px;
cursor: pointer;
}
& > span.active{
background-color:#5091FF ;
color: #fff;
padding:0px 15px;
}
}
}

View File

@ -6,15 +6,13 @@ import FocusButton from "../UsersList/focus_button";
import axios from "axios";
import { getImageUrl } from "educoder";
import { Route, Switch } from "react-router-dom";
import { withRouter } from "react-router";
import "./new_user.css";
import "../css/index.css";
import "../css/index.scss";
import './Index.scss';
import Loadable from "react-loadable";
import Loading from "../../Loading";
import { ImageLayerOfCommentHOC } from "../../modules/page/layers/ImageLayerOfCommentHOC";
const InfosUser = Loadable({
loader: () => import("./InfosUser"),
@ -227,7 +225,7 @@ class Infos extends Component {
</li>
</ul>
</div>
<div className="bgcF">
{/* <div className="bgcF">
<div className="list-l-Menu">
<p className="list-l-p pd20" onClick={() => this.organize_link()} >
<span className="font-16 color-grey-3">
@ -239,7 +237,7 @@ class Infos extends Component {
</span>
</p>
</div>
</div>
</div> */}
</div>
<div className="list-right">
{user && (
@ -247,31 +245,31 @@ class Infos extends Component {
<Switch {...this.props}>
<Route
path="/users/:username/watch_users"
render={(props) => {
render={() => {
return <WatchsUser {...this.props} {...this.state} userType="watch_users" />;
}}
></Route>
<Route
path="/users/:username/undo_events"
render={(props) => {
render={() => {
return <UndoEvents {...this.props} {...this.state} />;
}}
></Route>
<Route
path="/users/:username/fan_users"
render={(props) => {
render={() => {
return <FanUser {...this.props} {...this.state} userType="fan_users"/>;
}}
></Route>
<Route
path="/users/:username/projects/:project_type"
render={(props) => {
render={() => {
return <InfosUser {...this.props} {...this.state} />;
}}
></Route>
<Route
path="/users/:username/organizes"
render={(props) => {
render={() => {
return <Organize {...this.props} {...this.state} />;
}}
></Route>

View File

@ -1,5 +1,4 @@
import React, { Component } from "react";
// import { SnackbarHOC } from 'educoder';
import { Link } from "react-router-dom";
import { Menu, Input, Spin, Pagination, Popover, Button } from "antd";
@ -21,6 +20,7 @@ class InfosUser extends Component {
projectsList: undefined,
total: undefined,
category: undefined,
is_public:"public"
};
}
@ -29,15 +29,15 @@ class InfosUser extends Component {
};
componentDidUpdate = (prevProps) => {
if (prevProps.project_type != this.props.project_type) {
if (prevProps.project_type !== this.props.project_type) {
this.get_projects();
}
};
get_projects = () => {
get_projects = (isPublic) => {
const { user, project_type } = this.props;
const url = `/users/${user && user.login}/projects.json`;
const { page, limit, search, sort_by, category } = this.state;
const { page, limit, search, sort_by, category , is_public } = this.state;
this.setState({
isSpin: true,
});
@ -50,6 +50,7 @@ class InfosUser extends Component {
sort_by,
category,
project_type,
is_public:isPublic!==undefined ? isPublic : is_public
},
})
.then((result) => {
@ -91,9 +92,17 @@ class InfosUser extends Component {
});
};
// 切换公有私有
changeStatus=(is_public)=>{
this.setState({
is_public
})
this.get_projects(is_public);
}
render() {
const { current_user, user } = this.props;
const { category } = this.state;
const { category , is_public } = this.state;
const menu = (
<Menu onClick={this.ChangeSoryBy}>
<Menu.Item key="updated_on">更新时间排序</Menu.Item>
@ -116,20 +125,20 @@ class InfosUser extends Component {
user && current_user && user.login === current_user.login
? [
{ type: undefined, name: "所有" },
{ type: "manage", name: "我自己的" },
{ type: "manage", name: "我创建的" },
{ type: "join", name: "我参与的" },
{ type: "watched", name: "我关注的" },
{ type: "forked", name: "我Fork的" },
{ type: "public", name: "公开的" },
{ type: "private", name: "私有的" },
// { type: "public", name: "公开的" },
// { type: "private", name: "私有的" },
]
: [
{ type: undefined, name: "所有" },
{ type: "manage", name: "TA自己的" },
{ type: "manage", name: "TA创建的" },
{ type: "join", name: "TA参与的" },
{ type: "watched", name: "TA关注的" },
{ type: "forked", name: "TAFork的" },
{ type: "public", name: "公开的" },
// { type: "public", name: "公开的" },
];
const category_button = button_lists.map((item, key) => {
@ -207,7 +216,17 @@ class InfosUser extends Component {
</Popover>
</div>
</div>
<div className="project-list mt20">{category_button}</div>
<div className="infosType">
<div>{category_button}</div>
{
user && current_user && user.login === current_user.login ?
<p className="infoStatus">
<span className={is_public === "public" ? "active" : "" } onClick={()=>this.changeStatus("public")}>公有</span>
<span className={is_public === "private" ? "active" : "" } onClick={()=>this.changeStatus("private")}>私有</span>
</p>
:""
}
</div>
{projectsList && projectsList.length > 0 ? (
<div>

View File

@ -23,67 +23,7 @@
background: #fff;
padding:0px !important;
}
.list-l-Menu{
margin-bottom: 12px;
border-radius:2px;
background-color: #fff;
}
.list-l-Menu>li{
font-size: 1rem;
padding:0px 0px 0px 20px;
box-sizing: border-box;
position: relative;
}
.list-l-Menu>li > p{
height: 62px;
line-height: 62px;
width: 100%;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
cursor: pointer;
padding-right: 20px;
}
.list-l-Menu>li:last-child > p{
border-bottom: none;
}
.list-l-Menu li p span:last-child{
color: #999;
}
.list-l-Menu .MenuTitle{
font-size: 16px;
background-size: 100% 100%;
height: 62px;
line-height: 62px;
border-bottom: 1px solid #E0E0E0;
cursor: pointer;
}
.list-l-Menu > li:not(.MenuTitle):hover{
background-color: #fafafa;
}
/* 左侧menu */
.list-l-Menu .ant-menu-inline{
border:none;
}
.list-l-Menu .ant-menu-inline .ant-menu-item{
width:100%!important;
}
.list-l-Menu .ant-menu-item-group-title{
padding:0px;
}
.list-l-Menu li.active{
background-color: #fafafa;
}
.list-l-Menu li.active::before{
position: absolute;
left: 0px;
top: 16px;
width: 6px;
content: '';
height: 33px;
background: #4CACFF;
}
.text-center{text-align: center;}
.mt-n15{margin-top: -15px;}
.position-relative{position: relative;}

View File

@ -1108,7 +1108,7 @@ body #root {
.ant-modal-title {
height: 38px;
line-height: 38px;
line-height: 38px!important;
}
.underline {

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
import React, {Component} from 'react';
import {Link} from "react-router-dom";
class PackageBanner extends Component {
constructor(props) {
super(props)
this.state = {
}
}
componentDidMount() {
}
render() {
return (
<div className="project_packagesHead" style={{height: '300px'}}></div>
)
}
}
export default PackageBanner;

View File

@ -1,374 +0,0 @@
import React, {Component} from 'react';
import {Link} from "react-router-dom";
import axios from 'axios';
import { Input ,Icon,Button,Pagination,Spin} from 'antd';
import moment from 'moment';
import '../packageconcnet.css';
import AccountProfile from"../../user/AccountProfile";
import LoginDialog from '../../login/LoginDialog';
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:"devops_and_test"},
{name:"其它",value:"other"},
]
//
function setcategorylist(val){
let vals=""
categorylist.some((item,key)=> {
if (item.name === val) {
vals=item.value
return true
}
}
)
return vals
}
class PackageConcent extends Component {
constructor(props) {
super(props)
this.state = {
data:undefined,
project_packages:undefined,
category:undefined,
keyword:undefined,
sort_by:"recently",
sort_direction:"desc",
page:1,
per_page:20,
categories:[],
isRender:false,
AccountProfiletype:false,
isSpin:false
}
}
//desc, desc, asc
//否 string 排序,默认最新, recently, price
// 否 string 类型, front,backend,mobile,database, cloud_compute_and_big_data,devops_and_test,ai,other
componentDidMount() {
window.document.title = '众包创新'
let {category,keyword,sort_by,sort_direction,page}=this.state
this.setdatas(category,keyword,sort_by,sort_direction,page)
let Url = `/project_package_categories.json`;
axios.get(Url).then((response) => {
// console.log(response)
this.setState({
categories:response.data.categories
})
}).catch((error) => {
console.log(error)
})
}
setdatas=(category,keyword,sort_by,sort_direction,page)=>{
this.setState({
isSpin:true
})
let Url = `/project_packages.json`;
axios.get(Url,{params:{
category_id:category,
keyword:keyword,
sort_by:sort_by,
sort_direction:sort_direction,
page:page,
per_page:20,
}}
).then((response) => {
this.setState({
data:response.data,
isSpin:false,
project_packages:response.data.project_packages
})
}).catch((error) => {
console.log(error)
})
}
setdatafuns=(value)=>{
let {category,keyword,sort_by,sort_direction,page}=this.state
this.setState({
keyword:value
})
this.setdatas(category,value,sort_by,sort_direction,page)
}
setcategory=(value)=>{
let {category,keyword,sort_by,sort_direction,page}=this.state
this.setState({
category:value
})
this.setdatas(value,keyword,sort_by,sort_direction,page)
}
setsort_byfun=(value)=>{
let {category,keyword,sort_by,sort_direction,page}=this.state
this.setState({
sort_by:value
})
let sort_directionvalue;
if(value===sort_by){
if(sort_direction==="desc"){
this.setState({
sort_direction:"asc"
})
sort_directionvalue="asc";
}else{
this.setState({
sort_direction:"desc"
})
sort_directionvalue="desc";
}
}else{
this.setState({
sort_direction:"desc"
})
sort_directionvalue="desc";
}
this.setdatas(category,keyword,value,sort_directionvalue,page)
}
onReleaseRequirements=(url)=>{
let{current_user} =this.props;
if(current_user===undefined){
this.setState({
isRender:true
})
return
}
if(current_user&&current_user.login===""){
this.setState({
isRender:true
})
return;
}
if(current_user&&current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return;
}
if(url !== undefined || url!==""){
window.location.href = url;
}
}
// 登录
Modifyloginvalue=()=>{
this.setState({
isRender:false,
})
}
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
onChangePagelist=(pageNum)=> {
this.setState({
page: pageNum
})
let {category, keyword, sort_by, sort_direction} = this.state;
this.setdatas(category, keyword, sort_by, sort_direction, pageNum)
}
render() {
let {data,page,category,sort_by,sort_direction,project_packages,
isRender,AccountProfiletype
}=this.state;
return (
<div className="educontent clearfix mtf10" style={{flex: "1 0 auto"}}>
{isRender===true?<LoginDialog
Modifyloginvalue={()=>this.Modifyloginvalue()}
{...this.props}
{...this.state}
/>:""}
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.props}
{...this.state}
/>:""}
<div className="stud-class-set">
<div className="news">
<div className="edu-class-inner container clearfix">
<div className="member for-content-0 for-content">
<div className="people clearfix mb60">
{/*concent*/}
<div className="mb30">
<div className="clearfix">
<p className="clearfix" >
<p style={{height: '50px'}}>
<Search placeholder="输入标题名称进行检索"
className="packinput"
enterButton={<span><Icon type="search" className="mr5"/> 搜索</span>}
onSearch={ (value)=>this.setdatafuns(value)} />
<Button type="primary" className="setissues fr" size={"large"}>
<a onClick={()=>this.onReleaseRequirements("/crowdsourcing/new")}>发布需求</a>
</Button>
</p>
</p>
</div>
</div>
<div className="edu-back-white mb30">
<p className="clearfix padding30">
<p className="clearfix mb30 shaiContent">
<span className="shaiTitle fl mt3">类型</span>
<div className="fl pr shaiAllItem pagetype">
<li className={category===undefined?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} onClick={()=>this.setcategory(undefined)}>全部</li>
{this.state.categories.map((item,key)=>{
return(
<li key={key} className={category===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} value={item.id} onClick={()=>this.setcategory(item.id)}>{item.name}</li>
)
})}
</div>
</p>
<p className="clearfix shaiContent">
<span className="shaiTitle fl mt3">排序</span>
<div className="fl pr shaiAllItem">
<li className="shaiItem shixun_repertoire" value="recently" onClick={()=>this.setsort_byfun("recently")}>
<span className={sort_by==="recently"?"color-blue":""}>最新</span>
<sapn className="relativef">
<i className={sort_by==="recently"&&sort_direction==="asc"?
"iconfont icon-sanjiaoxing-up font-12 topsj color-blue" :"iconfont icon-sanjiaoxing-up font-12 topsj"}></i>
<i className={sort_by==="recently"&&sort_direction==="desc"?
"iconfont icon-sanjiaoxing-down font-12 bottomsj color-blue":"iconfont icon-sanjiaoxing-down font-12 bottomsj"}></i>
</sapn>
</li>
<li className="shaiItem shixun_repertoire " value="price" onClick={()=>this.setsort_byfun("price")}>
<span className={sort_by==="price"?"color-blue":""}>价格</span>
<sapn className="relativef">
<i className={sort_by==="price"&&sort_direction==="asc"?
"iconfont icon-sanjiaoxing-up font-12 topsj color-blue" :"iconfont icon-sanjiaoxing-up font-12 topsj"}></i>
<i className={sort_by==="price"&&sort_direction==="desc"?
"iconfont icon-sanjiaoxing-down font-12 bottomsj color-blue":"iconfont icon-sanjiaoxing-down font-12 bottomsj"}></i>
</sapn>
</li>
</div>
</p>
</p>
</div>
<Spin size="large" className="educontent project-packages-list" spinning={this.state.isSpin}>
{project_packages&&project_packages.map((item,key)=>{
return(
<div className="educontent project-packages-list mb30" key={key}>
<div className="project-package-item">
<div className="item-image">
<img src={"/images/educoder/project_packages/"+setcategorylist(item.category_name)+".png"}/>
</div>
<div className=" item-body">
<div className=" item-head mbf10">
<div className=" item-head-title">
<a className={"fl mt3 font-20 font-bd color-dark maxwidth670 "}
onClick={()=>this.onReleaseRequirements("/crowdsourcing/"+item.id)}
title={item.title}
>{item.title}</a>
</div>
<div className=" item-head-blank"></div>
<div className=" item-head-price mtf12">
{item.min_price===null?"":<span>{item.min_price}</span>}
{item.max_price===null||item.min_price===null?"":<span>~</span>}
{item.max_price===null?"":<span>{item.max_price}</span>}
{item.min_price===null&&item.max_price===null?<span>可议价</span>:""}
</div>
</div>
<div className=" item-category mt10">
<div className=" item-category-item">{item.category_name}</div>
</div>
<div className=" item-other">
<div className=" item-group item-other-visit">
<span className=" item-group-icon mr10"><i className="fa fa-eye"></i></span>
<span className=" item-group-text">{item.visit_count}人浏览</span>
</div>
<div className=" item-group item-other-deadline">
<span className=" item-group-icon mr10"><i className="fa fa-clock-o"></i></span>
<span className=" item-group-text">{moment(item.deadline_at).format("YYYY-MM-DD HH:mm")}竞标截止</span>
</div>
<div className=" item-group item-other-bidding ml0 pagemancenter">
<span className=" item-group-icon mr10"><i className="fa fa-user" ></i></span>
<span className=" item-group-text">{item.bidding_users_count}人竞标</span>
</div>
{/*<div className=" item-other-blank"></div>*/}
<div className=" item-group item-other-publish-at">
{item.published_at===null?<span className="item-group-text">更新于{moment(item.updated_at).format("YYYY-MM-DD HH:mm")} </span>:
<span className=" item-group-text">发布于{moment(item.published_at).format("YYYY-MM-DD HH:mm")} </span>}
</div>
</div>
</div>
</div>
</div>
)
})}
</Spin>
{project_packages&&project_packages.length===0?<div className="edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div>:""}
<div className={"mt40"}>
<Pagination className="edu-txt-center" onChange={this.onChangePagelist} hideOnSinglePage={true} pageSize={20} current={page} total={data&&data.count} />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
)
}
}
export default PackageConcent;

View File

@ -1,30 +0,0 @@
import React, { Component } from 'react';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
//业务组件
import PackageBanner from "./PackageBanner";
import PackageConcent from "./PackageConcent";
class PackageIndex extends Component{
constructor(props) {
super(props)
}
componentDidMount(){
window.document.title = '众包创新'
}
render() {
return (
<div>
<div className="clearfix">
{/*头部banner*/}
<PackageBanner {...this.props}></PackageBanner>
{/*内容banner*/}
<PackageConcent {...this.props}></PackageConcent>
</div>
</div>
)
}
}
export default PackageIndex;

View File

@ -1,41 +0,0 @@
import React, { Component } from 'react';
import { Spin, Icon , Modal,Input,Button} from 'antd';
class NEITaskDetailsModel extends Component {
constructor(props) {
super(props);
this.state = {
}
}
render() {
return(
<Modal
keyboard={false}
title="提示"
visible={this.props.applytype===undefined?false:this.props.applytype}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
width="530px"
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 mb20">
<div>{this.props.applyvalue}</div>
<div>{this.props.applybottom}</div>
</p>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30 color_white" onClick={this.props.applycancel}>取消</a>
<a className="task-btn task-btn-orange " onClick={this.props.applyconfirm}>确定</a>
</div>
</div>
</Modal>
)
}
}
export default NEITaskDetailsModel;

View File

@ -1,492 +0,0 @@
import React, {Component} from 'react';
import {Link} from "react-router-dom";
import axios from 'axios';
import { Input ,Icon,Button,Pagination,DatePicker,Breadcrumb} from 'antd';
import { handleDateString,markdownToHTML,bytesToSize,getImageUrl} from 'educoder';
import NEITaskDetailsModel from './NEITaskDetailsModel';
import moment from 'moment';
import '../packageconcnet.css';
import './pds.css'
import gouxuan from './img/gouxuan.png'
import weigouxuan from './img/weigouxuan.png'
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 PackageIndexNEITaskDetails extends Component {
constructor(props) {
super(props)
this.contentMdRef = React.createRef();
this.state = {
data:undefined,
modalCancel: false,
overtype:false,
setbiddingmantype:false,
datalist:[]
}
}
componentDidMount() {
this.getdatas()
window.document.title = '众包创新'
}
getdatas=()=>{
let url =`/project_packages/${this.props.match.params.id}.json`;
axios.get(url).then((response) => {
if(response.data.status!=401&&response.data.status!=403&&response.data.status!=408&&response.data.status!=409)[
this.setState({
data:response.data
})
]
}).catch((error) => {
console.log(error);
})
}
setbiddingman=()=>{
this.setState({
setbiddingmantype:true
})
}
notsetbiddingman=()=>{
let {data} =this.state;
let gouxuans2=data.bidding_users
for (var i=0;i<gouxuans2.length;i++){
if(gouxuans2[i].bool === true){
gouxuans2[i].bool=false;
}
}
this.setState({
setbiddingmantype:false,
datalist:[]
})
}
modalCancel=()=>{
this.setState({
modalCancel:false
})
}
setbiddingusers=()=>{
let{datalist}=this.state;
if(datalist.length>0){
this.setState({
applytype:true,
applyvalue:`选择的${datalist.length}个竞标者将被设定为“中标”`,
applybottom:"是否确认执行?",
applycancel:this.setApplycancel,
applyconfirm:this.setApplysumbit
})
}
}
setApplysumbit=()=>{
this.setState({
applytype:false,
})
let{datalist}=this.state;
let newlist=[];
datalist.map((item,key)=>{
newlist.push(item.id)
})
let url=`/project_packages/${this.props.match.params.id}/bidding_users/win.json`;
axios.post(url,{
user_ids:newlist
}).then((response) => {
if(response.data.status===0){
this.props.showSnackbar("提交成功");
this.setState({
setbiddingmantype:false
})
this.getdatas()
}else if(response.data.status===-1){
this.props.showSnackbar(response.data.message);
}
}).catch((error) => {
console.log(error)
})
}
Clickteacher2=(e)=>{
let {data} =this.state;
let newlist=[]
let gouxuans2=data.bidding_users
for (var i=0;i<gouxuans2.length;i++){
if(gouxuans2[i].id === e){
// console.log("51");
// console.log(e);
if(gouxuans2[i].bool === true){
gouxuans2[i].bool=false;
}else{
gouxuans2[i].bool=true;
newlist.push(gouxuans2[i])
}
}else{
if(gouxuans2[i].bool === true){
newlist.push(gouxuans2[i])
}
}
}
console.log(newlist);
this.setState({
datalist:newlist,
})
}
setover=()=>{
this.setState({
overtype:true
})
}
setout=()=>{
this.setState({
overtype:false
})
}
deletePackages=()=>{
this.setState({
applytype:true,
applyvalue:"是否确认删除?",
applycancel:this.setApplycancel,
applyconfirm:this.setApplydelect
})
}
setApplydelect=()=>{
this.setState({
applytype:false,
})
let url=`/project_packages/${this.props.match.params.id}.json`;
axios.delete(url ).then((response) => {
// const status = response.data.status
// console.log(response)
this.props.showSnackbar('删除成功');
}).catch((error) => {
console.log(error)
})
}
setBiddingApply=()=>{
this.setState({
applytype:true,
applyvalue:"是否确认报名?",
applycancel:this.setApplycancel,
applyconfirm:this.setApplyconfirm
})
}
setApplycancel=()=>{
this.setState({
applytype:false,
})
}
setApplyconfirm=()=>{
this.setState({
applytype:false,
})
let url=`/project_packages/${this.props.match.params.id}/bidding_users.json`;
axios.post(url).then((response) => {
if(response.data.status===0){
this.props.showSnackbar("报名成功");
this.getdatas()
}else if(response.data.status===-1){
this.props.showSnackbar(response.data.message);
}
}).catch((error) => {
console.log(error)
})
}
goback = () => {
// window.history.go(-1)
// window.location.href="/crowdsourcing";
this.props.history.goBack()
}
render() {
let {overtype,data}=this.state;
// console.log(data&&data.creator.id)
let datalogin=data&&data.creator.id;
let userlogin=this.props.current_user&&this.props.current_user.user_id;
console.log(datalogin===userlogin)
// console.log(this.props.current_user&&this.props.current_user.user_id)
return (
data===undefined?"":<div>
<div className="clearfix">
<NEITaskDetailsModel
applytype={this.state.applytype}
applyvalue={this.state.applyvalue}
applybottom={this.state.applybottom}
applycancel={this.state.applycancel}
applyconfirm={this.state.applyconfirm}
/>
<div className={"educontent mt20 mb50"}>
<Breadcrumb separator={'>'} className={"fl"}>
{/*<Breadcrumb.Item>{this.props.current_user.username}</Breadcrumb.Item>*/}
<Breadcrumb.Item>
<a href="/crowdsourcing">众包创新</a>
</Breadcrumb.Item>
<Breadcrumb.Item><span className={"tabelcli"} title={data&&data.title}>{data&&data.title}</span></Breadcrumb.Item>
</Breadcrumb>
<a className="color-grey-6 fr font-18 mr20" onClick={this.goback}>返回</a>
<div className="mb20">
<p className="clearfix">
<div className={"stud-class-set coursenavbox edu-back-white mt20"}>
<div className={"ant-row contentbox mdInForm "}>
<div className="educontent project-packages-list relative">
{data&&data.status==="pending"?<div>
<div className="publicpart orangeBlack "></div>
<span className="smalltrangle"></span>
<span className="publicword publicwords"> 未申请 </span>
</div>:data&&data.status==="applying"?<div>
<div className="publicpart orangeGreen"></div>
<span className="smalltrangle"></span>
<span className="publicword publicwords"> 待发布 </span>
</div>:""}
<div className="project-package-item project-package-items height185">
<div className="item-image">
<div className="fl edu-back-white ">
<a href={`/users/${data&&data.creator.login}`}>
<img alt="头像" className="radius mt10 ml5" height="70" id="nh_user_logo" name="avatar_image"
src={`/images/${data&&data.creator.image_url}`}
width="70"/>
</a>
<div className=" edu-back-white pagemancenter mt10 ">
{data&&data.creator.name}
</div>
{datalogin===userlogin===true?"":<div className=" edu-back-white ml5 mt10 "
onMouseOver={this.setover}
onMouseOut={this.setout}
>
{overtype===false?<a className="ContacttheTA fl" target="_blank" href={`/messages/${this.props.current_user&&this.props.current_user.login}/message_detail?target_ids=${data&&data.creator.id}`}> <img alt="头像" class="mr5" src={require('./newsone.png')} />联系TA</a>:
<a className="ContacttheTAs fl" target="_blank" href={`/messages/${this.props.current_user&&this.props.current_user.login}/message_detail?target_ids=${data&&data.creator.id}`}> <img alt="头像" className="mr5"
src={require('./newstwo.png')}/>联系TA</a>}
</div>}
</div>
</div>
<div className=" item-body">
<div className=" item-head mbf10 mt15 ">
<div className=" item-head-title ">
<span className={"fl mt3 font-18 font-bd color-dark maxwidth670 "}
title={data&&data.title}
>{data&&data.title}
</span>
</div>
<div className=" item-head-price mt2">
{data&&data.min_price===null?"":<span><span className={"font-24"}>{data&&data.min_price}</span></span>}
{data&&data.max_price===null||data&&data.min_price===null?"":<span>~</span>}
{data&&data.max_price===null?"":<span><span className={"font-24"}>{data&&data.max_price}</span></span>}
{data&&data.min_price===null&&data&&data.max_price===null?<span>可议价</span>:""}
</div>
</div>
<div className="item-category">
<div className="item-category-item">{data&&data.category_name}</div>
</div>
<div className=" item-other">
<div>
{data&&data.published_at===null?<span className="item-group-text">
更新时间{moment(data&&data.updated_at).format("YYYY-MM-DD HH:mm")}
</span>:<span className="item-group-text">
发布时间{moment(data&&data.published_at).format("YYYY-MM-DD HH:mm")}
</span>}
</div>
<div className=" item-group item-other-deadline ml40">
<span className="item-group-text">竞标截止时间{moment(data&&data.deadline_at).format("YYYY-MM-DD HH:mm")}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{/*详情*/}
<div className={"stud-class-set padding26 coursenavbox edu-back-white mt20"}>
<div>
<div className={"longboxs"}>
需求详情
{data&&data.status==="pending"&&data&&data.operation.can_select_bidding_user===true?<div className="fr">
<a className="task-btn-nebules fr" href={`/crowdsourcing/${this.props.match.params.id}/edit`}>编辑</a>
<a className="task-btn-nebules fr" onClick={this.deletePackages}>删除</a>
</div>:""}
</div>
<div className={"padding020"}>
<div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML(data&&data.content).replace(/▁/g,"▁▁▁")}}></div>
</div>
</div>
{data&&data.attachments.length>0?<div>
<div className={"longboxs "}>
需求文件
</div>
{data&&data.attachments.map((item,key)=>{
return(
<div className={"newForm newFormbox mt10 "}>
<i className="color-green iconfont icon-fujian mr5 fl font-14 mt3"></i>
<a className="upload_filename color-grey readonly hidden fl mtf3 mr10 ml5" href={item.url}>{item.title} &nbsp; &nbsp;{bytesToSize(item.filesize)}</a>
</div>
)})}
</div>:""}
</div>
{/*发布者和竞选者状态show*/}
{this.state.setbiddingmantype===false&&data&&data.published_at!=null?<div className={"stud-class-set coursenavbox edu-back-white mt20"}>
{/*下面是头像*/}
<div className={"stud-class-set pd26 coursenavbox edu-back-white"}>
<div className={"relativef"}>
<div className={"longboxs mb0"}>
报名列表({data&&data.bidding_users.length})
</div>
<div className="packageabsolute">
{data&&data.operation.can_bidding===true?<Button type="primary" className="defalutSubmitbtn fl ml20 defalutSubmitbtns" onClick={this.setBiddingApply}>竞标报名</Button>:""}
{data&&data.operation.can_select_bidding_user===true?<Button type="primary" className="defalutSubmitbtn fl ml20 defalutSubmitbtns" onClick={this.setbiddingman}>选择中标者</Button>:""}
</div>
</div>
</div>
<div className={"ysllogin_register_contentss edu-back-white "} style={{borderTop: '1px solid rgb(234, 234, 234)'}}>
<div className="ysllogin_sections">
<div className="ysldivhome2s">
<div style={{height: "20px"}}> </div>
{data&&data.bidding_users.map((item,key)=>{
return(
<div className="ysldivhomediv1s homehove" key={key}>
{item.status==="bidding_won"?<img src={gouxuan} className="yslgouxuanimg"/>:""}
<a className={item.status==="bidding_won"?"":"mt20"} href={`/users/${item.login}`}><img className="div1imgs" src={getImageUrl("images/"+item.image_url)}/></a>
<div className="textall mt10" title={item.name}> <p className="ptext">{item.name}</p></div>
{this.props.current_user&&this.props.current_user.login!=item.login?<a className="ContacttheTAs fl none" target="_blank" href={`/messages/${this.props.current_user&&this.props.current_user.login}/message_detail?target_ids=${item.id}`}>
<img alt="头像" className="mr5" src={require('./newstwo.png')}/>联系TA
</a>:""}
</div>
)
})}
{data&&data.bidding_users.length===0?<div className="edu-back-white" style={{width: '1200px'}}>
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无人员竞标~</p></div>
</div>:""}
</div>
</div>
</div>
</div>:""}
{this.state.setbiddingmantype===true?<div className={"stud-class-set coursenavbox edu-back-white mt20"}>
{/*发布人选择状态*/}
{/*下面是头像*/}
<div className={"stud-class-set pd26 coursenavbox edu-back-white"}>
<div className={"relativef"}>
<div className={"longboxs mb0"}>
报名列表({data&&data.bidding_users.length})
</div>
<div className="packageabsolute">
<div className=" fl mt10 mr20">
已选 <span className={"color-orange06"}>({this.state.datalist.length})</span>
</div>
<a className="defalutCancelbtns fl" onClick={this.notsetbiddingman}>取消</ a>
<Button type="primary" className="defalutSubmitbtn fl ml20 defalutSubmitbtns" onClick={this.setbiddingusers}>确定</Button>
</div>
</div>
</div>
<div className={"ysllogin_register_contentss edu-back-white "} style={{borderTop: '1px solid rgb(234, 234, 234)'}}>
<div className="ysllogin_sections">
<div className="ysldivhome2s">
<div style={{height: "20px"}}> </div>
{data&&data.bidding_users.map((item,key)=>{
return(
<div className="ysldivhomediv1s" onClick={()=>this.Clickteacher2(item.id)} key={key}>
{item.bool===true?<img src={gouxuan} className="yslgouxuanimg"/>:<img src={weigouxuan} className="yslgouxuanimg"/>}
<a href={`/users/${item.login}`} target="_blank"><img className="div1imgs" src={getImageUrl("images/"+item.image_url)}/></a>
<span className={item.bool===true?"textall mt10 color-blue":"textall mt10"} title={item.name}> <p className="ptext">{item.name}</p></span>
</div>
)
})}
{data&&data.bidding_users.length===0?<div className="edu-back-white" style={{width: '1200px'}}>
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无人员竞标~</p></div>
</div>:""}
</div>
</div>
</div>
</div>:""}
</p>
</div>
</div>
</div>
</div>
)
}
}
export default PackageIndexNEITaskDetails;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

View File

@ -1,57 +0,0 @@
.ysldivhome2s{
display: flex;
flex-flow: row wrap;
align-content:stretch;
flex-direction: row;
margin-bottom: 20px;
}
.ysllogin_register_contentss{
margin-top:0px !important;
padding-top: 10px;
padding-bottom: 10px;
display: flex;
margin-top: 20px;
/*justify-content: center;*/
background: #fff;
}
.ysldivhomediv1s{
width: 80px;
height: 130px;
display: flex;
flex-direction:column;
margin-left: 48px;
margin-top: 20px;
}
.yslgouxuanimg{
width: 20px;
height: 20px;
margin-left: 64px;
}
.yslgouxuanimg2s{
height: 20px;
}
.div1imgs{
display: flex;
justify-content:center;
width: 80px;
height: 80px;
border-radius:50%;
}
.textall{
text-align: center;
font-size: 13px;
color: #4B4B4B;
}
.ptext{
width: 80px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.ysllogin_sections {
display: flex;
align-items: center;
flex-direction: column;
}

View File

@ -1,41 +0,0 @@
import React, {Component} from 'react';
import {Link} from "react-router-dom";
import { Steps, Divider } from 'antd';
const { Step } = Steps;
class PackageIndexNEIBanner extends Component {
constructor(props) {
super(props)
this.state = {
current:0
}
}
componentDidMount() {
}
onChange=(current)=>{
console.log('onChange:', current);
this.setState({ current });
};
render() {
const { current } = this.state;
return (
<div className="edu-back-white mb20 PackageIndexNEIBanner">
<p className="clearfix padding110">
<Steps current={current} >
<Step title="发布需求"/>
<Step title="筛选合适的接包方"/>
<Step title="线下交易,完成实施"/>
</Steps>
</p>
</div>
)
}
}
export default PackageIndexNEIBanner;

View File

@ -1,954 +0,0 @@
import React, {Component} from 'react';
import {Link} from "react-router-dom";
import axios from 'axios';
import { Input , Spin, Icon ,Button,Pagination,DatePicker} from 'antd';
import { handleDateString,getUrl,setmiyah} 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 '../packageconcnet.css';
const { Search } = Input;
const $ = window.$;
let origin = getUrl();
// load
if (!window.postUpMsg) {
$.getScript(
`${origin}/javascripts/attachments.js`,
(data, textStatus, jqxhr) => {
});
}
function checkPhone(phone){
if(!(/^1[3456789]\d{9}$/.test(phone))){
// alert("手机号码有误,请重填");
return false;
}
}
function range(start, end) {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
}
function disabledDateTime() {
return {
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
};
}
function disabledDate(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
class PackageIndexNEIBannerConcent extends Component {
constructor(props) {
super(props)
this.contentMdRef = React.createRef();
this.state = {
modalCancel:false,
getverificationcodes:true,
seconds:60,
springtype:false,
category:undefined,
title:undefined,
content:undefined,
attachment_ids:undefined,
deadline_at:undefined,
min_price:undefined,
max_price:undefined,
contact_name:undefined,
contact_phone:undefined,
code:undefined,
publish:false,
categories:[]
}
}
componentDidMount() {
window.document.title = '众包创新'
if(this.props.match.params.id!=undefined){
let url=`/project_packages/${this.props.match.params.id}.json`
axios.get((url)).then((response) => {
let data=response.data
this.setState({
category:data.category_id,
title:data.title,
content:data.content,
deadline_at:moment(data.deadline_at),
min_price:data.min_price,
max_price:data.max_price,
contact_name:data.contact_name==null||data.contact_name==undefined?this.props.current_user.real_name:data.contact_name,
phones:data.contact_phone,
attachments:data.attachments,
})
}).catch((error) => {
console.log(error);
})
}else{
console.log(this.props.current_user&&this.props.current_user.real_name)
}
let Url = `/project_package_categories.json`;
axios.get(Url).then((response) => {
// console.log(response)
if(response.data.status===-1){
}else{
this.setState({
categories:response.data.categories
})
}
}).catch((error) => {
console.log(error)
})
this.setState({
contact_name:this.props.current_user&&this.props.current_user.real_name
})
// this.contentMdRef.current.setValue("测试赋值")
}
componentDidUpdate = (prevProps) => {
if(prevProps.current_user!=this.props.current_user){
if(this.props.current_user!=undefined){
this.setState({
contact_name:this.props.current_user.real_name
})
}
}
}
//获取验证码;
getverificationcode =()=>{
// if (this.state.logins&&this.state.logins.length === 0) {
// // 判断没有输入手机号
// return
// }
if(this.state.getverificationcodes === undefined){
console.log("undefined");
return;
}
if (this.state.getverificationcodes === true) {
this.setState({
getverificationcodes: undefined,
})
let timer = setInterval(() => {
this.setState((preState) => ({
seconds: preState.seconds - 1,
}), () => {
if (this.state.seconds == 0) {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 60,
})
}
});
}, 1000)
//其他的网络请求也可以
this.SMSverification();
} else {
this.setState({
getverificationcodes: undefined,
})
let timer = setInterval(() => {
this.setState((preState) => ({
seconds: preState.seconds - 1,
}), () => {
if (this.state.seconds == 0) {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 60,
})
}
});
}, 1000)
//其他的网络请求也可以
this.SMSverification();
}
}
//短信验证
SMSverification = () => {
let {contact_phone,code}=this.state;
var url = `/accounts/get_verification_code.json`;
axios.get((url), {
params: {
login: contact_phone,
type: 5,
smscode:setmiyah(contact_phone)
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
// console.log(result);
// this.openNotification("验证码已发送,请注意查收");
if(result.data.status===1){
this.openNotification("验证码已发送,请注意查收");
}else if(result.data.status===-2){
this.openNotification(result.data.message);
}
}).catch((error) => {
console.log(error);
})
}
onChangeTimePicker = (value, dateString) => {
if(value===null){
this.setState({
deadline_at:""
})
}else{
if(moment(handleDateString(dateString))===undefined||moment(handleDateString(dateString))===null||moment(handleDateString(dateString))===""){
this.setState({
deadline_attypes:true
})
}else{
this.setState({
deadline_attypes:false
})
}
if(moment(handleDateString(dateString))<moment(new Date())){
this.setState({
deadline_attypexy:true
})
}else{
this.setState({
deadline_attypexy:false
})
}
this.setState({
deadline_at: moment(handleDateString(dateString))
})
}
}
setcheckoutcontent=()=>{
const content = this.contentMdRef.current.getValue().trim();
if(content===undefined||content===null||content===""){
this.setState({
contenttypes:true
})
}else{
this.setState({
contenttypes:false
})
}
}
setcheckout=(min_price,max_price)=>{
// if(min_price===undefined){
// this.setState({
// min_pricetype:true
// })
// }else{
// this.setState({
// min_pricetype:false
// })
// }
// if(parseInt(min_price)===undefined||parseInt(min_price)===null||parseInt(min_price)===""){
//
// this.setState({
// min_pricetype:true
// })
// }else{
// this.setState({
// min_pricetype:false
// })
// }
// if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){
//
// this.setState({
// min_pricetype:true
// })
//
// }else{
// this.setState({
// min_pricetype:false
// })
// }
if(parseInt(min_price)<=0){
this.setState({
smallstype:true
})
}else{
this.setState({
smallstype:false
})
}
if(parseInt(max_price)<parseInt(min_price)){
this.setState({
minmaxtype:true
})
}else{
this.setState({
minmaxtype:false
})
}
}
setPublication=(type)=>{
const content = this.contentMdRef.current.getValue().trim();
// console.log(content)
// console.log(this.state.deadline_at._i)
this.setState({
publish:type
})
let types=type;
let {category,title,attachment_ids,deadline_at,min_price,max_price,contact_name,contact_phone,code,modalCancel}=this.state;
if(category===undefined||category===null||category===""){
this.setState({
categorytypes:true
})
this.scrollToAnchor("publishtimestart");
return
}
if(title===undefined||title===null||title===""){
this.setState({
titletypes:true
})
this.scrollToAnchor("publishtimestart");
return
}
if(content===undefined||content===null||content===""){
this.setState({
contenttypes:true
})
this.scrollToAnchor("publishtimestart");
return
}
if(deadline_at===undefined||deadline_at===null||deadline_at===""){
this.setState({
deadline_attypes:true
})
this.scrollToAnchor("publishtime");
return
}
if(moment(deadline_at)<moment(new Date())){
this.setState({
deadline_attypexy:true
})
return
}
// if(min_price===undefined){
// this.setState({
// min_pricetype:true
// })
// }else{
// this.setState({
// min_pricetype:false
// })
// }
// if(parseInt(min_price)===undefined||parseInt(min_price)===null||parseInt(min_price)===""){
// this.setState({
// min_pricetype:true
// })
// return
// }
// if(parseInt(max_price)===undefined||parseInt(max_price)===null||parseInt(max_price)===""){
// this.setState({
// min_pricetype:true
// })
// return
// }
if(parseInt(min_price)<=0){
this.setState({
smallstype:true
})
return
}
if(parseInt(max_price)<parseInt(min_price)){
this.setState({
minmaxtype:true
})
return
}
if(contact_name===undefined||contact_name===""||contact_name===null){
this.setState({
contact_nametype:true
})
return
}
// if(modalCancel===false){
// if(this.props.current_user.phone===undefined||this.props.current_user.phone===null||this.props.current_user.phone===""){
// this.setState({
// current_userphonetype:true
// })
// return
// }
// }
if(this.props.current_user&&this.props.current_user.phone===null||modalCancel===true){
if(contact_phone===undefined||contact_phone===null||contact_phone===""){
this.setState({
contact_phonetype:true
})
return
}
if(checkPhone(contact_phone)===false){
this.setState({
contact_phonetypes:true
})
return
}
if(code===undefined||code===""||code===null){
this.setState({
codeypes:true
})
return
}
}
this.setState({
springtype:true
})
if(this.props.match.params.id===undefined){
const url = `/project_packages.json`;
axios.post(url, {
category_id: category,
title: title,
content: content,
attachment_ids: attachment_ids,
deadline_at:deadline_at._i,
min_price:parseInt(min_price),
max_price:parseInt(max_price),
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.real_name:contact_name,
contact_phone: contact_phone===undefined?this.props.current_user&&this.props.current_user.phone:contact_phone,
code:code,
publish:types
}
).then((response) => {
if(response.data.status===0){
if(type===true){
this.props.setPublicationfun(response.data.id)
}else{
window.location.href="/crowdsourcing/"+response.data.id
}
this.setState({
springtype:false
})
}else if(response.data.status===-1){
if(response.data.message==="无效的验证码"){
this.setState({
codeypesno:true,
springtype:false
})
}
}
this.setState({
springtype:false
})
}).catch((error) => {
console.log(error)
this.setState({
springtype:false
})
})
}else{
// edit
const url = `/project_packages/${this.props.match.params.id}.json`;
axios.put(url, {
category_id: category,
title: title,
content: content,
attachment_ids: attachment_ids,
deadline_at:deadline_at._i,
min_price:parseInt(min_price),
max_price:parseInt(max_price),
contact_name: contact_name===null||contact_name===undefined?this.props.current_user.real_name:contact_name,
contact_phone: contact_phone===undefined?this.props.current_user&&this.props.current_user.phone:contact_phone,
code:code,
publish:types
}
).then((response) => {
if(response.data.status===0){
if(type===true){
this.props.setPublicationfun(response.data.id)
}else{
window.location.href="/crowdsourcing/"+response.data.id
}
this.setState({
springtype:false
})
}else if(response.data.status===-1){
if(response.data.message==="无效的验证码"){
this.setState({
codeypesno:true,
springtype:false
})
}
}
this.setState({
springtype:false
})
}).catch((error) => {
console.log(error)
this.setState({
springtype:false
})
})
}
}
modalCancel=()=>{
this.setState({
modalCancel:false,
contact_phone:undefined,
code:undefined,
})
}
editmodels=()=>{
this.setState({
modalCancel:true
})
}
setcategory=(value)=>{
if(value===undefined||value===null||value===""){
this.setState({
categorytypes:true
})
}else{
this.setState({
categorytypes:false
})
}
this.setState({
category:value
})
}
settitlefun=(e)=>{
if(e.target.value===undefined||e.target.value===null||e.target.value===""){
this.setState({
titletypes:true
})
}else{
this.setState({
titletypes:false
})
}
this.setState({
title:e.target.value
})
}
onChangemin_prices=(e)=>{
let{max_price}=this.state;
this.setState({
min_price:e.target.value
})
this.setcheckout(e.target.value,max_price)
}
onChangemax_prices=(e)=>{
let{min_price}=this.state;
this.setState({
max_price:e.target.value
})
this.setcheckout(min_price,e.target.value)
}
onChangeContact_name=(e)=>{
if(e.target.value===undefined||e.target.value===""||e.target.value===null){
this.setState({
contact_nametype:true
})
}else{
this.setState({
contact_nametype:false
})
}
this.setState({
contact_name:e.target.value
})
}
onChangeContact_phone=(e)=>{
let {modalCancel}=this.state;
// if(modalCancel===false){
// if(this.props.current_user.phone===undefined||this.props.current_user.phone===null||this.props.current_user.phone===""){
// this.setState({
// current_userphonetype:true
// })
// }else{
// this.setState({
// current_userphonetype:false
// })
// }
// }
if(this.props.current_user&&this.props.current_user.phone===null||modalCancel===true){
if(e.target.value===undefined||e.target.value===null||e.target.value===""){
this.setState({
contact_phonetype:true
})
}else{
this.setState({
contact_phonetype:false
})
}
if(checkPhone(e.target.value)===false){
this.setState({
contact_phonetypes:true
})
}else{
this.setState({
contact_phonetypes:false
})
}
}
this.setState({
contact_phone:e.target.value
})
}
onChangeCode=(e)=>{
if(e.target.value===undefined||e.target.value===""||e.target.value===null){
this.setState({
codeypes:true
})
}else{
this.setState({
codeypes:false
})
}
this.setState({
code:e.target.value
})
}
//跳转道描点的地方
scrollToAnchor = (anchorName) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if(anchorElement) { anchorElement.scrollIntoView(); }
}
}
render() {
let {modalCancel,seconds,getverificationcodes,attachments,
category,title}=this.state;
let categorylist=[
{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"},
]
return (
<div className="mb20 touchSelect">
{/*<PhoneModel*/}
{/*modalsType={modalCancel}*/}
{/*modalCancel={this.modalCancel}*/}
{/*/>*/}
<Spin size="large" spinning={this.state.springtype} >
<p className="clearfix" id={"publishtimestart"}>
<div className={"stud-class-set pd30a0 edu-back-white pb20"}>
<div className={"ant-row contentbox mdInForm mb20"}>
<div className="ant-form-item-label mb20">
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16">请选择需求类型</label>
</div>
<p className="clearfix mb20 shaiContent" >
<div className="fl pr shaiAllItem pagetype">
{this.state.categories.map((item,key)=>{
return(
<li key={key} className={category===item.id?"shaiItem shixun_repertoire active borderccc":"shaiItem shixun_repertoire borderccc"} value={item.id} onClick={()=>this.setcategory(item.id)}>{item.name}</li>
)
})}
</div>
</p>
{this.state.categorytypes===true?<div className={"color-red mb10"}>请选择类型</div>:""}
<div className="ant-form-item-label mb15">
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16" >需求标题和详情</label>
</div>
<Input placeholder="请输入需求标题示例美食类APP开发最大限制60个字符" maxLength="60" className="input-100-40s mt5 fafafas"
value={title} onInput={this.settitlefun}/>
{this.state.titletypes===true?<div className={"color-red mt10"}>不能为空</div>:""}
<MDEditors ref={this.contentMdRef} placeholder="请填写清晰完整的需求内容" mdID={'courseContentMD'} refreshTimeout={1500}
watch={false} className="courseMessageMD" initValue={this.state.content} setcheckoutcontent={()=>this.setcheckoutcontent()}></MDEditors>
{/* 请求status 422 */}
{this.state.contenttypes===true?<div className={"color-red"}>不能为空</div>:""}
{/*<div className="df uploadBtn">*/}
{/*<a href="javascript:void(0);" className="fl" onClick={() => window.$('#_file').click()}*/}
{/*data-tip-down="请选择文件上传">*/}
{/*/!*<i className="fa fa-upload mr5 color-blue"></i>*!/*/}
{/*<span className="color-blue">上传附件</span>*/}
{/*</a>*/}
{/*<span style={{ fontSize: "14px"}}>(最多可添加 <span className={"color-orange06"}>5</span> 个图片/文件,每个大小不超过 <span className={"color-orange06"}>10MB</span>)</span>*/}
{/*</div>*/}
{/*{attachments&&attachments.map((item,key)=>{*/}
{/*return(*/}
{/*<div className={"newForm newFormbox mt10 "}>*/}
{/*<i className="color-green iconfont icon-fujian mr5 fl font-14 mt4"></i>*/}
{/*<a className="upload_filename color-grey readonly hidden fl mtf3 mr10 ml5" href={item.url}>{item.title} &nbsp; &nbsp;{bytesToSize(item.filesize)}</a>*/}
{/*</div>*/}
{/*)})}*/}
{/*<form className="newForm newFormbox mt10 ">*/}
{/*<span id={`attachments_fields`} className="attachments_fields"*/}
{/*xmlns="http://www.w3.org/1999/html">*/}
{/*</span>*/}
{/*<span className="add_attachment">*/}
{/*<input className="file_selector"*/}
{/*data-are-you-sure="您确定要删除吗?"*/}
{/*data-delete-all-files="您确定要删除所有文件吗"*/}
{/*data-description-placeholder="可选的描述"*/}
{/*data-field-is-public="公开"*/}
{/*data-file-count="个文件已上传"*/}
{/*data-lebel-file-uploding="个文件正在上传"*/}
{/*data-max-concurrent-uploads="2"*/}
{/*data-max-file-size-message="该文件无法上传。超过文件大小限制 (10 MB)建议上传到百度云等其他共享工具里然后在txt文档里给出链接以及共享密码并上传"*/}
{/*data-max-file-size="10485760" data-upload-path="/uploads.js"*/}
{/*id="_file"*/}
{/*multiple="multiple" name="attachments[dummy][file]"*/}
{/*onChange={() => {*/}
{/*;*/}
{/*console.log(window.$('.file_selector')[0])*/}
{/*window.addInputFiles(window.$('.file_selector')[0])*/}
{/*}}*/}
{/*style={{'display': 'none'}}*/}
{/*type="file">*/}
{/*</input>*/}
{/*</span>*/}
{/*</form>*/}
</div>
</div>
<div className={"stud-class-set padding30 coursenavbox edu-back-white"} style={{borderTop: '1px solid #EAEAEA'}} id={"publishtime"}>
<div className={"ant-row contentbox mdInForm "}>
<div className="ant-form-item-label mb10">
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16">工期与预算</label>
</div>
<p className="clearfix mb20 shaiContent">
<span className="shaiTitle fl mt5 ml10">竞标截止</span>
<DatePicker
showToday={false}
showTime={{ format: 'HH:mm' }}
locale={locale}
style={{"width": "260px"}}
format="YYYY-MM-DD HH:mm"
placeholder="请选择任务的竞标截止日期"
className={"fafas"}
disabledTime={disabledDateTime}
disabledDate={disabledDate}
dropdownClassName="hideDisable"
value={this.state.deadline_at}
onChange={this.onChangeTimePicker}
/>
{this.state.deadline_attypes===true?<div className={"color-red ml100"}>不能为空</div>:""}
{this.state.deadline_attypexy===true?<div className={"color-red ml100"}>不能早于当前时间</div>:""}
</p>
<p className="clearfix mb20 shaiContent">
<span className="shaiTitle fl mt5 ml10">支付费用</span>
<Input
className={"fafas"}
style={{"width": "260px"}}
value={this.state.min_price}
placeholder="支付多少费用(最低)"
onInput={(e)=>this.onChangemin_prices(e)}
suffix={
<span >¥</span>
}
/>
<span className={"ml10 mr10"}></span>
<Input
className={"fafas"}
style={{"width": "260px"}}
value={this.state.max_price}
placeholder="支付多少费用(最高)"
onInput={(e)=>this.onChangemax_prices(e)}
suffix={
<span>¥</span>
}
/><span className={"pagenoedits"}></span>
{this.state.min_pricetype===true?<div className={"color-red ml100"}>不能为空</div>:""}
{this.state.smallstype===true?<div className={"color-red ml100"}>不能小于零</div>:""}
{this.state.minmaxtype===true?<div className={"color-red ml100"}>最高费用不能小于最低费用</div>:""}
</p>
<div className="ant-form-item-label mb10">
<label htmlFor="coursesNew_description" className="ant-form-item-requireds font-16" >联系方式</label>
</div>
<p className="clearfix mb20 shaiContent">
<span className="shaiTitle fl mt5 ml40">姓名</span>
<Input
className={"fafafas"}
style={{"width": "260px"}}
value={this.state.contact_name===null||this.state.contact_name===undefined?this.props.current_user&&this.props.current_user.real_name:this.state.contact_name}
placeholder="请输入姓名"
onInput={(e)=>this.onChangeContact_name(e)}
/>
{this.state.contact_nametype===true?<div className={"color-red ml100"}>不能为空</div>:""}
</p>
{this.props.current_user&&this.props.current_user.phone!=null&&modalCancel===false?<p className="clearfix mb20 shaiContent">
<span className="shaiTitle fl mt5 ml25">手机号</span>
<Input
className={"fafafas fl"}
style={{"width": "260px"}}
value={this.state.phones===undefined?this.props.current_user&&this.props.current_user.phone:this.state.phones}
placeholder="请输入手机号"
disabled={true}
/>
<a className="fl ml20 mt10">
<i className="iconfont icon-bianjidaibeijing font-20 color-blue" onClick={()=>this.editmodels()}></i>
</a>
</p>:""}
{/*{this.state.current_userphonetype===true?<div className={"color-red ml100"}>不能为空</div>:""}*/}
{this.props.current_user&&this.props.current_user.phone===null||modalCancel===true?<p className="clearfix mb20 shaiContent">
<span className="shaiTitle mt5 fl">
<span className="shaiTitle fl mt5 ml25">
{/*未注册才显示!*/}
手机号</span>
<Input
className={"fafafas fl"}
style={{"width": "260px"}}
value={this.state.contact_phone}
placeholder="请输入手机号码"
onInput={(e)=>this.onChangeContact_phone(e)}
/>
{this.state.contact_phonetype===true?<div className={"color-red ml100"}>不能为空</div>:""}
{this.state.contact_phonetypes===true?<div className={"color-red ml100"}>请输入正确的手机号</div>:""}
</span>
<span className="shaiTitle mt5 ml17 fl">
<span>
<Search
style={{ width: 300 }}
value={this.state.code}
className="fafas"
placeholder="请输入验证码"
enterButton={
getverificationcodes === undefined ? <span>重新发送 ({seconds}s)</span>: getverificationcodes === true ?<span ></span> :<span ></span>}
onSearch={()=>this.getverificationcode()}
onInput={(e)=>this.onChangeCode(e)}
/>
{this.state.codeypes===true?<div className={"color-red"}>验证码不能为空</div>:""}
{this.state.codeypesno===true?<div className={"color-red"}>验证码不正确</div>:""}
</span>
<span>
{/*<Button type="primary" className="defalutSubmitbtn ml10 defalutSubmitbtnmodels">重新发送()</Button>*/}
</span>
</span>
<a className="fl mt8 mt15">
<span className="font-18 color-blue" onClick={()=>this.modalCancel()}>X</span>
</a>
</p>:""}
</div>
</div>
</p>
<div className="clearfix mt30 mb30">
<Button type="primary" className="defalutSubmitbtn fl mr20 defalutSubmitbtns" onClick={()=>this.setPublication(true)}>申请发布</Button>
<a className="defalutCancelbtns fl" onClick={()=>this.setPublication(false)}>保存</ a>
</div>
</Spin>
</div>
)
}
}
export default PackageIndexNEIBannerConcent;
// attachments:[
// {
// id: 206525,
// title: "412420b57ed8c141963d4c548bde551f",
// filesize: 18523,
// description: null,
// url: "/api/attachments/206525"
// }
// ]

View File

@ -1,49 +0,0 @@
import React, {Component} from 'react';
import {Link} from "react-router-dom";
import { Icon ,Button} from 'antd';
class PackageIndexNEISubmit extends Component {
constructor(props) {
super(props)
this.state = {
current:0
}
}
componentDidMount() {
window.document.title = '众包创新'
}
setageload=(sum)=>{
if(sum===undefined){
window.location.href="/crowdsourcing/new"
}else{
// this.props.history.push("/project_packages/"+sum)
window.location.href="/crowdsourcing/"+sum
}
}
render() {
return (
<div className="mb20">
<p className="clearfix ">
<div className={"stud-class-set padding200 coursenavbox edu-back-white"}>
<div className={"mb20"}><Icon type="check-circle" theme="filled" className={"fontcircle color-green"}/></div>
<div className={"sumbtongs mb10"}>恭喜!</div>
<div className={"sumbtongs mb10"}>提交成功</div>
<div className={"terraces mb5"}>平台正在审核您的申请审核结果将以平台消息的形式通知您</div>
<div className="clearfix mt30 mb30 padding251">
<a className="defalutCancelbtns fl" onClick={()=>this.setageload(this.props.id)}>查看发布需求</ a>
<Button type="primary" className="defalutSubmitbtn fl ml40 defalutSubmitbtns" onClick={()=>this.setageload()}>继续发布</Button>
</div>
</div>
</p>
</div>
)
}
}
export default PackageIndexNEISubmit;

View File

@ -1,69 +0,0 @@
import React, { Component } from 'react';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
//业务组件
import PackageIndexNEIBanner from "./PackageIndexNEIBanner";
import PackageIndexNEIBannerConcent from "./PackageIndexNEIBannerConcent"
import PackageIndexNEISubmit from './PackageIndexNEISubmit'
import '../packageconcnet.css';
class PackageIndexNewandEditIndex extends Component{
constructor(props) {
super(props)
this.state = {
setPublication:false,
id:undefined
}
}
componentDidMount(){
window.document.title = '众包创新'
}
setPublicationfun=(ids)=>{
this.setState({
setPublication:true,
id:ids
})
}
goback = () => {
// window.history.go(-1)
// window.location.href="/crowdsourcing";
this.props.history.goBack()
}
render() {
let {setPublication}=this.state;
return (
<div>
<div className="clearfix">
{setPublication===false?<div className={"educontent mt20 mb50"}>
<p className="clearfix mt20 mb20">
<span className="fl font-24 color-grey-3">
{this.props.match.params.id!=undefined?"编辑":"新建"}</span>
<a className="color-grey-6 fr font-15 mr20" onClick={this.goback}>返回</a>
</p>
<PackageIndexNEIBanner {...this.props} />
<PackageIndexNEIBannerConcent
{...this.props}
setPublicationfun={this.setPublicationfun}
/>
</div>:
<div className={"educontent mt30 mb50"}>
<PackageIndexNEISubmit
{...this.props}
id={this.state.id}
/>
</div>}
</div>
</div>
)
}
}
export default PackageIndexNewandEditIndex;

View File

@ -1,140 +0,0 @@
import React, { Component } from 'react';
import { Spin, Icon , Modal,Input,Button} from 'antd';
class PhoneModel extends Component {
//getverificationcodes 是否是重新发送或者是获取验证码
//多少秒
constructor(props) {
super(props);
this.state = {
funmodalsType:false,
istype:false,
getverificationcodes:true,
seconds:35,
}
}
//获取验证码
getverificationcode =()=>{
// if (this.state.logins&&this.state.logins.length === 0) {
// 判断没有输入手机号
// return
// }
if (this.state.getverificationcodes === true) {
this.setState({
getverificationcodes: undefined,
})
let timer = setInterval(() => {
this.setState((preState) => ({
seconds: preState.seconds - 1,
}), () => {
if (this.state.seconds == 0) {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 35,
})
}
});
}, 1000)
//其他的网络请求也可以
this.SMSverification();
} else {
this.setState({
getverificationcodes: undefined,
})
let timer = setInterval(() => {
this.setState((preState) => ({
seconds: preState.seconds - 1,
}), () => {
if (this.state.seconds == 0) {
clearInterval(timer);
this.setState({
getverificationcodes: false,
seconds: 35,
})
}
});
}, 1000)
//其他的网络请求也可以
this.SMSverification();
}
}
//短信验证
SMSverification = () => {
// var url = `/accounts/get_verification_code.json`;
// axios.get((url), {
// params: {
// login: this.state.logins,
// type: 1,
// }
// }).then((result) => {
// //验证有问题{"status":1,"message":"success"}
// // console.log(result);
// this.openNotification("验证码已发送,请注意查收");
//
//
// }).catch((error) => {
// console.log(error);
//
// })
}
render() {
let{getverificationcodes,seconds} =this.state;
const antIcons = <Icon type="loading" style={{ fontSize: 24 }} spin />
return(
<Modal
keyboard={false}
title="修改手机号"
visible={this.props.modalsType===undefined?false:this.props.modalsType}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
width="530px"
>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 mb20">
<span className="shaiTitle mt5">手机号码<span>
<Input
style={{ width: 337 }}
placeholder="请输入手机号码" />
</span></span>
</p>
<p className="task-popup-text-center font-16 mt5">
<span className="shaiTitle mt5 ml17">
验证码
<span>
<Input
style={{ width: 200 }}
placeholder="请输入验证码" />
</span>
<span>
{
getverificationcodes === undefined ?
<Button type="primary" className="defalutSubmitbtn ml10 defalutSubmitbtnmodels" >重新发送 ({seconds}s)</Button>
: getverificationcodes === true ?
<Button type="primary" className="defalutSubmitbtn ml10 defalutSubmitbtnmodels" onClick={() => this.getverificationcode()} >获取验证码</Button>
:
<Button type="primary" className="defalutSubmitbtn ml10 defalutSubmitbtnmodels" onClick={() => this.getverificationcode()} >重新发送</Button>
}
{/*<Button type="primary" className="defalutSubmitbtn ml10 defalutSubmitbtnmodels">重新发送()</Button>*/}
</span>
</span>
</p>
<div className="clearfix mt30 edu-txt-center">
<a className="task-btn mr30 color_white" onClick={this.props.modalCancel}>取消</a>
<a className="task-btn task-btn-orange " onClick={this.props.modalSave}>确定</a>
</div>
</div>
</Modal>
)
}
}
export default PhoneModel;

View File

@ -1,76 +0,0 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
import Loading from '../../Loading'
import Loadable from 'react-loadable';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC'
import { SnackbarHOC } from 'educoder'
const PackageIndex = Loadable({
loader: () => import('./PackageIndex/PackageIndex'),
loading: Loading,
})
const PackageIndexNewandEdit = Loadable({
loader: () => import('./PackageIndexNewandEdit/PackageIndexNewandEditIndex'),
loading: Loading,
})
const PackageIndexNEITaskDetails = Loadable({
loader: () => import('./PackageIndexNEITaskDetails/PackageIndexNEITaskDetails'),
loading: Loading,
})
class ProjectPackageIndex extends Component {
constructor(props) {
super(props)
}
componentDidMount(){
window.document.title = '众包创新'
}
render() {
return (
<div className="newMain clearfix">
<Switch>
{/*众包首页*/}
<Route path="/crowdsourcing/:id/edit"
render={
(props) => (<PackageIndexNewandEdit {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/crowdsourcing/new"
render={
(props) => (<PackageIndexNewandEdit {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/crowdsourcing/:id"
render={
(props) => (<PackageIndexNEITaskDetails {...this.props} {...props} {...this.state} />)
}
></Route>
<Route path="/crowdsourcing"
render={
(props) => (<PackageIndex {...this.props} {...props} {...this.state} />)
}
></Route>
</Switch>
</div>
);
}
}
export default SnackbarHOC() (TPMIndexHOC (ProjectPackageIndex)) ;

View File

@ -1,369 +0,0 @@
.width1240{
width:1240px;
}
.packinput .ant-input{
height: 50px;
width:749px;
border-color: #E1EDF8 !important;
}
.packinput{
width:749px;
}
.packinput .ant-input-group-addon .ant-btn{
width:140px !important;
font-size: 18px;
height: 50px;
background:rgba(76,172,255,1);
}
.setissues{
width:280px;
height:50px;
background:rgba(76,172,255,1);
border-radius:4px;
margin-left: 15px;
}
.pagetype li{
color:#8F8F8F !important;
}
.maxwidth670{
max-width: 670px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mbf10{
margin-bottom:-10px;
}
.PackageIndexNEIBanner{
width:1200px;
height:110px;
background:rgba(255,255,255,1);
box-shadow:0px 2px 6px 0px rgba(125,125,125,0.26);
border-radius:8px;
}
.padding110{
padding: 39px 110px 0px;
box-sizing: border-box;
}
.borderccc{
border: 1px solid #ccc;
}
.input-100-40s{
width: 100%;
padding: 5px;
box-sizing: border-box;
}
.fafafas{
background-color: #fafafa!important;
height: 40px;
}
.fafafas:focus{
background-color: #fff!important;
}
.fafas .ant-input{
background-color: #fafafa!important;
height: 40px;
}
.fafas .ant-input:focus{
background-color: #fff!important;
}
.fafas .ant-input-group-addon .ant-btn{
width:140px !important;
font-size: 14px;
height: 40px;
background:rgba(76,172,255,1);
}
.newFormbox .upload_filename{
line-height: 32px;
}
.newFormbox .attachment span{
line-height: 23px;
}
.newFormbox .attachment .remove-upload{
line-height: 28px;
}
.pd26a0{
padding: 26px 26px 16px 26px;
}
.newFormbox .attachment .icon-fujian{
font-size: 14px !important;
line-height: 14px;
margin-top: 9px;
}
.newFormbox{
height:20px
}
.ml24{
margin-left:24px;
}
.defalutCancelbtns{
display: block;
border: 1px solid #4CACFF !important;
background-color: #fff;
color: #4CACFF !important;
width:130px;
height:40px;
text-align: center;
line-height: 40px;
border-radius: 4px;
}
.defalutSubmitbtns{
background-color: #4CACFF;
height:40px;
}
.defalutSubmitbtnmodels{
width:127px;
height:30px;
background-color: #4CACFF;
}
.ant-steps-item-process .ant-steps-item-icon{
background-color: #4CACFF !important;
}
.ant-steps-item-process .ant-steps-item-icon{
background-color: #4CACFF !important;
}
.padding200{
padding: 115px 200px 215px 200px;
}
.fontcircle{
font-size: 80px;
display: inherit;
}
.sumbtongs{
font-size: 24px;
display: inherit;
text-align: center;
}
.terraces{
font-size: 16px;
display: inherit;
text-align: center;
color:#999;
}
.padding251{
padding: 0px 245px;
}
.ant-modal-title{
text-align: center;
}
.ml17{
margin-left: 17px;
}
.project-package-items{
display: -webkit-flex;
display: flex;
flex-direction: row;
margin:0px !important;
padding: 20px;
background: white;
margin-bottom:0px !important;
box-shadow: none !important;
}
.mtf7{
margin-top:-7px;
}
.publicpart.orangeGreen {
border-left: 80px solid #29BD8B;
}
.publicwords{
left: 3px;
top: 18px;
}
.project-packages-list .project-package-items .item-image{
width:100px !important;
}
.height185{
height: 185px;
}
.ContacttheTA{
width: 80px;
height: 26px;
font-size: 14px;
line-height: 26px;
display: block;
border: 1px solid #4CACFF !important;
background-color: #fff;
color: #4CACFF !important;
text-align: center;
border-radius: 4px;
}
.ContacttheTAs{
width: 80px;
height: 26px;
font-size: 14px;
line-height: 24px;
/*display: block;*/
border: 1px solid #fff !important;
background-color: #4CACFF;
color: #fff !important;
text-align: center;
border-radius: 4px;
}
.ml28{
margin-left: 28px;
}
.longboxs{
font-size: 16px;
font-family: MicrosoftYaHei-Bold;
font-weight: bold;
color: rgba(5,16,26,1);
border-left: 4px solid rgba(76,172,255,1);
padding-left: 10px;
margin-bottom: 20px;
}
.padding020{
padding: 0px 20px 20px;
}
.mtf3{
margin-top:-3px;
}
.task-btn-nebules{
background: #fff!important;
color: #4CACFF!important;
border: 1px solid #4CACFF!important;
margin-left: 20px;
cursor: pointer;
display: inline-block;
padding: 0 12px;
letter-spacing: 1px;
text-align: center;
font-size: 14px;
height: 30px;
line-height: 30px;
border-radius: 2px;
}
.packageabsolute{
position: absolute;
right: -16px;
top: -7px;
}
.relativef{
position: relative;
}
.homehove:hover .ptext{
color: #4CACFF!important;
}
.homehove:hover .ContacttheTAs{
display: block;
}
.topsj{
position: absolute;
top: -3px;
}
.bottomsj{
position: absolute;
bottom: -5px;
}
.touchSelect .ant-spin-dot-spin{
margin-top: 30% !important;
}
.pagenoedits{
margin-left: 20px;
color: #ccc;
}
.pagemancenter{
text-align: center;
}
.ml0{
margin-left: 0px;
}
.tabelcli{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 850px;
display: table-cell;
}
.mtf10{
margin-top:-10px;
}
.padding26{
padding: 26px;
box-sizing: border-box;
}
.pd26{
padding: 26px;
}
.pd30a0{
padding: 30px 30px 16px 30px;
}
.shaiContent li.shaiItem:hover span{
color: #fff !important;
}
.shaiContent li.shaiItem:hover i.iconfont{
color: #4CACFF!important
}
.ant-form-item-requireds::before {
display: inline-block;
margin-right: 4px;
color: #f5222d;
font-size: 14px;
font-family: SimSun,sans-serif;
line-height: 1;
content: '*';
}
*, *::before, *::after {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.mtf12{
margin-top: -12px;
}

View File

@ -617,6 +617,8 @@ class NewHeader extends Component {
return true
} else if (url.startsWith('/statistics') && match.path.startsWith('/statistics')) {
return true
} else if (url.startsWith('/users') && match.path.startsWith('/users')) {
return true
} else {
return false
}
@ -734,9 +736,9 @@ class NewHeader extends Component {
<div className="headerContent">
{isRender === true ?
<LoginDialog
Modifyloginvalue={() => this.Modifyloginvalue()}
{...this.props}
{...this.state}
Modifyloginvalue={() => this.Modifyloginvalue()}
/> : ""}
{AccountProfiletype === true ?
@ -756,9 +758,9 @@ class NewHeader extends Component {
<a href={"/"} onClick={() => this.headtypesonClick("/", false)} className={"fl mr30"}>
{
mygetHelmetapi2 && mygetHelmetapi2.nav_logo_url && mygetHelmetapi2.nav_logo_url ?
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(mygetHelmetapi2.nav_logo_url)}></img>
:
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img>
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(mygetHelmetapi2.nav_logo_url)}></img>
:
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl("images/educoder/headNavLogo.png?1526520218")}></img>
}
</a>
{
@ -812,38 +814,44 @@ class NewHeader extends Component {
)
})
}
{
this.props.current_user && this.props.current_user.login &&
<li key="projects" onClick={() => this.headtypesonClick(`/users/${this.props.current_user.login}`, true)} className={`${this.matchpaths(`/users/${this.props.current_user.login}`) === true ? 'pr active' : 'pr'}`} style={true ? { display: 'flex' } : { display: 'none' }}>
<Link to={`/users/${this.props.current_user.login}`}>项目</Link>
</li>
}
</ul>
</div>
: ""
}
<div className="head-right">
{
this.props.user && this.props.user.login ?
<div className="edu-menu-panel">
<i className="iconfont icon-tianjiafangda color-grey-3"></i>
<div className="edu-menu-list" style={{ top: '46px', width: "240px" }}>
<div className="overPart"></div>
<ul className={coursestypes === true && this.props.user && this.props.user.main_site === false ? "fl headwith100b edu-txt-center pr ul-leftline" : "fl with50 edu-txt-center pr ul-leftline"}>
<div className="edu-menu-panel">
<i className="iconfont icon-tianjiafangda color-grey-3"></i>
<div className="edu-menu-list" style={{ top: '46px', width: "240px" }}>
<div className="overPart"></div>
<ul className={coursestypes === true && this.props.user && this.props.user.main_site === false ? "fl headwith100b edu-txt-center pr ul-leftline" : "fl with50 edu-txt-center pr ul-leftline"}>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_syllabuses &&
<li><a href={`${mygetHelmetapi2.new_course.new_syllabuses}`} target="_blank">新建课程</a></li>
}
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_course &&
<li><a href={`${mygetHelmetapi2.new_course.new_course}`} target="_blank">新建班级</a></li>
}
</ul>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_syllabuses &&
<li><a href={`${mygetHelmetapi2.new_course.new_syllabuses}`} target="_blank">新建课程</a></li>
coursestypes === true && this.props.user && this.props.user.main_site === false ? "" :
<ul className="fl with50 edu-txt-center">
<li><Link to={"/projects/mirror/new"}>新建镜像项目</Link></li>
<li><Link to={"/projects/deposit/new"}>新建托管项目</Link></li>
</ul>
}
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.new_course &&
<li><a href={`${mygetHelmetapi2.new_course.new_course}`} target="_blank">新建班级</a></li>
}
</ul>
{
coursestypes === true && this.props.user && this.props.user.main_site === false ? "" :
<ul className="fl with50 edu-txt-center">
<li><Link to={"/projects/mirror/new"}>新建镜像项目</Link></li>
<li><Link to={"/projects/deposit/new"}>新建托管项目</Link></li>
</ul>
}
</div>
</div>
</div>
: ""
: ""
}
{
this.props.user && this.props.user.login ?
@ -892,39 +900,39 @@ class NewHeader extends Component {
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url &&
<span><em className="vertical-line"></em><a className="ml5 color-grey-3" href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank"></a></span>
}
</span>
: user.login === "" ?
<span className="font-15">
<a onClick={() => this.educoderlogin()} className="mr5 color-grey-3">登录</a>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url &&
<span><em className="vertical-line"></em><a className="color-grey-3 ml5" href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank"></a></span>
}
</span>
:
<div className="ml30 edu-menu-panel" style={{height:"70px",lineHeight:"70px"}}>
<a href={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`}>
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image"
src={getImageUrl(`images/` + user.image_url)} width="34">
</img>
</a>
<ul className="edu-menu-list" style={{ top: '46px', 'textAlign': 'center' }}>
<li className="bor-bottom-greyE">
<a href={`/users/${this.props.current_user.login}`}>个人中心</a>
</li>
: user.login === "" ?
<span className="font-15">
<a onClick={() => this.educoderlogin()} className="mr5 color-grey-3">登录</a>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_courses &&
<li><a href={`${mygetHelmetapi2.new_course.my_courses}`} target="_blank">我的课程</a></li>
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url &&
<span><em className="vertical-line"></em><a className="color-grey-3 ml5" href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank"></a></span>
}
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_organ &&
<li><a href={`/users/${this.props.current_user.login}/organize`} target="_blank">我的组织</a></li>
}
<li className="bor-top-greyE">
<a onClick={() => this.educoderloginysl()}>退出</a>
</li>
</ul>
</div>
</span>
:
<div className="ml30 edu-menu-panel" style={{ height: "70px", lineHeight: "70px" }}>
<a href={`/users/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`}>
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image"
src={getImageUrl(`images/` + user.image_url)} width="34">
</img>
</a>
<ul className="edu-menu-list" style={{ top: '46px', 'textAlign': 'center' }}>
<li className="bor-bottom-greyE">
<a href={`/users/${this.props.current_user.login}`}>个人中心</a>
</li>
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_courses &&
<li><a href={`${mygetHelmetapi2.new_course.my_courses}`} target="_blank">我的课程</a></li>
}
{
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_organ &&
<li><a href={`/users/${this.props.current_user.login}/organize`} target="_blank">我的组织</a></li>
}
<li className="bor-top-greyE">
<a onClick={() => this.educoderloginysl()}>退出</a>
</li>
</ul>
</div>
}
</div>
</div>

View File

@ -42,7 +42,7 @@ export function TPMIndexHOC(WrappedComponent) {
})
}
keyupListener = (e) => {
if (e.key === "Escape") {
this.setState({ globalLoading: false })
@ -51,7 +51,7 @@ export function TPMIndexHOC(WrappedComponent) {
componentWillUnmount() {
window.removeEventListener('keyup', this.keyupListener)
}
componentWillMount(){
componentWillMount() {
this.fetchUsers();
}

View File

@ -24,10 +24,7 @@ const VideoProtocol = Loadable({
loader: () => import('./video/VideoProtocol'),
loading: Loading,
})
const $ = window.$;
class InfosIndex extends Component {
render() {
return (
<Switch {...this.props}>