Merge branches 'dev_aliyun' and 'dev_new_shixun_task' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_new_shixun_task

 Conflicts:
	public/react/src/modules/tpm/TPMIndex.js
dev_tpm_ui
杨树明 5 years ago
commit db53699bd6

@ -70,6 +70,9 @@ class HackUserLastestCodesController < ApplicationController
# 提交记录详情
def record_detail
@hack_user = HackUserCode.find params[:id]
set = HackSet.find_by(id: @hack_user.error_test_set_id)
@pass_set_count = set ? set.position - 1 : 0
@set_count = @hack_user.hack.hack_sets.count
@my_hack = @hack_user.hack_user_lastest_code
end
@ -96,7 +99,8 @@ class HackUserLastestCodesController < ApplicationController
if ojEvaResult['execMode'] == "debug"
save_debug_data ds_params
elsif ojEvaResult['execMode'] == "submit"
save_submit_data ds_params.merge(expected_output: testCase['expectedOutput'])
save_submit_data ds_params.merge(expected_output: testCase['expectedOutput'],
error_test_set_id: ojEvaResult['failCaseNum'])
end
# 评测完成后,还原评测中的状态
@my_hack.update_attribute(:submit_status, 0)

@ -100,7 +100,7 @@ class HacksController < ApplicationController
@hack.update_attribute(:status, 1)
base_attrs = {
trigger_user_id: current_user.id, viewed: 0, tiding_type: 'System', user_id: @hack.user_id,
parent_container_type: "HackPublish"
parent_container_type: "HackPublish", extra: @hack.identifier
}
@hack.tidings.create!(base_attrs)
render_ok
@ -111,7 +111,7 @@ class HacksController < ApplicationController
@hack.update_attribute(:status, 0)
base_attrs = {
trigger_user_id: current_user.id, viewed: 0, tiding_type: 'System', user_id: @hack.user_id,
parent_container_type: "HackUnPublish"
parent_container_type: "HackUnPublish", extra: @hack.identifier
}
@hack.tidings.create!(base_attrs)
render_ok
@ -232,6 +232,11 @@ class HacksController < ApplicationController
hacks = hacks.where(category: params[:category])
end
# 语言
if params[:language]
hacks = hacks.joins(:hack_codes).where(hack_codes: {language: params[:language]})
end
# 排序
sort_by = params[:sort_by] || "hack_user_lastest_codes_count"
sort_direction = params[:sort_direction] || "desc"

@ -88,7 +88,7 @@ class JupytersController < ApplicationController
def timeinfo_with_tpi
myshixun = Myshixun.find_by(identifier: params[:identifier])
info = jupyter_timeinfo_tpi(shixun)
info = jupyter_timeinfo_tpi(myshixun)
render json: {status: 0}.merge(info)
end

@ -53,18 +53,20 @@ class Discuss < ApplicationRecord
def send_tiding
if dis_type == 'Shixun'
user_id = has_parent? ? parent.user_id : Challenge.find(challenge_id).user_id
send_user_id = has_parent? ? parent.user_id : Challenge.find(challenge_id).user_id
parent_container_type = 'Challenge'
challenge_id = challenge_id
extra = ''
elsif dis_type == 'Hack'
user_id = has_parent? ? parent.user_id : Hack.find(dis_id).user_id
send_user_id = has_parent? ? parent.user_id : Hack.find(dis_id).user_id
parent_container_type = 'Hack'
challenge_id = dis_id
extra = HackUserLastestCode.where(user_id: user_id, hack_id: dis_id).first&.identifier
end
base_attrs = {
trigger_user_id: user_id, parent_container_id: challenge_id, parent_container_type: parent_container_type,
belong_container_id: dis_id, belong_container_type: dis_type, viewed: 0, tiding_type: 'Comment'
belong_container_id: dis_id, belong_container_type: dis_type, viewed: 0, tiding_type: 'Comment', extra: extra
}
tidings.create!(base_attrs.merge(user_id: user_id))
tidings.create!(base_attrs.merge(user_id: send_user_id))
end
end

@ -1,4 +1,5 @@
class HackUserCode < ApplicationRecord
# error_test_set_id: 错误的测试集id
# 用户编程题的信息
belongs_to :hack
belongs_to :hack_user_lastest_code

@ -6,6 +6,9 @@ json.data do
json.language @hack_user.hack.language
json.name @hack_user.hack.name
json.myproblem_identifier @my_hack.identifier
json.pass_sets_count @pass_set_count
json.set_count @set_count
json.user do
json.partial! 'users/user', user: current_user
end

@ -1,5 +1,5 @@
json.extract! tiding, :id, :status, :viewed, :user_id, :tiding_type, :container_id, :container_type,
:parent_container_id, :parent_container_type, :belong_container_id, :belong_container_type
:parent_container_id, :parent_container_type, :belong_container_id, :belong_container_type, :extra
json.content tiding.content
json.identifier tiding.identifier

@ -0,0 +1,5 @@
class AddErrorTestSetIdForHackUserLastest < ActiveRecord::Migration[5.2]
def change
add_column :hack_user_codes, :error_test_set_id, :integer
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

@ -1242,6 +1242,12 @@
<div class="code-name">&amp;#xe6c8;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70f;</span>
<div class="name">减号</div>
<div class="code-name">&amp;#xe70f;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe60f;</span>
<div class="name">工程</div>
@ -1758,6 +1764,54 @@
<div class="code-name">&amp;#xe6d9;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe701;</span>
<div class="name">缩小</div>
<div class="code-name">&amp;#xe701;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe707;</span>
<div class="name">放大</div>
<div class="code-name">&amp;#xe707;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe709;</span>
<div class="name">编辑</div>
<div class="code-name">&amp;#xe709;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70b;</span>
<div class="name">公开</div>
<div class="code-name">&amp;#xe70b;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70c;</span>
<div class="name">解析</div>
<div class="code-name">&amp;#xe70c;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70d;</span>
<div class="name">删除</div>
<div class="code-name">&amp;#xe70d;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70e;</span>
<div class="name">试题栏</div>
<div class="code-name">&amp;#xe70e;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe710;</span>
<div class="name">复制</div>
<div class="code-name">&amp;#xe710;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
@ -3626,6 +3680,15 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jianhao"></span>
<div class="name">
减号
</div>
<div class="code-name">.icon-jianhao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongcheng"></span>
<div class="name">
@ -4400,6 +4463,78 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-suoxiao2"></span>
<div class="name">
缩小
</div>
<div class="code-name">.icon-suoxiao2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-fangda"></span>
<div class="name">
放大
</div>
<div class="code-name">.icon-fangda
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-bianji2"></span>
<div class="name">
编辑
</div>
<div class="code-name">.icon-bianji2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongkai"></span>
<div class="name">
公开
</div>
<div class="code-name">.icon-gongkai
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiexi"></span>
<div class="name">
解析
</div>
<div class="code-name">.icon-jiexi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shanchu1"></span>
<div class="name">
删除
</div>
<div class="code-name">.icon-shanchu1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shitilan"></span>
<div class="name">
试题栏
</div>
<div class="code-name">.icon-shitilan
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-fuzhi3"></span>
<div class="name">
复制
</div>
<div class="code-name">.icon-fuzhi3
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
@ -6045,6 +6180,14 @@
<div class="code-name">#icon-pinglun</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jianhao"></use>
</svg>
<div class="name">减号</div>
<div class="code-name">#icon-jianhao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongcheng"></use>
@ -6733,6 +6876,70 @@
<div class="code-name">#icon-zhiding</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-suoxiao2"></use>
</svg>
<div class="name">缩小</div>
<div class="code-name">#icon-suoxiao2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fangda"></use>
</svg>
<div class="name">放大</div>
<div class="code-name">#icon-fangda</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-bianji2"></use>
</svg>
<div class="name">编辑</div>
<div class="code-name">#icon-bianji2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongkai"></use>
</svg>
<div class="name">公开</div>
<div class="code-name">#icon-gongkai</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiexi"></use>
</svg>
<div class="name">解析</div>
<div class="code-name">#icon-jiexi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shanchu1"></use>
</svg>
<div class="name">删除</div>
<div class="code-name">#icon-shanchu1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shitilan"></use>
</svg>
<div class="name">试题栏</div>
<div class="code-name">#icon-shitilan</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fuzhi3"></use>
</svg>
<div class="name">复制</div>
<div class="code-name">#icon-fuzhi3</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>

