Skip to content

Commit

Permalink
文件在updateFrom下
Browse files Browse the repository at this point in the history
  • Loading branch information
fenglijun nb committed May 9, 2020
0 parents commit 2977d6b
Show file tree
Hide file tree
Showing 4,878 changed files with 8,411 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@


# SKMS

### Prerequisites

- Node.js

```
yum remove nodejs
curl –sL https://rpm.nodesource.com/setup_10.x | sudo bash -
yum install -y nodejs
```

- Git > 2.5.1

```
yum install -y epel-release
yum remove git
rpm -U https://centos7.iuscommunity.org/ius-release.rpm
yum install -y git2u
git --version
```

- Usage

```
mkdir <your-project-name>
cd <your-project-name>
npm create umi
# Choose ant-design-pro:
Select the boilerplate type (Use arrow keys)
❯ ant-design-pro - Create project with an layout-only ant-design-pro boilerplate, use together with umi block.
app - Create project with a simple boilerplate, support typescript.
block - Create a umi block.
library - Create a library with umi.
plugin - Create a umi plugin.
npm install
npm start
```





### Production Install

```
git pull origin master
```

```
npm start
```

136 changes: 136 additions & 0 deletions config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
// https://umijs.org/config/
import { defineConfig } from 'umi';
import defaultSettings from './defaultSettings';
import proxy from './proxy';

const { REACT_APP_ENV } = process.env;
export default defineConfig({
hash: true,
antd: {},
dva: {
hmr: true,
},
locale: {
// default zh-CN
default: 'zh-CN',
// default true, when it is true, will use `navigator.language` overwrite default
antd: true,
baseNavigator: true,
},
dynamicImport: {
loading: '@/components/PageLoading/index',
},
targets: {
ie: 11,
},
// umi routes: https://umijs.org/docs/routing
routes: [
{
path: '/user',
component: '../layouts/UserLayout',
routes: [
{
name: 'login',
path: '/user/login',
component: './user/login',
},
],
},
{
path: '/',
component: '../layouts/SecurityLayout',
routes: [
{
path: '/',
component: '../layouts/BasicLayout',
authority: ['admin', 'user'],
routes: [
{
path: '/',
redirect: '/welcome',
},
{
path: '/welcome',
name: 'welcome',
icon: 'smile',
component: './Welcome',
},
{
path: '/admin',
name: 'admin',
icon: 'crown',
component: './Admin',
authority: ['admin'],
routes: [
{
path: '/admin/sub-page',
name: 'sub-page',
icon: 'smile',
component: './Welcome',
authority: ['admin'],
},
],
},
{
name: 'list.table-list',
icon: 'table',
path: '/list',
component: './ListTableList',
},



{
name: 'basic',
icon: 'smile',
path: '/basic',
routes: [
{
name: 'knowledge',
icon: 'table',
path: '/basic/knowledge',
component: './basic/knowledge',
},
{
name: 'knowledge',
icon: 'table',
path: '/basic/knowledge/CreateForm',
component: './basic/knowledge/components/CreateForm',
hideInMenu: true,
},
{
name: 'knowledge',
icon: 'table',
path: '/basic/knowledge/UpdateForm',
component: './basic/knowledge/components/UpdateForm',
hideInMenu: true,
},
],
},


{
component: './404',
},
],
},
{
component: './404',
},
],
},
{
component: './404',
},
],
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
theme: {
// ...darkTheme,
'primary-color': defaultSettings.primaryColor,
},
ignoreMomentLocale: true,
proxy: proxy[REACT_APP_ENV || 'dev'],
manifest: {
basePath: '/',
},
});
17 changes: 17 additions & 0 deletions config/defaultSettings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default {
navTheme: 'dark',
// 拂晓蓝
primaryColor: '#1890ff',
layout: 'sidemenu',
contentWidth: 'Fluid',
fixedHeader: false,
autoHideHeader: false,
fixSiderbar: false,
colorWeak: false,
menu: {
locale: true,
},
title: 'Ant Design Pro',
pwa: false,
iconfontUrl: '',
};
36 changes: 36 additions & 0 deletions config/proxy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
* The agent cannot take effect in the production environment
* so there is no configuration of the production environment
* For details, please see
* https://pro.ant.design/docs/deploy
*/
export default {
dev: {
'/api/': {
target: 'http://dev.lvb.dongaocloud.tv/',
changeOrigin: true,
pathRewrite: {
'^/api/': '/interface/v1/live/channel?Action=',
},
},
},
test: {
'/api/': {
target: 'https://preview.pro.ant.design',
changeOrigin: true,
pathRewrite: {
'^': '',
},
},
},
pre: {
'/api/': {
target: 'your pre url',
changeOrigin: true,
pathRewrite: {
'^': '',
},
},
},
};
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
testURL: 'http://localhost:8000',
testEnvironment: './tests/PuppeteerEnvironment',
verbose: false,
globals: {
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: false,
localStorage: null,
},
};
10 changes: 10 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
Loading

0 comments on commit 2977d6b

Please sign in to comment.