commit
008a1412f1
@ -0,0 +1,3 @@
|
||||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the ecloud controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
@ -0,0 +1,198 @@
|
||||
#encoding=utf-8
|
||||
require 'net/http'
|
||||
require 'digest'
|
||||
|
||||
class EcloudController < ApplicationController
|
||||
skip_before_filter :verify_authenticity_token
|
||||
|
||||
before_filter :check_sign
|
||||
before_filter :user_setup
|
||||
# before_filter :require_login, only: [:authorize]
|
||||
|
||||
|
||||
skip_before_filter :verify_authenticity_token, only: [:ps_new, :ps_update, :bs_new, :bs_update, :ecloud_login_callback]
|
||||
|
||||
def index
|
||||
|
||||
render file: 'public/react-oschina/build/index.html', :layout => false
|
||||
end
|
||||
|
||||
def trustie_login
|
||||
end
|
||||
|
||||
CLIENT_ID = '1022'
|
||||
CLIENT_SECRET = '2112037a-6d7a-432b-9081-feb1153d8668'
|
||||
ROOT_URl = 'http://localhost:3000'
|
||||
SERVER_URL = "https://221.176.54.92:9081/restful/services/"
|
||||
|
||||
|
||||
|
||||
## 签名
|
||||
def sign(timestamp)
|
||||
Digest::MD5.hexdigest("client_id=#{CLIENT_ID}client_key=#{CLIENT_SECRET}timestamp=#{timestamp}").upcase
|
||||
end
|
||||
|
||||
|
||||
# 企业开通
|
||||
# ecordercode 唯一标志一个企业的订购关系
|
||||
def bs_new
|
||||
ActiveRecord::Base.transaction do
|
||||
begin
|
||||
ecloud = Ecloud.create!(applyno: params['applyno'], ecordercode: params['ecordercode'], opttype: params['opttype'],
|
||||
trial: params['trial'], bossorderid: params['bossorderid'], custid: params['custid'], custtype: params['custtype'],
|
||||
custcode: params['custcode'], registersource: params['registersource'], custname: params['custname'],
|
||||
userid: params['userid'], username: params['username'], useralias: params['useralias'], mobile: params['mobile'],
|
||||
email: params['email'], productcode: params['productcode'], begintime: params['begintime'],
|
||||
endtime: params['endtime'])
|
||||
services = params['services'].first
|
||||
EcloudService.create(opttype: services['opttype'], code: services['code'], begintime: services['begintime'],
|
||||
endtime: services['endtime'], ecloud_id: ecloud.try(:id))
|
||||
|
||||
render :json => {result: true, errmsg: ""}
|
||||
rescue Exception => e
|
||||
logger.error(e.message)
|
||||
render :json => {code: 500, msg: "#{e.message}"}
|
||||
raise ActiveRecord::Rollback
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# 企业更新
|
||||
def bs_update
|
||||
ActiveRecord::Base.transaction do
|
||||
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['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)
|
||||
render :json => {code: 500, msg: "#{e.message}"}
|
||||
raise ActiveRecord::Rollback
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# 用户业务开通接口
|
||||
def ps_new
|
||||
begin
|
||||
user_param = params['users'].first
|
||||
ecloud_user = EcloudUser.where(:custid => params['custid'], :userid => user_param['userid']).first
|
||||
if ecloud_user.present?
|
||||
render :json => {code: 500, msg: "你已开通过该业务"}
|
||||
else
|
||||
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
|
||||
logger.error(e.message)
|
||||
render :json => {code: 500, msg: "#{e.message}"}
|
||||
end
|
||||
end
|
||||
|
||||
# 用户业务变更、销毁接口
|
||||
def ps_update
|
||||
begin
|
||||
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: user_param['opttype'])
|
||||
render :json => {success: true, errmsg: ""}
|
||||
else
|
||||
render :json => {code: 404, msg: "企业ID不存在"}
|
||||
end
|
||||
rescue Exception => e
|
||||
logger.error(e.message)
|
||||
render :json => {code: 500, msg: "#{e.message}"}
|
||||
end
|
||||
end
|
||||
|
||||
def ecloud_login_callback
|
||||
#获取code
|
||||
logger.info "oauth2 login_callback: #{params}"
|
||||
|
||||
raise "没有code" unless params[:code]
|
||||
|
||||
url = "#{SERVER_URL}/oauth2/authorization?grant_type=authorization_code" +
|
||||
"&client_id=#{CLIENT_ID}&scope=&redirect_uri=&code=#{params[:code]}"
|
||||
|
||||
res = post(url)
|
||||
logger.info "oauth2 authorization resp: #{res}"
|
||||
|
||||
body = decode(res)
|
||||
#{"access_token":"21a80f20ff736b54aecd002b60210943","token_type":"bearer","expires_in":86400,"refresh_token":"be92e2c137a8c6dd22f0d8c4a622b3aeceb054087a95d293130f04ec60fd3e3f","scope":"user_info","created_at":1542684088}
|
||||
|
||||
raise '登录失败' unless body["access_token"]
|
||||
|
||||
#获取此用户信息
|
||||
|
||||
# res = get("https://gitee.com/api/v5/user?access_token=#{body["access_token"]}")
|
||||
res = get("#{SERVER_URL}/user/info?access_token=#{body['access_token']}&userid=#{body['uid']}")
|
||||
logger.info "oauth2 get user info: #{res}"
|
||||
|
||||
# 同步用户
|
||||
# info = decode(res)
|
||||
#
|
||||
# user = User.find_by_oschina_user_id(info["id"])
|
||||
# unless user
|
||||
# user = User.create_with_oschina!(info)
|
||||
# end
|
||||
#
|
||||
# @current_user = user
|
||||
|
||||
render :index
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
def get(url)
|
||||
uri = URI(url)
|
||||
res = Net::HTTP.start(uri.host, uri.port, use_ssl: url.start_with?('https')) do |http|
|
||||
req = Net::HTTP::Get.new(uri)
|
||||
#req['Content-Type'] = 'application/json'
|
||||
# The body needs to be a JSON string, use whatever you know to parse Hash to JSON
|
||||
#req.body = {a: 1}.to_json
|
||||
http.request(req)
|
||||
end
|
||||
|
||||
res.body
|
||||
end
|
||||
|
||||
def post(url)
|
||||
uri = URI(url)
|
||||
res = Net::HTTP.start(uri.host, uri.port, use_ssl: url.start_with?('https')) do |http|
|
||||
req = Net::HTTP::Post.new(uri)
|
||||
#req['Content-Type'] = 'application/json'
|
||||
# The body needs to be a JSON string, use whatever you know to parse Hash to JSON
|
||||
#req.body = {a: 1}.to_json
|
||||
http.request(req)
|
||||
end
|
||||
|
||||
res.body
|
||||
end
|
||||
|
||||
def decode(s)
|
||||
begin
|
||||
obj = ActiveSupport::JSON.decode(s)
|
||||
rescue ActiveSupport::JSON.parse_error
|
||||
logger.error("Attempted to decode invalid JSON: #{s}")
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def check_sign
|
||||
sign = sign(params['timestamp'])
|
||||
if sign != params['sign']
|
||||
render :json => {code: 501, msg: "sign的值错误"}
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -0,0 +1,2 @@
|
||||
module EcloudHelper
|
||||
end
|
@ -0,0 +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,
|
||||
:effecttime, :operatime
|
||||
has_one :ecloud_user
|
||||
has_one :ecloud_service
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
class EcloudService < ActiveRecord::Base
|
||||
attr_accessible :begintime, :code, :endtime, :opttype, :ecloud_id, :packagecode, :bossorderid
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
class EcloudUser < ActiveRecord::Base
|
||||
attr_accessible :begintime, :email, :endtime, :mobile, :opttype, :paras, :useralias, :userid, :username, :custid
|
||||
end
|
@ -0,0 +1,3 @@
|
||||
class EcloudUser < ActiveRecord::Base
|
||||
attr_accessible :begintime, :email, :endtime, :mobile, :opttype, :paras, :useralias, :userid, :username, :custid
|
||||
end
|
@ -1,6 +1,7 @@
|
||||
class EcloudService
|
||||
|
||||
def list
|
||||
return {status: 0, message: "test"}
|
||||
def list params
|
||||
|
||||
return {status: 0, message: "test", code: params[:code], params: params}
|
||||
end
|
||||
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.3274c43b.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.9f01900e.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.32605315.js"></script></body></html>
|
@ -1,6 +1,6 @@
|
||||
<% major_school.users.each do |user| %>
|
||||
<span class="MajorName"><%= user.show_real_name %>
|
||||
<% if @is_school_manager || major_school.users.where(:id => User.current.id).count > 0 %>
|
||||
<% if @is_school_manager %>
|
||||
<i class="iconfont icon-htmal5icon19 font-16" onclick="delete_confirm_box_2('<%= delete_manager_ec_major_school_path(major_school, :user_id => user.id) %>','是否确认删除')"></i>
|
||||
<% end %>
|
||||
</span>
|
||||
|
@ -0,0 +1,9 @@
|
||||
Gitlab.configure do |config|
|
||||
# config.endpoint = 'http://192.168.41.130:3000/trustie/api/v3' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
|
||||
# config.private_token = 'cK15gUDwvt8EEkzwQ_63' # user's private token, default: ENV['GITLAB_API_PRIVATE_TOKEN']
|
||||
config.endpoint = 'http://testbdgit.trustie.net/api/v3' # API endpoint URL, default: ENV['GITLAB_API_ENDPOINT']
|
||||
config.private_token = 's89kqsMPtF8YLZSLyVmF' # user's private token, default: ENV['GITLAB_API_PRIVATE_TOKEN']
|
||||
# Optional
|
||||
# config.user_agent = 'Custom User Agent' # user agent, default: 'Gitlab Ruby Gem [version]'
|
||||
# config.sudo = 'user' # username for sudo mode, default: nil
|
||||
end
|
@ -0,0 +1,30 @@
|
||||
class CreateEcloudusers < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :ecloudusers do |t|
|
||||
t.string :applyno
|
||||
t.string :ecordercoder
|
||||
t.string :string
|
||||
t.integer :opttype
|
||||
t.boolean :trial
|
||||
t.string :bossorderid
|
||||
t.integer :custid
|
||||
t.string :custcod
|
||||
t.string :string
|
||||
t.integer :custtype
|
||||
t.integer :registersource
|
||||
t.string :custname
|
||||
t.integer :userid
|
||||
t.string :username
|
||||
t.string :useralias
|
||||
t.string :moblile
|
||||
t.string :email
|
||||
t.string :productcode
|
||||
t.datetime :begintime
|
||||
t.datetime :endtime
|
||||
t.string :productparas
|
||||
t.string :services
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,18 @@
|
||||
class CreateEcloudUser < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :ecloud_users do |t|
|
||||
t.integer :opttype
|
||||
t.integer :userid
|
||||
t.string :username
|
||||
t.string :useralias
|
||||
t.string :mobile
|
||||
t.string :email
|
||||
t.string :begintime
|
||||
t.string :endtime
|
||||
t.string :paras
|
||||
t.integer :custid
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,25 @@
|
||||
class CreateEclouds < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :eclouds do |t|
|
||||
t.string :applyno
|
||||
t.string :ecordercode
|
||||
t.integer :opttype
|
||||
t.boolean :trial
|
||||
t.string :bossorderid
|
||||
t.integer :custid
|
||||
t.string :custcode
|
||||
t.integer :registersource
|
||||
t.integer :custtype
|
||||
t.string :custname
|
||||
t.integer :userid
|
||||
t.string :username
|
||||
t.string :useralias
|
||||
t.string :mobile
|
||||
t.string :productcode
|
||||
t.string :begintime
|
||||
t.string :endtime
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,13 @@
|
||||
class CreateEcloudServices < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :ecloud_services do |t|
|
||||
t.integer :opttype
|
||||
t.string :code
|
||||
t.string :begintime
|
||||
t.string :endtime
|
||||
t.integer :ecloud_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddIndexToEcloud < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :eclouds, [:ecordercode, :custcode], :unique => true, :name => 'ecorder_cust_code'
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddEmailToEcloud < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :eclouds, :email, :string
|
||||
end
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class AddPackagecodeToEcloudServices < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :ecloud_services, :packagecode, :string
|
||||
add_column :ecloud_services, :bossorderid, :string
|
||||
end
|
||||
end
|
@ -0,0 +1,6 @@
|
||||
class AddOperatimeToEcloud < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :eclouds, :operatime, :string
|
||||
add_column :eclouds, :effecttime, :string
|
||||
end
|
||||
end
|
@ -0,0 +1,46 @@
|
||||
#coding=utf-8
|
||||
|
||||
require 'net/http'
|
||||
require 'uri'
|
||||
|
||||
|
||||
module Trustie
|
||||
module Http
|
||||
|
||||
def get(url)
|
||||
uri = URI(url)
|
||||
res = Net::HTTP.start(uri.host, uri.port, use_ssl: url.start_with?('https')) do |http|
|
||||
req = Net::HTTP::Get.new(uri)
|
||||
#req['Content-Type'] = 'application/json'
|
||||
# The body needs to be a JSON string, use whatever you know to parse Hash to JSON
|
||||
#req.body = {a: 1}.to_json
|
||||
http.request(req)
|
||||
end
|
||||
|
||||
res.body
|
||||
end
|
||||
|
||||
def post(url, data=nil)
|
||||
uri = URI(url)
|
||||
res = Net::HTTP.start(uri.host, uri.port, use_ssl: url.start_with?('https')) do |http|
|
||||
req = Net::HTTP::Post.new(uri)
|
||||
#req['Content-Type'] = 'application/json'
|
||||
# The body needs to be a JSON string, use whatever you know to parse Hash to JSON
|
||||
req.body = data if data
|
||||
http.request(req)
|
||||
end
|
||||
|
||||
res.body
|
||||
end
|
||||
|
||||
def decode(s)
|
||||
begin
|
||||
obj = ActiveSupport::JSON.decode(s)
|
||||
rescue ActiveSupport::JSON.parse_error
|
||||
logger.error("Attempted to decode invalid JSON: #{s}")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
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="/css/css_min_all.css"><link rel="stylesheet" href="http://testbdweb.educoder.net/assets/iconfont/iconfont.css"><link href="/react/build/./static/css/main.3274c43b.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.9f01900e.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.32605315.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
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
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
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
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
@ -1,2 +1,2 @@
|
||||
webpackJsonp([30],{1788:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n.n(i),u=n(595),l=n(322),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),f=function(e){function t(){var e,n,c,i;o(this,t);for(var a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return n=c=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),c.fetchPosts=function(){(0,c.props.dispatch)(Object(u.c)())},i=n,r(c,i)}return c(t,e),s(t,[{key:"componentDidMount",value:function(){console.log("TestRealWorldRedux "),this.fetchPosts()}},{key:"render",value:function(){var e=this.props,t=e.memo_list,n=e.isFetching;return a.a.createElement("div",null,"TestRealWorldRedux",t.length,a.a.createElement("p",null,n?"isFetching":"fetched"),a.a.createElement("button",{onClick:this.fetchPosts},"fetch again"))}}]),t}(a.a.Component),p=function(e){var t=(e.counter,e.testRealWorld);return{memo_list:t.memo_list,isFetching:t.isFetching}};t.default=Object(l.connect)(p)(f)}});
|
||||
//# sourceMappingURL=30.3482c43d.chunk.js.map
|
||||
webpackJsonp([30],{1788:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function c(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n.n(i),u=n(595),l=n(321),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),f=function(e){function t(){var e,n,c,i;o(this,t);for(var a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return n=c=r(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),c.fetchPosts=function(){(0,c.props.dispatch)(Object(u.c)())},i=n,r(c,i)}return c(t,e),s(t,[{key:"componentDidMount",value:function(){console.log("TestRealWorldRedux "),this.fetchPosts()}},{key:"render",value:function(){var e=this.props,t=e.memo_list,n=e.isFetching;return a.a.createElement("div",null,"TestRealWorldRedux",t.length,a.a.createElement("p",null,n?"isFetching":"fetched"),a.a.createElement("button",{onClick:this.fetchPosts},"fetch again"))}}]),t}(a.a.Component),p=function(e){var t=(e.counter,e.testRealWorld);return{memo_list:t.memo_list,isFetching:t.isFetching}};t.default=Object(l.connect)(p)(f)}});
|
||||
//# sourceMappingURL=30.92e2f4a6.chunk.js.map
|
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
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
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue