From 1d43efcdd1607897e76e199fcbb58f8b568aa6fb Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 30 Dec 2019 16:49:18 +0800
Subject: [PATCH 1/5] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=90=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/controllers/application_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 3d1fd642e..4daa3b45c 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base
 		if params[:client_key].present?
 			Rails.logger.info("111111  #{params[:client_key]}")
 			Rails.logger.info("00000  #{params[:timestamp]}")
-			tip_exception(501, "请求超时") if Time.now - params[:timestamp].to_i > 5
+			tip_exception(501, "请求超时") if (Time.now - params[:timestamp].to_i).between(0,5)
 			timestamp = params[:timestamp]
 			sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}")
 			Rails.logger.info("2222  #{sign}")

From d81387c8e7858831e296d21b64c88365c82d43ed Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 30 Dec 2019 16:49:53 +0800
Subject: [PATCH 2/5] 1

---
 app/controllers/application_controller.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 4daa3b45c..63c32f7e6 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -27,7 +27,8 @@ class ApplicationController < ActionController::Base
 		if params[:client_key].present?
 			Rails.logger.info("111111  #{params[:client_key]}")
 			Rails.logger.info("00000  #{params[:timestamp]}")
-			tip_exception(501, "请求超时") if (Time.now - params[:timestamp].to_i).between(0,5)
+			Rails.logger.info("Time.now - params[:timestamp].to_i: #{Time.now - params[:timestamp].to_i}")
+			tip_exception(501, "请求超时") unless (Time.now - params[:timestamp].to_i).between(0,5)
 			timestamp = params[:timestamp]
 			sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}")
 			Rails.logger.info("2222  #{sign}")

From 9f02077d434cc1da84ae338e5272b70f8a72de99 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 30 Dec 2019 16:51:02 +0800
Subject: [PATCH 3/5] 1

---
 app/controllers/application_controller.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 63c32f7e6..3bad1718c 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -27,8 +27,8 @@ class ApplicationController < ActionController::Base
 		if params[:client_key].present?
 			Rails.logger.info("111111  #{params[:client_key]}")
 			Rails.logger.info("00000  #{params[:timestamp]}")
-			Rails.logger.info("Time.now - params[:timestamp].to_i: #{Time.now - params[:timestamp].to_i}")
-			tip_exception(501, "请求超时") unless (Time.now - params[:timestamp].to_i).between(0,5)
+			Rails.logger.info("Time.now - params[:timestamp].to_i: #{Time.now.to_i - params[:timestamp].to_i}")
+			tip_exception(501, "请求超时") unless (Time.now.to_i - params[:timestamp].to_i).between(0,5)
 			timestamp = params[:timestamp]
 			sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}")
 			Rails.logger.info("2222  #{sign}")

From 7742f99aeb7d45faa85ab1d565df5d6c4155a8bf Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 30 Dec 2019 16:53:49 +0800
Subject: [PATCH 4/5] 1

---
 app/controllers/application_controller.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 3bad1718c..65c05ef2a 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -28,7 +28,7 @@ class ApplicationController < ActionController::Base
 			Rails.logger.info("111111  #{params[:client_key]}")
 			Rails.logger.info("00000  #{params[:timestamp]}")
 			Rails.logger.info("Time.now - params[:timestamp].to_i: #{Time.now.to_i - params[:timestamp].to_i}")
-			tip_exception(501, "请求超时") unless (Time.now.to_i - params[:timestamp].to_i).between(0,5)
+			tip_exception(501, "请求超时") unless (Time.now.to_i - params[:timestamp].to_i).between?(0,5)
 			timestamp = params[:timestamp]
 			sign = Digest::MD5.hexdigest("#{OPENKEY}#{timestamp}")
 			Rails.logger.info("2222  #{sign}")

From 8f0db2f4738843ccd184d705ab59e630374b55b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 30 Dec 2019 16:59:11 +0800
Subject: [PATCH 5/5] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 public/react/src/AppConfig.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 29e7461ec..9350001e4 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -7,8 +7,6 @@ import { broadcastChannelOnmessage ,SetAppModel, isDev, queryString } from 'educ
 import {  notification } from 'antd';
 import './index.css';
 const opens ="79e33abd4b6588941ab7622aed1e67e8";
-let timestamp = Date.parse(new Date());
-const newopens=md5(opens+timestamp)
 broadcastChannelOnmessage('refreshPage', () => {
     window.location.reload()
 })
@@ -94,6 +92,8 @@ export function initAxiosInterceptors(props) {
 								}
 							}
             if(`${config[0]}`!=`true`){
+              let timestamp = Date.parse(new Date())/1000;
+              let newopens=md5(opens+timestamp)
                 if (window.location.port === "3007") {
                     config.url = `${proxy}${url}`;
                     if (config.url.indexOf('?') == -1) {