Commit f92bc055 authored by nano's avatar nano

env

parent 8409c374
let publicPath = 'https://cdn01.moecube.com/accounts/' let publicPath = 'https://cdn01.moecube.com/accounts/'
const API_ROOT = {
test: 'http://192.168.1.9:3000',
dev: 'http://114.215.243.95:8082',
prod: 'https://api.moeube.com/accounts'
}
let defineConf = { let defineConf = {
apiRoot: process.env["API_ROOT"] apiRoot: API_ROOT[process.env["ENV"]],
} }
export default { export default {
......
{ {
"private": true, "private": true,
"scripts": { "scripts": {
"start": "cross-env API_ROOT=http://192.168.1.9:3000 roadhog server", "start": "cross-env ENV=test roadhog server",
"build:dev": "cross-env API_ROOT=http://114.215.243.95:8082 roadhog build", "build:dev": "cross-env ENV=dev roadhog build",
"build": "cross-env API_ROOT=https://api.moeube.com/accounts roadhog build", "build": "cross-env ENV=prod roadhog build",
"lint": "eslint --ext .js src test", "lint": "eslint --ext .js src test",
"precommit": "npm run lint" "precommit": "npm run lint"
}, },
......
import { Route, Router } from 'dva/router'; import { Route, Router, Redirect } from 'dva/router';
import React from 'react'; import React from 'react';
import Active from './routes/Activate.js'; import Active from './routes/Activate.js';
......
...@@ -95,6 +95,7 @@ class Profiles extends React.Component { ...@@ -95,6 +95,7 @@ class Profiles extends React.Component {
/* eslint-disable jsx-a11y/label-has-for */ /* eslint-disable jsx-a11y/label-has-for */
return ( return (
<div style={{ flex: 1, height: '100%' }}>
<Spin spinning={loading} delay={100}> <Spin spinning={loading} delay={100}>
<Tabs defaultActiveKey="1" className="app-detail-nav"> <Tabs defaultActiveKey="1" className="app-detail-nav">
<TabPane tab={<span><Icon type="user"/><Format id={'user-info'}/> </span>} key="1"> <TabPane tab={<span><Icon type="user"/><Format id={'user-info'}/> </span>} key="1">
...@@ -107,7 +108,7 @@ class Profiles extends React.Component { ...@@ -107,7 +108,7 @@ class Profiles extends React.Component {
this.cropper = cropper; this.cropper = cropper;
}} }}
src={imageUrl || defaultAvatar} src={imageUrl || defaultAvatar}
style={{ height: '20vw', width: '20vw' }} style={{ maxHeight: '20vw', maxWidth: '20vw' }}
aspectRatio={1 / 1} aspectRatio={1 / 1}
guides guides
/> />
...@@ -164,6 +165,7 @@ class Profiles extends React.Component { ...@@ -164,6 +165,7 @@ class Profiles extends React.Component {
</TabPane> </TabPane>
</Tabs> </Tabs>
</Spin> </Spin>
</div>
); );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment