dev_SaaS
cxt 6 years ago
commit f588b0d765

@ -7,10 +7,10 @@ class EcloudController < ApplicationController
# before_filter :check_sign
before_filter :user_setup
before_filter :require_login, only: [:authorize]
# before_filter :require_login, only: [:authorize]
skip_before_filter :verify_authenticity_token, only: [:ps_new, :ps_edit, :ecloud_login_callback]
skip_before_filter :verify_authenticity_token, only: [:ps_new, :ps_update, :bs_new, :bs_update, :ecloud_login_callback]
def index
@ -63,10 +63,11 @@ class EcloudController < ApplicationController
begin
ecloud = Ecloud.where(custid: params['custid']).first
ecloud.update_attributes!(applyno: params['applyno'], ecordercode: params['ecordercode'], opttype: params['opttype'],
custid: params['custid'], custcode: params['custcode'], productcode: params['productcode'],
operatime: params['operatime'], effecttime: params['effecttime'])
services = params['ervices'].first
ecloud.ecloud_services.update_attributes!(packagecode: services['packagecode'], bossorderid: services['bossorderid'])
custid: params['custid'], custcode: params['custcode'], productcode: params['productcode'],
operatime: params['operatime'], effecttime: params['effecttime'])
services = params['services'].first
ecloud.ecloud_service.update_attributes!(packagecode: services['packagecode'], bossorderid: services['bossorderid'])
render :json => {result: true, errmsg: ""}
rescue Exception => e
logger.error(e.message)
@ -79,15 +80,15 @@ class EcloudController < ApplicationController
# 用户业务开通接口
def ps_new
begin
logger.info("11111######params")
ecloud_user = EcloudUser.where(:custid => params['custid'], :user_id => params['users']['userid']).first
user_param = params['users'].first
ecloud_user = EcloudUser.where(:custid => params['custid'], :userid => user_param['userid']).first
if ecloud_user.present?
render :json => {code: 501, msg: "你已开通过该业务"}
render :json => {code: 500, msg: "你已开通过该业务"}
else
EcloudUser.create!(custid: params['custid'], opttype: params['users']['opttype'], userid: params['users']['userid'],
username: params['users']['username'], useralias: params['users']['useralias'],
mobile: params['users']['mobile'], email: params['users']['email'], begintime: params['users']['begintime'].to_s,
endtime: params['users']['endtime'].to_s)
EcloudUser.create!(custid: params['custid'], opttype: user_param['opttype'], userid: user_param['userid'],
username: user_param['username'], useralias: user_param['useralias'],
mobile: user_param['mobile'], email: user_param['email'], begintime: user_param['begintime'].to_s,
endtime: user_param['endtime'].to_s)
render :json => {success: true, errmsg: ""}
end
rescue Exception => e
@ -99,12 +100,13 @@ class EcloudController < ApplicationController
# 用户业务变更、销毁接口
def ps_update
begin
ecloud_user = EcloudUser.where(:custid => params['custid'], :user_id => params['users']['userid']).first
user_param = params['users'].first
ecloud_user = EcloudUser.where(:custid => params['custid'], :userid => user_param['userid']).first
if ecloud_user.present?
ecloud_user.update_attributes(opttype: params['users']['opttype'])
render :json => {code: 501, msg: "你已开通过该业务"}
ecloud_user.update_attributes(opttype: user_param['opttype'])
render :json => {success: true, errmsg: ""}
else
render :json => {code: 404, errmsg: ""}
render :json => {code: 404, msg: "企业ID不存在"}
end
rescue Exception => e
logger.error(e.message)

@ -1,6 +1,7 @@
class Ecloud < ActiveRecord::Base
attr_accessible :applyno, :begintime, :bossorderid, :custcode, :custid, :custname, :custtype, :ecordercode, :endtime,
:mobile, :opttype, :productcode, :registersource, :string, :trial, :useralias, :userid, :username, :email
has_one :ecloud_users
has_one :ecloud_services
:mobile, :opttype, :productcode, :registersource, :string, :trial, :useralias, :userid, :username, :email,
:effecttime, :operatime
has_one :ecloud_user
has_one :ecloud_service
end

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/react/build/css/css_min_all.css"><link rel="stylesheet" href="/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.c95e49c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/react/build/js/js_min_all.js"></script><script type="text/javascript" src="/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/react/build/js/create_kindeditor.js"></script><script type="text/javascript" src="/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.61755688.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/react/build/css/css_min_all.css"><link rel="stylesheet" href="/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.c95e49c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/react/build/js/js_min_all.js"></script><script type="text/javascript" src="/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/react/build/js/create_kindeditor.js"></script><script type="text/javascript" src="/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.abd5a2e1.js"></script></body></html>

@ -0,0 +1,6 @@
class AddOperatimeToEcloud < ActiveRecord::Migration
def change
add_column :eclouds, :operatime, :string
add_column :eclouds, :effecttime, :string
end
end

