Merge branch 'dev_aliyun' into dev_cxt

chromesetting
cxt 5 years ago
commit de6056cdbb

@ -65,7 +65,7 @@ $(document).on('turbolinks:load', function() {
}, },
matcher: matcherFunc matcher: matcherFunc
}); });
} };
$.ajax({ $.ajax({
url: '/api/schools/for_option.json', url: '/api/schools/for_option.json',

@ -107,7 +107,7 @@ $(document).on('turbolinks:load', function() {
}, },
templateResult: function (item) { templateResult: function (item) {
if(!item.id || item.id === '') return item.text; if(!item.id || item.id === '') return item.text;
var ele = '<span>' var ele = '<span>';
ele += '<span>' + item.name + '</span>'; ele += '<span>' + item.name + '</span>';
ele += '<span class="font-12"> -- ' + item.creator_name + '</span>'; ele += '<span class="font-12"> -- ' + item.creator_name + '</span>';
ele += '<span class="font-12"> -- ' + item.status_text+ '</span>'; ele += '<span class="font-12"> -- ' + item.status_text+ '</span>';
@ -116,9 +116,8 @@ $(document).on('turbolinks:load', function() {
return $(ele); return $(ele);
}, },
templateSelection: function(item){ templateSelection: function(item){
if (item.id) { if(!item.id || item.id === '') return item.text;
} var ele = '<span>' + (item.name || item.text) + '<span class="font-12"> -- ' + item.creator_name + '</span></span>';
var ele = '<span>' + (item.name || item.text) + '<span class="font-12"> -- ' + item.creator_name + '</span></span>'
return $(ele); return $(ele);
} }
}); });

@ -125,7 +125,7 @@ class Competitions::CompetitionsController < Competitions::BaseController
end end
@all_records = @competition.competition_teams.joins(:competition_scores).where(competition_scores: {competition_stage_id: @stage&.id.to_i}) @all_records = @competition.competition_teams.joins(:competition_scores).where(competition_scores: {competition_stage_id: @stage&.id.to_i})
.select("competition_teams.*, score, cost_time").order("score desc, cost_time desc") .select("competition_teams.*, score, cost_time").order("score desc, cost_time asc")
current_team_ids = @competition.team_members.where(user_id: current_user.id).pluck(:competition_team_id).uniq current_team_ids = @competition.team_members.where(user_id: current_user.id).pluck(:competition_team_id).uniq
@user_ranks = @all_records.select{|com_team| current_team_ids.include?(com_team.id)} @user_ranks = @all_records.select{|com_team| current_team_ids.include?(com_team.id)}
@ -213,7 +213,7 @@ class Competitions::CompetitionsController < Competitions::BaseController
if personal if personal
row_cells_column << record_user.real_name row_cells_column << record_user.real_name
row_cells_column << record_user.school_name row_cells_column << record_user.school_name
row_cells_column << record_user.student_id.present? ? (record_user.student_id.to_s + "\t") : "--" row_cells_column << (record_user.student_id.present? ? (record_user.student_id.to_s + "\t") : "--")
else else
row_cells_column << record.name row_cells_column << record.name
row_cells_column << record.teachers_name row_cells_column << record.teachers_name

@ -4,7 +4,6 @@ class ExerciseAnswersController < ApplicationController
include ExercisesHelper include ExercisesHelper
def create #每一次答案的点击,请求一次,实训题不在这里回答 def create #每一次答案的点击,请求一次,实训题不在这里回答
ActiveRecord::Base.transaction do
begin begin
q_type = @exercise_question.question_type #试卷的类型 q_type = @exercise_question.question_type #试卷的类型
choice_id = params[:exercise_choice_id].present? ? params[:exercise_choice_id] : "" choice_id = params[:exercise_choice_id].present? ? params[:exercise_choice_id] : ""
@ -31,8 +30,8 @@ class ExerciseAnswersController < ApplicationController
ea_ids = ea.pluck(:exercise_choice_id) ea_ids = ea.pluck(:exercise_choice_id)
common_answer_ids = choice_ids & ea_ids #已经存在的试卷选项id common_answer_ids = choice_ids & ea_ids #已经存在的试卷选项id
new_ids = choice_ids - common_answer_ids # 新增的id new_ids = (choice_ids - common_answer_ids).uniq # 新增的id
old_ids = ea_ids - common_answer_ids #没有选择的,则删掉 old_ids = (ea_ids - common_answer_ids).uniq #没有选择的,则删掉
if new_ids.size > 0 if new_ids.size > 0
new_ids.each do |e| new_ids.each do |e|
answer_option = { answer_option = {
@ -84,7 +83,6 @@ class ExerciseAnswersController < ApplicationController
raise ActiveRecord::Rollback raise ActiveRecord::Rollback
end end
end end
end
private private

@ -20,8 +20,8 @@ class HomeController < ApplicationController
shixuns = shixuns.where(homepage_show: true) shixuns = shixuns.where(homepage_show: true)
subjects = subjects.where(homepage_show: true) subjects = subjects.where(homepage_show: true)
else else
shixuns = shixuns.where(laboratory_shixuns: { homepage: true }) shixuns = shixuns.joins(:laboratory_shixuns).where(laboratory_shixuns: { homepage: true, laboratory_id: current_laboratory.id})
subjects = subjects.where(laboratory_subjects: { homepage: true }) subjects = subjects.joins(:laboratory_subjects).where(laboratory_subjects: { homepage: true, laboratory_id: current_laboratory.id})
end end
@shixuns = shixuns.includes(:tag_repertoires, :challenges).limit(8) @shixuns = shixuns.includes(:tag_repertoires, :challenges).limit(8)

@ -294,7 +294,7 @@ class HomeworkCommonsController < ApplicationController
HomeworksService.new.update_myshixun_work_score work, myshixun, games, @homework, challenge_settings HomeworksService.new.update_myshixun_work_score work, myshixun, games, @homework, challenge_settings
normal_status("更新成功") normal_status("更新成功")
else else
normal_status("开启挑战,暂不能更新成绩") normal_status("开启挑战,暂不能更新成绩")
end end
rescue Exception => e rescue Exception => e
uid_logger(e.message) uid_logger(e.message)
@ -591,6 +591,10 @@ class HomeworkCommonsController < ApplicationController
# tip_exception("challenge_id参数的长度与challenge_score参数的长度不匹配") if # tip_exception("challenge_id参数的长度与challenge_score参数的长度不匹配") if
# params[:challenge_settings][:challenge_score].length != params[:challenge_settings][:challenge_id].length # params[:challenge_settings][:challenge_score].length != params[:challenge_settings][:challenge_id].length
sum_challenge_score = params[:challenge_settings].pluck(:challenge_score).reject(&:blank?).map{|score| score.to_f}.sum
total_score = params[:work_efficiency] ? (params[:eff_score].to_f + sum_challenge_score) : sum_challenge_score
tip_exception("分值之和必须等于总分值:#{params[:total_score]}") if params[:total_score].to_f.round(2) != total_score.to_f.round(2)
current_eff_score = @homework.eff_score.to_f.round(2) current_eff_score = @homework.eff_score.to_f.round(2)
@homework.total_score = params[:total_score] @homework.total_score = params[:total_score]
@homework.work_efficiency = params[:work_efficiency] @homework.work_efficiency = params[:work_efficiency]

@ -6,11 +6,10 @@ class PollVotesController < ApplicationController
def create #每一次答案的点击,请求一次 def create #每一次答案的点击,请求一次
ActiveRecord::Base.transaction do
begin begin
question_votes = @poll_question.poll_votes question_votes = @poll_question.poll_votes
question_type = @poll_question.question_type question_type = @poll_question.question_type
question_answer_id = params[:poll_answer_id] ? params[:poll_answer_id] : nil #该答案的id question_answer_id = params[:poll_answer_id] ? params[:poll_answer_id] : -1 #该答案的id
question_answer_text = params[:vote_text].present? ? params[:vote_text] : nil #其他选项的内容 question_answer_text = params[:vote_text].present? ? params[:vote_text] : nil #其他选项的内容
user_votes = question_votes.find_current_vote("user_id",current_user.id) #当前用户的答案,可能有多个 user_votes = question_votes.find_current_vote("user_id",current_user.id) #当前用户的答案,可能有多个
# 当前用户的当前答案,如果已存在,当再次点击的时候,取消答案,即删除该答案 # 当前用户的当前答案,如果已存在,当再次点击的时候,取消答案,即删除该答案
@ -120,7 +119,6 @@ class PollVotesController < ApplicationController
raise ActiveRecord::Rollback raise ActiveRecord::Rollback
end end
end end
end
private private

@ -6,7 +6,9 @@ class Weapps::CodeSessionsController < Weapps::BaseController
logged = false logged = false
result = Wechat::Weapp.jscode2session(params[:code]) result = Wechat::Weapp.jscode2session(params[:code])
Rails.logger.info("###########result: #{result}")
Rails.logger.info("###########result: #{result['session_key']}")
Rails.logger.info("###########result: #{result['unionid']}")
# 能根据 code 拿到 unionid # 能根据 code 拿到 unionid
open_user = OpenUsers::Wechat.find_by(uid: result['unionid']) open_user = OpenUsers::Wechat.find_by(uid: result['unionid'])
if open_user.present? && open_user.user if open_user.present? && open_user.user

@ -1,6 +1,7 @@
class Weapps::CoursesController < Weapps::BaseController class Weapps::CoursesController < Weapps::BaseController
before_action :require_login before_action :require_login
before_action :set_course, :user_course_identity, except: [:create] before_action :set_course, :user_course_identity, except: [:create]
before_action :check_account, only: [:create]
before_action :teacher_allowed, only: [:edit, :update] before_action :teacher_allowed, only: [:edit, :update]
before_action :teacher_or_admin_allowed, only: [:change_member_roles, :delete_course_teachers] before_action :teacher_or_admin_allowed, only: [:change_member_roles, :delete_course_teachers]

@ -48,8 +48,9 @@ class Laboratory < ApplicationRecord
def shixuns def shixuns
if main_site? if main_site?
Shixun.where.not(id: laboratory_shixuns.pluck(:shixun_id)) not_shixun_ids = Shixun.joins(:laboratory_shixuns).where("laboratory_shixuns.laboratory_id != #{Laboratory.current.id}")
elsif sync_subject Shixun.where.not(id: not_shixun_ids.pluck(:shixun_id))
elsif sync_shixun
laboratory_shixun_ids = laboratory_shixuns.pluck(:shixun_id) laboratory_shixun_ids = laboratory_shixuns.pluck(:shixun_id)
school_shixun_ids = Shixun.joins("join user_extensions on shixuns.user_id=user_extensions.user_id").where(user_extensions: { school_id: school_id }).pluck(:id) school_shixun_ids = Shixun.joins("join user_extensions on shixuns.user_id=user_extensions.user_id").where(user_extensions: { school_id: school_id }).pluck(:id)
shixun_ids = laboratory_shixun_ids + school_shixun_ids shixun_ids = laboratory_shixun_ids + school_shixun_ids
@ -61,7 +62,8 @@ class Laboratory < ApplicationRecord
def subjects def subjects
if main_site? if main_site?
Subject.where.not(id: laboratory_subjects.pluck(:subject_id)) not_subject_ids = Subject.joins(:laboratory_subjects).where("laboratory_subjects.laboratory_id != #{Laboratory.current.id}")
Subject.where.not(id: not_subject_ids.pluck(:subject_id))
elsif sync_subject elsif sync_subject
laboratory_subject_ids = laboratory_subjects.pluck(:subject_id) laboratory_subject_ids = laboratory_subjects.pluck(:subject_id)
school_subject_ids = Subject.joins("join user_extensions on subjects.user_id=user_extensions.user_id").where(user_extensions: { school_id: school_id }).pluck(:id) school_subject_ids = Subject.joins("join user_extensions on subjects.user_id=user_extensions.user_id").where(user_extensions: { school_id: school_id }).pluck(:id)

@ -3,6 +3,12 @@ class ApplicationService
Error = Class.new(StandardError) Error = Class.new(StandardError)
def regix_emoji content
" " if content.blank?
regex = /[^a-zA-Z0-9\u4E00-\u9FFF]/
content.gsub(regex, '')
end
private private
def strip(str) def strip(str)

@ -17,7 +17,8 @@ class Oauth::CreateOrFindQqAccountService < ApplicationService
new_user = true new_user = true
# 新用户 # 新用户
login = User.generate_login('Q') login = User.generate_login('Q')
@user = User.new(login: login, nickname: params.dig('info', 'nickname'), type: 'User', status: User::STATUS_ACTIVE) #nickname = regix_emoji params.dig('info', 'nickname')
@user = User.new(login: login, type: 'User', status: User::STATUS_ACTIVE)
end end
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
@ -31,7 +32,7 @@ class Oauth::CreateOrFindQqAccountService < ApplicationService
Util.download_file(params.dig('info', 'image'), avatar_path) Util.download_file(params.dig('info', 'image'), avatar_path)
end end
new_open_user = OpenUsers::QQ.create!(user: user, uid: params['uid'], extra: params.dig('extra', 'raw_info')) new_open_user = OpenUsers::QQ.create!(user: user, uid: params['uid'])
Rails.cache.write(new_open_user.can_bind_cache_key, 1, expires_in: 1.hours) if new_user # 方便后面进行账号绑定 Rails.cache.write(new_open_user.can_bind_cache_key, 1, expires_in: 1.hours) if new_user # 方便后面进行账号绑定
end end

@ -24,7 +24,10 @@ class Oauth::CreateOrFindWechatAccountService < ApplicationService
new_user = true new_user = true
# 新用户 # 新用户
login = User.generate_login('w') login = User.generate_login('w')
@user = User.new(login: login, nickname: result['nickname'], type: 'User', status: User::STATUS_ACTIVE) # result['nickname'] = regix_emoji(result['nickname'])
@user = User.new(login: login, type: 'User', status: User::STATUS_ACTIVE)
#@user = User.new(login: login, nickname: result['nickname'], type: 'User', status: User::STATUS_ACTIVE)
end end
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
@ -39,7 +42,7 @@ class Oauth::CreateOrFindWechatAccountService < ApplicationService
Util.download_file(result['headimgurl'], avatar_path) Util.download_file(result['headimgurl'], avatar_path)
end end
new_open_user= OpenUsers::Wechat.create!(user: user, uid: result['unionid'], extra: result) new_open_user= OpenUsers::Wechat.create!(user: user, uid: result['unionid'])
Rails.cache.write(new_open_user.can_bind_cache_key, 1, expires_in: 1.hours) if new_user # 方便后面进行账号绑定 Rails.cache.write(new_open_user.can_bind_cache_key, 1, expires_in: 1.hours) if new_user # 方便后面进行账号绑定
end end

@ -44,7 +44,7 @@ class SearchService < ApplicationService
when 'subject' then when 'subject' then
{ where: { id: Laboratory.current.subjects.pluck(:id) } } { where: { id: Laboratory.current.subjects.pluck(:id) } }
when 'course' then when 'course' then
{ where: { id: Laboratory.current.all_courses } } { where: { id: Laboratory.current.all_courses.pluck(:id) } }
else else
{} {}
end end

@ -20,7 +20,7 @@ class ShixunSearchService < ApplicationService
if type == "mine" if type == "mine"
@shixuns = @shixuns.where(id: User.current.shixuns) @shixuns = @shixuns.where(id: User.current.shixuns)
else else
if User.current.admin? || User.current.business? if User.current.admin? || User.current.business? || !User.current.school_id
@shixuns = @shixuns.where(hidden: 0) @shixuns = @shixuns.where(hidden: 0)
else else
none_shixun_ids = ShixunSchool.where("school_id != #{User.current.school_id}").pluck(:shixun_id) none_shixun_ids = ShixunSchool.where("school_id != #{User.current.school_id}").pluck(:shixun_id)

@ -21,7 +21,7 @@ class Users::ShixunService
def category_scope_shixuns def category_scope_shixuns
case params[:category] case params[:category]
when 'study' then when 'study' then
laboratory.shixuns.where(id: user.study_shixuns) user.study_shixuns.where(shixuns: {id: laboratory.shixuns})
when 'manage' then when 'manage' then
laboratory.shixuns.where(id: user.shixuns) laboratory.shixuns.where(id: user.shixuns)
else else
@ -43,8 +43,6 @@ class Users::ShixunService
def user_policy_filter(relations) def user_policy_filter(relations)
# 只有自己或者管理员才有过滤筛选及查看全部状态下实训功能 # 只有自己或者管理员才有过滤筛选及查看全部状态下实训功能
Rails.logger.info("self_or_admin?: #{self_or_admin?}")
Rails.logger.info("user: #{user.id}")
if self_or_admin? if self_or_admin?
relations = relations.where.not(status: -1) relations = relations.where.not(status: -1)
status_filter(relations) status_filter(relations)

@ -18,6 +18,7 @@ json.shixun_list do
json.title highlights.delete(:name)&.join('...') || obj.searchable_title json.title highlights.delete(:name)&.join('...') || obj.searchable_title
json.description highlights[:description]&.join('...') || Util.extract_content(obj.description)[0..300]&.gsub(atta_reg, '') json.description highlights[:description]&.join('...') || Util.extract_content(obj.description)[0..300]&.gsub(atta_reg, '')
json.pic url_to_avatar(obj)
json.content highlights json.content highlights
json.level level_to_s(obj.trainee) json.level level_to_s(obj.trainee)
json.subjects obj.subjects.uniq do |subject| json.subjects obj.subjects.uniq do |subject|

@ -6,6 +6,7 @@ json.members_count course.course_members_count
json.homework_commons_count get_tasks_count course json.homework_commons_count get_tasks_count course
json.attachments_count course.attachments.count json.attachments_count course.attachments.count
json.visits course.visits json.visits course.visits
json.school course.school&.name
json.first_category_url module_url(course.course_modules.where(hidden: 0).order(position: :desc).first, course) json.first_category_url module_url(course.course_modules.where(hidden: 0).order(position: :desc).first, course)

@ -0,0 +1,17 @@
class AddUniqIndexToExerciseAnswer < ActiveRecord::Migration[5.2]
def change
remove_index :exercise_answers, column: [:exercise_question_id, :user_id]
change_column_default :exercise_answers, :exercise_choice_id, from: nil, to: -1
ExerciseAnswer.where(exercise_choice_id: nil).update_all(exercise_choice_id: -1)
sql = %Q(delete from exercise_answers where (exercise_question_id, user_id, exercise_choice_id) in
(select * from (select exercise_question_id, user_id, exercise_choice_id from exercise_answers group by exercise_question_id, user_id, exercise_choice_id having count(*) > 1) a)
and id not in (select * from (select min(id) from exercise_answers group by exercise_question_id, user_id, exercise_choice_id having count(*) > 1 order by id) b))
ActiveRecord::Base.connection.execute sql
add_index :exercise_answers, [:exercise_question_id, :user_id, :exercise_choice_id], name: 'exercise_choice_index', unique: true
end
end

@ -0,0 +1,16 @@
class AddUniqIndexToPollVotes < ActiveRecord::Migration[5.2]
def change
remove_index :poll_votes, column: [:poll_question_id, :user_id]
change_column_default :poll_votes, :poll_question_id, from: nil, to: -1
PollVote.where(poll_answer_id: nil).update_all(poll_answer_id: -1)
sql = %Q(delete from poll_votes where (poll_question_id, user_id, poll_answer_id) in
(select * from (select poll_question_id, user_id, poll_answer_id from poll_votes group by poll_question_id, user_id, poll_answer_id having count(*) > 1) a)
and id not in (select * from (select min(id) from poll_votes group by poll_question_id, user_id, poll_answer_id having count(*) > 1 order by id) b))
ActiveRecord::Base.connection.execute sql
add_index :poll_votes, [:poll_question_id, :user_id, :poll_answer_id], name: 'poll_answer_index', unique: true
end
end

File diff suppressed because one or more lines are too long

@ -139935,6 +139935,29 @@ $(document).on('turbolinks:load', function() {
} }
}) })
; ;
$(document).on('turbolinks:load', function(){
if ($('body.admins-shixun-feedback-messages-index-page').length > 0) {
var baseOptions = {
autoclose: true,
language: 'zh-CN',
format: 'yyyy-mm-dd 00:00:00',
startDate: '2017-04-01'
}
var defineDateRangeSelect = function(element){
var options = $.extend({inputs: $(element).find('.start-date, .end-date')}, baseOptions);
$(element).datepicker(options);
$(element).find('.start-date').datepicker().on('changeDate', function(e){
$(element).find('.end-date').datepicker('setStartDate', e.date);
})
};
defineDateRangeSelect('.grow-date-input-daterange');
}
})
;
$(document).on('turbolinks:load', function() { $(document).on('turbolinks:load', function() {
if ($('body.admins-shixun-settings-index-page').length > 0) { if ($('body.admins-shixun-settings-index-page').length > 0) {
let searchContainer = $(".shixun-settings-list-form"); let searchContainer = $(".shixun-settings-list-form");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -11,7 +11,8 @@ const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter'); const eslintFormatter = require('react-dev-utils/eslintFormatter');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin'); const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); // const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
// const TerserPlugin = require('terser-webpack-plugin');
const paths = require('./paths'); const paths = require('./paths');
const getClientEnvironment = require('./env'); const getClientEnvironment = require('./env');
@ -55,6 +56,10 @@ const extractTextPluginOptions = shouldUseRelativeAssetPaths
// 上线用的 // 上线用的
// console.log('publicPath ', publicPath) // console.log('publicPath ', publicPath)
module.exports = { module.exports = {
// optimization: {
// minimize: true,
// minimizer: [new TerserPlugin()],
// },
// externals: { // externals: {
// 'react': 'window.React' // 'react': 'window.React'
// }, // },
@ -372,7 +377,7 @@ module.exports = {
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
// You can remove this if you don't use Moment.js: // You can remove this if you don't use Moment.js:
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new MonacoWebpackPlugin(), // new MonacoWebpackPlugin(),
], ],
// Some libraries import Node modules but don't use them in the browser. // Some libraries import Node modules but don't use them in the browser.
// Tell Webpack to provide empty mocks for them so importing them works. // Tell Webpack to provide empty mocks for them so importing them works.

@ -15,6 +15,7 @@ import actions from '../../redux/actions';
import MultipTags from './components/multiptags'; import MultipTags from './components/multiptags';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import CONST from '../../constants'; import CONST from '../../constants';
import { withRouter } from 'react-router';
const {tagBackground, diffText} = CONST; const {tagBackground, diffText} = CONST;
const { Search } = Input; const { Search } = Input;
@ -96,10 +97,11 @@ const testMaps = {
} }
} }
class DeveloperHome extends React.PureComponent {
/** /**
* 表格列 * 表格列
*/ */
const options = { options = {
title: '操作', title: '操作',
key: 'action', key: 'action',
fixed: 'right', fixed: 'right',
@ -112,11 +114,12 @@ const options = {
</span> </span>
), ),
} }
const columns = [
columns = [
{ {
title: '标题', title: '标题',
dataIndex: 'name', dataIndex: 'name',
render: (name, record) => <Link style={{ color: '#459be5' }} to={`/myproblems/${record.identifier}`}>{name}</Link> render: (name, record) => <Button type="link" onClick={() => this.handleNameClick(record)} className={'oj_item_name'}>{name}</Button>
}, },
{ {
title: '分类', title: '分类',
@ -155,7 +158,6 @@ const columns = [
}, },
]; ];
class DeveloperHome extends React.PureComponent {
state = { state = {
data: [], data: [],
loading: false, loading: false,
@ -170,7 +172,7 @@ class DeveloperHome extends React.PureComponent {
page: 1, // 当前页数 page: 1, // 当前页数
limit: 10 // 每页显示条件 limit: 10 // 每页显示条件
}, },
columns: columns, columns: this.columns,
searchInfo: [] searchInfo: []
}; };
@ -179,7 +181,7 @@ class DeveloperHome extends React.PureComponent {
const { isMySource } = this.props; const { isMySource } = this.props;
if (isMySource) { if (isMySource) {
this.handleFilterSearch({come_from: 'mine'}); this.handleFilterSearch({come_from: 'mine'});
let _columns = columns.concat([options]); let _columns = this.columns.concat([this.options]);
this.setState({ this.setState({
columns: _columns columns: _columns
}); });
@ -309,13 +311,13 @@ class DeveloperHome extends React.PureComponent {
this.handleFilterSearch({come_from: item.key === 'all' ? '' : item.key}); this.handleFilterSearch({come_from: item.key === 'all' ? '' : item.key});
if (item.key !== 'all') { if (item.key !== 'all') {
let _columns = columns.concat([options]); let _columns = this.columns.concat([this.options]);
this.setState({ this.setState({
columns: _columns columns: _columns
}); });
} else { } else {
this.setState({ this.setState({
columns: columns columns: this.columns
}) })
} }
} }
@ -333,10 +335,19 @@ class DeveloperHome extends React.PureComponent {
}); });
if (info.type === 'come_from' && info.key === 'mine') { if (info.type === 'come_from' && info.key === 'mine') {
this.setState({ this.setState({
columns: columns columns: this.columns
}); });
} }
} }
// 点击name
handleNameClick = (record) => {
console.log('name has click', record);
// 先调用start接口获取返回的 identifier, 再跳转到开启编辑
this.props.startProgramQuestion(record.identifier, this.props);
}
render () { render () {
// const { testReducer, handleClick } = this.props; // const { testReducer, handleClick } = this.props;
const { const {
@ -453,10 +464,11 @@ const mapDispatchToProps = (dispatch) => ({
handleClick: () => dispatch(actions.toggleTodo()), handleClick: () => dispatch(actions.toggleTodo()),
fetchOJList: (params) => dispatch(actions.getOJList(params)), fetchOJList: (params) => dispatch(actions.getOJList(params)),
changePaginationInfo: (obj) => dispatch(actions.changePaginationInfo(obj)), changePaginationInfo: (obj) => dispatch(actions.changePaginationInfo(obj)),
startProgramQuestion: (id, props) => dispatch(actions.startProgramQuestion(id, props))
}); });
export default connect( export default withRouter(connect(
mapStateToProps, mapStateToProps,
mapDispatchToProps mapDispatchToProps
)(DeveloperHome); )(DeveloperHome));
// export default DeveloperHome; // export default DeveloperHome;

@ -72,4 +72,8 @@
color: #fff; color: #fff;
} }
} }
.oj_item_name{
color: #459be5;
cursor: pointer;
}
} }

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-25 09:46:03 * @Date: 2019-11-25 09:46:03
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-11-27 19:28:50 * @LastEditTime: 2019-11-29 15:04:12
*/ */
import 'quill/dist/quill.core.css'; import 'quill/dist/quill.core.css';
import 'quill/dist/quill.bubble.css'; import 'quill/dist/quill.bubble.css';
@ -38,7 +38,6 @@ const defaultOptions = [
* @description 抽取一个React编辑器组件基于Quill * @description 抽取一个React编辑器组件基于Quill
* @class QuillEditor类 * @class QuillEditor类
* @param [object] props 接收的属性 * @param [object] props 接收的属性
*
* props: { * props: {
* options: {} // 编辑器配置信息, 不传使用 defaultOptions, 传了的话 使用用户自定义的, * options: {} // 编辑器配置信息, 不传使用 defaultOptions, 传了的话 使用用户自定义的,
* placeholder: '' // 编辑器提示信息 * placeholder: '' // 编辑器提示信息
@ -71,7 +70,7 @@ class QuillEditor extends React.Component {
toolbar: renderOptions toolbar: renderOptions
}, },
readOnly, readOnly,
theme: 'snow', theme: readOnly ? 'bubble' : 'snow',
} }
// 实例化 Quill 编辑器 // 实例化 Quill 编辑器
quillEditor = new Quill(this.editorRef.current, editorOption); quillEditor = new Quill(this.editorRef.current, editorOption);
@ -122,12 +121,15 @@ class QuillEditor extends React.Component {
render () { render () {
const styles = this.props.style || {} const styles = this.props.style || {}
return ( return (
<div>
<div <div
id="quill_editor" id="quill_editor"
style={styles} style={styles}
className={'quill_editor_area'} className={'quill_editor_area'}
ref={this.editorRef}> ref={this.editorRef}>
</div> </div>
</div>
); );
} }
} }

