first stamp

dev_tpm_ui
jingquan huang 5 years ago
commit ae05c26ba9

@ -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, "请求不合理") 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}")

@ -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) {

Loading…
Cancel
Save