diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 6e55d1268..90151efca 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -43,7 +43,7 @@ class ApplicationController < ActionController::Base
end
def shixun_marker
- unless current_user.is_shixun_marker?
+ unless current_user.is_shixun_marker? || current_user.admin_or_business?
tip_exception(403, "..")
end
end
diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb
index 917fca4b5..7df9aae89 100644
--- a/app/controllers/subjects_controller.rb
+++ b/app/controllers/subjects_controller.rb
@@ -7,7 +7,7 @@ class SubjectsController < ApplicationController
:search_members, :add_subject_members, :statistics, :shixun_report, :school_report,
:up_member_position, :down_member_position, :update_team_title]
before_action :require_admin, only: [:copy_subject]
- before_action :shixun_marker, only: [:new, :create]
+ before_action :shixun_marker, only: [:new, :create, :add_shixun_to_stage]
include ApplicationHelper
diff --git a/public/images/educoder/qqqun20191230.png b/public/images/educoder/qqqun20191230.png
new file mode 100644
index 000000000..e831b7d7b
Binary files /dev/null and b/public/images/educoder/qqqun20191230.png differ
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 4e91938c8..055f6ae92 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -8,6 +8,8 @@ import { notification } from 'antd';
import './index.css';
const $ = window.$;
const opens ="79e33abd4b6588941ab7622aed1e67e8";
+let timestamp;
+let checkSubmitFlg = false;
broadcastChannelOnmessage('refreshPage', () => {
window.location.reload()
})
@@ -19,7 +21,7 @@ function locationurl(list){
window.location.href=list
}
}
-let hashTimeout
+
// TODO 开发期多个身份切换
let debugType =""
@@ -39,7 +41,29 @@ if (isDev) {
//ebugType="teacher";
// 学生
//debugType="student";
-
+ function railsgettimes(proxy) {
+ if(timestamp&&checkSubmitFlg===false){
+ $.ajax({url:proxy,async:false,success:function(data){
+ if(data.status===0){
+ timestamp=data.message;
+ }
+ }})
+ checkSubmitFlg=true
+ window.setTimeout(function () {
+ checkSubmitFlg=false;
+ }, 3500);
+ }else if(checkSubmitFlg===false){
+ $.ajax({url:proxy,async:false,success:function(data){
+ if(data.status===0){
+ timestamp=data.message;
+ }
+ }})
+ checkSubmitFlg=true
+ window.setTimeout(function () {
+ checkSubmitFlg=false;
+ }, 3500);
+ }
+}
window._debugType = debugType;
export function initAxiosInterceptors(props) {
initOnlineOfflineListener()
@@ -62,6 +86,7 @@ export function initAxiosInterceptors(props) {
// 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制
const requestMap = {};
+<<<<<<< HEAD
window.railsgettimes = function(proxy) {
// $.ajax({url:`${proxy}/api/main/first_stamp.json`,async:false,success:function(data,status){
// if(data.status===0){
@@ -70,9 +95,12 @@ export function initAxiosInterceptors(props) {
// }});
}
+=======
+>>>>>>> dev_aliyun
window.setfalseInRequestMap = function(keyName) {
requestMap[keyName] = false;
}
+
axios.interceptors.request.use(
config => {
@@ -103,8 +131,12 @@ export function initAxiosInterceptors(props) {
if(`${config[0]}`!=`true`){
let timestamp = Date.parse(new Date())/1000;
if (window.location.port === "3007") {
+<<<<<<< HEAD
// let timestamp=railsgettimes(proxy);
console.log(timestamp)
+=======
+ railsgettimes(`${proxy}/api/main/first_stamp.json`);
+>>>>>>> dev_aliyun
let newopens=md5(opens+timestamp)
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
@@ -114,6 +146,8 @@ export function initAxiosInterceptors(props) {
}
} else {
// 加api前缀
+ railsgettimes(`/api/main/first_stamp.json`);
+ let newopens=md5(opens+timestamp)
config.url = url;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?&randomcode=${timestamp}&client_key=${newopens}`;
diff --git a/public/react/src/modal/GotoQQgroup.js b/public/react/src/modal/GotoQQgroup.js
new file mode 100644
index 000000000..740f8c365
--- /dev/null
+++ b/public/react/src/modal/GotoQQgroup.js
@@ -0,0 +1,62 @@
+import React, { Component } from 'react';
+import {getImageUrl} from 'educoder';
+import { Modal} from 'antd';
+import axios from 'axios';
+import '../modules/user/account/common.css';
+import './gotoqqgroup.css'
+class GotoQQgroup extends Component {
+
+ constructor(props) {
+ super(props);
+ this.state={
+
+ }
+ }
+
+ modalCancel=()=>{
+ try {
+ this.props.setgoshowqqgtounp(false);
+ }catch (e) {
+
+ }
+ }
+
+ setDownload=()=>{
+ //立即联系
+ try {
+ this.props.setgoshowqqgtounp(false);
+ }catch (e) {
+
+ }
+ }
+
+
+ render() {
+
+ return(
+ 您可以在QQ服务群向管理员申请,获得继续操作的权限 群号:612934990