@ -1,3 +1,4 @@
.quill_editor_area{ .quill_editor_area{
height: 300px; height: 300px;
overflow-y: auto;
} }

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-23 10:53:19 * @Date: 2019-11-23 10:53:19
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-11-29 08:56:18 * @LastEditTime: 2019-11-29 20:00:34
*/ */
import './index.scss'; import './index.scss';
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
@ -20,9 +20,10 @@ import actions from '../../../redux/actions';
const StudentStudy = (props) => { const StudentStudy = (props) => {
useEffect(() => { useEffect(() => {
const { match: { params }, startProgramQuestion } = props; const { match: { params }, getUserProgramDetail } = props;
let { id } = params; let { id } = params;
startProgramQuestion(id); // startProgramQuestion(id);
getUserProgramDetail(id);
}, []); }, []);
return ( return (
<div className={'student_study_warp'}> <div className={'student_study_warp'}>
@ -61,7 +62,9 @@ const mapStateToProps = (state) => ({});
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({
// 调用开启编辑 // 调用开启编辑
startProgramQuestion: (id) => dispatch(actions.startProgramQuestion(id)) // startProgramQuestion: (id) => dispatch(actions.startProgramQuestion(id))
// 调用编程题详情
getUserProgramDetail: (id) => dispatch(actions.getUserProgramDetail(id))
}); });
export default connect( export default connect(

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-27 09:49:30 * @Date: 2019-11-27 09:49:30
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-11-27 19:36:41 * @LastEditTime: 2019-11-29 13:46:11
*/ */
import '../index.scss'; import '../index.scss';
import React from 'react'; import React from 'react';

@ -33,13 +33,15 @@ function getModeByMirrorName(mirror_name) {
return mode; return mode;
} }
const _extraKeys = {"Alt-/": "autocomplete"}; const _extraKeys = {"Alt-/": "autocomplete"};
function createCMOptions(mirror_name) { function createCMOptions(mirror_name, theme) {
let mode = getModeByMirrorName(mirror_name) let mode = getModeByMirrorName(mirror_name)
let cmOptions = { let cmOptions = {
lineNumbers: true, lineNumbers: true,
mode: mode, mode: mode,
theme: "railscasts", // theme: "railscasts",
// theme: "vs-dark",
theme: theme,
indentUnit:4, indentUnit:4,
matchBrackets: true, matchBrackets: true,
autoRefresh: true, autoRefresh: true,
@ -97,6 +99,7 @@ class TPICodeMirror extends Component {
super(props) super(props)
this.state = { this.state = {
cmFontSize: fromStore('cmFontSize', 16), cmFontSize: fromStore('cmFontSize', 16),
cmCodeMode: fromStore('cmCodeMode', 'vs-dark'),
autoCompleteSwitch: fromStore('autoCompleteSwitch', true), autoCompleteSwitch: fromStore('autoCompleteSwitch', true),
} }
} }
@ -114,7 +117,7 @@ class TPICodeMirror extends Component {
} }
} }
componentDidMount() { componentDidMount() {
let cmOptions = createCMOptions(this.props.mirror_name) let cmOptions = createCMOptions(this.props.mirror_name, this.state.cmCodeMode)
extend_editor = window.CodeMirror.fromTextArea(window.$('#extend-challenge-file-edit')[0] extend_editor = window.CodeMirror.fromTextArea(window.$('#extend-challenge-file-edit')[0]
, cmOptions); , cmOptions);
@ -241,6 +244,12 @@ class TPICodeMirror extends Component {
this.setState({ cmFontSize: value }); this.setState({ cmFontSize: value });
} }
onCodeModeChange = (value) => {
toStore('cmCodeMode', value);
this.setState({ cmCodeMode: value });
window.monaco.editor.setTheme(value);
}
render() { render() {
const { repositoryCode, showSettingDrawer, settingDrawerOpen } = this.props; const { repositoryCode, showSettingDrawer, settingDrawerOpen } = this.props;
const { cmFontSize } = this.state; const { cmFontSize } = this.state;
@ -259,6 +268,7 @@ class TPICodeMirror extends Component {
> >
<TPICodeSetting {...this.props} {...this.state} <TPICodeSetting {...this.props} {...this.state}
onFontSizeChange={this.onFontSizeChange} onFontSizeChange={this.onFontSizeChange}
onCodeModeChange={this.onCodeModeChange}
onAutoCompleteSwitchChange={this.onAutoCompleteSwitchChange} onAutoCompleteSwitchChange={this.onAutoCompleteSwitchChange}
></TPICodeSetting> ></TPICodeSetting>
</Drawer> </Drawer>

@ -18,12 +18,12 @@ class TPICodeSetting extends Component {
render() { render() {
const { autoCompleteSwitch, onAutoCompleteSwitchChange, onFontSizeChange const { autoCompleteSwitch, onAutoCompleteSwitchChange, onFontSizeChange
, cmFontSize, , cmFontSize, cmCodeMode,
onCodeModeChange,
shixun } = this.props; shixun } = this.props;
const task_pass = shixun.task_pass const task_pass = shixun.task_pass
const forbid_copy = shixun.forbid_copy const forbid_copy = shixun.forbid_copy
const test_set_permission = shixun.test_set_permission const test_set_permission = shixun.test_set_permission
return ( return (
<div className="ide-settings--content"> <div className="ide-settings--content">
<style>{` <style>{`
@ -54,6 +54,25 @@ class TPICodeSetting extends Component {
</div> </div>
</div> </div>
</div>*/} </div>*/}
<div className="-layout-h -center -justify-between">
<div className="ide-settings--item-key">显示模式</div>
<div className="ide-settings--item-value">
<div className="select -view-flat -value">
<div className="-layout-v -start">
<div className="select--wrapper -layout-h -center -justify" >
<Select
style={{ width: '120px' }}
value={cmCodeMode}
onChange={onCodeModeChange}
>
<Option value={'vs'}>白色背景</Option>
<Option value={'vs-dark'}>黑色背景</Option>
</Select>
</div>
</div>
</div>
</div>
</div>
<div className="-layout-h -center -justify-between"> <div className="-layout-h -center -justify-between">
<div className="ide-settings--item-key">字体大小</div> <div className="ide-settings--item-key">字体大小</div>
<div className="ide-settings--item-value"> <div className="ide-settings--item-value">
@ -61,6 +80,7 @@ class TPICodeSetting extends Component {
<div className="-layout-v -start"> <div className="-layout-v -start">
<div className="select--wrapper -layout-h -center -justify" > <div className="select--wrapper -layout-h -center -justify" >
<Select <Select
style={{ width: '120px' }}
value={cmFontSize} value={cmFontSize}
onChange={onFontSizeChange}> onChange={onFontSizeChange}>
<Option value={12}>12px</Option> <Option value={12}>12px</Option>

@ -93,7 +93,7 @@
.monaco-editor .monaco-editor-hover code { background-color: rgba(10, 10, 10, 0.4); } .monaco-editor .monaco-editor-hover code { background-color: rgba(10, 10, 10, 0.4); }
.monaco-editor .goto-definition-link { color: #4e94ce !important; } .monaco-editor .goto-definition-link { color: #4e94ce !important; }
.mtk1 { color: #d4d4d4 !important; } /* .mtk1 { color: #d4d4d4 !important; }
.mtk2 { color: #1e1e1e !important; } .mtk2 { color: #1e1e1e !important; }
.mtk3 { color: #cc6666 !important; } .mtk3 { color: #cc6666 !important; }
.mtk4 { color: #9cdcfe !important; } .mtk4 { color: #9cdcfe !important; }
@ -116,7 +116,7 @@
.mtk21 { color: #4f76ac !important; } .mtk21 { color: #4f76ac !important; }
.mtk22 { color: #3dc9b0 !important; } .mtk22 { color: #3dc9b0 !important; }
.mtk23 { color: #74b0df !important; } .mtk23 { color: #74b0df !important; }
.mtk24 { color: #4864aa !important; } .mtk24 { color: #4864aa !important; } */
.mtki { font-style: italic; } .mtki { font-style: italic; }
.mtkb { font-weight: bold; } .mtkb { font-weight: bold; }
.mtku { text-decoration: underline; text-underline-position: under; } .mtku { text-decoration: underline; text-underline-position: under; }

@ -17,10 +17,11 @@ import * as monaco from 'monaco-editor'
import { fromStore, toStore } from 'educoder' import { fromStore, toStore } from 'educoder'
import './TPIMonacoConfig' import './TPIMonacoConfig'
import { isThisSecond } from 'date-fns';
// https://microsoft.github.io/monaco-editor/playground.html#customizing-the-appearence-exposed-colors // https://microsoft.github.io/monaco-editor/playground.html#customizing-the-appearence-exposed-colors
monaco.editor.defineTheme('myCoolTheme', { monaco.editor.defineTheme('myCoolTheme', {
base: 'vs-dark', base: 'vs', // vs、vs-dark、hc-black
inherit: true, inherit: true,
rules: [ rules: [
{ token: 'green', background: 'FF0000', foreground: '00FF00', fontStyle: 'italic'}, { token: 'green', background: 'FF0000', foreground: '00FF00', fontStyle: 'italic'},
@ -213,6 +214,7 @@ class TPIMonaco extends Component {
loadMonacoResouce(); loadMonacoResouce();
this.state = { this.state = {
cmFontSize: fromStore('cmFontSize', 16), cmFontSize: fromStore('cmFontSize', 16),
cmCodeMode: fromStore('cmCodeMode', 'vs-dark'),
autoCompleteSwitch: fromStore('autoCompleteSwitch', true), autoCompleteSwitch: fromStore('autoCompleteSwitch', true),
} }
} }
@ -243,7 +245,6 @@ class TPIMonaco extends Component {
editor_monaco.setValue(this.props.repositoryCode) editor_monaco.setValue(this.props.repositoryCode)
} }
// 代码没变也需要layout可能从命令行自动切回了代码tab // 代码没变也需要layout可能从命令行自动切回了代码tab
editor_monaco.layout();
// Clears the editor's undo history. // Clears the editor's undo history.
// TODO // TODO
@ -290,11 +291,12 @@ class TPIMonaco extends Component {
language: lang, language: lang,
// language: 'css', // language: 'css',
// theme: "vs-dark", // theme: "vs",
theme: "myCoolTheme", theme: this.state.cmCodeMode,
// theme: 'myCoolTheme',
insertSpaces: false, insertSpaces: false,
fontSize: this.state.cmFontSize fontSize: this.state.cmFontSize,
// theme: this.state.cdCodeMode
}); });
window.editor_monaco = editor; window.editor_monaco = editor;
@ -368,10 +370,17 @@ class TPIMonaco extends Component {
} }
onFontSizeChange = (value) => { onFontSizeChange = (value) => {
toStore('cmFontSize', value) toStore('cmFontSize', value)
this.setState({ cmFontSize: value });
this.editor_monaco.updateOptions({fontSize: value}) this.editor_monaco.updateOptions({fontSize: value})
}
this.setState({ cmFontSize: value }); onCodeModeChange = (value) => {
toStore('cmCodeMode', value);
this.setState({ cmCodeMode: value });
window.monaco.editor.setTheme(value);
} }
onAutoCompleteSwitchChange = () => { onAutoCompleteSwitchChange = () => {
} }
@ -393,6 +402,7 @@ class TPIMonaco extends Component {
> >
<TPICodeSetting {...this.props} {...this.state} <TPICodeSetting {...this.props} {...this.state}
onFontSizeChange={this.onFontSizeChange} onFontSizeChange={this.onFontSizeChange}
onCodeModeChange={this.onCodeModeChange}
onAutoCompleteSwitchChange={this.onAutoCompleteSwitchChange} onAutoCompleteSwitchChange={this.onAutoCompleteSwitchChange}
></TPICodeSetting> ></TPICodeSetting>
</Drawer> </Drawer>

@ -20,6 +20,7 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$; const $ = window.$;
const versionNum = '0001'; const versionNum = '0001';
const timestamp = Date.parse(new Date());
// let _url_origin = getUrl() // let _url_origin = getUrl()
let _url_origin=''; let _url_origin='';
if(window.location.port === "3007"){ if(window.location.port === "3007"){
@ -35,14 +36,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`)); // .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?8`)); .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?${timestamp}`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?8`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?${timestamp}`));
// index.html有加载 // index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?8`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?${timestamp}`));
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')

@ -345,7 +345,7 @@ class InfosCourse extends Component{
</p> </p>
<span><img alt="用户" className="radius mt15" height="60" src={getImageUrl('images/'+`${item.teacher && item.teacher.avatar_url}`)} width="60"/></span> <span><img alt="用户" className="radius mt15" height="60" src={getImageUrl('images/'+`${item.teacher && item.teacher.avatar_url}`)} width="60"/></span>
<p className="font-14 mt10 task-hide"><span>{item.teacher && item.teacher.real_name}</span></p> <p className="font-14 mt10 task-hide"><span>{item.teacher && item.teacher.real_name}</span></p>
<p className="font-16 mb15 task-hide mt10"><span className="color-grey-98">{item.teacher && item.teacher.school_name}</span></p> <p className="font-16 mb15 task-hide mt10"><span className="color-grey-98">{item&&item.school}</span></p>
</div> </div>
<div className="edu-txt-center course-bottom"> <div className="edu-txt-center course-bottom">
<div className="inline color-grey-6"> <div className="inline color-grey-6">

@ -36,6 +36,7 @@ import {
saveUserInputCode, saveUserInputCode,
changeUserCodeTab, changeUserCodeTab,
submitUserCode, submitUserCode,
getUserProgramDetail
// isUpdateCodeCtx // isUpdateCodeCtx
} from './ojForUser'; } from './ojForUser';
@ -79,6 +80,7 @@ export default {
changeSubmitLoadingStatus, changeSubmitLoadingStatus,
submitUserCode, submitUserCode,
changePublishLoadingStatus, changePublishLoadingStatus,
isMyPublish isMyPublish,
getUserProgramDetail
// isUpdateCodeCtx // isUpdateCodeCtx
} }

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-27 13:42:11 * @Date: 2019-11-27 13:42:11
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-11-29 12:03:51 * @LastEditTime: 2019-11-29 20:07:09
*/ */
import types from "./actionTypes"; import types from "./actionTypes";
import { Base64 } from 'js-base64'; import { Base64 } from 'js-base64';
@ -19,7 +19,7 @@ import {
} from "../../services/ojService"; } from "../../services/ojService";
// 进入编程页面时,首先调用开启编程题接口 // 进入编程页面时,首先调用开启编程题接口
export const startProgramQuestion = (id) => { export const startProgramQuestion = (id, props) => {
return (dispatch) => { return (dispatch) => {
fetchStartProgram(id).then(res => { fetchStartProgram(id).then(res => {
const { status, data } = res; const { status, data } = res;
@ -29,7 +29,18 @@ export const startProgramQuestion = (id) => {
type: types.SAVE_USER_PROGRAM_ID, type: types.SAVE_USER_PROGRAM_ID,
payload: identifier payload: identifier
}); });
// 跳转至开启编程
props.history.push(`/myproblems/${identifier}`);
// Redirect.to
}
})
}
}
// 获取用户编程题详情
export const getUserProgramDetail = (identifier) => {
// 调用用户编程详情接口 // 调用用户编程详情接口
return (dispatch) => {
fetchUserProgramDetail(identifier).then(res => { fetchUserProgramDetail(identifier).then(res => {
const { status, data = {} } = res; const { status, data = {} } = res;
if (status === 200) { if (status === 200) {
@ -38,9 +49,7 @@ export const startProgramQuestion = (id) => {
payload: data payload: data
}); });
} }
}) });
}
})
} }
} }

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-20 16:35:46 * @Date: 2019-11-20 16:35:46
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-11-28 21:21:56 * @LastEditTime: 2019-11-29 18:55:43
*/ */
import types from './actionTypes'; import types from './actionTypes';
import CONST from '../../constants'; import CONST from '../../constants';
@ -204,7 +204,7 @@ export const validateOjForm = (props, type) => {
payload: true payload: true
}); });
setTimeout(() => { setTimeout(() => {
props.history.push('/developer'); props.history.push('/problems');
}, 1000); }, 1000);
} }

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-27 13:41:48 * @Date: 2019-11-27 13:41:48
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-11-28 17:34:13 * @LastEditTime: 2019-11-29 20:07:57
*/ */
import types from "../actions/actionTypes"; import types from "../actions/actionTypes";
import { Base64 } from 'js-base64'; import { Base64 } from 'js-base64';

@ -20,6 +20,7 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$; const $ = window.$;
const versionNum = '0001'; const versionNum = '0001';
const timestamp = Date.parse(new Date());
// let _url_origin = getUrl() // let _url_origin = getUrl()
let _url_origin=''; let _url_origin='';
if(window.location.port === "3007"){ if(window.location.port === "3007"){
@ -35,14 +36,14 @@ if (!window['indexHOCLoaded']) {
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`)); // .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?8`)); .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?${timestamp}`));
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?8`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?${timestamp}`));
// index.html有加载 // index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?8`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?${timestamp}`));
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')

@ -3795,3 +3795,7 @@ a.singlepublishtwo{
.fontweightbold{ .fontweightbold{
font-weight: bold !important; font-weight: bold !important;
} }
.ant-drawer{
z-index: 10000 !important;
}
Loading…
Cancel
Save