|
|
@ -3,7 +3,7 @@ import { RouteRequest } from '@peace/utils'; |
|
|
|
import { RouteTable } from '$utils' |
|
|
|
|
|
|
|
export const INIT_LAYOUT = 'INIT_LAYOUT'; |
|
|
|
export function initLayout(title, copyright, sections, actions) { |
|
|
|
export function initLayout (title, copyright, sections, actions) { |
|
|
|
return { |
|
|
|
type: INIT_LAYOUT, |
|
|
|
payload: { |
|
|
@ -16,7 +16,7 @@ export function initLayout(title, copyright, sections, actions) { |
|
|
|
} |
|
|
|
|
|
|
|
export const RESIZE = 'RESIZE'; |
|
|
|
export function resize(clientHeight, clientWidth) { |
|
|
|
export function resize (clientHeight, clientWidth) { |
|
|
|
return { |
|
|
|
type: RESIZE, |
|
|
|
payload: { |
|
|
@ -27,7 +27,7 @@ export function resize(clientHeight, clientWidth) { |
|
|
|
} |
|
|
|
|
|
|
|
export const INIT_API_ROOT = 'INIT_API_ROOT'; |
|
|
|
export function initApiRoot() { |
|
|
|
export function initApiRoot () { |
|
|
|
return dispatch => { |
|
|
|
RouteRequest.get(RouteTable.apiRoot).then(res => { |
|
|
|
localStorage.setItem('tyApiRoot', res.root); |
|
|
|