Merge branch 'dev_aliyun' into dev_cxt2

dev_cxt2
cxt 5 years ago
commit 864e913f5b

@ -115,7 +115,7 @@ $(document).on('turbolinks:load', function(){
minimumInputLength: 1, minimumInputLength: 1,
ajax: { ajax: {
delay: 500, delay: 500,
url: '/api/schools/for_option.json', url: '/api/schools/search.json',
dataType: 'json', dataType: 'json',
data: function(params){ data: function(params){
return { keyword: params.term }; return { keyword: params.term };

@ -0,0 +1,90 @@
$(document).on('turbolinks:load', function() {
var $modal = $('.modal.admin-select-school-modal');
if ($modal.length > 0) {
var $link = null;
var $form = $modal.find('form.admin-select-school-form');
var multiple = $form.data('multiple');
$form.find('.school-select').select2({
theme: 'bootstrap4',
placeholder: '请选择',
multiple: multiple,
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/api/schools/search.json',
dataType: 'json',
data: function (params) {
return {keyword: params.term};
},
processResults: function (data) {
return {results: data.schools}
}
},
templateResult: function (item) {
if (!item.id || item.id === '') return item.text;
var html = "<span>" + item.name + "<span class='ml-4 font-12'>";
if(item.province){ html += item.province }
html += "</span></span>";
return $(html);
},
templateSelection: function (item) {
if (item.id) {
}
return item.name || item.text;
}
});
$form.validate({
errorElement: 'span',
errorClass: 'danger text-danger',
rules: {
school_ids: {
required: true
}
},
messages: {
school_ids: {
required: '请选择'
}
}
});
$modal.on('show.bs.modal', function(event){
$link = $(event.relatedTarget);
});
$modal.on('hide.bs.modal', function(){
$form.find('.error').html('');
$form.find('.school-select').select2('val', ' ');
});
$modal.on('click', '.submit-btn', function(){
$form.find('.error').html('');
if($form.valid()){
var url = $form.data('url');
var schoolIds = $form.find('#school_ids').val();
$.ajax({
method: 'POST',
dataType: 'json',
url: url,
data: { school_ids: schoolIds },
success: function(){
$.notify({ message: '操作成功' });
$modal.modal('hide');
setTimeout(function(){
window.location.reload();
}, 500);
},
error: function(res){
var data = res.responseJSON;
$form.find('.error').html(data.message);
}
});
}
});
}
});

@ -9,7 +9,7 @@ $(document).on('turbolinks:load', function () {
minimumInputLength: 1, minimumInputLength: 1,
ajax: { ajax: {
delay: 500, delay: 500,
url: '/api/schools/for_option.json', url: '/api/schools/search.json',
dataType: 'json', dataType: 'json',
data: function (params) { data: function (params) {
return {keyword: params.term}; return {keyword: params.term};

@ -0,0 +1,38 @@
class Admins::CustomersController < Admins::BaseController
helper_method :current_partner
def index
default_sort('created_at', 'desc')
customers = Admins::CustomerQuery.call(params.merge(partner_id: current_partner.id))
@customers = paginate(customers.preload(:school))
end
def create
params[:school_ids] = Array.wrap(params[:school_ids])
school_ids = School.where(id: params[:school_ids]).pluck(:id)
ActiveRecord::Base.transaction do
school_ids.each do |school_id|
next if current_partner.customers.exists?(school_id)
customer = Customer.create!(school_id: school_id)
current_partner.partner_customers.create!(customer: customer)
end
end
render_ok
end
def destroy
current_partner.customers.find(params[:id]).destroy!
render_delete_success
end
private
def current_partner
@_current_partner ||= Partner.find(params[:partner_id])
end
end

@ -0,0 +1,29 @@
class Admins::PartnersController < Admins::BaseController
def index
default_sort('created_at', 'desc')
partners = Admins::PartnerQuery.call(params)
@partners = paginate(partners.preload(:school))
end
def create
params[:school_ids] = Array.wrap(params[:school_ids])
school_ids = School.where(id: params[:school_ids]).pluck(:id)
exist_school_ids = Partner.where(school_id: school_ids).pluck(:school_id)
Partner.bulk_insert(*%i[school_id created_at updated_at]) do |worker|
(school_ids - exist_school_ids).each do |school_id|
worker.add(school_id: school_id)
end
end
render_ok
end
def destroy
Partner.find(params[:id]).destroy!
render_delete_success
end
end

@ -886,7 +886,7 @@ class ExercisesController < ApplicationController
ex_user_ids = exercise_users.pluck(:id) ex_user_ids = exercise_users.pluck(:id)
EndExerciseCalculateJob.perform_later(ex_user_ids,exercise,Time.now) EndExerciseCalculateJob.perform_later(ex_user_ids,exercise,Time.now.to_s)
# exercise_users.each do |user| # exercise_users.each do |user|
# if user.commit_status == 0 && user.start_at.present? # if user.commit_status == 0 && user.start_at.present?
# objective_score = calculate_student_score(exercise,user.user)[:total_score] # objective_score = calculate_student_score(exercise,user.user)[:total_score]
@ -1068,7 +1068,7 @@ class ExercisesController < ApplicationController
rescue Exception => e rescue Exception => e
uid_logger_error(e.message) uid_logger_error(e.message)
tip_exception("页面调用失败!") tip_exception(e.message)
raise ActiveRecord::Rollback raise ActiveRecord::Rollback
end end
end end
@ -1123,7 +1123,7 @@ class ExercisesController < ApplicationController
# 学生提交试卷 # 学生提交试卷
def commit_exercise def commit_exercise
tip_exception(-1, "试卷已提交") if @answer_committed_user.commit_status == 1 tip_exception(0, "试卷截止时间已到,系统已自动提交") if @answer_committed_user.commit_status == 1
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
begin begin
can_commit_exercise = false can_commit_exercise = false

@ -17,4 +17,13 @@ class SchoolsController < ApplicationController
render_ok(schools: schools.select(:id, :name).as_json) render_ok(schools: schools.select(:id, :name).as_json)
end end
def search
schools = School.all
keyword = params[:keyword].to_s.strip
schools = schools.where('name LIKE ?', "%#{keyword}%") if keyword
schools = paginate(schools)
render_ok(schools: schools.as_json(only: %i[id name province]))
end
end end

@ -905,16 +905,16 @@ module ExercisesHelper
exercise_user_start = exercise_user&.start_at.present? ? exercise_user.start_at.to_i : 0 exercise_user_start = exercise_user&.start_at.present? ? exercise_user.start_at.to_i : 0
#用户未开始答题时即exercise_user_start为0 #用户未开始答题时即exercise_user_start为0
if exercise_user_start == 0 if exercise_user_start == 0
if (exercise_end_time - time_now_i) > time_mill if (exercise_end_time.to_i - time_now_i) > time_mill
user_left_time = time_mill user_left_time = time_mill
else else
user_left_time = (exercise_end_time < time_now_i) ? nil : (exercise_end_time - time_now_i) user_left_time = (exercise_end_time.to_i < time_now_i) ? nil : (exercise_end_time.to_i - time_now_i)
end end
else else
if (exercise_user_start + time_mill) > exercise_end_time if (exercise_user_start + time_mill) > exercise_end_time.to_i
time_mill = exercise_end_time - exercise_user_start #如果开始答题时间加试卷的限时长大于试卷的截止时间,则以试卷的截止时间到开始答题时间为试卷的限时 time_mill = exercise_end_time.to_i - exercise_user_start.to_i #如果开始答题时间加试卷的限时长大于试卷的截止时间,则以试卷的截止时间到开始答题时间为试卷的限时
end end
exercise_user_left_time = time_now_i - exercise_user_start #用户已回答的时间 exercise_user_left_time = time_now_i - exercise_user_start.to_i #用户已回答的时间
user_left_time = (time_mill < exercise_user_left_time) ? nil : (time_mill - exercise_user_left_time) #当前用户对试卷的回答剩余时间 user_left_time = (time_mill < exercise_user_left_time) ? nil : (time_mill - exercise_user_left_time) #当前用户对试卷的回答剩余时间
end end
end end

@ -9,7 +9,7 @@ class EndExerciseCalculateJob < ApplicationJob
exercise_users = ExerciseUser.where(id: ex_user_ids) exercise_users = ExerciseUser.where(id: ex_user_ids)
exercise_users.each do |user| exercise_users.each do |user|
if user.commit_status == 0 && user.start_at.present? if user.commit_status == 0 && user.start_at.present?
objective_score = calculate_student_score(exercise,user.user,end_time)[:total_score] objective_score = calculate_student_score(exercise,user.user,end_time.to_time)[:total_score]
user_sub_score = user.subjective_score user_sub_score = user.subjective_score
subjective_score = user_sub_score < 0.0 ? 0.0 : user_sub_score subjective_score = user_sub_score < 0.0 ? 0.0 : user_sub_score
total_score = objective_score + subjective_score total_score = objective_score + subjective_score

@ -156,9 +156,9 @@ class Exercise < ApplicationRecord
if unified_setting || teacher #当试卷为统一设置或当前为老师的时候 if unified_setting || teacher #当试卷为统一设置或当前为老师的时候
pb_time = publish_time pb_time = publish_time
en_time = end_time en_time = end_time
if (exercise_status != 3) && en_time.present? && (en_time <= Time.now) # if (exercise_status != 3) && en_time.present? && (en_time <= Time.now)
update_column("exercise_status",3) # update_column("exercise_status",3)
end # end
else else
# ex_group_setting = exercise_group_settings # ex_group_setting = exercise_group_settings
user_group = course.students.where(user_id:user_id).select(:course_group_id) user_group = course.students.where(user_id:user_id).select(:course_group_id)

@ -2,4 +2,6 @@ class Partner < ApplicationRecord
belongs_to :school, optional: true belongs_to :school, optional: true
has_many :users has_many :users
has_many :partner_customers, dependent: :destroy
has_many :customers, through: :partner_customers
end end

@ -0,0 +1,24 @@
class Admins::CustomerQuery < ApplicationQuery
include CustomSortable
attr_reader :params
sort_columns :created_at, default_by: :created_at, default_direction: :desc, default_table: 'customers'
def initialize(params)
@params = params
end
def call
customers = Customer.all
if params[:partner_id].present?
customers = customers.joins(:partner_customers).where(partner_customers: { partner_id: params[:partner_id] })
end
keyword = params[:keyword].to_s.strip
customers = customers.joins(:school).where('schools.name LIKE ?', "%#{keyword}%") if keyword.present?
custom_sort(customers, params[:sort_by], params[:sort_direction])
end
end

@ -0,0 +1,20 @@
class Admins::PartnerQuery < ApplicationQuery
include CustomSortable
attr_reader :params
sort_columns :created_at, default_by: :created_at, default_direction: :desc
def initialize(params)
@params = params
end
def call
partners = Partner.all
keyword = params[:keyword].to_s.strip
partners = partners.joins(:school).where('schools.name LIKE ?', "%#{keyword}%") if keyword.present?
custom_sort(partners, params[:sort_by], params[:sort_direction])
end
end

@ -17,7 +17,7 @@ class CreateBindUserService < ApplicationService
bind_user = User.try_to_login(params[:username], params[:password]) bind_user = User.try_to_login(params[:username], params[:password])
raise Error, '用户名或者密码错误' if bind_user.blank? raise Error, '用户名或者密码错误' if bind_user.blank?
raise Error, '该账号已被其他微信号绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s) raise Error, '该账号已被绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s)
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
open_user.user_id = bind_user.id open_user.user_id = bind_user.id

@ -27,7 +27,7 @@ class Users::ApplyAuthenticationService < ApplicationService
move_image_file! unless params[:upload_image].to_s == 'false' move_image_file! unless params[:upload_image].to_s == 'false'
end end
sms_notify_admin # sms_notify_admin
user user
end end

@ -39,7 +39,7 @@ class Users::ApplyProfessionalAuthService < ApplicationService
move_image_file! unless params[:upload_image].to_s == 'false' move_image_file! unless params[:upload_image].to_s == 'false'
end end
sms_notify_admin # sms_notify_admin
end end
private private

@ -23,12 +23,12 @@ class Users::ApplyTrailService < ApplicationService
user.update!(certification: 1) user.update!(certification: 1)
apply.status = 1 apply.status = 1
else # else
sms_cache = Rails.cache.read("apply_auth") # sms_cache = Rails.cache.read("apply_auth")
if sms_cache.nil? # if sms_cache.nil?
send_trial_apply_notify! # send_trial_apply_notify!
Rails.cache.write("apply_auth", 1, expires_in: 5.minutes) # Rails.cache.write("apply_auth", 1, expires_in: 5.minutes)
end # end
end end
apply.save! apply.save!
end end

@ -49,7 +49,7 @@ class ExercisePublishTask
exercises = Exercise.includes(:exercise_questions).where("exercise_status = 2 AND end_time <= ?",Time.now + 900) exercises = Exercise.includes(:exercise_questions).where("exercise_status = 2 AND end_time <= ?",Time.now + 900)
exercises.each do |exercise| exercises.each do |exercise|
Rails.logger.info("end_exercise_id: #{exercise.id}") Rails.logger.info("end_exercise_id: #{exercise.id}")
exercise.update_attributes!('exercise_status', 3) exercise.update_attributes!(exercise_status: 3)
if exercise.unified_setting if exercise.unified_setting
ex_type = exercise.exercise_questions.pluck(:question_type).uniq ex_type = exercise.exercise_questions.pluck(:question_type).uniq
exercise.exercise_users.where("commit_status = 0 and start_at is not null").each do |exercise_user| exercise.exercise_users.where("commit_status = 0 and start_at is not null").each do |exercise_user|

@ -0,0 +1,19 @@
<% define_admin_breadcrumbs do %>
<% add_admin_breadcrumb('合作伙伴', admins_partners_path) %>
<% add_admin_breadcrumb(current_partner.school&.name || current_partner.name) %>
<% end %>
<div class="box search-form-container customer-list-form">
<%= form_tag(admins_partner_customers_path(current_partner), method: :get, class: 'form-inline search-form', remote: true) do %>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-md-4 ml-3', placeholder: '客户名称检索') %>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
<% end %>
<%= javascript_void_link('添加', class: 'btn btn-primary', data: { toggle: 'modal', target: '.admin-select-school-modal' }) %>
</div>
<div class="box customer-list-container">
<%= render 'admins/customers/shared/list', customers: @customers %>
</div>
<%= render partial: 'admins/shared/modal/select_school_modal', locals: { title: '添加客户', multiple: true, url: admins_partner_customers_path(current_partner) } %>

@ -0,0 +1 @@
$('.customer-list-container').html("<%= j(render partial: 'admins/customers/shared/list', locals: { customers: @customers }) %>");

@ -0,0 +1,26 @@
<table class="table table-hover text-center customer-list-table">
<thead class="thead-light">
<tr>
<th width="50%" class="text-left">客户名称</th>
<th width="30%"><%= sort_tag('添加时间', name: 'created_at', path: admins_partner_customers_path(current_partner)) %></th>
<th width="20%">操作</th>
</tr>
</thead>
<tbody>
<% if customers.present? %>
<% customers.each do |customer| %>
<tr class="customer-item-<%= customer.id %>">
<td class="text-left"><%= customer.school&.name %></td>
<td><%= customer.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
<td>
<%= delete_link '删除', admins_partner_customer_path(current_partner, customer, element: ".customer-item-#{customer.id}"), class: 'delete-customer-action' %>
</td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>
<%= render partial: 'admins/shared/paginate', locals: { objects: customers } %>

@ -0,0 +1,18 @@
<% define_admin_breadcrumbs do %>
<% add_admin_breadcrumb('合作伙伴') %>
<% end %>
<div class="box search-form-container partner-list-form">
<%= form_tag(admins_partners_path, method: :get, class: 'form-inline search-form', remote: true) do %>
<%= text_field_tag(:keyword, params[:keyword], class: 'form-control col-md-4 ml-3', placeholder: '合作伙伴名称检索') %>
<%= submit_tag('搜索', class: 'btn btn-primary ml-3', 'data-disable-with': '搜索中...') %>
<% end %>
<%= javascript_void_link('添加', class: 'btn btn-primary', data: { toggle: 'modal', target: '.admin-select-school-modal' }) %>
</div>
<div class="box partner-list-container">
<%= render 'admins/partners/shared/list', partners: @partners %>
</div>
<%= render partial: 'admins/shared/modal/select_school_modal', locals: { title: '添加客户', multiple: true, url: admins_partners_path } %>

@ -0,0 +1 @@
$('.partner-list-container').html("<%= j(render partial: 'admins/partners/shared/list', locals: { partners: @partners }) %>");

@ -0,0 +1,27 @@
<table class="table table-hover text-center partner-list-table">
<thead class="thead-light">
<tr>
<th width="50%" class="text-left">名称</th>
<th width="30%"><%= sort_tag('添加时间', name: 'created_at', path: admins_partners_path) %></th>
<th width="20%">操作</th>
</tr>
</thead>
<tbody>
<% if partners.present? %>
<% partners.each do |partner| %>
<tr class="partner-item-<%= partner.id %>">
<td class="text-left"><%= partner.school&.name || partner.name %></td>
<td><%= partner.created_at&.strftime('%Y-%m-%d %H:%M') %></td>
<td>
<%= link_to '查看', admins_partner_customers_path(partner), class: 'action' %>
<%= delete_link '删除', admins_partner_path(partner, element: ".partner-item-#{partner.id}"), class: 'delete-partner-action' %>
</td>
</tr>
<% end %>
<% else %>
<%= render 'admins/shared/no_data_for_table' %>
<% end %>
</tbody>
</table>
<%= render partial: 'admins/shared/paginate', locals: { objects: partners } %>

@ -40,6 +40,7 @@
<%= sidebar_item_group('#schools-submenu', '单位管理', icon: 'building') do %> <%= sidebar_item_group('#schools-submenu', '单位管理', icon: 'building') do %>
<li><%= sidebar_item(admins_schools_path, '单位列表', icon: 'university', controller: 'admins-schools') %></li> <li><%= sidebar_item(admins_schools_path, '单位列表', icon: 'university', controller: 'admins-schools') %></li>
<li><%= sidebar_item(admins_departments_path, '部门列表', icon: 'sitemap', controller: 'admins-departments') %></li> <li><%= sidebar_item(admins_departments_path, '部门列表', icon: 'sitemap', controller: 'admins-departments') %></li>
<li><%= sidebar_item(admins_partners_path, '合作伙伴', icon: 'handshake-o', controller: 'admins-partners') %></li>
<% end %> <% end %>
</li> </li>

@ -0,0 +1,28 @@
<div class="modal fade admin-select-school-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><%= title %></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form class="admin-select-school-form" data-multiple="<%= multiple || false %>" data-url="<%= url %>">
<div class="form-group d-flex">
<label for="school_ids" class="col-form-label"><%= label ||= '选择单位:' %></label>
<div class="d-flex flex-column-reverse w-75">
<select id="school_ids" name="school_ids" class="form-control school-select" multiple="multiple"></select>
</div>
</div>
<div class="error text-danger"></div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary submit-btn">确认</button>
</div>
</div>
</div>
</div>

@ -6,4 +6,5 @@ json.data do
json.boards do json.boards do
json.array! @boards, :id, :name json.array! @boards, :id, :name
end end
json.email_notify @course.email_notify
end end

@ -10,8 +10,8 @@ json.students do
if @user_course_identity < Course::ASSISTANT_PROFESSOR && !params[:course_group_id].present? if @user_course_identity < Course::ASSISTANT_PROFESSOR && !params[:course_group_id].present?
json.member_roles student.user.course_role(@course) json.member_roles student.user.course_role(@course)
end end
json.user_phone student.user.hidden_phone json.user_phone @course.excellent ? "" : student.user.hidden_phone
json.user_mail student.user.hidden_mail json.user_mail @course.excellent ? "" : student.user.hidden_mail
end end
end end
json.students_count @students_count json.students_count @students_count

@ -4,3 +4,4 @@ admins-carousels: 'admins-laboratories'
admins-competition_settings: 'admins-competitions' admins-competition_settings: 'admins-competitions'
admins-enroll_lists: 'admins-competitions' admins-enroll_lists: 'admins-competitions'
admins-competition_prize_users: 'admins-competitions' admins-competition_prize_users: 'admins-competitions'
admins-customers: 'admins-partners'

@ -717,6 +717,7 @@ Rails.application.routes.draw do
collection do collection do
get :school_list get :school_list
get :for_option get :for_option
get :search
end end
scope module: :ecs do scope module: :ecs do
@ -1082,6 +1083,10 @@ Rails.application.routes.draw do
post :cancel_excellent post :cancel_excellent
end end
end end
resources :partners, only: [:index, :create, :destroy] do
resources :customers, only: [:index, :create, :destroy]
end
end end
namespace :cooperative do namespace :cooperative do

File diff suppressed because one or more lines are too long

@ -136185,7 +136185,7 @@ $(document).on('turbolinks:load', function(){
minimumInputLength: 1, minimumInputLength: 1,
ajax: { ajax: {
delay: 500, delay: 500,
url: '/api/schools/for_option.json', url: '/api/schools/search.json',
dataType: 'json', dataType: 'json',
data: function(params){ data: function(params){
return { keyword: params.term }; return { keyword: params.term };
@ -138214,6 +138214,96 @@ $(document).on('turbolinks:load', function() {
}); });
}) })
}); });
$(document).on('turbolinks:load', function() {
var $modal = $('.modal.admin-select-school-modal');
if ($modal.length > 0) {
var $link = null;
var $form = $modal.find('form.admin-select-school-form');
var multiple = $form.data('multiple');
$form.find('.school-select').select2({
theme: 'bootstrap4',
placeholder: '请选择',
multiple: multiple,
minimumInputLength: 1,
ajax: {
delay: 500,
url: '/api/schools/search.json',
dataType: 'json',
data: function (params) {
return {keyword: params.term};
},
processResults: function (data) {
return {results: data.schools}
}
},
templateResult: function (item) {
if (!item.id || item.id === '') return item.text;
var html = "<span>" + item.name + "<span class='ml-4 font-12'>";
if(item.province){ html += item.province }
html += "</span></span>";
return $(html);
},
templateSelection: function (item) {
if (item.id) {
}
return item.name || item.text;
}
});
$form.validate({
errorElement: 'span',
errorClass: 'danger text-danger',
rules: {
school_ids: {
required: true
}
},
messages: {
school_ids: {
required: '请选择'
}
}
});
$modal.on('show.bs.modal', function(event){
$link = $(event.relatedTarget);
});
$modal.on('hide.bs.modal', function(){
$form.find('.error').html('');
$form.find('.school-select').select2('val', ' ');
});
$modal.on('click', '.submit-btn', function(){
$form.find('.error').html('');
if($form.valid()){
var url = $form.data('url');
var schoolIds = $form.find('#school_ids').val();
$.ajax({
method: 'POST',
dataType: 'json',
url: url,
data: { school_ids: schoolIds },
success: function(){
$.notify({ message: '操作成功' });
$modal.modal('hide');
setTimeout(function(){
window.location.reload();
}, 500);
},
error: function(res){
var data = res.responseJSON;
$form.find('.error').html(data.message);
}
});
}
});
}
});
$(document).on('turbolinks:load', function() { $(document).on('turbolinks:load', function() {
var $modal = $('.modal.admin-upload-file-modal'); var $modal = $('.modal.admin-upload-file-modal');
if ($modal.length > 0) { if ($modal.length > 0) {
@ -138636,7 +138726,7 @@ $(document).on('turbolinks:load', function () {
minimumInputLength: 1, minimumInputLength: 1,
ajax: { ajax: {
delay: 500, delay: 500,
url: '/api/schools/for_option.json', url: '/api/schools/search.json',
dataType: 'json', dataType: 'json',
data: function (params) { data: function (params) {
return {keyword: params.term}; return {keyword: params.term};
@ -138668,12 +138758,18 @@ $(document).on('turbolinks:load', function () {
// 上传图片 // 上传图片
$('.modal.admin-upload-file-modal').on('upload:success', function (e, data) { $('.modal.admin-upload-file-modal').on('upload:success', function (e, data) {
var $imageElement = $('.subject-image-' + data.source_id); if(data.suffix == '_qrcode'){
$imageElement.attr('src', data.url); var $imageElement = $('.subject-weapp-image-' + data.source_id);
$imageElement.show(); $imageElement.attr('src', data.url);
$imageElement.next().html('重新上传'); $imageElement.show();
}) $imageElement.next().html('重新上传');
} else {
var $imageElement = $('.subject-image-' + data.source_id);
$imageElement.attr('src', data.url);
$imageElement.show();
$imageElement.next().html('重新上传');
}
});
// 定义状态切换监听事件 // 定义状态切换监听事件
var defineStatusChangeFunc = function (doElement, undoElement, url, callback) { var defineStatusChangeFunc = function (doElement, undoElement, url, callback) {
$('.subject-list-container').on('click', doElement, function () { $('.subject-list-container').on('click', doElement, function () {

@ -75,7 +75,10 @@ const Otherloginstart=Loadable({
loader: () => import('./modules/login/Otherloginstart'), loader: () => import('./modules/login/Otherloginstart'),
loading: Loading, loading: Loading,
}) })
const Otherloginsqq=Loadable({
loader: () => import('./modules/login/Otherloginqq'),
loading: Loading,
})
// const TestIndex = Loadable({ // const TestIndex = Loadable({
// loader: () => import('./modules/test'), // loader: () => import('./modules/test'),
// loading: Loading, // loading: Loading,
@ -527,6 +530,9 @@ class App extends Component {
<Route <Route
path="/otherloginstart" component={Otherloginstart} path="/otherloginstart" component={Otherloginstart}
/> />
<Route
path={"/otherloginqq"} component={Otherloginsqq}
/>
<Route <Route
path="/otherlogin" component={Otherlogin} path="/otherlogin" component={Otherlogin}
/> />

@ -46,6 +46,7 @@ export function initAxiosInterceptors(props) {
//proxy="http://47.96.87.25:48080" //proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net" proxy="https://pre-newweb.educoder.net"
proxy="https://test-newweb.educoder.net" proxy="https://test-newweb.educoder.net"
//proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求 // 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制 // 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制
@ -73,15 +74,22 @@ export function initAxiosInterceptors(props) {
} }
requestProxy(config) requestProxy(config)
var url = `/api${config.url}`; let url = `/api${config.url}`;
//qq登录去掉api
if(config.params&&config.params.redirect_uri!=undefined){
if(config.params.redirect_uri.indexOf('otherloginqq')!=-1){
url = `${config.url}`;
}
}
if(`${config[0]}`!=`true`){ if(`${config[0]}`!=`true`){
if (window.location.port === "3007") { if (window.location.port === "3007") {
if (url.indexOf('.json') == -1) { // if (url.indexOf('.json') == -1) {
//
alert('开发提示:请给接口加.json:' + url) // alert('开发提示:请给接口加.json:' + url)
//
} // }
config.url = `${proxy}${url}`; config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) { if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`; config.url = `${config.url}?debug=${debugType}`;

@ -51,6 +51,11 @@ const _origin = window.location.origin;
/* /*
tpi讨论交流问答帖子详情讨论课堂讨论的公用模块:
https://www.educoder.net/tasks/n2ejvaowk6l9
https://www.educoder.net/forums/2629
注意不同模块使用时的参数的不同 usingAntdModal onlySuperAdminCouldHide isChildCommentPagination等等
用到的props: 用到的props:
user user_url image_url user user_url image_url
@ -68,6 +73,8 @@ const _origin = window.location.origin;
isChildCommentPagination 是否子回复分页 isChildCommentPagination 是否子回复分页
loadMoreChildComments function 加载所有子回复 loadMoreChildComments function 加载所有子回复
usingAntdModal 是否使用antd的弹框
接口 接口
deleteComment 删除 deleteComment 删除
onPaginationChange 翻页变化 onPaginationChange 翻页变化

@ -43,7 +43,7 @@ class CompetitionCommon extends Component{
// }) // })
// } // }
// }).catch((error) => { // }).catch((error) => {
// console.log(error) // //console.log(error)
// }) // })
} }
} }
@ -51,8 +51,8 @@ class CompetitionCommon extends Component{
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if (prevProps.user != this.props.user) { if (prevProps.user != this.props.user) {
console.log("componentDidUpdatess"); //console.log("componentDidUpdatess");
console.log(this.props.user); //console.log(this.props.user);
if (this.props.user && this.props.user.login != "") { if (this.props.user && this.props.user.login != "") {
const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`; const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`;
axios.get((zul)).then((result) => { axios.get((zul)).then((result) => {
@ -64,7 +64,7 @@ class CompetitionCommon extends Component{
} }
} }
}).catch((error) => { }).catch((error) => {
//console.log(error); ////console.log(error);
}) })
} }
} }
@ -103,7 +103,7 @@ class CompetitionCommon extends Component{
} }
} }
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
}) })
//this.props.user 有可能为空 //this.props.user 有可能为空
@ -119,7 +119,7 @@ class CompetitionCommon extends Component{
} }
} }
}).catch((error) => { }).catch((error) => {
//console.log(error); ////console.log(error);
}) })
} }
@ -161,7 +161,7 @@ class CompetitionCommon extends Component{
} }
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
}) })
} }
} }
@ -192,7 +192,7 @@ class CompetitionCommon extends Component{
} }
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
}) })
}else{ }else{
if (module_url.substring(0, 7) == 'http://' || module_url.substring(0, 8) == 'https://') { if (module_url.substring(0, 7) == 'http://' || module_url.substring(0, 8) == 'https://') {
@ -309,7 +309,7 @@ class CompetitionCommon extends Component{
}) })
} }
}).catch((error) => { }).catch((error) => {
console.log(error) //console.log(error)
}) })
} }

@ -91,6 +91,7 @@ class ListPageIndex extends Component{
this.state={ this.state={
yslGuideone:undefined, yslGuideone:undefined,
yslElearning:false, yslElearning:false,
isexcellent:false
} }
} }
comyslElearning(bool){ comyslElearning(bool){
@ -163,6 +164,11 @@ class ListPageIndex extends Component{
}); });
} }
} }
ispostexcellenttype=(excellent)=>{
this.setState({
isexcellent:excellent
})
}
render() { render() {
let {yslGuideone} =this.state; let {yslGuideone} =this.state;
// console.log("98"); // console.log("98");
@ -175,7 +181,7 @@ class ListPageIndex extends Component{
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">
{/*头部banner*/} {/*头部banner*/}
<CoursesBanner {...this.props}></CoursesBanner> <CoursesBanner {...this.props} ispostexcellenttype={(excellent)=>this.ispostexcellenttype(excellent)}></CoursesBanner>
{/*下面是指引哦*/} {/*下面是指引哦*/}
{/*{yslGuideone!==undefined?*/} {/*{yslGuideone!==undefined?*/}
{/*(*/} {/*(*/}

@ -28,7 +28,8 @@ class BoardsNew extends Component{
this.state = { this.state = {
fileList: [], fileList: [],
boards: [], boards: [],
title_num: 0 title_num: 0,
email_notify:false
} }
} }
addSuccess = () => { addSuccess = () => {
@ -44,6 +45,7 @@ class BoardsNew extends Component{
if (response.data.status == 0) { if (response.data.status == 0) {
this.setState({ this.setState({
boards: response.data.data.boards || [], boards: response.data.data.boards || [],
boardsdata:response.data.data,
course_id: response.data.data.course_id course_id: response.data.data.course_id
}) })
if (!isEdit) { if (!isEdit) {
@ -158,6 +160,7 @@ class BoardsNew extends Component{
axios.post(url, { axios.post(url, {
...values, ...values,
email_notify:this.state.email_notify,
course_id: cid, course_id: cid,
attachment_ids, attachment_ids,
}) })
@ -247,6 +250,12 @@ class BoardsNew extends Component{
const boardId = this.props.match.params.boardId const boardId = this.props.match.params.boardId
this.props.toListPage(courseId, boardId) this.props.toListPage(courseId, boardId)
} }
setemailchange=(e)=>{
this.setState({
email_notify:e.target.checked
})
}
render() { render() {
let { addGroup, fileList, course_id, title_num } = this.state; let { addGroup, fileList, course_id, title_num } = this.state;
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
@ -289,6 +298,7 @@ class BoardsNew extends Component{
const boardId = this.props.match.params.boardId const boardId = this.props.match.params.boardId
const isCourseEnd = this.props.isCourseEnd(); const isCourseEnd = this.props.isCourseEnd();
document.title=this.props.coursedata&&this.props.coursedata.name; document.title=this.props.coursedata&&this.props.coursedata.name;
return( return(
<div className="newMain "> <div className="newMain ">
<AddDirModal {...this.props} <AddDirModal {...this.props}
@ -401,6 +411,10 @@ class BoardsNew extends Component{
</Select> </Select>
)} )}
</Form.Item> </Form.Item>
{this.state.boardsdata&&this.state.boardsdata.email_notify===true?this.props.isAdminOrTeacher()===true?this.isEdit ?"":<span className={"setemail"}>
<Checkbox onChange={this.setemailchange} checked={this.state.email_notify}>发送邮件提醒</Checkbox>
</span>:"":""}
{/* { isAdmin && <Form.Item {/* { isAdmin && <Form.Item
label="" label=""

@ -36,3 +36,11 @@
text-align: center; text-align: center;
margin-top: 16px; margin-top: 16px;
} }
.setemail{
margin-left: 20px;
}
.setemail .ant-checkbox-wrapper{
margin-top: 8px;
}

@ -136,6 +136,7 @@ class CoursesBanner extends Component {
coursedata: data, coursedata: data,
excellent:data.excellent, excellent:data.excellent,
}) })
this.props.ispostexcellenttype(data.excellent)
}else{ }else{
this.onloadupdatabanner() this.onloadupdatabanner()
} }

@ -421,7 +421,7 @@ class Selectresource extends Component{
<Radio style={radioStyle} value={0}> <Radio style={radioStyle} value={0}>
立即发布 立即发布
</Radio> </Radio>
<Radio style={radioStyle} value={1} className={"fl"}> <Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延迟发布</span> <span className={"mr5"}>延迟发布</span>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"

@ -529,7 +529,7 @@ class Selectsetting extends Component{
<Radio style={radioStyle} value={0}> <Radio style={radioStyle} value={0}>
立即发布 立即发布
</Radio> </Radio>
<Radio style={radioStyle} value={1} className={"fl"}> <Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延迟发布</span> <span className={"mr5"}>延迟发布</span>
<DatePicker <DatePicker

@ -263,6 +263,8 @@ class Sendresource extends Component{
height: '30px', height: '30px',
lineHeight: '30px', lineHeight: '30px',
}; };
return( return(
<div> <div>
{/*提示*/} {/*提示*/}
@ -396,7 +398,7 @@ class Sendresource extends Component{
<Radio style={radioStyle} value={0}> <Radio style={radioStyle} value={0}>
立即发布 立即发布
</Radio> </Radio>
<Radio style={radioStyle} value={1} className={"fl"}> <Radio style={radioStyle} value={1} className={"fl"} disabled={this.props.isStudent()}>
<span className={"mr5"}>延迟发布</span> <span className={"mr5"}>延迟发布</span>
<DatePicker <DatePicker

@ -16,8 +16,8 @@ const $ = window.$
const { Option } = Select; const { Option } = Select;
const tagArray = [ const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
] ]
class SingleEditor extends Component{ class SingleEditor extends Component{
@ -186,7 +186,7 @@ class SingleEditor extends Component{
// TODO 新建然后删除CD选项再输入题干会调用到这里且index是3 // TODO 新建然后删除CD选项再输入题干会调用到这里且index是3
return; return;
} }
let question_choices = this.state.question_choices.slice(0); let question_choices = this.state.question_choices.slice(0);
question_choices[index] = value; question_choices[index] = value;
this.setState({ question_choices }) this.setState({ question_choices })
} }
@ -208,8 +208,8 @@ class SingleEditor extends Component{
render() { render() {
let { question_title, question_score, question_type, question_choices, standard_answers } = this.state; let { question_title, question_score, question_type, question_choices, standard_answers } = this.state;
let { question_id, index, exerciseIsPublish, let { question_id, index, exerciseIsPublish,
// question_title, // question_title,
// question_type, // question_type,
// question_score, // question_score,
isNew } = this.props; isNew } = this.props;
@ -224,6 +224,10 @@ class SingleEditor extends Component{
// [true, false, true] -> [0, 2] // [true, false, true] -> [0, 2]
const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1); const answerTagArray = standard_answers.map((item, index) => { return item == true ? tagArray[index] : -1 }).filter(item => item != -1);
console.log("xuanzheshijuan");
console.log(answerTagArray);
console.log(!exerciseIsPublish);
return( return(
<div className="padding20-30 bor-bottom-greyE signleEditor" id={qNumber}> <div className="padding20-30 bor-bottom-greyE signleEditor" id={qNumber}>
<style>{` <style>{`
@ -254,7 +258,7 @@ class SingleEditor extends Component{
></TPMMDEditor> ></TPMMDEditor>
{question_choices.map( (item, index) => { {question_choices.map( (item, index) => {
const bg = standard_answers[index] ? 'check-option-bg' : '' const bg = standard_answers[index] ? 'check-option-bg' : ''
return <div className="df optionRow " > return <div className="df optionRow " >
{/* 点击设置答案 */} {/* 点击设置答案 */}
@ -268,7 +272,7 @@ class SingleEditor extends Component{
</span> </span>
{/* </Tooltip> */} {/* </Tooltip> */}
<div style={{ flex: '0 0 1038px'}}> <div style={{ flex: '0 0 1038px'}}>
<DMDEditor <DMDEditor
ref={`optionEditor${index}`} ref={`optionEditor${index}`}
toMDMode={this.toMDMode} toShowMode={this.toShowMode} toMDMode={this.toMDMode} toShowMode={this.toShowMode}
height={166} className={'optionMdEditor'} noStorage={true} height={166} className={'optionMdEditor'} noStorage={true}
@ -292,16 +296,15 @@ class SingleEditor extends Component{
}) } }) }
<div className="mb20"> <div className="mb20">
{/* {!exerciseIsPublish && <ActionBtn style="grey" className="middle mr20" onClick={this.addOption}>新增选项</ActionBtn>} */} <span
style={{color: '#FF6800'}}>{'温馨提示:点击选项输入框可设置答案;选中的选项即为正确答案,选择多个答案即为多选题'}</span>
<span style={{color: '#FF6800'}}>{!exerciseIsPublish ? '温馨提示:点击选项标题,可以直接设置答案;选择多个答案即为多选题' : ' '}</span>
{ answerTagArray && !!answerTagArray.length ? { answerTagArray && !!answerTagArray.length ?
<React.Fragment> <React.Fragment>
<span className="fr color-orange">{answerTagArray.join(' ')}</span> <span className="fr color-orange">{answerTagArray.join(' ')}</span>
<span className="fr">标准答案</span> <span className="fr">标准答案</span>
</React.Fragment> </React.Fragment>
: :
<span className="fr color-orange">请点击正确选项</span> <span className="fr color-orange">请点击正确选项</span>
} }
</div> </div>

@ -697,6 +697,26 @@ class studentsList extends Component{
const isStudentPage = pageType == TYPE_STUDENTS const isStudentPage = pageType == TYPE_STUDENTS
this.isStudentPage = isStudentPage this.isStudentPage = isStudentPage
const isGroupChildPage = pageType == TYPE_COURSE_GOURP_CHILD const isGroupChildPage = pageType == TYPE_COURSE_GOURP_CHILD
let studentlist=buildColumns(this,isParent);
if(this.props.isexcellent===true){
studentlist.some((item,key)=> {
if (item.title === "手机号") {
studentlist.splice(key, 1)
return true
}
}
)
}
if(this.props.isexcellent===true){
studentlist.some((item,key)=> {
if (item.title === "邮箱") {
studentlist.splice(key, 1)
return true
}
}
)
}
return( return(
<React.Fragment > <React.Fragment >
@ -866,7 +886,7 @@ class studentsList extends Component{
<Spin size="large" spinning={this.state.isSpin}> <Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table"> <div className="clearfix stu_table">
{students && !!students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}> {students && !!students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
<Table columns={buildColumns(this,isParent)} dataSource={students} onChange={this.onTableChange} pagination={false}></Table> <Table columns={studentlist} dataSource={students} onChange={this.onTableChange} pagination={false}></Table>
</Checkbox.Group> } </Checkbox.Group> }
</div> </div>
</Spin> </Spin>

@ -117,12 +117,12 @@ class ShixunHomeworkPage extends Component {
/// 重做的确认 /// 重做的确认
ModalSaves=()=>{ ModalSaves=()=>{
this.setState({ this.setState({
ModalsType:false, ModalsType:false,
Modalstopval:"" Modalstopval:""
}); });
if(this.state.teacherdatapage){ if(this.state.teacherdatapage){
this.resetshixunCombat(this.state.teacherdatapage.myshixun_identifier); this.resetshixunCombat(this.state.teacherdatapage.myshixun_identifier);
} }
try { try {
console.log("this.child"); console.log("this.child");
@ -149,29 +149,29 @@ class ShixunHomeworkPage extends Component {
} }
//重置按钮 //重置按钮
resetshixunCombat=(id)=>{ resetshixunCombat=(id)=>{
this.setState({ this.setState({
mylistisSpin:true, mylistisSpin:true,
})
let zrl=`/myshixuns/${id}/reset_my_game.json`;
axios.get(zrl).then((response) => {
// window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges";
this.setState({
mylistisSpin:false,
}) })
let zrl=`/myshixuns/${id}/reset_my_game.json`; this.child.Isupdatass();
axios.get(zrl).then((response) => { this.props.showNotification("已清空本实训的学习记录\n" +
// window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; "\n" +
this.setState({ "请点击“开启挑战”重做实训作业");
mylistisSpin:false, }).catch((error) => {
}) this.setState({
this.child.Isupdatass(); mylistisSpin:false,
this.props.showNotification("已清空本实训的学习记录\n" + })
"\n" + console.log(error)
"请点击“开启挑战”重做实训作业"); });
}).catch((error) => {
this.setState({
mylistisSpin:false,
})
console.log(error)
});
} }
bindRef = ref => { this.child = ref } bindRef = ref => { this.child = ref }
///////////////教师截止 ///////////////教师截止
//编辑作业 //编辑作业
Showupdateinstructionsboolfalse (bool) { Showupdateinstructionsboolfalse (bool) {
this.setState({ this.setState({
Showupdateinstructions:bool Showupdateinstructions:bool
@ -183,7 +183,7 @@ class ShixunHomeworkPage extends Component {
Showupdateinstructions:true Showupdateinstructions:true
}) })
} }
gotohome=()=>{ gotohome=()=>{
// console.log(this.props) // console.log(this.props)
let {jobsettingsdatapage}=this.state let {jobsettingsdatapage}=this.state
@ -194,7 +194,7 @@ class ShixunHomeworkPage extends Component {
const isAdmin = this.props.isAdmin(); const isAdmin = this.props.isAdmin();
// console.log(119) // console.log(119)
// console.log(jobsettingsdatapage); // console.log(jobsettingsdatapage);
document.title=jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name; document.title=jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name;
return ( return (
<div className="newMain clearfix "> <div className="newMain clearfix ">
@ -224,34 +224,34 @@ class ShixunHomeworkPage extends Component {
</div> </div>
} }
<div className="educontent mb20"> <div className="educontent mb20">
<p className=" fl color-black summaryname" style={{heigth: "33px"}}> <p className=" fl color-black summaryname" style={{heigth: "33px"}}>
{teacherdatapage === undefined ? "" : teacherdatapage.homework_name} {teacherdatapage === undefined ? "" : teacherdatapage.homework_name}
</p> </p>
<CoursesListType <CoursesListType
typelist={teacherdatapage === undefined ? [""] : teacherdatapage.homework_status} typelist={teacherdatapage === undefined ? [""] : teacherdatapage.homework_status}
/> />
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" onClick={()=>this.gotohome()}>返回</a> <a className="color-grey-9 fr font-16 summaryname ml20 mr20" onClick={()=>this.gotohome()}>返回</a>
<a className="color-grey-9 fr font-16 mr20" <a className="color-grey-9 fr font-16 mr20"
href={`/shixuns/${teacherdatapage === undefined ? "" : teacherdatapage.shixun_identifier}/challenges`} href={`/shixuns/${teacherdatapage === undefined ? "" : teacherdatapage.shixun_identifier}/challenges`}
target={"_blank"}>实训详情</a> target={"_blank"}>实训详情</a>
</div> </div>
<div className="edu-back-white "> <div className="edu-back-white ">
<div className="stud-class-set bor-bottom-greyE "> <div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list"> <div className=" clearfix edu-back-white poll_list">
<a className={parseInt(tab) === 0 ? "active" : ""} onClick={(e) => this.ChangeTab(0)}>作品列表</a> <a className={parseInt(tab) === 0 ? "active" : ""} onClick={(e) => this.ChangeTab(0)}>作品列表</a>
<a className={parseInt(tab) === 1 ? "active" : ""} onClick={(e) => this.ChangeTab(1)}>作业描述</a> <a className={parseInt(tab) === 1 ? "active" : ""} onClick={(e) => this.ChangeTab(1)}>作业描述</a>
{this.props.isAdmin() ? {this.props.isAdmin() ?
this.state.code_review === true || jobsettingsdatapage === undefined ? [""] : jobsettingsdatapage.data.homework_status[0] === "未发布" ? "" : this.state.code_review === true || jobsettingsdatapage === undefined ? [""] : jobsettingsdatapage.data.homework_status[0] === "未发布" ? "" :
<a <a
className={parseInt(tab) === 2 ? "active" : ""} className={parseInt(tab) === 2 ? "active" : ""}
onClick={(e) => this.ChangeTab(2)}> onClick={(e) => this.ChangeTab(2)}>
代码查重</a> : ""} 代码查重</a> : ""}
{parseInt(tab) === 3? {parseInt(tab) === 3?
<style>{this.props.isAdmin()? <style>{this.props.isAdmin()?
` `
.poll_list a.active:after { .poll_list a.active:after {
content: ''; content: '';
width: 57px; width: 57px;
@ -262,17 +262,17 @@ class ShixunHomeworkPage extends Component {
position: absolute; position: absolute;
} }
`:"" `:""
}</style> }</style>
:""} :""}
<a className={parseInt(tab) === 3 ? "active" : ""} <a className={parseInt(tab) === 3 ? "active" : ""}
onClick={(e) => this.ChangeTab(3)} onClick={(e) => this.ChangeTab(3)}
>{this.props.isAdmin()?"设置":"得分规则"}</a> >{this.props.isAdmin()?"设置":"得分规则"}</a>
{/*{this.props.isAdmin() ? <a*/} {/*{this.props.isAdmin() ? <a*/}
{/* className="fr color-blue font-16"*/} {/* className="fr color-blue font-16"*/}
{/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/} {/* href={`/api/homework_commons/${this.props.match.params.coursesId}/works_list.xlsx`}*/}
{/*>导出</a> : ""}*/} {/*>导出</a> : ""}*/}
<style>{` <style>{`
.drop_down_menu li a { .drop_down_menu li a {
padding: 0px; padding: 0px;
font-size: 14px; font-size: 14px;
@ -290,72 +290,72 @@ class ShixunHomeworkPage extends Component {
} }
`}</style> `}</style>
{this.props.isAdmin() ? {this.props.isAdmin() ?
<li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}> <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}> <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
{/*<li><a*/} {/*<li><a*/}
{/* onClick={(child,i) => this.confirmysl(this.child,1)}>实训报告</a>*/} {/* onClick={(child,i) => this.confirmysl(this.child,1)}>实训报告</a>*/}
{/*</li>*/} {/*</li>*/}
<li><a <li><a
onClick={(child,i) => this.confirmysl(this.child,2)}>学生成绩</a> onClick={(child,i) => this.confirmysl(this.child,2)}>学生成绩</a>
</li> </li>
</ul> </ul>
</li> : ""} </li> : ""}
{this.props.isAdmin() ? {this.props.isAdmin() ?
teacherdatapage && teacherdatapage.end_immediately === true ? teacherdatapage && teacherdatapage.end_immediately === true ?
<a className="fr color-blue font-16" onClick={(child)=>this.homeworkendss(this.child)}>立即截止</a> <a className="fr color-blue font-16" onClick={(child)=>this.homeworkendss(this.child)}>立即截止</a>
: "" : ""
: ""} : ""}
{this.props.isAdmin() ? {this.props.isAdmin() ?
teacherdatapage && teacherdatapage.publish_immediately === true ? teacherdatapage && teacherdatapage.publish_immediately === true ?
<a className="fr color-blue font-16" onClick={(child)=>this.homeworkstarts(this.child)}>立即发布</a> <a className="fr color-blue font-16" onClick={(child)=>this.homeworkstarts(this.child)}>立即发布</a>
: "" : ""
: ""} : ""}
{this.props.isAdmin() ? {this.props.isAdmin() ?
teacherdatapage && teacherdatapage.code_review === true ? teacherdatapage && teacherdatapage.code_review === true ?
<a className="fr color-blue font-16" onClick={(child)=>this.workshowmodels(this.child)}>代码查重</a> <a className="fr color-blue font-16" onClick={(child)=>this.workshowmodels(this.child)}>代码查重</a>
: "" : ""} : "" : ""}
{ {
parseInt(tab)===1? parseInt(tab)===1?
this.props.isAdmin() ? this.props.isAdmin() ?
<a className="fr color-blue font-16" onClick={()=>this.edenwork()}>编辑作业</a> <a className="fr color-blue font-16" onClick={()=>this.edenwork()}>编辑作业</a>
:""
:"" :""
:"" }
}
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"} {this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage&&teacherdatapage.work_id}/shixun_work_report`}> to={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage&&teacherdatapage.work_id}/shixun_work_report`}>
查看实训报告 查看实训报告
</Link> : ""} </Link> : ""}
{ {
teacherdatapage === undefined ? "" teacherdatapage === undefined ? ""
: teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" : : teacherdatapage.commit_des === null || teacherdatapage.commit_des === undefined ? "" :
<a className="fr color-blue font-16" <a className="fr color-blue font-16"
href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage === undefined ? "" : teacherdatapage.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdatapage.commit_des}</a> href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${teacherdatapage === undefined ? "" : teacherdatapage.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdatapage.commit_des}</a>
} }
{teacherdatapage === undefined ? "" : <Startshixuntask {teacherdatapage === undefined ? "" : <Startshixuntask
{...this.props} {...this.props}
data={teacherdatapage} data={teacherdatapage}
/>} />}
{this.props.isStudent() ? {this.props.isStudent() ?
( (
teacherdatapage&&teacherdatapage.redo_work===true? teacherdatapage&&teacherdatapage.redo_work===true?
<a className="fr color-blue font-16" onClick={()=>this.Modalcancelss()}>重做</a> <a className="fr color-blue font-16" onClick={()=>this.Modalcancelss()}>重做</a>
:"" :""
) )
: "" } : "" }
</div>
</div> </div>
</div> </div>
</div>
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""} {parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""}
{parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}></Workquestionandanswer>:""} {parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}></Workquestionandanswer>:""}
{parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""} {parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""}
{parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""} {parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
</Spin> </Spin>
</div> </div>
</div> </div>
) )

@ -147,8 +147,8 @@ class ShixunsHome extends Component {
nextArrow={<CustomNextArrow />} nextArrow={<CustomNextArrow />}
prevArrow={<CustomPrevArrow />} prevArrow={<CustomPrevArrow />}
autoplay autoplay
autoplaySpeed={4500} autoplaySpeed={5000}
animation={false} animation={false}
pauseOnHover={true} pauseOnHover={true}
style={{width:"100%"}} style={{width:"100%"}}
arrowPos="outer"> arrowPos="outer">

@ -136,9 +136,15 @@
.startlogin{ .startlogin{
color:#888; color:#888;
} }
.weixinheight390{ .weixinheight390{
height: 390px; height: 390px;
} }
.qqheight390{
width: 450px;
height: 390px;
}
#log_reg_content { #log_reg_content {
padding: 38px 30px 20px !important; padding: 38px 30px 20px !important;
} }

@ -7,7 +7,7 @@ import Dialog, {
DialogContentText, DialogContentText,
DialogTitle, DialogTitle,
} from 'material-ui/Dialog'; } from 'material-ui/Dialog';
import {notification } from 'antd'; import {notification,Modal } from 'antd';
import axios from 'axios'; import axios from 'axios';
@ -104,8 +104,8 @@ class LoginDialog extends Component {
MyEduCoderModals:false, MyEduCoderModals:false,
Phonenumberisnotco:undefined, Phonenumberisnotco:undefined,
Phonenumberisnotcobool:false, Phonenumberisnotcobool:false,
weixinlogin:false weixinlogin:false,
qqlogin:false
}; };
} }
enter=(num) =>{ enter=(num) =>{
@ -529,14 +529,30 @@ class LoginDialog extends Component {
weixinlogin:true weixinlogin:true
}) })
} }
openqqlogin=()=>{
this.setState({
qqlogin:true
})
//window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2otherloginqq&response_type=code`
window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`
// window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&tp=qq&response_type=code`
}
openphoneqqlogin=()=>{
window.open(
`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2ftest-newweb.educoder.net%2fotherloginqq&response_type=code`
)
}
hideweixinlogin=()=>{ hideweixinlogin=()=>{
this.setState({ this.setState({
weixinlogin:false weixinlogin:false,
qqlogin:false
}) })
} }
render() { render() {
let{open,login,speedy,loginValue,regular,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco, let{qqlogin,login,isGoing,isGoingValue,disabled,bottonclass,Phonenumberisnotco,
dialogBox,shortcutnum,disabledType,gaincode,authCodeType,authCodeclass, isRender,weixinlogin}=this.state; dialogBox, isRender,weixinlogin}=this.state;
if (isRender === undefined) { if (isRender === undefined) {
isRender = false isRender = false
@ -659,8 +675,22 @@ class LoginDialog extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./WeChat.png')} alt="微信登录"/> <img src={require('./WeChat.png')} alt="微信登录"/>
</a> </a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./qq.png')} alt="qq登录"/>
</a>
</div> </div>
</p>:""} </p>:<p className="clearfix mt20">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()} className={"ml10"}>
<img src={require('./qq.png')} alt="qq登录"/>
</a>
</div>
</p>}
</form>} </form>}
{weixinlogin===true?<iframe {weixinlogin===true?<iframe
@ -669,7 +699,9 @@ class LoginDialog extends Component {
sandbox="allow-scripts allow-same-origin allow-top-navigation" sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no" scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""} src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login#wechat_redirect`}></iframe>:""}
{weixinlogin===true?<p className="clearfix">
{weixinlogin===true?<p className="clearfix ">
<a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回账号登录</a> <a className={"startlogin color-blue"} onClick={()=>this.hideweixinlogin()}>返回账号登录</a>
</p>:""} </p>:""}
</div> </div>
@ -690,110 +722,3 @@ class LoginDialog extends Component {
export default LoginDialog ; export default LoginDialog ;
// onkeypress="user_login_keypress(event);"
// onkeypress="user_login_keypress(event);"
{/* <div className="pr drag_certi_block width100 mt5">
<div id="quick-drag" className="drag_slider" style={{color: 'rgb(255, 255, 255)'}}></div>
<div className="new-login-error" style={{height: '25px'}}>
<p id="passlogin_error_notice" className="color-orange edu-txt-left none" style={{display: 'block'}}></p>
</div>
</div>}
{/*第三方账号登录*/}
{/* <div className="mt10 edu-txt-center">
<p className="color-grey-9">第三方账号登录</p>
<div className="mt15">
<a href="javascript:void(0)" className="margin15"><img src="/images/educoder/weixin.png" className="radius"/></a>
<a href="javascript:void(0)" className="margin15"><img src="/images/educoder/QQ.png" className="radius"/></a>
<a href="javascript:void(0)" className="margin15"><img src="/images/educoder/weibo.png" className="radius"/></a>
</div>
</div>}
//
// {/*<div className="login-panel none" id="login-panel-2" style={{display:speedy==0?'block':'none'}}>*/}
// {/*<form acceptCharset="UTF-8" action="/login" id="code_login_form" method="post">*/}
// {/*<div style={{"display":"inline","padding":"0","margin":"0"}}>*/}
// {/*<input name="utf8" type="hidden" value="✓"></input>*/}
// {/*<input name="authenticity_token" type="hidden" value="NVLiIlHZfhVBQtO9djnWncJqqdikNQIIxEmOvzK9vNM="></input>*/}
// {/*</div>*/}
// {/*<input name="back_url" type="hidden" value={this.back_url}></input>*/}
// {/*<input*/}
// {/*type="text"*/}
// {/*id="pass_name_input"*/}
// {/*name="username"*/}
// {/*ref="shortcutText"*/}
// {/*onInput={this.shortcutIdChange}*/}
// {/*className="input-100-45 mt20"*/}
// {/*placeholder="手机号/邮箱号">*/}
// {/*</input>*/}
// {/*<div style={{height: '25px'}}>*/}
// {/*<p className="color-orange edu-txt-left none" id="pass_name_error_notice"*/}
// {/*style={{display: shortcutnum==0?'block':'none'}}>请输入有效的手机号/邮箱号*/}
// {/*</p>*/}
// {/*</div>*/}
//
// {/*<div id="wrapper">*/}
// {/*/!*drag*/ }*/}
// {/*<div id="quick-drag" className="drag_slider">*/}
// {/*<div className="drag_bg"></div>*/}
// {/*<div className="drag_text slidetounlock">*/}
// {/*请按住滑块,拖动到最右边*/}
// {/*</div>*/}
// {/*<div className="handler handler_bg"></div>*/}
// {/*</div>*/}
// {/*<div className="new-login-error" style={{height: '25px'}}>*/}
// {/*<p id="passlogin_error_notice" className="color-orange edu-txt-left none">请先拖动滑块完成验证</p>*/}
// {/*</div>*/}
// {/*</div>*/}
//
// {/*<p className="clearfix mt5">*/}
// {/*<input*/}
// {/*type="text"*/}
// {/*name="code"*/}
// {/*id="login_verification_code"*/}
// {/*className="input-48-45 edu-txt-center fl"*/}
// {/*ref="authCodeText"*/}
// {/*onInput={this.authCodeChange}*/}
// {/*placeholder="请输入验证码">*/}
// {/*</input>*/}
// {/*<button className={gaincode} disabled={disabledType}*/}
// {/*onClick={()=>{this.get_login_verification_code()}} id="get_verification_code">获取验证码</button>*/}
// {/*</p>*/}
//
// {/*<div style={{height: '25px'}}>*/}
// {/*<p className="color-orange edu-txt-left none" id="send_code_notice">*/}
// {/*请输入验证码*/}
// {/*</p>*/}
// {/*</div>*/}
//
// {/*<button className={authCodeclass} disabled={authCodeType} id="code_login_btn">登录</button>*/}
//
// {/*<p className="clearfix mt10">*/}
//
// {/*<span className="fl">*/}
// {/*<input type="checkbox"*/}
// {/*className="mr5 magic-checkbox"*/}
// {/*id="autolog"*/}
// {/*checked={isGoing}*/}
// {/*onChange={this.handleInputChange}*/}
// {/*value={isGoingValue}*/}
// {/*name="isGoing"*/}
// {/*></input>*/}
// {/*<label htmlFor="autolog" style={{"top":"0px"}}>下次自动登录</label>*/}
// {/*</span>*/}
//
// {/*<span className="fr">*/}
// {/*<a href="https://www.educoder.net/account/lost_password" className="mr3 color-grey-9">忘记密码</a><em className="vertical-line"></em>*/}
// {/*<a href="https://www.educoder.net/user_join" target="_blank" className="color-grey-9">注册</a>*/}
// {/*</span>*/}
//
// {/*</p>*/}
// {/*</form>*/}
// {/*</div>*/}

@ -132,6 +132,8 @@ class Otherlogin extends Component {
} }
postwechatlogin=(type,username,password)=>{ postwechatlogin=(type,username,password)=>{
let query=this.props.location.search;
const types = query.split('?type=');
if(type===false){ if(type===false){
if(username===undefined||username===""||username===null){ if(username===undefined||username===""||username===null){
this.setState({ this.setState({
@ -146,9 +148,11 @@ class Otherlogin extends Component {
return return
} }
} }
let url = "/bind_user.json"; let url = "/bind_user.json";
axios.post(url, { axios.post(url, {
type: 'wechat', type: types[1]==="qq"?"qq":'wechat',
not_bind:type, not_bind:type,
username:username, username:username,
password:password password:password

@ -0,0 +1,58 @@
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Spin } from 'antd';
import axios from 'axios';
class Otherloginqq extends Component {
componentDidMount() {
let query=this.props.location.search;
const type = query.split('?code=');
const types = type[1].split('&state=');
let codeurl = `/auth/qq/callback`;
axios.get(codeurl,{params:{
code:type[1],
redirect_uri:`https://${window.location.host}/otherloginqq`
}}).then((result)=> {
if(result){
if(result.data.status===0){
if(result.data.new_user===true){
window.location.href="/otherlogin?type=qq"
}else{
// this.getinfo()
if(types[1]==="account"){
window.location.href="/account/binding"
}else{
window.location.href="/"
}
}
}
}
}).catch((error)=>{
})
}
render() {
// Loading
return (
<div className="App" style={{minHeight: '800px',width:"100%"}}>
<style>
{
`
.margintop{
margin-top:20%;
}
`
}
</style>
<Spin size="large" className={"margintop"}/>
</div>
);
}
}
export default Otherloginqq;

@ -8,31 +8,34 @@ class Otherloginstart extends Component {
componentDidMount() { componentDidMount() {
let query=this.props.location.search; let query=this.props.location.search;
const type = query.split('?code='); debugger
const types = type[1].split('&state='); if(query!= ""){
console.log(types) const type = query.split('?code=');
let codeurl = `/auth/wechat/callback.json` const types = type[1].split('&state=');
axios.get(codeurl,{params:{ let codeurl = `/auth/wechat/callback.json`
code:types[0] axios.get(codeurl,{params:{
}}).then((result)=> { code:types[0]
if(result){ }}).then((result)=> {
if(result.data.status===0){ if(result){
if(result.data.new_user===true){ if(result.data.status===0){
window.location.href="/otherlogin" if(result.data.new_user===true){
}else{ window.location.href="/otherlogin?type=wechat"
// this.getinfo()
if(types[1]==="account"){
window.location.href="/account/binding"
}else{ }else{
window.location.href="/" // this.getinfo()
} if(types[1]==="account"){
window.location.href="/account/binding"
}else{
window.location.href="/"
}
}
} }
} }
} }).catch((error)=>{
}).catch((error)=>{
})
}
})
} }

@ -226,6 +226,7 @@ class TPIMonaco extends Component {
// https://github.com/Microsoft/monaco-editor/issues/539 // https://github.com/Microsoft/monaco-editor/issues/539
window.monaco.editor.setModelLanguage(editor_monaco.getModel(), lang) window.monaco.editor.setModelLanguage(editor_monaco.getModel(), lang)
} else if (prevProps.isEditablePath != this.props.isEditablePath) { } else if (prevProps.isEditablePath != this.props.isEditablePath) {
// 当前文件是否可编辑
if (this.props.isEditablePath || this.props.shixun && this.props.shixun.code_edit_permission == true) { if (this.props.isEditablePath || this.props.shixun && this.props.shixun.code_edit_permission == true) {
editor_monaco.updateOptions({readOnly: false}) editor_monaco.updateOptions({readOnly: false})
} else { } else {
@ -250,6 +251,7 @@ class TPIMonaco extends Component {
} }
} }
componentWillUnmount() { componentWillUnmount() {
// 注意销毁不然会出现不能编辑的bug
this.editor_monaco && this.editor_monaco.dispose() this.editor_monaco && this.editor_monaco.dispose()
} }

@ -1224,7 +1224,7 @@ submittojoinclass=(value)=>{
} }
{ {
this.props.Headertop && this.props.Headertop.laboratory_user && this.props.Headertop && this.props.Headertop.laboratory_user &&
<li><a href="/cooperative">后台管理</a></li> <li><a href="/admins">后台管理</a></li>
} }
<li><a href={`/account/profile`}>账号管理</a></li> <li><a href={`/account/profile`}>账号管理</a></li>

@ -68,6 +68,7 @@ class LoginRegisterComponent extends Component {
registered:undefined, registered:undefined,
Phonenumberisnotcodmms:undefined, Phonenumberisnotcodmms:undefined,
weixinlogin:false, weixinlogin:false,
qqlogin:false
} }
} }
if(props.loginstatus === false){ if(props.loginstatus === false){
@ -106,7 +107,7 @@ class LoginRegisterComponent extends Component {
registered:undefined, registered:undefined,
Phonenumberisnotcodmms:undefined, Phonenumberisnotcodmms:undefined,
weixinlogin:false, weixinlogin:false,
qqlogin:false
} }
} }
} }
@ -892,9 +893,25 @@ class LoginRegisterComponent extends Component {
hideweixinlogin=()=>{ hideweixinlogin=()=>{
this.setState({ this.setState({
weixinlogin:false, weixinlogin:false,
qqlogin:false,
tab:["0"] tab:["0"]
}) })
} }
openqqlogin=()=>{
this.setState({
qqlogin:true
})
//window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2otherloginqq&response_type=code`
window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`
// window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&tp=qq&response_type=code`
}
openphoneqqlogin=()=>{
window.open(
`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2ftest-newweb.educoder.net%2fotherloginqq&response_type=code`
)
}
render() { render() {
const { const {
// 登录 // 登录
@ -1040,12 +1057,31 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/> <img src={require('./img/WeChat.png')} alt="微信登录"/>
</a> </a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div> </div>
</p>:""} </p>}
</div> </div>
} }
{ {
weixinlogin===false&&parseInt(tab[0])==1 && weixinlogin===false&&parseInt(tab[0])==1 &&
<div style={{width: '340px'}}> <div style={{width: '340px'}}>
@ -1201,8 +1237,22 @@ class LoginRegisterComponent extends Component {
<a onClick={()=>this.openweixinlogin()}> <a onClick={()=>this.openweixinlogin()}>
<img src={require('./img/WeChat.png')} alt="微信登录"/> <img src={require('./img/WeChat.png')} alt="微信登录"/>
</a> </a>
<a onClick={()=>this.openqqlogin()} className={"ml10"}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div>
</p>:<p className="clearfix mb10 textcenter">
<span className={"startlogin"}> 快速登录 </span>
<div className={"mt10"}>
{/*<a onClick={()=>this.openweixinlogin()}>*/}
{/*<img src={require('./WeChat.png')} alt="微信登录"/>*/}
{/*</a>*/}
<a onClick={()=>this.openphoneqqlogin()}>
<img src={require('./img/qq.png')} alt="qq登录"/>
</a>
</div> </div>
</p>:""} </p>}
</div> </div>
} }
{weixinlogin===true?<iframe {weixinlogin===true?<iframe

@ -12,10 +12,79 @@ class AccountSecure extends Component {
super(props) super(props)
this.state = { this.state = {
Modalstype:false, Modalstype:false,
list:[{
en_type: "wechat",
id: null,
nickname: "",
},{
en_type: "qq",
id: null,
nickname: "",
}
]
}
}
IsPC=()=>{
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone",
"SymbianOS", "Windows Phone",
"iPad", "iPod"];
var flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
} }
return flag;
}
componentDidMount() {
let {basicInfo}=this.props;
let {list}=this.state;
let newlist=list;
if(basicInfo===undefined||JSON.stringify(basicInfo) == "{}"||basicInfo&&basicInfo.open_users.length===0){
}else{
basicInfo&&basicInfo.open_users.map((item,key)=>{
newlist.map((items,keys)=>{
if(items.en_type===item.en_type){
items.id=item.id;
items.nickname=item.nickname;
}
})
})
}
this.setState({
list:newlist
})
} }
componentDidUpdate=(prevProps)=>{
if(prevProps!=this.props){
let {basicInfo}=this.props;
let {list}=this.state;
let newlist=list;
if(basicInfo===undefined||JSON.stringify(basicInfo) == "{}"||basicInfo&&basicInfo.open_users.length===0){
}else{
basicInfo&&basicInfo.open_users.map((item,key)=>{
newlist.map((items,keys)=>{
if(items.en_type===item.en_type){
items.id=item.id;
items.nickname=item.nickname;
}
})
})
}
this.setState({
list:newlist
})
}
}
showModal=()=>{ showModal=()=>{
this.setState({ this.setState({
visible: true, visible: true,
@ -42,11 +111,21 @@ class AccountSecure extends Component {
}) })
} }
Saveundologin=(id)=>{ Saveundologin=(type,id)=>{
let {basicInfo}=this.props; let {basicInfo}=this.props;
let {list}=this.state;
let newlist=list;
let url=`/users/accounts/${basicInfo.id}/open_users/${id}.json`; let url=`/users/accounts/${basicInfo.id}/open_users/${id}.json`;
axios.delete(url).then((result)=>{ axios.delete(url).then((result)=>{
if(result.data.status===0){ if(result.data.status===0){
newlist.map((item,key)=>{
if(item.en_type===type){
item.id=null
}
})
this.setState({
list:newlist
})
this.props.showNotification('解绑成功'); this.props.showNotification('解绑成功');
this.Cancelundologins() this.Cancelundologins()
this.props.getBasicInfo() this.props.getBasicInfo()
@ -61,13 +140,22 @@ class AccountSecure extends Component {
Modalstype:true, Modalstype:true,
Modalstopval:type==="wechat"?"是否确定解绑微信账号?":"是否确定解绑QQ账号", Modalstopval:type==="wechat"?"是否确定解绑微信账号?":"是否确定解绑QQ账号",
ModalCancel:this.Cancelundologins, ModalCancel:this.Cancelundologins,
ModalSave:()=>this.Saveundologin(id), ModalSave:()=>this.Saveundologin(type,id),
}) })
} }
openqqlogin=()=>{
window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginqq&response_type=code`
}
openphoneqqlogin=()=>{
window.open(
`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2ftest-newweb.educoder.net%2fotherloginqq&response_type=code`
)
}
render() { render() {
let {basicInfo}=this.props; let flag = this.IsPC(); //true为PC端false为手机端
let {list}=this.state;
console.log(window.location.host)
return ( return (
<div> <div>
<div className="basicForm settingForm"> <div className="basicForm settingForm">
@ -137,6 +225,10 @@ class AccountSecure extends Component {
font-size: 40px !important; font-size: 40px !important;
color: #4eaf2b; color: #4eaf2b;
} }
.qqlogo{
font-size: 40px !important;
color: #29a1e6;
}
.lineheight60{ .lineheight60{
line-height: 60px; line-height: 60px;
@ -146,64 +238,71 @@ class AccountSecure extends Component {
} }
`}</style> `}</style>
<div className="title">绑定登录账号</div> <div className="title">绑定登录账号</div>
<Form> <Form>
<div className="flexTable">
<div className="flexTable"> {list.map((item,key)=>{
</div>
return(
<div className="flexTable"> <div className="flexTable" key={key}>
<div className="flexRow"> <div className="flexTable">
<div className="name"> <div className="flexRow">
<i className={"iconfont icon-weixin2 weixinlogo mr10"}></i> <div className="name">
<span className={"color-ooo"}>微信</span> {item.en_type!="qq"?<i className={"iconfont icon-weixin2 weixinlogo mr10"}></i>:<i className={"iconfont icon-qq qqlogo mr10"}></i>}
</div> {item.en_type!="qq"?<span className={"color-ooo"}>微信</span>:<span className={"color-ooo"}>QQ</span>}
</div>
<div className="description lineheight60">
{basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0?"":<span className={"color-grey-9 ml80"}>{basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users[0].nickname}</span>} <div className="description lineheight60">
</div> <span className={"color-grey-9 ml80"}>{item.id===null?"":item.nickname}</span>
</div>
<div className="status pt19">
<WordsBtn style={basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0?"blue":"colorgrey9"} className={basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0?"borderBottom":""} <div className="status pt19">
onClick={ {item.en_type!="qq"?<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0 ?() => this.showModal("wechat"):() => this.undologin("wechat",basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users[0].id) onClick={
} item.id===null?() => this.showModal("wechat"):() => this.undologin("wechat",item.id)
>{basicInfo===undefined||JSON.stringify(basicInfo) == "{}"?"":basicInfo&&basicInfo.open_users.length===0 ?"绑定":"解绑"}</WordsBtn> }
</div> >{item.id===null?"绑定":"解绑"}</WordsBtn>:<WordsBtn style={ item.id===null?"blue":"colorgrey9"} className={item.id===null?"borderBottom":""}
onClick={
</div> item.id===null?flag===true?() => this.openqqlogin():() => this.openphoneqqlogin():() => this.undologin("qq",item.id)
</div> }
<style> >{item.id===null?"绑定":"解绑"}</WordsBtn>}
{ </div>
` </div>
</div>
</div>
)
})
}
</Form>
<style>
{
`
.ml70{ .ml70{
margin-left: 70px; margin-left: 70px;
} }
` `
} }
</style> </style>
<Modal <Modal
closable={false} closable={false}
footer={null} footer={null}
visible={this.state.visible} visible={this.state.visible}
onOk={this.handleOk} onOk={this.handleOk}
onCancel={this.handleCancel} onCancel={this.handleCancel}
> >
<div> <div>
<iframe <iframe
className={"weixinheight390 ml70"} className={"weixinheight390 ml70"}
frameBorder="0" frameBorder="0"
sandbox="allow-scripts allow-same-origin allow-top-navigation" sandbox="allow-scripts allow-same-origin allow-top-navigation"
scrolling="no" scrolling="no"
src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login&state=account#wechat_redirect`}></iframe> src={`https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2f${window.location.host}%2fotherloginstart&response_type=code&scope=snsapi_login&state=account#wechat_redirect`}></iframe>
<p className="clearfix pagemancenter"> <p className="clearfix pagemancenter">
<a className={"startlogin color-blue"} onClick={()=>this.handleCancel()}>取消</a> <a className={"startlogin color-blue"} onClick={()=>this.handleCancel()}>取消</a>
</p> </p>
</div>
</Modal>
</div> </div>
</Form> </Modal>
</div> </div>
<div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div> <div style={{color: '#989898', marginLeft: '20px'}}>* 我们确保你所提供的信息均处于严格保密状态不会泄露</div>
</div> </div>

@ -4,6 +4,7 @@ import { WordsBtn, getImageUrl } from 'educoder';
import RealNameCertificationModal from '../modal/RealNameCertificationModal' import RealNameCertificationModal from '../modal/RealNameCertificationModal'
import '../../courses/css/Courses.css' import '../../courses/css/Courses.css'
import {CNotificationHOC} from '../../courses/common/CNotificationHOC' import {CNotificationHOC} from '../../courses/common/CNotificationHOC'
import axios from 'axios';
class AccountCertification extends Component { class AccountCertification extends Component {
@ -29,6 +30,40 @@ class AccountCertification extends Component {
} }
// 撤销认证
cancelCertification=(type)=>{
this.props.confirm({
okText: '确认',
content: '是否确认撤销认证?',
onOk: () => {
this.cancelCertificationAction(type);
}
})
}
cancelCertificationAction=(type)=>{
let login =this.props.current_user.login;
var url = `/users/accounts/${login}/${ type == 1 ? 'authentication_apply.json':'professional_auth_apply.json'}`;
axios.delete(url).then((result)=>{
if(result){
this.props.showNotification("撤销成功!");
try {
this.props.getBasicInfo();
} catch (e) {
}
try {
this.props.Getdata();
} catch (e) {
}
}
}).catch((error)=>{
console.log(error);
})
}
showRealNameCertificationModal = (index) => { showRealNameCertificationModal = (index) => {
this.setState({ this.setState({
certification:index, certification:index,
@ -75,7 +110,6 @@ class AccountCertification extends Component {
color: #CDCDCD; color: #CDCDCD;
} }
.flexRow .status { .flexRow .status {
width: 100px;
color: #28AC7F; color: #28AC7F;
} }
`}</style> `}</style>
@ -87,9 +121,17 @@ class AccountCertification extends Component {
<div className="status"> <div className="status">
{ {
basicInfo && basicInfo.authentication =="uncertified" ? basicInfo && basicInfo.authentication =="uncertified" ?
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.checkBasicInfo(1)} >立即认证</WordsBtn>: <WordsBtn style="blue" className="borderBottom mr20" onClick={()=>this.checkBasicInfo(1)} >立即认证</WordsBtn>:
basicInfo && basicInfo.authentication =="applying" ? <span style={{color: '#FF6800'}}>待审核</span>: basicInfo && basicInfo.authentication =="applying" ?
<span><i className="iconfont icon-wancheng color-green font-16 mr3"></i></span> <span>
<WordsBtn style="grey" className="mr20" onClick={()=>this.cancelCertification(1)}>撤销认证</WordsBtn>
<span className="mr20 ml18" style={{color: '#FF6800'}}>待审核</span>
</span>
:
<span>
<WordsBtn style="grey" className="mr20 fl " onClick={()=>this.checkBasicInfo(1)}>重新认证</WordsBtn>
<span className="mr20 fl"><i className="iconfont icon-wancheng color-green font-16 mr3 fl"></i></span>
</span>
} }
</div> </div>
</div> </div>
@ -103,9 +145,18 @@ class AccountCertification extends Component {
<div className="status"> <div className="status">
{ {
basicInfo && basicInfo.professional_certification =="uncertified" ? basicInfo && basicInfo.professional_certification =="uncertified" ?
<WordsBtn style="blue" className="borderBottom" onClick={()=>this.checkBasicInfo(2)} >立即认证</WordsBtn>: <WordsBtn style="blue" className="mr20 borderBottom" onClick={()=>this.checkBasicInfo(2)} >立即认证</WordsBtn>
basicInfo && basicInfo.professional_certification =="applying" ? <span style={{color: '#FF6800'}}>待审核</span>: :
<span><i className="iconfont icon-wancheng color-green font-16 mr3"></i></span> basicInfo && basicInfo.professional_certification =="applying" ?
<span>
<WordsBtn style="grey" className="mr20 " onClick={()=>this.cancelCertification(2)}>撤销认证</WordsBtn>
<span className="mr20 ml18" style={{color: '#FF6800'}}>待审核</span>
</span>
:
<span>
<WordsBtn style="grey" className="fl mr20" onClick={()=>this.checkBasicInfo(2)} >重新认证</WordsBtn>
<span className="mr20 fl"><i className="iconfont icon-wancheng color-green font-16 mr3 fl"></i></span>
</span>
} }
</div> </div>
</div> </div>

@ -55,47 +55,45 @@ class RealNameCertificationModal extends Component{
} }
} }
componentDidMount() { // 弹框出现visible==true时给formitem赋值
console.log("RealNameCertificationModal"); setVisible = (visible) => {
console.log(this.props.basicInfo); this.refs.modalWrapper.setVisible(visible);
if(this.props.basicInfo){ if(visible && this.props.basicInfo){
this.setValue(this.props.basicInfo); this.setValue(this.props.basicInfo);
this.getSchoolList(this.props.basicInfo); this.getSchoolList(this.props.basicInfo);
} }
} }
setValue=(basicInfo)=>{ setValue=(basicInfo)=>{
// debugger;
if(basicInfo){ if(basicInfo){
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
nickname:basicInfo.nickname, nickname:basicInfo.nickname,
name:!basicInfo.show_realname ? this.hideRealName(basicInfo.name) : basicInfo.name, name:!basicInfo.show_realname ? this.hideRealName(basicInfo.name) : basicInfo.name,
sex:String(basicInfo.gender),
job:basicInfo.identity, job:basicInfo.identity,
org:basicInfo.school_name, org:basicInfo.school_name
// city:[basicInfo.location,basicInfo.location_city]
}) })
setTimeout(() => { setTimeout(() => {
// 等显示后再set // 等显示后再set
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
job:basicInfo.identity, job:basicInfo.identity,
sex:String(basicInfo.gender),
student_No:basicInfo.student_id, student_No:basicInfo.student_id,
org2:basicInfo.department_name, org2:basicInfo.department_name,
job1:basicInfo && basicInfo.identity=="teacher" ? basicInfo.technical_title:"教授", job1:basicInfo && basicInfo.identity=="teacher" ? basicInfo.technical_title:"教授",
job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者", job2:basicInfo && basicInfo.identity=="professional" ? basicInfo.technical_title:"企业管理者",
}) })
}, 100) }, 100)
//if(basicInfo.nickname){ this.setState({
this.setState({ forDisable: true,
forDisable: true, nameLength:basicInfo.nickname?basicInfo.nickname.length:0,
nameLength:basicInfo.nickname?basicInfo.nickname.length:0, showRealName:basicInfo.show_realname,
showRealName:basicInfo.show_realname, realName: basicInfo.name,
realName: basicInfo.name, identity:basicInfo.identity,
identity:basicInfo.identity, school_id:basicInfo.school_id,
school_id:basicInfo.school_id, department_id:basicInfo.department_id
department_id:basicInfo.department_id })
})
//}
} }
} }
@ -256,10 +254,6 @@ class RealNameCertificationModal extends Component{
// } // }
} }
setVisible = (visible) => {
this.refs.modalWrapper.setVisible(visible)
}
onSendOk = () => { onSendOk = () => {
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
console.log(values); console.log(values);
@ -273,7 +267,7 @@ class RealNameCertificationModal extends Component{
// 实名认证 // 实名认证
let url = `/users/accounts/${current_user && current_user.login}/authentication_apply.json` let url = `/users/accounts/${current_user && current_user.login}/authentication_apply.json`
axios.post((url),{ axios.post((url),{
name:values.name, name:values.name || basicInfo.name,
gender:parseInt(values.sex), gender:parseInt(values.sex),
id_number:values.credentials id_number:values.credentials
}).then((result)=>{ }).then((result)=>{
@ -289,8 +283,6 @@ class RealNameCertificationModal extends Component{
} }
this.setVisible(false); this.setVisible(false);
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);

@ -180,6 +180,12 @@ class InfosCourse extends Component{
.whitepanelysllis { .whitepanelysllis {
width: 66px !important; width: 66px !important;
height: 48px !important;
line-height: 46px !important;
margin-left: 40px !important;
}
.whitepanelysllik {
width: 80px !important;
height: 48px !important; height: 48px !important;
line-height: 46px !important; line-height: 46px !important;
margin-left: 40px !important; margin-left: 40px !important;
@ -207,11 +213,11 @@ class InfosCourse extends Component{
<li className={category ? " font-16 whitepanelyslli" : "active font-16 whitepanelyslli"}><a <li className={category ? " font-16 whitepanelyslli" : "active font-16 whitepanelyslli"}><a
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li> href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a <li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")} href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className="font-16 w66">{is_current ? "我" : "TA"}管理的</a></li> className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a <li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")} href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className="font-16 w66">{is_current ? "我" : "TA"}学习的</a></li> className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div> </div>
<style> <style>
@ -242,11 +248,12 @@ class InfosCourse extends Component{
href="javascript:void(0)" onClick={() => this.changeStatus("end")} className="w66">已结束</a></li> href="javascript:void(0)" onClick={() => this.changeStatus("end")} className="w66">已结束</a></li>
</div> </div>
} }
<p className="pl25 pr25 clearfix font-12 " style={{ <p className=" clearfix font-12 " style={{
lineHeight: "41px", lineHeight: "41px",
marginTop: "10px",
}}> }}>
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"课堂"}</span>
<sapn className="relativef fr" <sapn className="relativef color-grey-9 fr"
style={{ style={{
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",

@ -216,10 +216,10 @@ class InfosPath extends Component{
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li> href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a <li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")} href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className="font-16 w66">{is_current ? "我" : "TA"}管理的</a></li> className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a <li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")} href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className="font-16 w66">{is_current ? "我" : "TA"}学习的</a></li> className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div> </div>
<style> <style>
@ -264,11 +264,12 @@ class InfosPath extends Component{
href="javascript:void(0)" onClick={() => this.changeStatus("finished")} className="w60">已完成</a></li> href="javascript:void(0)" onClick={() => this.changeStatus("finished")} className="w60">已完成</a></li>
</div> </div>
} }
<div className="pl25 pr25 clearfix font-12 " style={{ <div className="clearfix font-12 " style={{
lineHeight: "41px", lineHeight: "41px",
marginTop: "10px",
}}> }}>
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"实践课程"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"实践课程"}</span>
<sapn className="relativef fr" <sapn className="relativef color-grey-9 fr"
style={{ style={{
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",

@ -217,10 +217,10 @@ class InfosProject extends Component{
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li> href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a <li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")} href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className="font-16 w66">{is_current ? "我" : "TA"}管理的</a></li> className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a <li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")} href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className="font-16 w66">{is_current ? "我" : "TA"}学习的</a></li> className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div> </div>
<style> <style>
{ {
@ -250,11 +250,12 @@ class InfosProject extends Component{
href="javascript:void(0)" onClick={() => this.changeStatus("personal")} className=" w60">私有</a></li> href="javascript:void(0)" onClick={() => this.changeStatus("personal")} className=" w60">私有</a></li>
</div> </div>
} }
<p className="pl25 pr25 clearfix font-12 " style={{ <p className="clearfix font-12 " style={{
lineHeight: "41px", lineHeight: "41px",
marginTop: "10px",
}}> }}>
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"项目"}</span>
<sapn className="relativef fr" <sapn className="relativef color-grey-9 fr"
style={{ style={{
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",

@ -217,10 +217,10 @@ class InfosShixun extends Component{
href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li> href="javascript:void(0)" onClick={() => this.changeCategory()} className="font-16 w32">全部</a></li>
<li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a <li className={category == "manage" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("manage")} href="javascript:void(0)" onClick={() => this.changeCategory("manage")}
className="font-16 w66">{is_current ? "我" : "TA"}管理的</a></li> className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}管理的</a></li>
<li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a <li className={category == "study" ? "active font-16 whitepanelysllis" : "font-16 whitepanelysllis"}><a
href="javascript:void(0)" onClick={() => this.changeCategory("study")} href="javascript:void(0)" onClick={() => this.changeCategory("study")}
className="font-16 w66">{is_current ? "我" : "TA"}学习的</a></li> className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的</a></li>
</div> </div>
<style> <style>
{ {
@ -267,11 +267,12 @@ class InfosShixun extends Component{
href="javascript:void(0)" onClick={() => this.changeStatus("passed")} className="w60">已通关</a></li> href="javascript:void(0)" onClick={() => this.changeStatus("passed")} className="w60">已通关</a></li>
</div> </div>
} }
<div className="pl25 pr25 clearfix font-12 " style={{ <div className=" clearfix font-12 " style={{
lineHeight: "41px", lineHeight: "41px",
marginTop: "10px",
}}> }}>
<span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"实训"}</span> <span className="fl color-grey-9">共参与{totalCount}{category?category=="manage"?"发布":"学习":"实训"}</span>
<sapn className="relativef fr" <sapn className="relativef color-grey-9 fr"
style={{ style={{
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",

@ -451,3 +451,7 @@
.w60 { .w60 {
width: 60px !important; width: 60px !important;
} }
.w80 {
width: 80px !important;
}

@ -346,8 +346,8 @@ function InfoVideo (props) {
marginRight: " 5px", marginRight: " 5px",
}}>{"最新上传"}</span> }}>{"最新上传"}</span>
<sapn className="relativef fr" <sapn className="relativef color-grey-9 fr"
style={{ style={{
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
height: "40px", height: "40px",

Loading…
Cancel
Save