@ -524,7 +524,7 @@ li.li-width15{width: 15%;text-align: left}
li.li-width7{width: 7%;text-align: left}
/*-----------------------------在线课堂动态----------------------------------*/
.courseHead{width: 100%;margin-bottom:40px;background-size: 100% 100%;background-image: url("/images/educoder/course-detail.jpg");height: 240px;
.courseHead{width: 100%;margin-bottom:40px;background-size: 100% 100%;background-image: url("/images/educoder/courtailsbdpicture.jpg");height: 240px;
justify-content: center;align-items: center;display: -webkit-flex;
background-size: cover;
background-position: center;
@ -3483,4 +3483,4 @@ a.singlepublishtwo{
.markdown-body {
text-align: justify;
word-break: break-all;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1419,6 +1419,13 @@
"unicode": "e6c8",
"unicode_decimal": 59080
},
{
"icon_id": "7556166",
"name": "减号",
"font_class": "jianhao",
"unicode": "e70f",
"unicode_decimal": 59151
},
{
"icon_id": "7587940",
"name": "工程",
@ -2020,6 +2027,62 @@
"font_class": "zhiding",
"unicode": "e6d9",
"unicode_decimal": 59097
},
{
"icon_id": "12403050",
"name": "缩小",
"font_class": "suoxiao2",
"unicode": "e701",
"unicode_decimal": 59137
},
{
"icon_id": "12403054",
"name": "放大",
"font_class": "fangda",
"unicode": "e707",
"unicode_decimal": 59143
},
{
"icon_id": "12491363",
"name": "编辑",
"font_class": "bianji2",
"unicode": "e709",
"unicode_decimal": 59145
},
{
"icon_id": "12491366",
"name": "公开",
"font_class": "gongkai",
"unicode": "e70b",
"unicode_decimal": 59147
},
{
"icon_id": "12491369",
"name": "解析",
"font_class": "jiexi",
"unicode": "e70c",
"unicode_decimal": 59148
},
{
"icon_id": "12491370",
"name": "删除",
"font_class": "shanchu1",
"unicode": "e70d",
"unicode_decimal": 59149
},
{
"icon_id": "12491850",
"name": "试题栏",
"font_class": "shitilan",
"unicode": "e70e",
"unicode_decimal": 59150
},
{
"icon_id": "12568379",
"name": "复制",
"font_class": "fuzhi3",
"unicode": "e710",
"unicode_decimal": 59152
}
]
}

@ -626,6 +626,9 @@ Created by iconfont
<glyph glyph-name="pinglun" unicode="&#59080;" d="M896 704H128c-35.2 0-64-28.8-64-64v-448c0-35.2 28.8-64 64-64h256l128-64 128 64h256c35.2 0 64 28.8 64 64V640c0 35.2-28.8 64-64 64zM304 368c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z m208 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z m208 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z" horiz-adv-x="1024" />
<glyph glyph-name="jianhao" unicode="&#59151;" d="M768 341.333333H256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h512c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667z" horiz-adv-x="1024" />
<glyph glyph-name="gongcheng" unicode="&#58895;" d="M141.9 476.8L454.1 298c18.2-10.6 38.9-16.3 59.9-16.3 21.2 0 41.7 5.6 59.4 16.3l312.4 178.6c21.7 11.8 35.2 36.5 34.5 63.1-0.8 26.2-15.4 50.2-37.4 61.2L567.3 758.4c-33.9 16.9-72.8 16.9-106.6 0L144.9 600.8c-22.5-11.6-36.4-34.5-37.2-61.1-0.8-26.3 12.3-50.4 34.2-62.9z m22.3 85.9l315.6 157.5c10.9 5.4 22.5 8.2 34.2 8.2 11.7 0 23.4-2.7 34.2-8.2l315.5-157.5c8.1-4 13.5-13.6 13.8-24.2 0.3-10.6-4.5-20.2-12.2-24.3L552 335l-0.5-0.3c-11-6.7-24-10.2-37.5-10.2s-26.7 3.6-38.5 10.5L163.1 513.8c-8 4.6-13 14.3-12.7 24.6 0.3 10.9 5.6 20 13.8 24.3zM888.4 249.7l-369-211c-3.5-2-7.1-2-10.7 0.1L139.6 249.7c-10.3 5.9-23.3 2.3-29.1-7.9-5.9-10.2-2.3-23.3 7.9-29.1l368.8-210.8c8.4-4.9 17.6-7.3 26.7-7.3 9.2 0 18.3 2.4 26.6 7.2l368.9 210.9c10.2 5.9 13.8 18.9 7.9 29.1-5.6 10.2-18.7 13.8-28.9 7.9zM888.4 387.1l-369-211c-3.5-2-7.1-2-10.7 0.1L139.6 387.1c-10.3 5.9-23.3 2.3-29.1-7.9-5.9-10.2-2.3-23.3 7.9-29.1l368.8-210.8c8.4-4.9 17.6-7.3 26.7-7.3 9.2 0 18.3 2.4 26.6 7.2L909.6 350c10.2 5.9 13.8 18.9 7.9 29.1-5.8 10.3-18.9 13.8-29.1 8z" horiz-adv-x="1024" />
@ -884,6 +887,30 @@ Created by iconfont
<glyph glyph-name="zhiding" unicode="&#59097;" d="M496.0256 671.232L129.024 212.48A20.48 20.48 0 0 1 144.9984 179.2H337.92c11.264 0 20.48-9.216 20.48-20.48v-266.24c0-11.264 9.216-20.48 20.48-20.48h266.24a20.48 20.48 0 0 1 20.48 20.48V158.72c0 11.264 9.216 20.48 20.48 20.48h192.9216a20.48 20.48 0 0 1 15.9744 33.28l-367.0016 458.752a20.48 20.48 0 0 1-31.9488 0zM153.6 896m51.2 0l614.4 0q51.2 0 51.2-51.2l0 0q0-51.2-51.2-51.2l-614.4 0q-51.2 0-51.2 51.2l0 0q0 51.2 51.2 51.2Z" horiz-adv-x="1024" />
<glyph glyph-name="suoxiao2" unicode="&#59137;" d="M921.6 418.133333h-318.577778c-5.688889 0-17.066667 0-22.755555 5.688889-5.688889 0-11.377778 5.688889-17.066667 11.377778-5.688889 5.688889-11.377778 11.377778-11.377778 17.066667 0 5.688889-5.688889 11.377778-5.688889 22.755555V793.6c0 34.133333 22.755556 56.888889 56.888889 56.888889s56.888889-22.755556 56.888889-56.888889V611.555556L927.288889 878.933333c22.755556 22.755556 56.888889 22.755556 79.644444 0s22.755556-56.888889 0-79.644444L739.555556 531.911111h182.044444c34.133333 0 56.888889-22.755556 56.888889-56.888889s-22.755556-56.888889-56.888889-56.888889zM56.888889-128c-17.066667 0-28.444444 5.688889-39.822222 17.066667-22.755556 22.755556-22.755556 56.888889 0 79.644444L284.444444 236.088889H102.4c-34.133333 0-56.888889 22.755556-56.888889 56.888889s22.755556 56.888889 56.888889 56.888889h318.577778c5.688889 0 17.066667 0 22.755555-5.688889 5.688889 0 11.377778-5.688889 17.066667-11.377778 5.688889-5.688889 11.377778-11.377778 11.377778-17.066667 0-5.688889 5.688889-11.377778 5.688889-22.755555v-318.577778c0-34.133333-22.755556-56.888889-56.888889-56.888889s-56.888889 22.755556-56.888889 56.888889V156.444444l-267.377778-267.377777c-11.377778-11.377778-22.755556-17.066667-39.822222-17.066667z" horiz-adv-x="1024" />
<glyph glyph-name="fangda" unicode="&#59143;" d="M603.022222 418.133333c-17.066667 0-28.444444 5.688889-39.822222 17.066667-22.755556 22.755556-22.755556 56.888889 0 79.644444L830.577778 782.222222h-182.044445c-34.133333 0-56.888889 22.755556-56.888889 56.888889s22.755556 56.888889 56.888889 56.888889H967.111111c5.688889 0 17.066667 0 22.755556-5.688889 5.688889 0 11.377778-5.688889 17.066666-11.377778 5.688889-5.688889 11.377778-11.377778 11.377778-17.066666 5.688889-5.688889 5.688889-17.066667 5.688889-22.755556v-318.577778c0-34.133333-22.755556-56.888889-56.888889-56.888889s-56.888889 22.755556-56.888889 56.888889V702.577778l-267.377778-267.377778c-11.377778-11.377778-22.755556-17.066667-39.822222-17.066667zM375.466667-128H56.888889c-5.688889 0-17.066667 0-22.755556 5.688889-5.688889 0-11.377778 5.688889-17.066666 11.377778-5.688889 5.688889-11.377778 11.377778-11.377778 17.066666-5.688889 5.688889-5.688889 17.066667-5.688889 22.755556v318.577778c0 34.133333 22.755556 56.888889 56.888889 56.888889s56.888889-22.755556 56.888889-56.888889v-182.044445l267.377778 267.377778c22.755556 22.755556 56.888889 22.755556 79.644444 0s22.755556-56.888889 0-79.644444L193.422222-14.222222h182.044445c34.133333 0 56.888889-22.755556 56.888889-56.888889s-22.755556-56.888889-56.888889-56.888889z" horiz-adv-x="1024" />
<glyph glyph-name="bianji2" unicode="&#59145;" d="M704.752941-97.882353H198.776471c-78.305882 0-138.541176 60.235294-138.541177 132.517647V667.105882c0 72.282353 66.258824 132.517647 138.541177 132.517647h319.247058c18.070588 0 30.117647-12.047059 30.117647-30.117647s-12.047059-24.094118-30.117647-24.094117H198.776471c-42.164706 0-78.305882-36.141176-78.305883-72.282353v-632.470588c0-42.164706 36.141176-72.282353 78.305883-72.282353h499.952941c42.164706 0 78.305882 36.141176 78.305882 72.282353V293.647059c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647v-259.011765c6.023529-72.282353-60.235294-132.517647-132.517647-132.517647zM313.223529 161.129412c-24.094118 0-54.211765 18.070588-60.235294 48.188235v30.117647l36.141177 126.494118 445.741176 445.741176c48.188235 48.188235 120.470588 48.188235 168.658824 0 48.188235-48.188235 48.188235-120.470588 0-168.658823l-445.741177-445.741177-126.494117-30.117647c-6.023529-6.023529-12.047059-6.023529-18.070589-6.023529z m36.141177 174.682353l-36.141177-114.447059 120.470589 30.117647 433.694117 433.694118c12.047059 12.047059 18.070588 24.094118 18.070589 42.164705 0 18.070588-6.023529 30.117647-18.070589 42.164706-24.094118 24.094118-60.235294 24.094118-84.329411 0L349.364706 335.811765z" horiz-adv-x="1024" />
<glyph glyph-name="gongkai" unicode="&#59147;" d="M512 42.666667C432.355556 42.666667 369.777778 105.244444 369.777778 184.888889S432.355556 327.111111 512 327.111111s142.222222-62.577778 142.222222-142.222222S591.644444 42.666667 512 42.666667z m0 227.555555c-45.511111 0-85.333333-39.822222-85.333333-85.333333S466.488889 99.555556 512 99.555556 597.333333 139.377778 597.333333 184.888889 557.511111 270.222222 512 270.222222zM256 469.333333c-17.066667 0-28.444444 11.377778-28.444444 28.444445V662.755556C244.622222 782.222222 352.711111 867.555556 483.555556 867.555556c142.222222 0 250.311111-96.711111 256-221.866667v-5.688889c0-17.066667-11.377778-28.444444-28.444445-28.444444s-28.444444 11.377778-28.444444 28.444444c-5.688889 96.711111-91.022222 170.666667-199.111111 170.666667-102.4 0-187.733333-68.266667-199.111112-153.6V497.777778c0-17.066667-11.377778-28.444444-28.444444-28.444445zM739.555556-128h-455.111112C176.355556-128 85.333333-36.977778 85.333333 71.111111v227.555556C85.333333 406.755556 176.355556 497.777778 284.444444 497.777778h455.111112c108.088889 0 199.111111-91.022222 199.111111-199.111111v-227.555556c0-108.088889-91.022222-199.111111-199.111111-199.111111z m-455.111112 568.888889C204.8 440.888889 142.222222 378.311111 142.222222 298.666667v-227.555556C142.222222-8.533333 204.8-71.111111 284.444444-71.111111h455.111112c79.644444 0 142.222222 62.577778 142.222222 142.222222v227.555556C881.777778 378.311111 819.2 440.888889 739.555556 440.888889h-455.111112z" horiz-adv-x="1024" />
<glyph glyph-name="jiexi" unicode="&#59148;" d="M506.311111-99.555556c-73.955556 0-147.911111 17.066667-216.177778 51.2-11.377778 5.688889-22.755556 22.755556-11.377777 39.822223 5.688889 11.377778 22.755556 22.755556 39.822222 11.377777 56.888889-28.444444 125.155556-45.511111 187.733333-45.511111 238.933333 0 432.355556 187.733333 432.355556 426.666667 0 85.333333-22.755556 164.977778-73.955556 233.244444-11.377778 11.377778-5.688889 28.444444 5.688889 39.822223 11.377778 11.377778 28.444444 5.688889 39.822222-5.688889 51.2-79.644444 79.644444-170.666667 79.644445-267.377778 5.688889-267.377778-216.177778-483.555556-483.555556-483.555556z m-301.511111 125.155556c-5.688889 0-11.377778 0-17.066667 5.688889C85.333333 122.311111 28.444444 253.155556 28.444444 389.688889 28.444444 651.377778 238.933333 867.555556 500.622222 867.555556c119.466667 0 233.244444-45.511111 318.577778-125.155556 11.377778-11.377778 11.377778-28.444444 0-39.822222-11.377778-11.377778-28.444444-11.377778-39.822222 0-79.644444 73.955556-176.355556 113.777778-278.755556 113.777778-227.555556 0-415.288889-187.733333-415.288889-420.977778 0-125.155556 51.2-238.933333 142.222223-318.577778 11.377778-11.377778 11.377778-28.444444 0-39.822222-5.688889-11.377778-11.377778-11.377778-22.755556-11.377778zM512 31.288889c-56.888889 0-102.4 45.511111-102.4 102.4v34.133333c-62.577778 34.133333-102.4 102.4-102.4 170.666667C307.2 446.577778 398.222222 537.6 512 537.6s204.8-91.022222 204.8-199.111111c0-68.266667-39.822222-136.533333-102.4-170.666667v-34.133333c0-51.2-39.822222-96.711111-91.022222-102.4H512z m0 449.422222c-79.644444 0-147.911111-62.577778-147.911111-142.222222 0-51.2 28.444444-96.711111 73.955555-125.155556l28.444445-17.066666v-68.266667c0-22.755556 17.066667-45.511111 45.511111-45.511111h5.688889c22.755556 0 39.822222 22.755556 39.822222 45.511111v68.266667l28.444445 17.066666c45.511111 22.755556 73.955556 73.955556 73.955555 125.155556 0 73.955556-68.266667 142.222222-147.911111 142.222222zM676.977778 497.777778c-5.688889 0-17.066667 0-22.755556 5.688889-11.377778 11.377778-11.377778 28.444444 0 39.822222L739.555556 628.622222c11.377778 11.377778 28.444444 11.377778 39.822222 0s11.377778-28.444444 0-39.822222l-85.333334-85.333333c-5.688889 0-11.377778-5.688889-17.066666-5.688889zM347.022222 497.777778c-5.688889 0-11.377778 5.688889-17.066666 5.688889L238.933333 594.488889c-11.377778 11.377778-11.377778 28.444444 0 39.822222s28.444444 11.377778 39.822223 0l85.333333-85.333333c11.377778-11.377778 11.377778-28.444444 0-39.822222 0-5.688889-5.688889-11.377778-17.066667-11.377778zM512 560.355556c-17.066667 0-28.444444 11.377778-28.444444 28.444444V685.511111c0 17.066667 11.377778 28.444444 28.444444 28.444445s28.444444-11.377778 28.444444-28.444445v-102.4c0-11.377778-11.377778-22.755556-28.444444-22.755555z" horiz-adv-x="1024" />
<glyph glyph-name="shanchu1" unicode="&#59149;" d="M672-96H358.4c-76.8 0-140.8 57.6-153.6 140.8L96 569.6c0 19.2 6.4 32 25.6 38.4 19.2 6.4 32-6.4 38.4-25.6l102.4-524.8c12.8-51.2 51.2-89.6 96-89.6h313.6c44.8 0 83.2 38.4 96 89.6l102.4 524.8c6.4 19.2 19.2 25.6 38.4 25.6 19.2-6.4 25.6-19.2 25.6-38.4L832 44.8c-19.2-83.2-83.2-140.8-160-140.8zM608 704v6.4c0 51.2-44.8 89.6-96 89.6S416 755.2 416 704h-64C352 793.6 422.4 864 512 864c83.2 0 153.6-64 160-153.6V704h-64zM384 38.4c-12.8 0-25.6 12.8-32 25.6L256 576c0 19.2 12.8 32 25.6 38.4 19.2 0 38.4-12.8 38.4-25.6l96-512c0-19.2-6.4-38.4-32-38.4 6.4 0 0 0 0 0zM640 38.4s-6.4 0 0 0c-25.6 6.4-32 19.2-32 38.4l96 512c0 19.2 19.2 32 38.4 25.6 12.8-6.4 25.6-19.2 25.6-38.4l-96-512c-6.4-12.8-19.2-25.6-32-25.6zM512 38.4c-19.2 0-32 12.8-32 32v512c0 19.2 12.8 32 32 32s32-12.8 32-32v-512c0-19.2-12.8-32-32-32zM992 640H32C12.8 640 0 652.8 0 672S12.8 704 32 704h960c19.2 0 32-12.8 32-32s-12.8-32-32-32z" horiz-adv-x="1024" />
<glyph glyph-name="shitilan" unicode="&#59150;" d="M816.118519-128H184.019753c-69.530864 0-126.419753 56.888889-126.419753 126.419753V756.938272C57.6 826.469136 114.488889 883.358025 184.019753 883.358025h568.888889l189.62963-189.62963v-695.308642c0-69.530864-56.888889-126.419753-126.419753-126.419753zM727.624691 820.148148H184.019753c-37.925926 0-63.209877-25.283951-63.209876-63.209876v-758.518519c0-37.925926 25.283951-63.209877 63.209876-63.209876h632.098766c37.925926 0 63.209877 25.283951 63.209876 63.209876V668.444444L727.624691 820.148148zM955.180247 662.123457h-189.62963c-25.283951 0-44.246914 18.962963-44.246913 44.246913l6.320987 189.62963 227.555556-233.876543z m-170.666667 82.172839v-18.962963h18.962963l-18.962963 18.962963zM670.735802 567.308642H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938S310.439506 630.518519 329.402469 630.518519h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604939s-12.641975-31.604938-31.604939-31.604938zM670.735802 314.469136H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938S310.439506 377.679012 329.402469 377.679012h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604938s-12.641975-31.604938-31.604939-31.604938zM670.735802 61.62963H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938s12.641975 31.604938 31.604938 31.604938h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604938s-12.641975-31.604938-31.604939-31.604938z" horiz-adv-x="1024" />
<glyph glyph-name="fuzhi3" unicode="&#59152;" d="M648.533333-128h-477.866666C75.093333-128 0-52.906667 0 42.666667v477.866666C0 616.106667 75.093333 691.2 170.666667 691.2h477.866666C744.106667 691.2 819.2 616.106667 819.2 520.533333v-477.866666c0-95.573333-75.093333-170.666667-170.666667-170.666667z m-477.866666 750.933333C116.053333 622.933333 68.266667 575.146667 68.266667 520.533333v-477.866666c0-54.613333 47.786667-102.4 102.4-102.4h477.866666c54.613333 0 102.4 47.786667 102.4 102.4v477.866666c0 54.613333-47.786667 102.4-102.4 102.4h-477.866666zM955.733333 110.933333c-20.48 0-34.133333 13.653333-34.133333 34.133334V691.2c0 54.613333-47.786667 102.4-102.4 102.4H273.066667c-20.48 0-34.133333 13.653333-34.133334 34.133333s13.653333 34.133333 34.133334 34.133334h546.133333c95.573333 0 170.666667-75.093333 170.666667-170.666667v-546.133333c0-20.48-13.653333-34.133333-34.133334-34.133334z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 374 KiB

@ -27,7 +27,7 @@ function onMessageByLocalStorage(eventName, callback) {
}
window.addEventListener("storage", function(ev) {
const cb = localStorageMap[ev.key];
console.log('storage event:', ev)
// console.log('storage event:', ev)
if (cb) {
cb(JSON.parse(ev.newValue))
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-17 17:32:55
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 11:11:57
* @LastEditTime : 2019-12-26 18:43:21
*/
import './index.scss';
import React, { useState } from 'react';
@ -69,7 +69,7 @@ function CommentForm (props) {
props.form.setFieldsValue({'comment': ''});
setCtx('');
// const _html = formatDelta(content.ops);
console.log('保存的内容=====》》》》', content);
// console.log('保存的内容=====》》》》', content);
onSubmit && onSubmit(JSON.stringify(content));
}
});

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-17 17:35:17
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 11:30:32
* @LastEditTime : 2019-12-27 11:05:17
*/
import './index.scss';
import 'quill/dist/quill.core.css'; // 核心样式
@ -36,6 +36,8 @@ function CommentItem ({
const [showItemCount, setShowItemCount] = useState(5);
// 箭头方向
const [arrow, setArrow] = useState(false);
// 上传图片的ulr
const [url, setUrl] = useState('');
const {
author = {}, // 作者
@ -85,6 +87,10 @@ function CommentItem ({
);
};
const handleShowUploadImage = (url) => {
// console.log('==============>>>>>>>>>>>>',url);
setUrl(url);
}
// 评论内容
const commentCtx = (ctx) => {
let _ctx = null;
@ -97,6 +103,7 @@ function CommentItem ({
<QuillForEditor
readOnly={true}
value={_ctx}
showUploadImage={handleShowUploadImage}
/>
)};
@ -181,6 +188,10 @@ function CommentItem ({
}
}
const handleClose = () => {
setUrl('');
}
return (
<li className="comment_item_area">
{commentAvatar(author)}
@ -225,11 +236,19 @@ function CommentItem ({
<div
style={{ display: showQuill ? 'block' : 'none'}}
className="comment_item_quill">
<CommentForm
<CommentForm
onCancel={handleClickCancel}
onSubmit={handleClickSubmit(id)}
/>
</div>
{/* 显示上传的图片信息 */}
<div className="show_upload_image" style={{ display: url ? 'block' : 'none'}}>
<Icon type="close" className="image_close" onClick={handleClose}/>
<div className="image_info">
<img className="image" src={url} alt=""/>
</div>
</div>
</div>
</li>
);

@ -87,6 +87,46 @@ $ml: 20px;
// .comment_item_quill{
// // margin-top: 10px;
// }
.show_upload_image{
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 1000;
&::before{
position: absolute;
height: 100%;
width:100%;
content: '';
background: #000;
opacity: .7;
}
.image_info{
display: flex;
position: absolute;
width: 80%;
height: 80%;
left: 10%;
top: 10%;
justify-content: center;
align-items: center;
// background: green;
.image{
display: block;
width: 100%;
}
}
.image_close{
position: absolute;
right: 20px;
top: 20px;
color: #fff;
cursor: pointer;
}
}
}
.comment_icon_count{
cursor: pointer;

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-16 15:50:45
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-24 09:44:03
* @LastEditTime : 2019-12-27 15:07:11
*/
import Quill from "quill";
@ -15,25 +15,38 @@ export default class ImageBlot extends BlockEmbed {
static create(value) {
const node = super.create();
node.setAttribute('alt', value.alt);
node.setAttribute('src', value.url);
// console.log('~~~~~~~~~~~', node, value);
node.addEventListener('click', function () {
value.onclick(value.url);
}, false);
if (value.width) {
node.setAttribute('width', value.width);
}
if (value.height) {
node.setAttribute('height', value.height);
}
if (value.id) {
node.setAttribute('id', value.id);
}
// 宽度和高度都不存在时,
if (!value.width && !value.height) {
node.setAttribute('display', 'block');
// node.setAttribute('display', 'block');
node.setAttribute('width', '100%');
}
// node.setAttribute('style', { cursor: 'pointer' });
// if (node.onclick) {
// console.log('image 有图片点击事件======》》》》》》');
// // node.setAttribute('onclick', node.onCLick);
// }
// 给图片添加点击事件
node.onclick = () => {
value.onClick && value.onClick(value.url);
}
// node.onclick = () => {
// value.onClick && value.onClick(value.url);
// }
return node;
}
@ -45,7 +58,9 @@ export default class ImageBlot extends BlockEmbed {
onclick: node.onclick,
width: node.width,
height: node.height,
display: node.getAttribute('display')
display: node.getAttribute('display'),
id: node.id,
// style: node.style
};
}
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-18 08:49:30
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 10:22:26
* @LastEditTime : 2019-12-27 10:36:11
*/
import './index.scss';
import 'quill/dist/quill.core.css'; // 核心样式
@ -116,9 +116,22 @@ function QuillForEditor ({
// 设置值
useEffect(() => {
if (!quill) return
// debugger;
const previous = quill.getContents()
const current = value
if (value && value.hasOwnProperty('ops')) {
// console.log(value.ops);
const ops = value.ops || [];
ops.forEach((item, i) => {
if (item.insert['image']) {
item.insert['image'] = Object.assign({}, item.insert['image'], {style: { cursor: 'pointer' }, onclick: (url) => showUploadImage(url)});
}
});
}
const current = value
// console.log('+++++', current);
if (!deepEqual(previous, current)) {
setSelection(quill.getSelection())
if (typeof value === 'string') {

@ -2,4 +2,9 @@
.ql-editing{
left: 0 !important;
}
.ql-editor{
img{
cursor: pointer;
}
}
}

@ -375,19 +375,19 @@ class CoursesBanner extends Component {
}
addTeacher = (isTeacher) => {
this.setState({ isTeacher }, () => {
this.refs.addTeacherModal.setVisible(true)
})
this.refs.addTeacherModal.setVisible(true)
})
}
addStudent = () => {
this.refs.addStudentModal.setVisible(true)
this.refs.addStudentModal.setVisible(true)
}
addTeacherSuccess = (params) => {
trigger('addTeacherSuccess', JSON.stringify(params))
this.updatabanner()
}
addStudentSuccess = (params) => {
trigger('addStudentSuccess', JSON.stringify(params))
trigger('addStudentSuccess', JSON.stringify(params))
this.updatabanner()
}
//退出课堂按钮
@ -728,7 +728,12 @@ class CoursesBanner extends Component {
<Breadcrumb.Item className={"pointer"}>
<Tooltip visible={coursedata.teacher_applies_count===undefined?false:coursedata.teacher_applies_count>0?true:false}
placement="topLeft"
title={<pre>{coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?<span>您有{coursedata.teacher_applies_count}条新的加入申请<a className={"daishenp"} onClick={()=>this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers?tab=2")}>待审批</a></span>:""}</pre>}>
title={<pre>{coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?<span>您有{coursedata.teacher_applies_count}条新的加入申请<a className={"daishenp"} onClick={()=>this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers?tab=2")}>
<span style={{
color:"#FFA804"
}}>
待审批
</span></a></span>:""}</pre>}>
<span className="color-grey-c font-16" onClick={()=>this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers")}>
<span className={"mr10"}>教师</span>
<span className={"mr10"}>{coursedata.teacher_count}</span>

@ -34,6 +34,7 @@ class NewShixunModel extends Component{
getdatalist=(page,type,newstatus,keyword,order,diff,limit,pagetype,sorts)=>{
let newsort=sorts;
let no_jupyter=undefined;
if(this.props.type==="shixuns"&&type==="mine"){
if(this.props&&this.props.user.course_name===undefined){
newsort="created_at";
@ -41,6 +42,12 @@ class NewShixunModel extends Component{
newsort="publish_time";
}
}
if(this.props.type==="shixuns"){
if(this.props&&this.props.user.course_name===undefined){
}else{
no_jupyter=1;
}
}
this.setState({
isspinning:true
})
@ -51,6 +58,7 @@ class NewShixunModel extends Component{
}else{
url="/subject_lists.json";
}
axios.get(url,{params:{
page:page,
type:type,
@ -59,7 +67,8 @@ class NewShixunModel extends Component{
order:order,
diff:diff,
limit:limit,
sort:newsort
sort:newsort,
no_jupyter:no_jupyter
}}).then((response) => {
if(response.data){
if(pagetype===undefined){

@ -9,7 +9,7 @@
import './index.scss';
import React from 'react';
import { Table, Button, Dropdown, Icon, Menu, Card, Input, Select, Tag, Modal } from 'antd';
import { Table, Button, Dropdown, Icon, Menu, Card, Input, Select, Tag } from 'antd';
import { connect } from 'react-redux';
import actions from '../../redux/actions';
import MultipTags from './components/multiptags';
@ -46,9 +46,24 @@ const maps = {
],
'languageMenu': [
{
'key': 'c',
'name': 'C语言',
'value': 'c'
'key': 'C',
'name': 'C',
'value': 'C'
},
{
'key': 'C++',
'name': 'C++',
'value': 'C++'
},
{
'key': 'Python',
'name': 'Python',
'value': 'Python'
},
{
'key': 'Java',
'name': 'Java',
'value': 'Java'
}
],
'difficultMenu': [
@ -254,7 +269,7 @@ class DeveloperHome extends React.PureComponent {
content: `确定要删除${record.name}吗?`,
onOk () {
// 调用删除接口
console.log(record.identifier);
// console.log(record.identifier);
deleteItem(record.identifier);
}
});
@ -491,7 +506,7 @@ class DeveloperHome extends React.PureComponent {
</div>
</div>
<div className={'card-table'}>
<div bordered={false} className={'filter_ctx_area'}>
<div className={'filter_ctx_area'}>
<div>
<Dropdown className={'dropdonw-style'} placement="bottomLeft" overlay={this.getMenuItems('categoryMenu', this.handleCategoryMenuClick)}>
<span className={'dropdown-span'}>分类 <Icon type="down"/></span>

@ -4,11 +4,11 @@
* @Github:
* @Date: 2019-11-27 16:02:36
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 15:17:28
* @LastEditTime : 2019-12-27 09:32:34
*/
import './index.scss';
import React, { useState, useRef, useEffect } from 'react';
import { Tabs, Button, Icon } from 'antd';
import { Tabs, Button, Icon, notification } from 'antd';
import { connect } from 'react-redux';
import InitTabCtx from '../initTabCtx';
import ExecResult from '../execResult';
@ -18,6 +18,7 @@ const { TabPane } = Tabs;
const ControlSetting = (props) => {
const {
hack,
inputValue,
loading,
submitLoading,
@ -57,6 +58,13 @@ const ControlSetting = (props) => {
// 调试代码
const handleTestCode = (e) => {
if (!hack.code) {
notification.warning({
message: '提示',
description: '代码块内容不能为空'
});
return;
}
// console.log(formRef.current.handleTestCodeFormSubmit);
// 调出控制台界面
setShowTextResult(true);
@ -137,8 +145,9 @@ const ControlSetting = (props) => {
const mapStateToProps = (state) => {
const {commonReducer, ojForUserReducer} = state;
const {loading, excuteState, submitLoading, showOrHideControl } = commonReducer;
const { commitTestRecordDetail } = ojForUserReducer;
const { commitTestRecordDetail, hack } = ojForUserReducer;
return {
hack,
loading,
submitLoading,
excuteState,

@ -3,8 +3,8 @@
* @Author: tangjiang
* @Github:
* @Date: 2019-11-27 19:46:14
* @LastEditors: tangjiang
* @LastEditTime: 2019-12-19 10:47:05
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 20:07:35
*/
import './index.scss';
import React, { useState, useEffect, useRef, useImperativeHandle, forwardRef } from 'react';
@ -26,7 +26,7 @@ function InitTabCtx (props, ref) {
const { inputValue, onDebuggerCode } = props;
console.log('default value', inputValue);
// console.log('default value', inputValue);
useImperativeHandle(ref, () => ({
handleTestCodeFormSubmit: (cb) => {
// console.log('父组件调用我啦~~~~~~~~~');
@ -34,9 +34,9 @@ function InitTabCtx (props, ref) {
}
}));
useEffect(() => {
console.log('初始值: ========', props);
}, [props]);
// useEffect(() => {
// console.log('初始值: ========', props);
// }, [props]);
// 渲染文本提示信息
const renderText = () => (<span className={'ctx_default'}>请在这里添加测试用例点击调试代码时将从这里读取输入来测试你的代码...</span>);

@ -3,8 +3,8 @@
* @Author: tangjiang
* @Github:
* @Date: 2019-11-25 17:50:33
* @LastEditors: tangjiang
* @LastEditTime: 2019-12-19 19:32:08
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-27 10:36:54
*/
import React, { useState } from 'react';
import { fromStore, toStore } from 'educoder';
@ -68,7 +68,7 @@ const SettingDrawer = (props) => {
);
} else if (Array.isArray(value)) {
const defaultValue = ctx.type === 'font' ? fontSize : theme;
console.log('++', defaultValue);
// console.log('++', defaultValue);
if (type === 'select') {
const child = ctx.value.map((opt, i) => {
return (

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-27 15:02:52
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 15:19:34
* @LastEditTime : 2019-12-27 10:32:25
*/
import './index.scss';
import React, { useState, useRef, useEffect } from 'react';
@ -28,7 +28,8 @@ const maps = {
function MyMonacoEditor (props, ref) {
const {
const {
code,
notice,
language,
identifier,
@ -41,7 +42,7 @@ function MyMonacoEditor (props, ref) {
} = props;
const [showDrawer, setShowDrawer] = useState(false); // 控制配置滑框
const [editCode, setEditCode] = useState('');
// const [editCode, setEditCode] = useState('');
// const [curLang, setCurLang] = useState('C');
const [fontSize, setFontSize] = useState(() => { // 字体
return +fromStore('oj_fontSize') || 14;
@ -52,11 +53,9 @@ function MyMonacoEditor (props, ref) {
const [ height, setHeight ] = useState('calc(100% - 56px)');
const editorRef = useRef(null);
useEffect(() => {
if (props.code) {
setEditCode(props.code);
}
}, [props]);
// useEffect(() => {
// setEditCode(props.code || '');
// }, [props]);
useEffect(() => {
setHeight(showOrHideControl ? 'calc(100% - 378px)' : 'calc(100% - 56px)');
@ -82,11 +81,11 @@ function MyMonacoEditor (props, ref) {
// 文本框内容变化时,记录文本框内容
const handleEditorChange = (origin, monaco) => {
editorRef.current = monaco; // 获取当前monaco实例
setEditCode(origin); // 保存编辑器初始值
// setEditCode(origin); // 保存编辑器初始值
editorRef.current.onDidChangeModelContent(e => { // 监听编辑器内容的变化
// TODO 需要优化 节流
const val = editorRef.current.getValue();
setEditCode(val);
// setEditCode(val);
onCodeChange(val);
// 值一变化保存当前代码值
// saveUserInputCode(val);
@ -125,9 +124,9 @@ function MyMonacoEditor (props, ref) {
}
}
const renderRestore = identifier ? (
<MyIcon type="iconzaicizairu" />
) : '';
// const renderRestore = identifier ? (
// <MyIcon type="iconzaicizairu" />
// ) : '';
// lex_has_save ${hadCodeUpdate} ? : ''
const _classnames = hadCodeUpdate ? `flex_strict flex_has_save` : 'flex_strict';
@ -181,7 +180,7 @@ function MyMonacoEditor (props, ref) {
height={height}
width="100%"
language={language && language.toLowerCase()}
value={editCode}
value={code || ''}
options={editorOptions}
theme={theme} // dark || light
editorDidMount={handleEditorChange}
@ -212,12 +211,12 @@ const mapStateToProps = (state) => {
}
};
const mapDispatchToProps = (dispatch) => ({
// saveUserInputCode: (code) => dispatch(actions.saveUserInputCode(code)),
});
// const mapDispatchToProps = (dispatch) => ({
// // saveUserInputCode: (code) => dispatch(actions.saveUserInputCode(code)),
// });
// MyMonacoEditor = React.forwardRef(MyMonacoEditor);
export default connect(
mapStateToProps,
mapDispatchToProps
// mapDispatchToProps
)(CNotificationHOC() (MyMonacoEditor));

@ -34,6 +34,7 @@ const NewOrEditTask = (props) => {
startProgramQuestion,
getUserInfoForNew,
handleCancelPublish,
validateOjForm,
// updateTestAndValidate,
} = props;
@ -69,14 +70,20 @@ const NewOrEditTask = (props) => {
// 模拟挑战
const imitationChallenge = () => {
// 调用 start 接口, 成功后跳转到模拟页面
identifier && startProgramQuestion(identifier, props);
// 先调用保存, 再调用 start 接口, 成功后跳转到模拟页面
// identifier && startProgramQuestion(identifier, props);
identifier && validateOjForm(props, 'challenge', () => {
startProgramQuestion(identifier, props);
});
}
// 开始挑战
const startChallenge = () => {
// 调用 start 接口, 成功后跳转到开启实战
// TODO
identifier && startProgramQuestion(identifier, props);
identifier && validateOjForm(props, 'challenge', () => {
startProgramQuestion(identifier, props);
});
// identifier && startProgramQuestion(identifier, props);
}
// 取消
@ -265,7 +272,8 @@ const mapDispatchToProps = (dispatch) => ({
// 开启模拟挑战
startProgramQuestion: (id, props) => dispatch(actions.startProgramQuestion(id, props)),
// 新建时获取信息
getUserInfoForNew: () => dispatch(actions.getUserInfoForNew())
getUserInfoForNew: () => dispatch(actions.getUserInfoForNew()),
validateOjForm: (props, type, cb) => dispatch(actions.validateOjForm(props, type, cb))
});
export default withRouter(connect(

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-21 09:19:38
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 15:33:01
* @LastEditTime : 2019-12-27 10:37:41
*/
import './index.scss';
import React from 'react';
@ -134,10 +134,10 @@ const AddTestDemo = (props) => {
// };
// const {input = {}, output = {}} = (testCasesValidate[index] = {});
const activePane = {
defaultActiveKey: [isOpen ? '1' : '']
};
console.log(activePane);
// const activePane = {
// defaultActiveKey: [isOpen ? '1' : '']
// };
// console.log(activePane);
// 切换手风琴
const handleChangeCollapse = () => {
@ -184,7 +184,7 @@ const AddTestDemo = (props) => {
const mapStateToProps = (state) => {
const {identifier, loading} = state.ojFormReducer;
console.log(state.ojFormReducer);
// console.log(state.ojFormReducer);
return {
identifier,
loading,

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 10:35:40
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 16:00:57
* @LastEditTime : 2019-12-27 14:30:55
*/
import './index.scss';
// import 'katex/dist/katex.css';
@ -175,11 +175,11 @@ class EditTab extends React.Component {
};
// 提交测试用例
const handleSubmitTest = (obj) => {
console.log('提交的测试用例: ', obj);
// console.log('提交的测试用例: ', obj);
};
// 删除测试用例
const handleDeleteTest = (obj) => {
console.log('删除的测试用例: ', obj);
// console.log('删除的测试用例: ', obj);
deleteTestCase(obj);
};
const renderTestCase = () => {
@ -223,10 +223,10 @@ class EditTab extends React.Component {
// 描述信息变化时
const handleContentChange = (content, quill) => {
console.log('描述信息为: ', content);
// if (quill.getText())
console.log('========>>>>>', quill.getText().length);
if (quill.getText().length === 1) {
// console.log('描述信息为: ', content);
const _text = quill.getText();
const reg = /^[\s\S]*.*[^\s][\s\S]*$/;
if (!reg.test(_text)) {
this.handleChangeDescription('');
} else {
// 保存获取的描述信息至redux中

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-01 10:18:35
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 13:51:40
* @LastEditTime : 2019-12-27 10:17:07
*/
import './index.scss';
import React from 'react';
@ -17,7 +17,8 @@ function RightPane (props, ref) {
const {
// identifier,
// code,
code,
language,
// onSubmitForm,
saveOjFormCode
} = props;
@ -44,8 +45,8 @@ function RightPane (props, ref) {
return (
<div className={'right_pane_code_wrap'}>
<MyMonacoEditor
language={props.language}
code={props.code}
language={language}
code={code}
onCodeChange={handleCodeChange}/>
{/* <ControlSetting
@ -65,7 +66,6 @@ const mapStateToProps = (state) => {
identifier,
language: ojForm.language,
input: (testCases[0] && testCases[0].input) || '',
}
};
const mapDispatchToProps = (dispatch) => ({

@ -75,11 +75,11 @@ class InitTabCtx extends PureComponent {
handleTestCodeFormSubmit = (cb) => {
const {form, debuggerCode} = this.props;
console.log(debuggerCode);
// console.log(debuggerCode);
form.validateFields((err, values) => {
if (!err) { // 表单验证通过时,调用测试接口
cb && cb(); // 调用回调函数,切换 tab
console.log('表单值:', values);
// console.log('表单值:', values);
debuggerCode(values);
}
});

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-04 08:36:21
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 14:04:16
* @LastEditTime : 2019-12-27 14:51:42
*/
import './index.scss';
import React, { useState, useEffect } from 'react';
@ -43,7 +43,7 @@ function RecordDetail (props) {
useEffect(() => {
setDetail(recordDetail);
console.log('详情: ', recordDetail);
// console.log('详情: ', recordDetail);
if (recordDetail) {
const { user, myproblem_identifier, code } = recordDetail;
setUser(user);
@ -99,6 +99,11 @@ function RecordDetail (props) {
<span className="status_label" style={{ visibility: detail.status === 0 ? 'visible' : 'hidden'}}>
执行用时: <span className="status_label_sub">{`${detail.execute_time && Number(detail.execute_time * 1000).toFixed(2)}ms`}</span>
</span>
<span className="status_label pass_case" style={{ display: [-1, 0, 2, 5].includes(detail.status) ? 'inline-block' : 'none'}}>
<span className="status_label_sub">{detail.pass_sets_count}</span>
<span className="pass_case_span"> / {detail.set_count}</span>
个通过测试用例
</span>
</div>
<div className="result_error_area">
<ErrorResult detail={detail}/>

@ -1,6 +1,7 @@
@import '../split_pane_resizer.scss';
.record_detail_area{
background: #fff;
.record_detail_ctx{
padding: 0 20px;
.detail_ctx_header{
@ -31,6 +32,13 @@
.status_label_sub{
color: #333333;
}
.pass_case{
float: right;
margin-right: 0;
}
.pass_case_span{
margin-right: 10px;
}
}
.result_code_area{
@ -39,6 +47,9 @@
}
.result_error_area{
margin-top: 15px;
background: rgba(250,250,250,1);
color: #E51C24;
border-radius: 3px;
}
}
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-23 10:53:19
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 15:02:12
* @LastEditTime : 2019-12-27 10:25:14
*/
import './index.scss';
import React, { useEffect, useState } from 'react';
@ -90,9 +90,9 @@ function StudentStudy (props) {
const handleClickEditor = (identifier) => {
if (!identifier) return;
changeShowOrHideControl(false);
props.saveEditorCodeForDetail();
props.history.push(`/problems/${identifier}/edit`);
props.saveEditorCodeForDetail('');
props.clearOjForUserReducer();
props.history.push(`/problems/${identifier}/edit`);
}
// 处理退出
const handleClickQuit = () => {
@ -100,7 +100,7 @@ function StudentStudy (props) {
props.clearOjForUserReducer();
// 将控制台关闭
changeShowOrHideControl(false);
props.saveEditorCodeForDetail();
props.saveEditorCodeForDetail('');
props.history.push('/problems');
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-27 09:49:33
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-25 14:45:20
* @LastEditTime : 2019-12-27 10:39:00
*/
import './index.scss';
import React, { useState, useEffect } from 'react';
@ -105,7 +105,7 @@ const CommitRecord = (props) => {
// expected_output
} = commitRecordDetail;
if (Object.keys(commitRecordDetail).length > 0) {
console.log('当前状态====》》》', status);
// console.log('当前状态====》》》', status);
const classes = status === 0 ? 'record_result_suc' : 'record_result_err';
const showErrorCode = status !== 0 ? `ecord_error_info show_error_code` : `ecord_error_info`;
const showErrorCopy = status !== 0 ? `copy_error show_error_copy` : `copy_error`;

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-27 14:59:51
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 17:56:51
* @LastEditTime : 2019-12-27 10:28:41
*/
import React, { useState, useEffect } from 'react';
import {connect} from 'react-redux';
@ -39,10 +39,12 @@ const RightPane = (props) => {
changeLoadingState
} = props;
const [editorCode, setEditorCode] = useState('');
const [editorCode, setEditorCode] = useState(editor_code || hack.code);
const [noteClazz, setNoteClazz] = useState('editor_nodte_area');
const [noteCount] = useState(5000);
let initFlag = true;
// const [code, setCode] = useState(editor_code || hack.code);
// let initFlag = true;
useEffect(() => {
if (editor_code) {
setEditorCode(editor_code);
@ -61,24 +63,18 @@ const RightPane = (props) => {
let timer = null; // 定时器
// 代码块内容变化时
const handleCodeChange = (code) => {
// 保存用户提交的代码块
setEditorCode(code);
// 第一次回填代码内容时不更新;
if (initFlag) {
initFlag = false;
return;
}
const handleCodeChange = (value) => {
saveUserInputCode(value);
setEditorCode(value);
if (!timer) {
timer = setInterval(() => {
timer = setInterval(function () {
clearInterval(timer);
timer = null;
saveUserCodeForInterval && saveUserCodeForInterval(identifier, code);
saveUserCodeForInterval(identifier);
}, 3000);
}
// 保存用户代码块
saveUserInputCode(code);
}
// 代码调试
const handleDebuggerCode = (value) => {
// 调用保存代码块接口,成功后,调用调试接口

@ -1,6 +1,6 @@
import React, {Component} from 'react';
import {Redirect} from 'react-router';
import {List, Typography, Tag, Modal, Radio, Checkbox, Table, Pagination,Upload,Button} from 'antd';
import {List, Typography, Tag, Modal, Radio, Checkbox, Table,message, Pagination,Upload,Button} from 'antd';
import { NoneData } from 'educoder'
import TPMRightSection from './component/TPMRightSection';
@ -12,7 +12,29 @@ import moment from 'moment';
import Tpmdatasetmodel from "./tpmmodel/Tpmdatasetmodel";
const confirm = Modal.confirm;
function clearSlct() {
if("getSelection" in window){
window.getSelection().removeAllRanges();
}else{
document.selection.empty();
};
}
function jsCopy(s) {
clearSlct();
const copyEle = document.getElementById(s);
copyEle.select();
const copyStatus=document.execCommand("Copy");
// 对成功与否定进行提示
copyStatuss(copyStatus)
}
function copyStatuss(copyStatus){
if (copyStatus) {
message.success('复制成功');
} else {
message.error('复制失败');
}
}
class TPMDataset extends Component {
constructor(props) {
super(props)
@ -69,6 +91,33 @@ class TPMDataset extends Component {
</div>
)
},
{
title: '操作',
dataIndex: 'operation',
key: 'operation',
align: 'center',
className: "edu-txt-center font-14 ",
render: (text, record) => (
<div style={{
cursor:"pointer",
}} onClick={() => {
jsCopy("file_path"+record.id)
}}>
<i className="iconfont icon-fuzhi3 font-18 ml2 questiontype" style={{
color:"#A0A7B4"
}} ></i>
<div
style={{
overflow: 'hidden',
height: "1px",
width: "1px"
}}
>
<input id={"file_path"+record.id} value={record.file_path}/>
</div>
</div>
)
},
],
page: 1,
limit: 10,
@ -148,6 +197,7 @@ class TPMDataset extends Component {
filesize:datas[i].filesize,
id:datas[i].id,
title:datas[i].title,
file_path:datas[i].file_path,
})
}
this.setState({
@ -203,6 +253,7 @@ class TPMDataset extends Component {
filesize:datas[i].filesize,
id:datas[i].id,
title:datas[i].title,
file_path:datas[i].file_path,
})
}
this.setState({

@ -77,6 +77,15 @@ function JupyterTPI (props) {
const emptyCtx = (
<div className="jupyter_empty">
<style>
{ `
.ant-empty{
margin-top:80px;
color:#fff;
}
`
}
</style>
<Empty />
</div>
);
@ -88,6 +97,15 @@ function JupyterTPI (props) {
const [myIdentifier, setMyIdentifier] = useState('');
const [renderCtx, setRenderCtx] = useState(() => (emptyCtx));
let newHandletype=false
const newHandle = function (event) {
if(newHandletype===false){
newHandletype=true
saveJupyterTpi(event);
setTimeout(()=>{newHandletype=false},500)
}
}
// 保存代码
const addEventListeners = () => {
window.addEventListener('message', (e) => {
@ -95,12 +113,10 @@ function JupyterTPI (props) {
if(e){
if(e.data){
if(e.data==="jupytermessage"){
saveJupyterTpi();
newHandle()
}
}
}
})
}
@ -152,8 +168,8 @@ function JupyterTPI (props) {
title: '更新通知',
content: (<div className="update_notice">
{stopposttpip(1)}
<p className="update_txt">该实训已更新更新后您编写的实训代码将会丢失</p>
<p className="update_txt">如有需要请先导出代码再进行更新</p>
<p className="update_txt">该实训已更新您选择更新后之前编写的实训代码将会丢失</p>
<p className="update_txt">如有需要请先使用jupyter中-文件-下载保存代码再进行更新</p>
{/*<p className="update_txt">还未完成评测的任务代码,请自行保存</p>*/}
</div>),
okText: '立即更新',
@ -294,7 +310,7 @@ function JupyterTPI (props) {
});
const oUl = (
<ul className="jupyter_data_list">
<ul className="jupyter_data_list" >
{ oList }
</ul>
);
@ -332,12 +348,12 @@ function JupyterTPI (props) {
</p>
<p className="jupyter_btn">
{/*sync | poweroff */}
{/*<Button*/}
{/* className="btn_common"*/}
{/* type="link"*/}
{/* icon="history"*/}
{/* onClick={handleClickResetTpi}*/}
{/*>重置实训</Button>*/}
<Button
className="btn_common"
type="link"
icon="history"
onClick={handleClickResetTpi}
>重置实训</Button>
<Button
className="btn_common"
@ -396,7 +412,7 @@ function JupyterTPI (props) {
<h2 className="borbottom17212F jupyterfilepaths">
<span className={"ml50"}>文件路径</span>
<div className="sortinxdirection">
<a className="jupyter_name ml50 maxnamewidth200 lineheighttaj colorlineheighttaj">{jupyter_folder_name}</a>
<a className="jupyter_name ml50 maxnamewidth186JUPYTER lineheighttaj colorlineheighttaj">{jupyter_folder_name}</a>
<a className={"fr color-blue lineheighttaj font-14"}
onClick={() => {
jsCopy("jupyter_folder_name")

@ -215,13 +215,13 @@ line-height: 50px !important;
background: #070F1A !important;
}
.maxnamewidth200{
max-width: 200px;
.maxnamewidth186JUPYTER{
max-width: 186px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: default;
width: 200px;
width: 186px;
}
.maxnamewidth181{

@ -360,11 +360,11 @@ class Challengesjupyter extends Component {
let id=this.props.match.params.shixunId;
let that=this;
Modal.confirm({
title: '重置实训',
title: '重置环境',
content: (
<p style={{ lineHeight: '24px' }}>
你在本文件中修改的内容将丢失,<br />
是否确定重新加载初始代码
是否确定重置环境
</p>
),
okText: '确定',
@ -424,7 +424,23 @@ class Challengesjupyter extends Component {
};
return (
<React.Fragment>
<div className="">
<div >
<style>
{
`
.ant-notification{
position: fixed !important;
z-index: 3000 !important;
}
.ant-modal-wrap {
position: fixed !important;
z-index: 3000 !important;
margin-top: 100px !important;
}
`
}
</style>
<p className="clearfix mb20 edu-back-white">
<div className={"shixunjianjie"}>
<span className="font-16 fl">简介</span>
@ -579,7 +595,7 @@ class Challengesjupyter extends Component {
<p className="challenbaocuntest" type="upload" >导入</p>
</div>
</Upload>
{/*<button type="button" className="ant-btn deletebuttom chongzhistyles" onClick={this.handleClickResetTpi}><span>重置环境</span></button>*/}
<button type="button" className="ant-btn deletebuttom chongzhistyles" onClick={this.handleClickResetTpi}><span>重置环境</span></button>
</div>

@ -198,7 +198,7 @@
position: fixed;
top: 0px;
left: 0px;
z-index: 999999;
z-index: 2800;
right: 0px;
}
@ -210,7 +210,7 @@
margin-top: 63px;
bottom: 0px;
left: 0px;
z-index: 999999;
z-index: 2800;
right: 0px;
}

@ -127,3 +127,14 @@
background: #FFFFFF;
}
.file_path_input{
position: absolute;
right: -50%;
}
.questiontype:hover{
color: #4CACFF !important;
}
.questiontype:active{
color: #4CACFF !important;
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-23 10:53:25
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-25 17:06:57
* @LastEditTime : 2019-12-27 11:07:02
*/
import types from "./actionTypes";
@ -42,7 +42,7 @@ export const getCommentLists = (identifier) => {
limit,
page
}).then(res => {
console.log('获取评论列表: ====>>>>', res);
// console.log('获取评论列表: ====>>>>', res);
if (res.status === 200) {
const {data} = res;
dispatch({

@ -7,7 +7,7 @@
* @LastEditTime: 2019-12-13 23:03:27
*/
import types from "./actionTypes";
import { message } from 'antd';
import { message ,Modal} from 'antd';
import {
fetchJupyterTpiDataSet,
fetchJupyterTpiUrl,
@ -15,7 +15,8 @@ import {
fetchSyncJupyterCode,
fetchreset_with_tpi,
fetchSaveJupyterTpi,
fetactive_with_tpi
fetactive_with_tpi,
timeinfo_with_tpis
} from "../../services/jupyterServer";
// 获取 jupyter 相关信息
@ -76,7 +77,9 @@ export const getJupyterTpiUrl = (obj) => {
console.log('获取url', res);
if (res.status === 200) {
const { status, url = '', port } = res.data;
addjypertime(Date.now() +3600 * 1000)
dispatch(updataspinning(false))
//setTimeout(()=>{ dispatch(addjypertime(Date.now() +3600 * 1000))},500)
timeinfo_with_tpi(id,dispatch)
dispatch({
type: types.GET_JUPYTER_TPI_URL,
payload: {
@ -106,7 +109,7 @@ export const syncJupyterCode = (identifier, msg) => {
const {status} = res.data
if (status === 0) {
message.success(msg);
updataspinning(false)
dispatch(updataspinning(false))
setTimeout(() => {
window.location.reload();
}, 300);
@ -131,7 +134,7 @@ export const reset_with_tpi = (identifier, msg) => {
const {status} = res.data
if (status === 0) {
message.success(msg);
updataspinning(false)
dispatch(updataspinning(false))
setTimeout(() => {
window.location.reload();
}, 300);
@ -156,7 +159,7 @@ export const active_with_tpi = (identifier, msg) => {
const {status} = res.data
if (status === 0) {
message.success(msg);
addjypertime(Date.now() + 900 * 1000);
dispatch(addjypertime(Date.now() + 900 * 1000))
}
}
})
@ -171,6 +174,7 @@ export const changeGetJupyterUrlState = (status) => {
payload: status
}
}
// 保存 jupyter tpi
export const saveJupyterTpi = () => {
return (dispatch, getState) => {
@ -234,3 +238,28 @@ export const updataspinning=(type)=>{
}
}
// 获取重置实训后的时间
export const timeinfo_with_tpi = (identifier, dispatch) => {
const params = {
identifier: identifier
};
timeinfo_with_tpis(params).then(res => {
if (res.data.status === 401) return;
if (res.status === 200) {
if(res.data.status===0){
if(res.data.useSeconds===null){
Modal.warning({
title: '提示',
content: '因为这个实训pod不在了无法获取倒计时请联系系统管理人员',
});
}else{
let useSeconds=res.data.useSeconds;
let summain=3600 * 1000;
let sums= useSeconds * 1000;
let sum=summain-sums;
setTimeout(()=>{ dispatch(addjypertime(Date.now() +sum))},500);
}
}
}
})
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-27 13:42:11
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 18:32:08
* @LastEditTime : 2019-12-27 11:06:09
*/
import types from "./actionTypes";
import { Base64 } from 'js-base64';
@ -108,25 +108,31 @@ export const getUserProgramDetail = (identifier, type) => {
}
export const saveUserCodeForInterval = (identifier, code) => {
return (dispatch) => {
return (dispatch, getState) => {
const { userCode } = getState().ojForUserReducer;
dispatch({
type: types.AUTO_UPDATE_CODE,
payload: true
});
// console.log('+++', userCode);
fetchUpdateCode(identifier, {
code: Base64.encode(code)
code: userCode
}).then(res => {
if (res.data.status === 401) {
return;
};
dispatch({
type: types.RESTORE_INITIAL_CODE,
payload: userCode
});
setTimeout(() => {
dispatch({
type: types.AUTO_UPDATE_CODE,
payload: false
})
}, 1000);
console.log('代码保存成功', res);
// console.log('代码保存成功', res);
}).catch(() => {
dispatch({
type: types.AUTO_UPDATE_CODE,

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 16:35:46
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 15:45:28
* @LastEditTime : 2019-12-27 14:18:02
*/
import types from './actionTypes';
import CONST from '../../constants';
@ -17,6 +17,7 @@ import {
import { Base64 } from 'js-base64';
import { notification } from 'antd';
import { toStore } from 'educoder';
// import { startProgramQuestion } from ''
const { jcLabel } = CONST;
// 表单字段映射
const maps = {
@ -99,7 +100,7 @@ const payloadInfo = (key, value, errMsg, validateInfo) => ({
// }
// 表单提交验证
export const validateOjForm = (props, type) => {
export const validateOjForm = (props, type, cb) => {
return (dispatch, getState) => {
const {ojForm, testCases, identifier, code } = getState().ojFormReducer;
// console.log('code', code);
@ -247,44 +248,44 @@ export const validateOjForm = (props, type) => {
paramsObj['identifier'] = identifier;
}
// 调用保存或更新
if (type === 'publish') {
// 提示发布信息
publishTask(identifier).then(res => {
dispatch({
type: types.PUBLISH_LOADING_STATUS,
payload: false
});
// 先调用保存接口
fetchPostOjForm(paramsObj).then(res => {
if (res.status === 200) { // 保存成功后,重新跳转至列表页
if (res.data.status === 0) {
// message.success('发布成功!');
notification.success({
message: '提示',
description: '发布成功!'
});
// linkToDev(dispatch, props);
// 改变发布状态值 0 => 1
// 改变按钮loading状态
dispatch({
type: types.CHANGE_PUBLISH_VALUE,
payload: 1
type: types.SUBMIT_LOADING_STATUS,
payload: false
});
}
}).catch(() => {
dispatch({
type: types.PUBLISH_LOADING_STATUS,
payload: false
});
});
} else {
// 调用更新
fetchPostOjForm(paramsObj).then(res => {
if (res.status === 200) { // 保存成功后,重新跳转至列表页
if (res.data.status === 0) {
// 改变按钮loading状态
dispatch({
type: types.SUBMIT_LOADING_STATUS,
payload: false
if (type === 'publish') {
publishTask(identifier).then(res => {
dispatch({
type: types.PUBLISH_LOADING_STATUS,
payload: false
});
if (res.data.status === 0) {
// message.success('发布成功!');
notification.success({
message: '提示',
description: '发布成功!'
});
// linkToDev(dispatch, props);
// 改变发布状态值 0 => 1
dispatch({
type: types.CHANGE_PUBLISH_VALUE,
payload: 1
});
}
}).catch(() => {
dispatch({
type: types.PUBLISH_LOADING_STATUS,
payload: false
});
});
} else if (type === 'challenge') {
cb && cb();
} else {
// message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功');
notification.success({
message: '提示',
@ -296,17 +297,81 @@ export const validateOjForm = (props, type) => {
type: types.SAVE_OJ_FORM_ID,
payload: identifier
});
// 保存或更新后调用start接口
// linkToDev(dispatch, props);
}
}}
).catch(err => {
dispatch({
type: types.SUBMIT_LOADING_STATUS,
payload: false
});
// 保存或更新后调用start接口
// linkToDev(dispatch, props);
}
}}
).catch(err => {
dispatch({
type: types.SUBMIT_LOADING_STATUS,
payload: false
});
}
dispatch({
type: types.PUBLISH_LOADING_STATUS,
payload: false
});
});
// 调用保存或更新
// if (type === 'publish') {
// // 提示发布信息
// publishTask(identifier).then(res => {
// dispatch({
// type: types.PUBLISH_LOADING_STATUS,
// payload: false
// });
// if (res.data.status === 0) {
// // message.success('发布成功!');
// notification.success({
// message: '提示',
// description: '发布成功!'
// });
// // linkToDev(dispatch, props);
// // 改变发布状态值 0 => 1
// dispatch({
// type: types.CHANGE_PUBLISH_VALUE,
// payload: 1
// });
// }
// }).catch(() => {
// dispatch({
// type: types.PUBLISH_LOADING_STATUS,
// payload: false
// });
// });
// } else {
// // 调用更新
// fetchPostOjForm(paramsObj).then(res => {
// if (res.status === 200) { // 保存成功后,重新跳转至列表页
// if (res.data.status === 0) {
// // 改变按钮loading状态
// dispatch({
// type: types.SUBMIT_LOADING_STATUS,
// payload: false
// });
// // message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功');
// notification.success({
// message: '提示',
// description: paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功'
// });
// const {identifier} = res.data;
// // 保存成功后的identifier
// identifier && dispatch({
// type: types.SAVE_OJ_FORM_ID,
// payload: identifier
// });
// // 保存或更新后调用start接口
// // linkToDev(dispatch, props);
// }
// }}
// ).catch(err => {
// dispatch({
// type: types.SUBMIT_LOADING_STATUS,
// payload: false
// });
// });
// }
}
}
};

@ -16,7 +16,7 @@ const initialState = {
publishLoading: false, // 发布
isMySource: false,
drawervisible:false,
jupytertime:Date.now() + 3600 * 1000,
jupytertime:0,
spinning:false
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-27 13:41:48
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 18:34:56
* @LastEditTime : 2019-12-27 09:18:02
*/
import types from "../actions/actionTypes";
import { Base64 } from 'js-base64';
@ -94,11 +94,10 @@ const ojForUserReducer = (state = initialState, action) => {
}
case types.SAVE_USER_CODE:
let curCode = Base64.encode(action.payload);
return {
...state,
userCode: curCode,
isUpdateCode: true
isUpdateCode: true,
}
case types.IS_UPDATE_CODE:
return {
@ -133,11 +132,13 @@ const ojForUserReducer = (state = initialState, action) => {
let restoreCode = action.payload
if (restoreCode) {
curHack['code'] = Base64.decode(restoreCode);
} else {
curHack['code'] = '';
}
console.log('当前的代码内容:', curHack);
console.log(curHack);
return {
...state,
hack: Object.assign({}, curHack)
hack: Object.assign({}, state.hack, curHack)
}
case types.SAVE_HACK_IDENTIFIER:
return {

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 16:40:32
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-23 10:12:59
* @LastEditTime : 2019-12-27 10:35:06
*/
import { Base64 } from 'js-base64';
import types from '../actions/actionTypes';
@ -174,10 +174,16 @@ const ojFormReducer = (state = initialState, action) => {
* 7. 添加测试用例验证
*/
const { code = '', description, language, name, hack_sets = [], time_limit, difficult, category, status } = action.payload;
let desc = null;
try {
desc = JSON.parse(description)
} catch (error) {
desc = description;
}
const currentOjForm = {
name, // 任务名称
language,
description: JSON.parse(description),
description: desc,
difficult,
category,
openOrNot: 1,

@ -138,15 +138,18 @@ class SearchPage extends Component{
font-size: 16px !important;
}
`}</style>
<div className="headersear" >
<div style={{height:"53px"}}></div>
<Search
style={{ width: "800px", marginTop:"53px"}}
className="packinput"
value={this.state.keywords}
enterButton={<span><Icon type="search" className="mr5"/> 搜索</span>}
onInput={(e)=>this.setdatafunsval(e)}
onSearch={ (value)=>this.setdatafuns(value)} />
<div className="shixunDetail_top " >
{/*<div style={{height:"53px"}}></div>*/}
<div className="intermediatecenter" style={{ width: "100%"}}>
<Search
style={{ width: "800px", marginTop:"53px"}}
className="packinput"
value={this.state.keywords}
enterButton={<span><Icon type="search" className="mr5"/> 搜索</span>}
onInput={(e)=>this.setdatafunsval(e)}
onSearch={ (value)=>this.setdatafuns(value)} />
</div>
</div>
<div className="tabtitle">

@ -3,8 +3,6 @@
margin-top: 53px;
}
.headersear{
height: 160px;
background: #EAF2F9;
display: flex;
justify-content: center;
}
@ -15,6 +13,12 @@
/*color: #681616 !important;*/
border-color: #E1EDF8 !important;
}
.intermediatecenter{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.packinput .ant-input-group-addon .ant-btn{
width:137px !important;
@ -174,3 +178,9 @@
.ml9{
margin-left: 9px;
}
.shixunDetail_top{width: 100%;background-image: url("/images/educoder/searchforbackres.jpg"); height: 240px;
justify-content: center;align-items: center;display: -webkit-flex;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}

@ -44,4 +44,11 @@ export async function fetchreset_with_tpi (params) {
export async function fetactive_with_tpi(params) {
const url = `/jupyters/active_with_tpi.json`;
return axios.get(url, { params });
}
//获取tpi重置实训的time
export async function timeinfo_with_tpis(params){
const url = `/jupyters/timeinfo_with_tpi.json`;
return axios.get(url, { params });
}

@ -4,13 +4,13 @@
* @Github:
* @Date: 2019-11-20 10:55:38
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-26 17:37:38
* @LastEditTime : 2019-12-27 11:06:27
*/
import axios from 'axios';
export async function fetchOJList (params) {
console.log('传递的参数: ', params);
// console.log('传递的参数: ', params);
const obj = {};
Object.keys(params).forEach(key => {
if (params[key]) {

@ -528,7 +528,7 @@ li.li-width15{width: 15%;text-align: left}
li.li-width7{width: 7%;text-align: left}
/*-----------------------------在线课堂动态----------------------------------*/
.courseHead{width: 100%;margin-bottom:40px;background-size: 100% 100%;background-image: url("/images/educoder/course-detail.jpg");height: 240px;
.courseHead{width: 100%;margin-bottom:40px;background-size: 100% 100%;background-image: url("/images/educoder/courtailsbdpicture.jpg");height: 240px;
justify-content: center;align-items: center;display: -webkit-flex;
background-size: cover;
background-position: center;
@ -3803,4 +3803,4 @@ a.singlepublishtwo{
.markdown-body {
text-align: justify;
word-break: break-all;
}
}

@ -1242,6 +1242,12 @@
<div class="code-name">&amp;#xe6c8;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70f;</span>
<div class="name">减号</div>
<div class="code-name">&amp;#xe70f;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe60f;</span>
<div class="name">工程</div>
@ -1758,6 +1764,54 @@
<div class="code-name">&amp;#xe6d9;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe701;</span>
<div class="name">缩小</div>
<div class="code-name">&amp;#xe701;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe707;</span>
<div class="name">放大</div>
<div class="code-name">&amp;#xe707;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe709;</span>
<div class="name">编辑</div>
<div class="code-name">&amp;#xe709;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70b;</span>
<div class="name">公开</div>
<div class="code-name">&amp;#xe70b;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70c;</span>
<div class="name">解析</div>
<div class="code-name">&amp;#xe70c;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70d;</span>
<div class="name">删除</div>
<div class="code-name">&amp;#xe70d;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe70e;</span>
<div class="name">试题栏</div>
<div class="code-name">&amp;#xe70e;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe710;</span>
<div class="name">复制</div>
<div class="code-name">&amp;#xe710;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
@ -3626,6 +3680,15 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jianhao"></span>
<div class="name">
减号
</div>
<div class="code-name">.icon-jianhao
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongcheng"></span>
<div class="name">
@ -4400,6 +4463,78 @@
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-suoxiao2"></span>
<div class="name">
缩小
</div>
<div class="code-name">.icon-suoxiao2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-fangda"></span>
<div class="name">
放大
</div>
<div class="code-name">.icon-fangda
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-bianji2"></span>
<div class="name">
编辑
</div>
<div class="code-name">.icon-bianji2
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-gongkai"></span>
<div class="name">
公开
</div>
<div class="code-name">.icon-gongkai
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-jiexi"></span>
<div class="name">
解析
</div>
<div class="code-name">.icon-jiexi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shanchu1"></span>
<div class="name">
删除
</div>
<div class="code-name">.icon-shanchu1
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shitilan"></span>
<div class="name">
试题栏
</div>
<div class="code-name">.icon-shitilan
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-fuzhi3"></span>
<div class="name">
复制
</div>
<div class="code-name">.icon-fuzhi3
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
@ -6045,6 +6180,14 @@
<div class="code-name">#icon-pinglun</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jianhao"></use>
</svg>
<div class="name">减号</div>
<div class="code-name">#icon-jianhao</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongcheng"></use>
@ -6733,6 +6876,70 @@
<div class="code-name">#icon-zhiding</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-suoxiao2"></use>
</svg>
<div class="name">缩小</div>
<div class="code-name">#icon-suoxiao2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fangda"></use>
</svg>
<div class="name">放大</div>
<div class="code-name">#icon-fangda</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-bianji2"></use>
</svg>
<div class="name">编辑</div>
<div class="code-name">#icon-bianji2</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-gongkai"></use>
</svg>
<div class="name">公开</div>
<div class="code-name">#icon-gongkai</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-jiexi"></use>
</svg>
<div class="name">解析</div>
<div class="code-name">#icon-jiexi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shanchu1"></use>
</svg>
<div class="name">删除</div>
<div class="code-name">#icon-shanchu1</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shitilan"></use>
</svg>
<div class="name">试题栏</div>
<div class="code-name">#icon-shitilan</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fuzhi3"></use>
</svg>
<div class="name">复制</div>
<div class="code-name">#icon-fuzhi3</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1419,6 +1419,13 @@
"unicode": "e6c8",
"unicode_decimal": 59080
},
{
"icon_id": "7556166",
"name": "减号",
"font_class": "jianhao",
"unicode": "e70f",
"unicode_decimal": 59151
},
{
"icon_id": "7587940",
"name": "工程",
@ -2020,6 +2027,62 @@
"font_class": "zhiding",
"unicode": "e6d9",
"unicode_decimal": 59097
},
{
"icon_id": "12403050",
"name": "缩小",
"font_class": "suoxiao2",
"unicode": "e701",
"unicode_decimal": 59137
},
{
"icon_id": "12403054",
"name": "放大",
"font_class": "fangda",
"unicode": "e707",
"unicode_decimal": 59143
},
{
"icon_id": "12491363",
"name": "编辑",
"font_class": "bianji2",
"unicode": "e709",
"unicode_decimal": 59145
},
{
"icon_id": "12491366",
"name": "公开",
"font_class": "gongkai",
"unicode": "e70b",
"unicode_decimal": 59147
},
{
"icon_id": "12491369",
"name": "解析",
"font_class": "jiexi",
"unicode": "e70c",
"unicode_decimal": 59148
},
{
"icon_id": "12491370",
"name": "删除",
"font_class": "shanchu1",
"unicode": "e70d",
"unicode_decimal": 59149
},
{
"icon_id": "12491850",
"name": "试题栏",
"font_class": "shitilan",
"unicode": "e70e",
"unicode_decimal": 59150
},
{
"icon_id": "12568379",
"name": "复制",
"font_class": "fuzhi3",
"unicode": "e710",
"unicode_decimal": 59152
}
]
}

@ -626,6 +626,9 @@ Created by iconfont
<glyph glyph-name="pinglun" unicode="&#59080;" d="M896 704H128c-35.2 0-64-28.8-64-64v-448c0-35.2 28.8-64 64-64h256l128-64 128 64h256c35.2 0 64 28.8 64 64V640c0 35.2-28.8 64-64 64zM304 368c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z m208 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z m208 0c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z" horiz-adv-x="1024" />
<glyph glyph-name="jianhao" unicode="&#59151;" d="M768 341.333333H256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h512c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667z" horiz-adv-x="1024" />
<glyph glyph-name="gongcheng" unicode="&#58895;" d="M141.9 476.8L454.1 298c18.2-10.6 38.9-16.3 59.9-16.3 21.2 0 41.7 5.6 59.4 16.3l312.4 178.6c21.7 11.8 35.2 36.5 34.5 63.1-0.8 26.2-15.4 50.2-37.4 61.2L567.3 758.4c-33.9 16.9-72.8 16.9-106.6 0L144.9 600.8c-22.5-11.6-36.4-34.5-37.2-61.1-0.8-26.3 12.3-50.4 34.2-62.9z m22.3 85.9l315.6 157.5c10.9 5.4 22.5 8.2 34.2 8.2 11.7 0 23.4-2.7 34.2-8.2l315.5-157.5c8.1-4 13.5-13.6 13.8-24.2 0.3-10.6-4.5-20.2-12.2-24.3L552 335l-0.5-0.3c-11-6.7-24-10.2-37.5-10.2s-26.7 3.6-38.5 10.5L163.1 513.8c-8 4.6-13 14.3-12.7 24.6 0.3 10.9 5.6 20 13.8 24.3zM888.4 249.7l-369-211c-3.5-2-7.1-2-10.7 0.1L139.6 249.7c-10.3 5.9-23.3 2.3-29.1-7.9-5.9-10.2-2.3-23.3 7.9-29.1l368.8-210.8c8.4-4.9 17.6-7.3 26.7-7.3 9.2 0 18.3 2.4 26.6 7.2l368.9 210.9c10.2 5.9 13.8 18.9 7.9 29.1-5.6 10.2-18.7 13.8-28.9 7.9zM888.4 387.1l-369-211c-3.5-2-7.1-2-10.7 0.1L139.6 387.1c-10.3 5.9-23.3 2.3-29.1-7.9-5.9-10.2-2.3-23.3 7.9-29.1l368.8-210.8c8.4-4.9 17.6-7.3 26.7-7.3 9.2 0 18.3 2.4 26.6 7.2L909.6 350c10.2 5.9 13.8 18.9 7.9 29.1-5.8 10.3-18.9 13.8-29.1 8z" horiz-adv-x="1024" />
@ -884,6 +887,30 @@ Created by iconfont
<glyph glyph-name="zhiding" unicode="&#59097;" d="M496.0256 671.232L129.024 212.48A20.48 20.48 0 0 1 144.9984 179.2H337.92c11.264 0 20.48-9.216 20.48-20.48v-266.24c0-11.264 9.216-20.48 20.48-20.48h266.24a20.48 20.48 0 0 1 20.48 20.48V158.72c0 11.264 9.216 20.48 20.48 20.48h192.9216a20.48 20.48 0 0 1 15.9744 33.28l-367.0016 458.752a20.48 20.48 0 0 1-31.9488 0zM153.6 896m51.2 0l614.4 0q51.2 0 51.2-51.2l0 0q0-51.2-51.2-51.2l-614.4 0q-51.2 0-51.2 51.2l0 0q0 51.2 51.2 51.2Z" horiz-adv-x="1024" />
<glyph glyph-name="suoxiao2" unicode="&#59137;" d="M921.6 418.133333h-318.577778c-5.688889 0-17.066667 0-22.755555 5.688889-5.688889 0-11.377778 5.688889-17.066667 11.377778-5.688889 5.688889-11.377778 11.377778-11.377778 17.066667 0 5.688889-5.688889 11.377778-5.688889 22.755555V793.6c0 34.133333 22.755556 56.888889 56.888889 56.888889s56.888889-22.755556 56.888889-56.888889V611.555556L927.288889 878.933333c22.755556 22.755556 56.888889 22.755556 79.644444 0s22.755556-56.888889 0-79.644444L739.555556 531.911111h182.044444c34.133333 0 56.888889-22.755556 56.888889-56.888889s-22.755556-56.888889-56.888889-56.888889zM56.888889-128c-17.066667 0-28.444444 5.688889-39.822222 17.066667-22.755556 22.755556-22.755556 56.888889 0 79.644444L284.444444 236.088889H102.4c-34.133333 0-56.888889 22.755556-56.888889 56.888889s22.755556 56.888889 56.888889 56.888889h318.577778c5.688889 0 17.066667 0 22.755555-5.688889 5.688889 0 11.377778-5.688889 17.066667-11.377778 5.688889-5.688889 11.377778-11.377778 11.377778-17.066667 0-5.688889 5.688889-11.377778 5.688889-22.755555v-318.577778c0-34.133333-22.755556-56.888889-56.888889-56.888889s-56.888889 22.755556-56.888889 56.888889V156.444444l-267.377778-267.377777c-11.377778-11.377778-22.755556-17.066667-39.822222-17.066667z" horiz-adv-x="1024" />
<glyph glyph-name="fangda" unicode="&#59143;" d="M603.022222 418.133333c-17.066667 0-28.444444 5.688889-39.822222 17.066667-22.755556 22.755556-22.755556 56.888889 0 79.644444L830.577778 782.222222h-182.044445c-34.133333 0-56.888889 22.755556-56.888889 56.888889s22.755556 56.888889 56.888889 56.888889H967.111111c5.688889 0 17.066667 0 22.755556-5.688889 5.688889 0 11.377778-5.688889 17.066666-11.377778 5.688889-5.688889 11.377778-11.377778 11.377778-17.066666 5.688889-5.688889 5.688889-17.066667 5.688889-22.755556v-318.577778c0-34.133333-22.755556-56.888889-56.888889-56.888889s-56.888889 22.755556-56.888889 56.888889V702.577778l-267.377778-267.377778c-11.377778-11.377778-22.755556-17.066667-39.822222-17.066667zM375.466667-128H56.888889c-5.688889 0-17.066667 0-22.755556 5.688889-5.688889 0-11.377778 5.688889-17.066666 11.377778-5.688889 5.688889-11.377778 11.377778-11.377778 17.066666-5.688889 5.688889-5.688889 17.066667-5.688889 22.755556v318.577778c0 34.133333 22.755556 56.888889 56.888889 56.888889s56.888889-22.755556 56.888889-56.888889v-182.044445l267.377778 267.377778c22.755556 22.755556 56.888889 22.755556 79.644444 0s22.755556-56.888889 0-79.644444L193.422222-14.222222h182.044445c34.133333 0 56.888889-22.755556 56.888889-56.888889s-22.755556-56.888889-56.888889-56.888889z" horiz-adv-x="1024" />
<glyph glyph-name="bianji2" unicode="&#59145;" d="M704.752941-97.882353H198.776471c-78.305882 0-138.541176 60.235294-138.541177 132.517647V667.105882c0 72.282353 66.258824 132.517647 138.541177 132.517647h319.247058c18.070588 0 30.117647-12.047059 30.117647-30.117647s-12.047059-24.094118-30.117647-24.094117H198.776471c-42.164706 0-78.305882-36.141176-78.305883-72.282353v-632.470588c0-42.164706 36.141176-72.282353 78.305883-72.282353h499.952941c42.164706 0 78.305882 36.141176 78.305882 72.282353V293.647059c0 18.070588 12.047059 30.117647 30.117647 30.117647s30.117647-12.047059 30.117647-30.117647v-259.011765c6.023529-72.282353-60.235294-132.517647-132.517647-132.517647zM313.223529 161.129412c-24.094118 0-54.211765 18.070588-60.235294 48.188235v30.117647l36.141177 126.494118 445.741176 445.741176c48.188235 48.188235 120.470588 48.188235 168.658824 0 48.188235-48.188235 48.188235-120.470588 0-168.658823l-445.741177-445.741177-126.494117-30.117647c-6.023529-6.023529-12.047059-6.023529-18.070589-6.023529z m36.141177 174.682353l-36.141177-114.447059 120.470589 30.117647 433.694117 433.694118c12.047059 12.047059 18.070588 24.094118 18.070589 42.164705 0 18.070588-6.023529 30.117647-18.070589 42.164706-24.094118 24.094118-60.235294 24.094118-84.329411 0L349.364706 335.811765z" horiz-adv-x="1024" />
<glyph glyph-name="gongkai" unicode="&#59147;" d="M512 42.666667C432.355556 42.666667 369.777778 105.244444 369.777778 184.888889S432.355556 327.111111 512 327.111111s142.222222-62.577778 142.222222-142.222222S591.644444 42.666667 512 42.666667z m0 227.555555c-45.511111 0-85.333333-39.822222-85.333333-85.333333S466.488889 99.555556 512 99.555556 597.333333 139.377778 597.333333 184.888889 557.511111 270.222222 512 270.222222zM256 469.333333c-17.066667 0-28.444444 11.377778-28.444444 28.444445V662.755556C244.622222 782.222222 352.711111 867.555556 483.555556 867.555556c142.222222 0 250.311111-96.711111 256-221.866667v-5.688889c0-17.066667-11.377778-28.444444-28.444445-28.444444s-28.444444 11.377778-28.444444 28.444444c-5.688889 96.711111-91.022222 170.666667-199.111111 170.666667-102.4 0-187.733333-68.266667-199.111112-153.6V497.777778c0-17.066667-11.377778-28.444444-28.444444-28.444445zM739.555556-128h-455.111112C176.355556-128 85.333333-36.977778 85.333333 71.111111v227.555556C85.333333 406.755556 176.355556 497.777778 284.444444 497.777778h455.111112c108.088889 0 199.111111-91.022222 199.111111-199.111111v-227.555556c0-108.088889-91.022222-199.111111-199.111111-199.111111z m-455.111112 568.888889C204.8 440.888889 142.222222 378.311111 142.222222 298.666667v-227.555556C142.222222-8.533333 204.8-71.111111 284.444444-71.111111h455.111112c79.644444 0 142.222222 62.577778 142.222222 142.222222v227.555556C881.777778 378.311111 819.2 440.888889 739.555556 440.888889h-455.111112z" horiz-adv-x="1024" />
<glyph glyph-name="jiexi" unicode="&#59148;" d="M506.311111-99.555556c-73.955556 0-147.911111 17.066667-216.177778 51.2-11.377778 5.688889-22.755556 22.755556-11.377777 39.822223 5.688889 11.377778 22.755556 22.755556 39.822222 11.377777 56.888889-28.444444 125.155556-45.511111 187.733333-45.511111 238.933333 0 432.355556 187.733333 432.355556 426.666667 0 85.333333-22.755556 164.977778-73.955556 233.244444-11.377778 11.377778-5.688889 28.444444 5.688889 39.822223 11.377778 11.377778 28.444444 5.688889 39.822222-5.688889 51.2-79.644444 79.644444-170.666667 79.644445-267.377778 5.688889-267.377778-216.177778-483.555556-483.555556-483.555556z m-301.511111 125.155556c-5.688889 0-11.377778 0-17.066667 5.688889C85.333333 122.311111 28.444444 253.155556 28.444444 389.688889 28.444444 651.377778 238.933333 867.555556 500.622222 867.555556c119.466667 0 233.244444-45.511111 318.577778-125.155556 11.377778-11.377778 11.377778-28.444444 0-39.822222-11.377778-11.377778-28.444444-11.377778-39.822222 0-79.644444 73.955556-176.355556 113.777778-278.755556 113.777778-227.555556 0-415.288889-187.733333-415.288889-420.977778 0-125.155556 51.2-238.933333 142.222223-318.577778 11.377778-11.377778 11.377778-28.444444 0-39.822222-5.688889-11.377778-11.377778-11.377778-22.755556-11.377778zM512 31.288889c-56.888889 0-102.4 45.511111-102.4 102.4v34.133333c-62.577778 34.133333-102.4 102.4-102.4 170.666667C307.2 446.577778 398.222222 537.6 512 537.6s204.8-91.022222 204.8-199.111111c0-68.266667-39.822222-136.533333-102.4-170.666667v-34.133333c0-51.2-39.822222-96.711111-91.022222-102.4H512z m0 449.422222c-79.644444 0-147.911111-62.577778-147.911111-142.222222 0-51.2 28.444444-96.711111 73.955555-125.155556l28.444445-17.066666v-68.266667c0-22.755556 17.066667-45.511111 45.511111-45.511111h5.688889c22.755556 0 39.822222 22.755556 39.822222 45.511111v68.266667l28.444445 17.066666c45.511111 22.755556 73.955556 73.955556 73.955555 125.155556 0 73.955556-68.266667 142.222222-147.911111 142.222222zM676.977778 497.777778c-5.688889 0-17.066667 0-22.755556 5.688889-11.377778 11.377778-11.377778 28.444444 0 39.822222L739.555556 628.622222c11.377778 11.377778 28.444444 11.377778 39.822222 0s11.377778-28.444444 0-39.822222l-85.333334-85.333333c-5.688889 0-11.377778-5.688889-17.066666-5.688889zM347.022222 497.777778c-5.688889 0-11.377778 5.688889-17.066666 5.688889L238.933333 594.488889c-11.377778 11.377778-11.377778 28.444444 0 39.822222s28.444444 11.377778 39.822223 0l85.333333-85.333333c11.377778-11.377778 11.377778-28.444444 0-39.822222 0-5.688889-5.688889-11.377778-17.066667-11.377778zM512 560.355556c-17.066667 0-28.444444 11.377778-28.444444 28.444444V685.511111c0 17.066667 11.377778 28.444444 28.444444 28.444445s28.444444-11.377778 28.444444-28.444445v-102.4c0-11.377778-11.377778-22.755556-28.444444-22.755555z" horiz-adv-x="1024" />
<glyph glyph-name="shanchu1" unicode="&#59149;" d="M672-96H358.4c-76.8 0-140.8 57.6-153.6 140.8L96 569.6c0 19.2 6.4 32 25.6 38.4 19.2 6.4 32-6.4 38.4-25.6l102.4-524.8c12.8-51.2 51.2-89.6 96-89.6h313.6c44.8 0 83.2 38.4 96 89.6l102.4 524.8c6.4 19.2 19.2 25.6 38.4 25.6 19.2-6.4 25.6-19.2 25.6-38.4L832 44.8c-19.2-83.2-83.2-140.8-160-140.8zM608 704v6.4c0 51.2-44.8 89.6-96 89.6S416 755.2 416 704h-64C352 793.6 422.4 864 512 864c83.2 0 153.6-64 160-153.6V704h-64zM384 38.4c-12.8 0-25.6 12.8-32 25.6L256 576c0 19.2 12.8 32 25.6 38.4 19.2 0 38.4-12.8 38.4-25.6l96-512c0-19.2-6.4-38.4-32-38.4 6.4 0 0 0 0 0zM640 38.4s-6.4 0 0 0c-25.6 6.4-32 19.2-32 38.4l96 512c0 19.2 19.2 32 38.4 25.6 12.8-6.4 25.6-19.2 25.6-38.4l-96-512c-6.4-12.8-19.2-25.6-32-25.6zM512 38.4c-19.2 0-32 12.8-32 32v512c0 19.2 12.8 32 32 32s32-12.8 32-32v-512c0-19.2-12.8-32-32-32zM992 640H32C12.8 640 0 652.8 0 672S12.8 704 32 704h960c19.2 0 32-12.8 32-32s-12.8-32-32-32z" horiz-adv-x="1024" />
<glyph glyph-name="shitilan" unicode="&#59150;" d="M816.118519-128H184.019753c-69.530864 0-126.419753 56.888889-126.419753 126.419753V756.938272C57.6 826.469136 114.488889 883.358025 184.019753 883.358025h568.888889l189.62963-189.62963v-695.308642c0-69.530864-56.888889-126.419753-126.419753-126.419753zM727.624691 820.148148H184.019753c-37.925926 0-63.209877-25.283951-63.209876-63.209876v-758.518519c0-37.925926 25.283951-63.209877 63.209876-63.209876h632.098766c37.925926 0 63.209877 25.283951 63.209876 63.209876V668.444444L727.624691 820.148148zM955.180247 662.123457h-189.62963c-25.283951 0-44.246914 18.962963-44.246913 44.246913l6.320987 189.62963 227.555556-233.876543z m-170.666667 82.172839v-18.962963h18.962963l-18.962963 18.962963zM670.735802 567.308642H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938S310.439506 630.518519 329.402469 630.518519h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604939s-12.641975-31.604938-31.604939-31.604938zM670.735802 314.469136H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938S310.439506 377.679012 329.402469 377.679012h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604938s-12.641975-31.604938-31.604939-31.604938zM670.735802 61.62963H329.402469c-18.962963 0-31.604938 12.641975-31.604938 31.604938s12.641975 31.604938 31.604938 31.604938h341.333333c18.962963 0 31.604938-12.641975 31.604939-31.604938s-12.641975-31.604938-31.604939-31.604938z" horiz-adv-x="1024" />
<glyph glyph-name="fuzhi3" unicode="&#59152;" d="M648.533333-128h-477.866666C75.093333-128 0-52.906667 0 42.666667v477.866666C0 616.106667 75.093333 691.2 170.666667 691.2h477.866666C744.106667 691.2 819.2 616.106667 819.2 520.533333v-477.866666c0-95.573333-75.093333-170.666667-170.666667-170.666667z m-477.866666 750.933333C116.053333 622.933333 68.266667 575.146667 68.266667 520.533333v-477.866666c0-54.613333 47.786667-102.4 102.4-102.4h477.866666c54.613333 0 102.4 47.786667 102.4 102.4v477.866666c0 54.613333-47.786667 102.4-102.4 102.4h-477.866666zM955.733333 110.933333c-20.48 0-34.133333 13.653333-34.133333 34.133334V691.2c0 54.613333-47.786667 102.4-102.4 102.4H273.066667c-20.48 0-34.133333 13.653333-34.133334 34.133333s13.653333 34.133333 34.133334 34.133334h546.133333c95.573333 0 170.666667-75.093333 170.666667-170.666667v-546.133333c0-20.48-13.653333-34.133333-34.133334-34.133334z" horiz-adv-x="1024" />
</font>

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 374 KiB

Loading…
Cancel
Save