@ -3,12 +3,12 @@
"./static/js/0.6b9d3c60.chunk.js.map": "./static/js/0.6b9d3c60.chunk.js.map",
"./static/js/1.5f152c98.chunk.js": "./static/js/1.5f152c98.chunk.js",
"./static/js/1.5f152c98.chunk.js.map": "./static/js/1.5f152c98.chunk.js.map",
"./static/js/10.8f4c2527.chunk.js": "./static/js/10.8f4c2527.chunk.js",
"./static/js/10.8f4c2527.chunk.js.map": "./static/js/10.8f4c2527.chunk.js.map",
"./static/js/10.2b2c6157.chunk.js": "./static/js/10.2b2c6157.chunk.js",
"./static/js/10.2b2c6157.chunk.js.map": "./static/js/10.2b2c6157.chunk.js.map",
"./static/js/11.03d0c22e.chunk.js": "./static/js/11.03d0c22e.chunk.js",
"./static/js/11.03d0c22e.chunk.js.map": "./static/js/11.03d0c22e.chunk.js.map",
"./static/js/12.37c4c6b6.chunk.js": "./static/js/12.37c4c6b6.chunk.js",
"./static/js/12.37c4c6b6.chunk.js.map": "./static/js/12.37c4c6b6.chunk.js.map",
"./static/js/12.6c612282.chunk.js": "./static/js/12.6c612282.chunk.js",
"./static/js/12.6c612282.chunk.js.map": "./static/js/12.6c612282.chunk.js.map",
"./static/js/13.6d2ba6a0.chunk.js": "./static/js/13.6d2ba6a0.chunk.js",
"./static/js/13.6d2ba6a0.chunk.js.map": "./static/js/13.6d2ba6a0.chunk.js.map",
"./static/js/14.22205a8a.chunk.js": "./static/js/14.22205a8a.chunk.js",
@ -67,8 +67,8 @@
"./static/js/9.e77edf45.chunk.js.map": "./static/js/9.e77edf45.chunk.js.map",
"main.css": "./static/css/main.c95e49c6.css",
"main.css.map": "./static/css/main.c95e49c6.css.map",
"main.js": "./static/js/main.61755688.js",
"main.js.map": "./static/js/main.61755688.js.map",
"main.js": "./static/js/main.abd5a2e1.js",
"main.js.map": "./static/js/main.abd5a2e1.js.map",
"static/media/ERASBD.ttf": "static/media/ERASBD.d5213044.ttf",
"static/media/background1.png": "static/media/background1.a34df396.png",
"static/media/background2.png": "static/media/background2.22ee659e.png",

@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/css/css_min_all.css"><link rel="stylesheet" href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.c95e49c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/js/js_min_all.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/js/create_kindeditor.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.61755688.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><title>Educoder</title><script type="text/javascript">window.__isR=!0</script><link rel="stylesheet" href="/css/css_min_all.css"><link rel="stylesheet" href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.c95e49c6.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="md_div" style="display:none"></div><div id="root" class="page -layout-v -fit"></div><div id="picture_display" style="display:none"></div><script type="text/javascript" src="/js/js_min_all.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/assets/kindeditor/kindeditor.js"></script><script type="text/javascript" src="/js/create_kindeditor.js"></script><script type="text/javascript" src="http://testbdweb.educoder.net/javascripts/educoder/edu_application.js"></script><script type="text/javascript" src="/react/build/./static/js/main.abd5a2e1.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -75,7 +75,7 @@ class ecGradeEvaluations extends Component {
}
componentDidMount(){
let ec_course_id=this.props.match.params.ec_course_id;
let Url = `/ec_courses/`+ec_course_id+`/score_level_data.json`;
let Url = `/ec_courses/`+ec_course_id+`/score_level_data`;
axios.get(Url, {
withCredentials: true,
}
@ -126,7 +126,7 @@ class ecGradeEvaluations extends Component {
updalevels=()=>{
let ec_course_id=this.props.match.params.ec_course_id;
let Url = `/ec_courses/`+ec_course_id+`/score_level_data.json`;
let Url = `/ec_courses/`+ec_course_id+`/score_level_data`;
axios.get(Url, {
withCredentials: true,
}

@ -55,7 +55,7 @@ class ecStudentList extends Component {
console.log(error);
});
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data.json';
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data';
axios.get(url, {
withCredentials: true,
}).then((response) => {
@ -96,7 +96,7 @@ class ecStudentList extends Component {
uploadcomponentDidMount(){
let major_id=this.props.match.params.major_id;
let year_id=this.props.match.params.year_id;
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data.json';
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data';
axios.get(url, {
withCredentials: true,
}).then((response) => {
@ -162,7 +162,7 @@ class ecStudentList extends Component {
showecStudentList=(page)=>{
let major_id=this.props.match.params.major_id;
let year_id=this.props.match.params.year_id;
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data.json?page='+page;
const url ='/ec_major_schools/'+major_id+'/academic_years/'+year_id+'/student_lists_data?page='+page;
axios.get(url, {
withCredentials: true,
}).then((response) => {

Loading…
Cancel
Save