├── src
├── components
│ ├── TVChartContainer
│ │ ├── UDFCompatibleDatafeed
│ │ │ ├── iquotes-provider.js
│ │ │ ├── helpers.js
│ │ │ ├── udf-compatible-datafeed.js
│ │ │ ├── quotes-provider.js
│ │ │ ├── requester.js
│ │ │ ├── quotes-pulse-provider.js
│ │ │ ├── history-provider.js
│ │ │ └── data-pulse-provider.js
│ │ ├── index.less
│ │ └── index.js
│ ├── _utils
│ │ ├── pathTools.js
│ │ └── pathTools.test.js
│ ├── SiderMenu
│ │ ├── index.js
│ │ └── index.less
│ ├── TopNavHeader
│ │ ├── index.less
│ │ └── index.js
│ ├── GlobalHeader
│ │ ├── index.js
│ │ ├── index.less
│ │ └── RightContent.js
│ └── Header
│ │ └── index.js
├── routes
│ ├── transaction
│ │ ├── kline
│ │ │ ├── index.less
│ │ │ └── index.js
│ │ ├── depthchart
│ │ │ ├── index.less
│ │ │ └── index.js
│ │ ├── perpetual
│ │ │ ├── index.less
│ │ │ └── index.js
│ │ ├── positionHold
│ │ │ ├── index.less
│ │ │ └── index.js
│ │ ├── totalRight
│ │ │ ├── index.less
│ │ │ └── index.js
│ │ ├── instrumentMarket
│ │ │ ├── index.less
│ │ │ └── index.js
│ │ ├── orderCommit
│ │ │ ├── index.js
│ │ │ ├── index.less
│ │ │ ├── orderMarketPrice.js
│ │ │ └── orderLimitPrice.js
│ │ ├── instrumentDetal
│ │ │ ├── index.less
│ │ │ └── index.js
│ │ ├── recentTrade
│ │ │ ├── index.less
│ │ │ └── index.js
│ │ ├── orderList
│ │ │ ├── index.js
│ │ │ ├── buyTable.js
│ │ │ ├── sellTable.js
│ │ │ └── index.less
│ │ └── userOrder
│ │ │ └── index.less
│ ├── Exception
│ │ ├── 403.js
│ │ ├── 404.js
│ │ └── 500.js
│ ├── home
│ │ └── index.js
│ ├── account
│ │ └── index.js
│ ├── helpcenter
│ │ └── index.js
│ └── User
│ │ ├── Login.less
│ │ ├── Register.less
│ │ └── Login.js
├── index.less
├── assets
│ ├── logo.png
│ ├── background.png
│ ├── flow-img.jpg
│ ├── login-logo.png
│ ├── logo-title.png
│ └── scrollbar_arrow.png
├── language
│ ├── en_US.js
│ └── index.js
├── layouts
│ ├── BlankLayout.js
│ ├── PageHeaderLayout.less
│ ├── PageHeaderLayout.js
│ ├── UserLayout.less
│ └── UserLayout.js
├── theme
│ ├── red.less
│ ├── green.less
│ ├── purple.less
│ ├── index.js
│ └── index.less
├── services
│ └── api.js
├── models
│ ├── global.js
│ ├── register.js
│ ├── login.js
│ ├── instrument.js
│ └── recentTrade.js
├── utils
│ ├── Authorized.js
│ ├── authority.js
│ ├── utils.less
│ ├── privacy.js
│ ├── request.js
│ └── utils.js
├── index.js
├── router.js
└── common
│ ├── menu.js
│ ├── config.js
│ └── router.js
├── public
├── favicon.ico
├── charting_library
│ └── static
│ │ ├── images
│ │ ├── icons.png
│ │ ├── balloon.png
│ │ ├── delayed.png
│ │ ├── bar-loader.gif
│ │ ├── button-bg.png
│ │ ├── controlll.png
│ │ ├── select-bg.png
│ │ ├── warning-icon.png
│ │ ├── dialogs
│ │ │ ├── checkbox.png
│ │ │ ├── close-flat.png
│ │ │ ├── opacity-slider.png
│ │ │ ├── linewidth-slider.png
│ │ │ └── large-slider-handle.png
│ │ ├── tvcolorpicker-bg.png
│ │ ├── tvcolorpicker-check.png
│ │ ├── tvcolorpicker-sprite.png
│ │ ├── prediction-clock-black.png
│ │ ├── prediction-clock-white.png
│ │ ├── sidetoolbar
│ │ │ ├── instruments.png
│ │ │ └── toolgroup.png
│ │ ├── prediction-failure-white.png
│ │ ├── prediction-success-white.png
│ │ ├── tvcolorpicker-bg-gradient.png
│ │ ├── charting_library
│ │ │ ├── logo-widget-copyright.png
│ │ │ └── logo-widget-copyright-faded.png
│ │ └── svg
│ │ │ ├── chart
│ │ │ ├── font.svg
│ │ │ ├── pencil2.svg
│ │ │ ├── bucket2.svg
│ │ │ └── large-slider-handle.svg
│ │ │ └── question-mark-rounded.svg
│ │ ├── fonts
│ │ ├── fontawesome-webfont.ttf
│ │ └── fontawesome-webfont.woff
│ │ ├── bundles
│ │ ├── dot.ed68e83c16f77203e73dbc4c3a7c7fa1.cur
│ │ ├── grab.bc156522a6b55a60be9fae15c14b66c5.cur
│ │ ├── zoom.e21f24dd632c7069139bc47ae89c54b5.cur
│ │ ├── eraser.0579d40b812fa2c3ffe72e5803a6e14c.cur
│ │ ├── crosshair.6c091f7d5427d0c5e6d9dc3a90eb2b20.cur
│ │ ├── grabbing.1c0862a8a8c0fb02885557bc97fdafe7.cur
│ │ ├── vendors.a94ef44ed5c201cefcf6ad7460788c1a.css
│ │ ├── propertypagesfactory.37bd38e8744b0cc04a07.js
│ │ ├── 10.ef75a963f37114f76e2f.js
│ │ ├── ie-fallback-logos.8319ee6d7ee230348d2d.js
│ │ ├── 13.23881782ce3895456f66.js
│ │ └── 9.8309436d1561a99a7fad.js
│ │ └── lib
│ │ └── external
│ │ └── spin.min.js
├── manifest.json
└── index.html
├── .vscode
├── settings.json
└── launch.json
├── .gitignore
├── config
├── jest
│ ├── cssTransform.js
│ └── fileTransform.js
├── paths.js
├── env.js
└── webpackDevServer.config.js
├── scripts
├── test.js
├── start.js
└── build.js
├── README.md
└── package.json
/src/components/TVChartContainer/UDFCompatibleDatafeed/iquotes-provider.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/routes/transaction/kline/index.less:
--------------------------------------------------------------------------------
1 | .kline{
2 | height: 100%;
3 | }
--------------------------------------------------------------------------------
/src/components/TVChartContainer/index.less:
--------------------------------------------------------------------------------
1 | .TVChartContainer{
2 | height: 100%;
3 | }
--------------------------------------------------------------------------------
/src/index.less:
--------------------------------------------------------------------------------
1 | @import "~quant-ui/lib/theme/index.less";
2 | @import "theme/index.less";
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/src/language/en_US.js:
--------------------------------------------------------------------------------
1 | //请尽量保证文字长度一直(英文简称)
2 | export default {
3 | '账户':"account",
4 | }
--------------------------------------------------------------------------------
/src/assets/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/src/assets/background.png
--------------------------------------------------------------------------------
/src/assets/flow-img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/src/assets/flow-img.jpg
--------------------------------------------------------------------------------
/src/assets/login-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/src/assets/login-logo.png
--------------------------------------------------------------------------------
/src/assets/logo-title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/src/assets/logo-title.png
--------------------------------------------------------------------------------
/src/assets/scrollbar_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/src/assets/scrollbar_arrow.png
--------------------------------------------------------------------------------
/src/layouts/BlankLayout.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default props =>
;
4 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.detectIndentation": false,
3 | "editor.tabSize": 4,
4 | "editor.fontSize": 14,
5 | }
--------------------------------------------------------------------------------
/src/routes/transaction/depthchart/index.less:
--------------------------------------------------------------------------------
1 | .depthchart{
2 | width: 100%;
3 | height: 100%;
4 | background-color: white;
5 | }
--------------------------------------------------------------------------------
/public/charting_library/static/images/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/icons.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/balloon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/balloon.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/delayed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/delayed.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/bar-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/bar-loader.gif
--------------------------------------------------------------------------------
/public/charting_library/static/images/button-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/button-bg.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/controlll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/controlll.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/select-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/select-bg.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/warning-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/warning-icon.png
--------------------------------------------------------------------------------
/src/theme/red.less:
--------------------------------------------------------------------------------
1 | @import "~quant-ui/lib/theme/index.less";
2 | // -------- Colors -----------
3 | @primary-color : rgba(253,204,57,1);
4 | @import "./index.less";
--------------------------------------------------------------------------------
/public/charting_library/static/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/public/charting_library/static/images/dialogs/checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/dialogs/checkbox.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/dialogs/close-flat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/dialogs/close-flat.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/tvcolorpicker-bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/tvcolorpicker-bg.png
--------------------------------------------------------------------------------
/public/charting_library/static/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/public/charting_library/static/images/tvcolorpicker-check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/tvcolorpicker-check.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/tvcolorpicker-sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/tvcolorpicker-sprite.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/dialogs/opacity-slider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/dialogs/opacity-slider.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/prediction-clock-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/prediction-clock-black.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/prediction-clock-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/prediction-clock-white.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/sidetoolbar/instruments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/sidetoolbar/instruments.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/sidetoolbar/toolgroup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/sidetoolbar/toolgroup.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/dialogs/linewidth-slider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/dialogs/linewidth-slider.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/prediction-failure-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/prediction-failure-white.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/prediction-success-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/prediction-success-white.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/tvcolorpicker-bg-gradient.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/tvcolorpicker-bg-gradient.png
--------------------------------------------------------------------------------
/public/charting_library/static/images/dialogs/large-slider-handle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/dialogs/large-slider-handle.png
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/dot.ed68e83c16f77203e73dbc4c3a7c7fa1.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/bundles/dot.ed68e83c16f77203e73dbc4c3a7c7fa1.cur
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/grab.bc156522a6b55a60be9fae15c14b66c5.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/bundles/grab.bc156522a6b55a60be9fae15c14b66c5.cur
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/zoom.e21f24dd632c7069139bc47ae89c54b5.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/bundles/zoom.e21f24dd632c7069139bc47ae89c54b5.cur
--------------------------------------------------------------------------------
/public/charting_library/static/images/charting_library/logo-widget-copyright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/charting_library/logo-widget-copyright.png
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/eraser.0579d40b812fa2c3ffe72e5803a6e14c.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/bundles/eraser.0579d40b812fa2c3ffe72e5803a6e14c.cur
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/crosshair.6c091f7d5427d0c5e6d9dc3a90eb2b20.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/bundles/crosshair.6c091f7d5427d0c5e6d9dc3a90eb2b20.cur
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/grabbing.1c0862a8a8c0fb02885557bc97fdafe7.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/bundles/grabbing.1c0862a8a8c0fb02885557bc97fdafe7.cur
--------------------------------------------------------------------------------
/public/charting_library/static/images/charting_library/logo-widget-copyright-faded.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gitlwz/quant-coin/HEAD/public/charting_library/static/images/charting_library/logo-widget-copyright-faded.png
--------------------------------------------------------------------------------
/src/theme/green.less:
--------------------------------------------------------------------------------
1 | @import "~quant-ui/lib/theme/index.less";
2 | // -------- Colors -----------
3 | @primary-color: #1DA57A;
4 | @link-color: #1DA57A;
5 | @border-radius-base: 2px;
6 |
7 |
8 |
9 | @import "./index.less";
--------------------------------------------------------------------------------
/src/layouts/PageHeaderLayout.less:
--------------------------------------------------------------------------------
1 | .PageHeaderLayout-content {
2 | margin: 24px 24px 0;
3 | }
4 |
5 | @media screen and (max-width: @screen-sm) {
6 | .PageHeaderLayout-content {
7 | margin: 24px 0 0;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/vendors.a94ef44ed5c201cefcf6ad7460788c1a.css:
--------------------------------------------------------------------------------
1 | @keyframes highlight-animation{0%{background:transparent}to{background:#fff2cf}}@keyframes highlight-animation-theme-dark{0%{background:transparent}to{background:#194453}}
--------------------------------------------------------------------------------
/src/theme/purple.less:
--------------------------------------------------------------------------------
1 | @import "~quant-ui/lib/theme/index.less";
2 | // -------- Colors -----------
3 | @primary-color : #7546C9;
4 | @border-radius-base : 8px;
5 | @btn-border-radius-base : 16px;
6 | @btn-border-radius-sm : 16px;
7 |
8 | @import "./index.less";
--------------------------------------------------------------------------------
/src/routes/Exception/403.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'dva/router';
3 | import { Exception } from 'quant-ui';
4 |
5 | export default () => (
6 |
7 | );
8 |
--------------------------------------------------------------------------------
/src/routes/Exception/404.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'dva/router';
3 | import { Exception } from 'quant-ui';
4 |
5 | export default () => (
6 |
7 | );
8 |
--------------------------------------------------------------------------------
/src/routes/Exception/500.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'dva/router';
3 | import { Exception } from 'quant-ui';
4 |
5 | export default () => (
6 |
7 | );
8 |
--------------------------------------------------------------------------------
/src/routes/home/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 |
3 | class index extends Component {
4 | render() {
5 | return (
6 |
7 | 首页
8 |
9 | )
10 | }
11 | }
12 | export default index
13 |
--------------------------------------------------------------------------------
/src/language/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:09:13
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 10:09:13
6 | */
7 | import en_US from './en_US.js';
8 | import {language} from "quant-ui";
9 | language.setLanguageData({en_US:{...en_US}});
--------------------------------------------------------------------------------
/src/routes/account/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 |
3 | class index extends Component {
4 | render() {
5 | return (
6 |
7 | 账户
8 |
9 | )
10 | }
11 | }
12 |
13 | export default index
14 |
--------------------------------------------------------------------------------
/src/routes/helpcenter/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 |
3 | class index extends Component {
4 | render() {
5 | return (
6 |
7 | 帮助中心
8 |
9 | )
10 | }
11 | }
12 |
13 | export default index
14 |
--------------------------------------------------------------------------------
/public/charting_library/static/images/svg/chart/font.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/_utils/pathTools.js:
--------------------------------------------------------------------------------
1 | // /userinfo/2144/id => ['/userinfo','/useinfo/2144,'/userindo/2144/id']
2 | export function urlToList(url) {
3 | const urllist = url.split('/').filter(i => i);
4 | return urllist.map((urlItem, index) => {
5 | return `/${urllist.slice(0, index + 1).join('/')}`;
6 | });
7 | }
8 |
--------------------------------------------------------------------------------
/src/routes/transaction/perpetual/index.less:
--------------------------------------------------------------------------------
1 | .perpetual{
2 | padding: 1px 20px;
3 | background-color: white;
4 | height: 100%;
5 | .title{
6 | margin-right: 6em;
7 | float: left;
8 | font-size: 12px;
9 | .titleLine1{
10 | color: #0a9bf5;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/public/charting_library/static/images/svg/chart/pencil2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/routes/transaction/positionHold/index.less:
--------------------------------------------------------------------------------
1 | .positionHold{
2 | padding: 20px 20px;
3 | height: 100%;
4 | background-color: white;
5 | .row{
6 | height: 32px;
7 | line-height: 32px;
8 | }
9 | .radio{
10 | padding: 10px 0;
11 | }
12 | .description{
13 | margin-top: 20px;
14 | font-size: 12px;
15 | }
16 | }
--------------------------------------------------------------------------------
/src/services/api.js:
--------------------------------------------------------------------------------
1 | let basUrl = "/api/v1";
2 | export default {
3 | basUrl: basUrl,
4 | //委托接口
5 | trade: {
6 | getTrade: basUrl + "/trade",
7 | },
8 | //合约接口
9 | instrument: {
10 | getInstrument: basUrl + "/instrument",
11 | },
12 | //深度图接口
13 | depthchart: {
14 | getDepth: basUrl + "/orderBook/L2",
15 | },
16 | }
17 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/config/jest/cssTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // This is a custom Jest transformer turning style imports into empty objects.
4 | // http://facebook.github.io/jest/docs/en/webpack.html
5 |
6 | module.exports = {
7 | process() {
8 | return 'module.exports = {};';
9 | },
10 | getCacheKey() {
11 | // The output is always the same.
12 | return 'cssTransform';
13 | },
14 | };
15 |
--------------------------------------------------------------------------------
/src/routes/transaction/kline/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { TVChartContainer } from '../../../components/TVChartContainer/index';
3 | import "./index.less";
4 | class index extends Component {
5 | render() {
6 | return (
7 |
8 |
9 |
10 | )
11 | }
12 | }
13 |
14 | export default index
15 |
--------------------------------------------------------------------------------
/src/models/global.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | export default {
4 | namespace: 'global',
5 |
6 | state: {
7 | collapsed: false,
8 |
9 | },
10 |
11 | effects: {
12 |
13 | },
14 |
15 | reducers: {
16 | changeLayoutCollapsed(state, { payload }) {
17 | return {
18 | ...state,
19 | collapsed: payload,
20 | };
21 | },
22 |
23 | },
24 |
25 | subscriptions: {
26 |
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": "Chrome",
6 | "type": "chrome",
7 | "request": "launch",
8 | "url": "http://localhost:3000",
9 | "webRoot": "${workspaceRoot}/src",
10 | "sourceMapPathOverrides": {
11 | "webpack:///src/*": "${webRoot}/*"
12 | }
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/public/charting_library/static/images/svg/chart/bucket2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/routes/transaction/totalRight/index.less:
--------------------------------------------------------------------------------
1 | .totalRight{
2 | height: 100%;
3 | background-color: white;
4 | .line1{
5 | text-align: center;
6 | font-size: 18px;
7 | font-weight: bold;
8 | padding-top: 10px;
9 | .lineColor{
10 | color: rgb(10, 155, 245);
11 | }
12 | }
13 | .line2{
14 | text-align: center;
15 | font-size: 10px;
16 | margin-top: 6px;
17 | }
18 | }
--------------------------------------------------------------------------------
/src/layouts/PageHeaderLayout.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'dva/router';
3 | import {PageHeader} from 'quant-ui';
4 |
5 | export default ({ children, wrapperClassName, top, ...restProps }) => (
6 |
7 | {top}
8 |
9 | {children ?
{children}
: null}
10 |
11 | );
12 |
--------------------------------------------------------------------------------
/public/charting_library/static/images/svg/chart/large-slider-handle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/utils/Authorized.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:08:35
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 10:08:35
6 | */
7 | import { Authorized } from 'quant-ui';
8 | import { getAuthority } from './authority';
9 |
10 | let _Authorized = Authorized(getAuthority()); // eslint-disable-line
11 |
12 | // Reload the rights component
13 | const reloadAuthorized = () => {
14 | _Authorized = Authorized(getAuthority());
15 | };
16 |
17 | export { reloadAuthorized };
18 | export default _Authorized;
19 |
--------------------------------------------------------------------------------
/src/theme/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:09:05
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 10:09:05
6 | */
7 | import { theme } from 'quant-ui';
8 | switch (theme.getCurrentColor()) {
9 | case "default":
10 | break;
11 | case "red":
12 | import('./red.less')
13 | break;
14 | case "green":
15 | import('./green.less');
16 | break;
17 | case "purple":
18 | import('./purple.less');
19 | break;
20 | default:
21 | break;
22 | }
--------------------------------------------------------------------------------
/src/components/_utils/pathTools.test.js:
--------------------------------------------------------------------------------
1 | import { urlToList } from './pathTools';
2 |
3 | describe('test urlToList', () => {
4 | it('A path', () => {
5 | expect(urlToList('/userinfo')).toEqual(['/userinfo']);
6 | });
7 | it('Secondary path', () => {
8 | expect(urlToList('/userinfo/2144')).toEqual(['/userinfo', '/userinfo/2144']);
9 | });
10 | it('Three paths', () => {
11 | expect(urlToList('/userinfo/2144/addr')).toEqual([
12 | '/userinfo',
13 | '/userinfo/2144',
14 | '/userinfo/2144/addr',
15 | ]);
16 | });
17 | });
18 |
--------------------------------------------------------------------------------
/src/components/TVChartContainer/UDFCompatibleDatafeed/helpers.js:
--------------------------------------------------------------------------------
1 | /**
2 | * If you want to enable logs from datafeed set it to `true`
3 | */
4 | var isLoggingEnabled = false;
5 | export function logMessage(message) {
6 | if (isLoggingEnabled) {
7 | var now = new Date();
8 | console.log(now.toLocaleTimeString() + "." + now.getMilliseconds() + "> " + message);
9 | }
10 | }
11 | export function getErrorMessage(error) {
12 | if (error === undefined) {
13 | return '';
14 | }
15 | else if (typeof error === 'string') {
16 | return error;
17 | }
18 | return error.message;
19 | }
20 |
--------------------------------------------------------------------------------
/src/routes/transaction/instrumentMarket/index.less:
--------------------------------------------------------------------------------
1 | .instrumentMarket{
2 | height: 100%;
3 | background-color: white;
4 | padding: 5px;
5 | .ant-table{
6 | font-size: 12px;
7 | }
8 | .search{
9 | text-align: center;
10 | }
11 | .collapse{
12 | margin-top: 5px;
13 | .ant-collapse > .ant-collapse-item > .ant-collapse-header{
14 | padding: 6px 0 6px 40px;
15 | }
16 | .ant-collapse-content > .ant-collapse-content-box{
17 | padding: 0px;
18 | }
19 | .ant-table-row:hover{
20 | cursor: pointer;
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/routes/transaction/totalRight/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import "./index.less";
3 | class index extends Component {
4 | render() {
5 | return (
6 |
7 |
8 | 折合
9 | 15265.12345678
10 | BTC
11 |
12 |
13 | ≈
14 | 10252513.49
15 | USD
16 |
17 |
18 | )
19 | }
20 | }
21 |
22 | export default index
23 |
--------------------------------------------------------------------------------
/public/charting_library/static/images/svg/question-mark-rounded.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/routes/User/Login.less:
--------------------------------------------------------------------------------
1 | .qdp-login-main {
2 | width: 368px;
3 | margin: 0 auto;
4 | @media screen and (max-width: @screen-sm) {
5 | width: 95%;
6 | }
7 | .qdp-login-icon {
8 | font-size: 24px;
9 | color: rgba(0, 0, 0, 0.2);
10 | margin-left: 16px;
11 | vertical-align: middle;
12 | cursor: pointer;
13 | transition: color 0.3s;
14 | &:hover {
15 | color: @primary-color;
16 | }
17 | }
18 | .qdp-login-other {
19 | text-align: left;
20 | margin-top: 24px;
21 | line-height: 22px;
22 | .qdp-login-register {
23 | float: right;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/models/register.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-11-15 17:02:01
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-11-15 17:24:21
6 | */
7 | import { routerRedux } from 'dva/router';
8 | export default {
9 | namespace: 'register',
10 |
11 | state: {
12 | },
13 |
14 | effects: {
15 | *submit({ payload }, { call, put }) {
16 | yield put(
17 | routerRedux.push({
18 | pathname: '/user/login',
19 | })
20 | );
21 | },
22 | },
23 |
24 | reducers: {
25 | save(state, { payload }) {
26 | return {
27 | ...state,
28 | ...payload
29 | };
30 | },
31 | },
32 | };
33 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:08:48
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 10:08:48
6 | */
7 | import dva from 'dva';
8 | import createLoading from 'dva-loading';
9 | import logger from 'redux-logger';
10 | import 'moment/locale/zh-cn';
11 | import "./theme/index.js";
12 | import "./index.less";
13 | import './language';
14 | // 1. Initialize
15 | const app = dva(
16 | process.env.NODE_ENV === "development" ? {
17 | onAction: logger,
18 | } : {}
19 | );
20 |
21 | // 2. Plugins
22 | app.use(createLoading());
23 |
24 | // 3. Register global model
25 | app.model(require('./models/global').default);
26 |
27 | // 4. Router
28 | app.router(require('./router').default);
29 |
30 | // 5. Start
31 | app.start('#root');
32 |
33 | export default app._store; // eslint-disable-line
34 |
--------------------------------------------------------------------------------
/src/routes/transaction/orderCommit/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import "./index.less";
3 | import OrderLimitPrice from "./orderLimitPrice.js";
4 | import OrderMarketPrice from "./orderMarketPrice.js";
5 | import { Table, Tabs } from 'quant-ui';
6 | const TabPane = Tabs.TabPane;
7 |
8 | class Index extends Component {
9 | render() {
10 | return (
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | )
22 | }
23 | }
24 |
25 | export default Index
26 |
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/propertypagesfactory.37bd38e8744b0cc04a07.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([12],{1077:function(e,r,t){"use strict";r.createInputsPropertyPage=function(e,r){var t=e.getInputsPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.createStudyStrategyPropertyPage=function(e,r){var t=e.getStrategyPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.createStylesPropertyPage=function(e,r){var t=e.getStylesPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.createDisplayPropertyPage=function(e,r){var t=e.getDisplayPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.createVisibilitiesPropertyPage=function(e,r){var t=e.getVisibilitiesPropertyPage();return null==t?null:new t(e.properties(),r,e)},r.hasInputsPropertyPage=function(e){return null!==e.getInputsPropertyPage()},r.hasStylesPropertyPage=function(e){return null!==e.getStylesPropertyPage()}}});
--------------------------------------------------------------------------------
/config/jest/fileTransform.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('path');
4 |
5 | // This is a custom Jest transformer turning file imports into filenames.
6 | // http://facebook.github.io/jest/docs/en/webpack.html
7 |
8 | module.exports = {
9 | process(src, filename) {
10 | const assetFilename = JSON.stringify(path.basename(filename));
11 |
12 | if (filename.match(/\.svg$/)) {
13 | return `module.exports = {
14 | __esModule: true,
15 | default: ${assetFilename},
16 | ReactComponent: (props) => ({
17 | $$typeof: Symbol.for('react.element'),
18 | type: 'svg',
19 | ref: null,
20 | key: null,
21 | props: Object.assign({}, props, {
22 | children: ${assetFilename}
23 | })
24 | }),
25 | };`;
26 | }
27 |
28 | return `module.exports = ${assetFilename};`;
29 | },
30 | };
31 |
--------------------------------------------------------------------------------
/src/components/TVChartContainer/UDFCompatibleDatafeed/udf-compatible-datafeed.js:
--------------------------------------------------------------------------------
1 | import * as tslib_1 from "tslib";
2 | import { UDFCompatibleDatafeedBase } from './udf-compatible-datafeed-base';
3 | import { QuotesProvider } from './quotes-provider';
4 | import { Requester } from './requester';
5 | var UDFCompatibleDatafeed = /** @class */ (function (_super) {
6 | tslib_1.__extends(UDFCompatibleDatafeed, _super);
7 | function UDFCompatibleDatafeed(datafeedURL, updateFrequency) {
8 | if (updateFrequency === void 0) { updateFrequency = 10 * 1000; }
9 | var _this = this;
10 | var requester = new Requester();
11 | var quotesProvider = new QuotesProvider(datafeedURL, requester);
12 | _this = _super.call(this, datafeedURL, quotesProvider, requester, updateFrequency) || this;
13 | return _this;
14 | }
15 | return UDFCompatibleDatafeed;
16 | }(UDFCompatibleDatafeedBase));
17 | export { UDFCompatibleDatafeed };
18 |
--------------------------------------------------------------------------------
/src/routes/User/Register.less:
--------------------------------------------------------------------------------
1 | .register {
2 | width: 368px;
3 | margin: 0 auto;
4 | .ant-form-item {
5 | margin-bottom: 24px;
6 | }
7 | .register-title {
8 | font-size: 22px;
9 | text-align: center;
10 | margin-bottom: 20px;
11 | }
12 | .register-getCaptcha {
13 | display: block;
14 | width: 100%;
15 | }
16 | .register-submit {
17 | width: 50%;
18 | }
19 | .register-login {
20 | float: right;
21 | line-height: @btn-height-lg;
22 | }
23 | }
24 |
25 | .register-success,
26 | .register-warning,
27 | .register-error {
28 | transition: color 0.3s;
29 | }
30 |
31 | .register-success {
32 | color: @success-color;
33 | }
34 |
35 | .register-warning {
36 | color: @warning-color;
37 | }
38 |
39 | .register-error {
40 | color: @error-color;
41 | }
42 |
43 | .register-progress-pass>.register-progress {
44 | .ant-progress-bg {
45 | background-color: @warning-color;
46 | }
47 | }
--------------------------------------------------------------------------------
/src/components/SiderMenu/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:09:35
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 10:09:35
6 | */
7 | import 'rc-drawer/assets/index.css';
8 | import React from 'react';
9 | import DrawerMenu from 'rc-drawer';
10 | import SiderMenu from './SiderMenu';
11 |
12 | const SiderMenuWrapper = props => {
13 | const { isMobile, collapsed } = props;
14 | return isMobile ? (
15 | }
19 | onHandleClick={() => {
20 | props.onCollapse(!collapsed);
21 | }}
22 | open={!collapsed}
23 | onMaskClick={() => {
24 | props.onCollapse(true);
25 | }}
26 | >
27 |
28 |
29 | ) : (
30 |
31 | );
32 | };
33 |
34 | export default SiderMenuWrapper;
35 |
--------------------------------------------------------------------------------
/src/utils/authority.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:08:38
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 13:08:43
6 | */
7 | import { utils } from "quant-ui";
8 | import { encrypt,decrypt } from "./privacy";
9 | const { getCookie ,setCookie,removeCookie} = utils;
10 | //设置权限
11 | export function getAuthority() {
12 | return localStorage.getItem('antd-pro-authority') || 'admin';
13 | }
14 | export function setAuthority(authority) {
15 | return localStorage.setItem('antd-pro-authority', authority);
16 | }
17 |
18 | //设置密码
19 | export function setUserUserlogin(userlogin) {
20 | setCookie('quant-token',encrypt(JSON.stringify(userlogin),"518de8d99fd5d9b104360ab3"),7)
21 | }
22 | export function getUserUserlogin() {
23 | let data = undefined
24 | let cookiedata = getCookie('quant-token')
25 | try {
26 | data = cookiedata&&JSON.parse(decrypt(cookiedata,"518de8d99fd5d9b104360ab3"));
27 | } catch (error) {
28 | data = undefined;
29 | }
30 | return data
31 | }
32 | export function removeUserUserlogin() {
33 | removeCookie("quant-token")
34 | }
35 | //end
--------------------------------------------------------------------------------
/src/routes/transaction/instrumentDetal/index.less:
--------------------------------------------------------------------------------
1 | .instrumentDetal{
2 | height: 100%;
3 | background-color: white;
4 | padding: 10px 5px;
5 | .headPrice{
6 | font-size: 16px;
7 | text-align: center;
8 |
9 | .quant-trendItem .quant-trendItem-up i, .quant-trendItem .quant-trendItem-down i{
10 | font-size: 20px;
11 | }
12 | .quant-trendItem{
13 | font-size: 16px;
14 | }
15 | }
16 | .arrow-down{
17 | color: #ae543b;
18 | }
19 | .arrow-up{
20 | color: #3e8654;
21 | }
22 | .content{
23 | .lineItem{
24 | padding: 0 6px;
25 | text-overflow: ellipsis;
26 | overflow: hidden;
27 | white-space: nowrap;
28 | word-wrap: normal;
29 | .key{
30 | float: left;
31 | display: inline-block;
32 | }
33 | .value{
34 | float: right;
35 | font-weight: 600;
36 | text-align: right;
37 | display: inline-block;
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/src/routes/transaction/recentTrade/index.less:
--------------------------------------------------------------------------------
1 | .recentTrade {
2 | height: 100%;
3 | background-color: white;
4 | padding: 5px;
5 | table {
6 | background-color: white;
7 | border-radius: 6px;
8 | table-layout: fixed;
9 | border: 1px solid #e8e8e8;
10 | border-collapse: collapse;
11 | width: 100%;
12 | overflow-x: auto;
13 | overflow-y: auto;
14 | text-align: right;
15 | font-size: 12px;
16 | tr:nth-child(even)>td {
17 | background-color: rgba(195, 195, 195, 0.25);
18 | }
19 | tr:hover{
20 | background: rgba(82, 179, 112, 0.3);
21 | }
22 | td{
23 | padding-right: 6px;
24 | white-space: nowrap;
25 | word-break: normal;
26 | }
27 | td:last-child{
28 | width: 10%;
29 | }
30 | .red{
31 | color: #ae543b;
32 | }
33 | .green{
34 | color: #3e8654;
35 | }
36 | .light{
37 | animation: recentTrade-myfirst 0.8s;
38 | }
39 | }
40 | }
41 | @keyframes recentTrade-myfirst {
42 | 0% {
43 | background: rgba(173, 169, 104, 0.4);
44 | }
45 | }
--------------------------------------------------------------------------------
/src/components/TVChartContainer/UDFCompatibleDatafeed/quotes-provider.js:
--------------------------------------------------------------------------------
1 | import { getErrorMessage, logMessage, } from './helpers';
2 | var QuotesProvider = /** @class */ (function () {
3 | function QuotesProvider(datafeedUrl, requester) {
4 | this._datafeedUrl = datafeedUrl;
5 | this._requester = requester;
6 | }
7 | QuotesProvider.prototype.getQuotes = function (symbols) {
8 | var _this = this;
9 | return new Promise(function (resolve, reject) {
10 | _this._requester.sendRequest(_this._datafeedUrl, 'quotes', { symbols: symbols })
11 | .then(function (response) {
12 | if (response.s === 'ok') {
13 | resolve(response.d);
14 | }
15 | else {
16 | reject(response.errmsg);
17 | }
18 | })
19 | .catch(function (error) {
20 | var errorMessage = getErrorMessage(error);
21 | logMessage("QuotesProvider: getQuotes failed, error=" + errorMessage);
22 | reject("network error: " + errorMessage);
23 | });
24 | });
25 | };
26 | return QuotesProvider;
27 | }());
28 | export { QuotesProvider };
29 |
--------------------------------------------------------------------------------
/src/layouts/UserLayout.less:
--------------------------------------------------------------------------------
1 | .UserLayout-container {
2 | display: flex;
3 | flex-direction: column;
4 | height: 100vh;
5 | overflow: auto;
6 | background: #f0f2f5;
7 | }
8 |
9 | .UserLayout-content {
10 | padding: 32px 0;
11 | flex: 1;
12 | }
13 |
14 | @media (min-width: @screen-md-min) {
15 | .UserLayout-container {
16 | background-repeat: no-repeat;
17 | background-position: center 110px;
18 | background-size: 100%;
19 | }
20 | .UserLayout-content {
21 | padding: 112px 0 24px 0;
22 | }
23 | }
24 |
25 | .UserLayout-top {
26 | text-align: center;
27 | }
28 |
29 | .UserLayout-header {
30 | height: 44px;
31 | line-height: 44px;
32 | a {
33 | text-decoration: none;
34 | }
35 | }
36 |
37 | .UserLayout-logo {
38 | height: 44px;
39 | vertical-align: top;
40 | margin-right: 16px;
41 | }
42 |
43 | .UserLayout-title {
44 | font-size: 33px;
45 | color: @heading-color;
46 | font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
47 | font-weight: 600;
48 | position: relative;
49 | top: 2px;
50 | }
51 |
52 | .UserLayout-desc {
53 | font-size: @font-size-base;
54 | color: @text-color-secondary;
55 | margin-top: 12px;
56 | margin-bottom: 40px;
57 | }
--------------------------------------------------------------------------------
/src/utils/utils.less:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:08:42
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 10:08:42
6 | */
7 | .textOverflow() {
8 | overflow: hidden;
9 | text-overflow: ellipsis;
10 | word-break: break-all;
11 | white-space: nowrap;
12 | }
13 |
14 | .textOverflowMulti(@line: 3, @bg: #fff) {
15 | overflow: hidden;
16 | position: relative;
17 | line-height: 1.5em;
18 | max-height: @line * 1.5em;
19 | text-align: justify;
20 | margin-right: -1em;
21 | padding-right: 1em;
22 | &:before {
23 | background: @bg;
24 | content: '...';
25 | padding: 0 1px;
26 | position: absolute;
27 | right: 14px;
28 | bottom: 0;
29 | }
30 | &:after {
31 | background: white;
32 | content: '';
33 | margin-top: 0.2em;
34 | position: absolute;
35 | right: 14px;
36 | width: 1em;
37 | height: 1em;
38 | }
39 | }
40 |
41 | // mixins for clearfix
42 | // ------------------------
43 | .clearfix() {
44 | zoom: 1;
45 | &:before,
46 | &:after {
47 | content: ' ';
48 | display: table;
49 | }
50 | &:after {
51 | clear: both;
52 | visibility: hidden;
53 | font-size: 0;
54 | height: 0;
55 | }
56 | }
--------------------------------------------------------------------------------
/src/components/TVChartContainer/UDFCompatibleDatafeed/requester.js:
--------------------------------------------------------------------------------
1 | import { logMessage } from './helpers';
2 | var Requester = /** @class */ (function () {
3 | function Requester(headers) {
4 | if (headers) {
5 | this._headers = headers;
6 | }
7 | }
8 | Requester.prototype.sendRequest = function (datafeedUrl, urlPath, params) {
9 | if (params !== undefined) {
10 | var paramKeys = Object.keys(params);
11 | if (paramKeys.length !== 0) {
12 | urlPath += '?';
13 | }
14 | urlPath += paramKeys.map(function (key) {
15 | return encodeURIComponent(key) + "=" + encodeURIComponent(params[key].toString());
16 | }).join('&');
17 | }
18 | logMessage('New request: ' + urlPath);
19 | // Send user cookies if the URL is on the same origin as the calling script.
20 | var options = { credentials: 'same-origin' };
21 | if (this._headers !== undefined) {
22 | options.headers = this._headers;
23 | }
24 | return fetch(datafeedUrl + "/" + urlPath, options)
25 | .then(function (response) { return response.text(); })
26 | .then(function (responseTest) { return JSON.parse(responseTest); });
27 | };
28 | return Requester;
29 | }());
30 | export { Requester };
31 |
--------------------------------------------------------------------------------
/src/routes/transaction/orderCommit/index.less:
--------------------------------------------------------------------------------
1 | .orderCommit{
2 | height: 100%;
3 | background-color: white;
4 | padding: 5px;
5 | }
6 | .orderLimitPrice{
7 | padding: 0 10px;
8 | .topRadio{
9 | }
10 | .inputNAndP{
11 | .firstSpan{
12 | height: 32px;
13 | line-height: 32px;
14 | }
15 | .currency{
16 | height:32px;
17 | line-height: 32px;
18 | background:rgba(255,161,30,1);
19 | border-radius:4px;
20 | text-align: center;
21 | }
22 | }
23 | .buttonMid{
24 | .green{
25 | background-color: #00BC7D;
26 | color: #fff;
27 | }
28 | .red{
29 | background-color:#DB5252;
30 | color: #fff;
31 | }
32 | }
33 | .totalData{
34 | margin-top: 10px;
35 | font-size: 12px;
36 | .specialSpan{
37 | width: 60px;
38 | text-align: right;
39 | display: inline-block;
40 | }
41 | .totalDataRow{
42 | padding: 10px 0;
43 | }
44 | .totalDataRowSecond{
45 | padding-bottom: 10px;
46 | }
47 | }
48 | .riskLimit{
49 | padding: 10px 0;
50 | border-top: 1px solid #3A425C;
51 | .riskLimitRow{
52 | text-align: right;
53 | .riskLimitSpan{
54 | margin-right: 5px;
55 | }
56 | }
57 | }
58 | }
59 | .marginB10{
60 | margin-bottom: 10px;
61 | }
--------------------------------------------------------------------------------
/scripts/test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Do this as the first thing so that any code reading it knows the right env.
4 | process.env.BABEL_ENV = 'test';
5 | process.env.NODE_ENV = 'test';
6 | process.env.PUBLIC_URL = '';
7 |
8 | // Makes the script crash on unhandled rejections instead of silently
9 | // ignoring them. In the future, promise rejections that are not handled will
10 | // terminate the Node.js process with a non-zero exit code.
11 | process.on('unhandledRejection', err => {
12 | throw err;
13 | });
14 |
15 | // Ensure environment variables are read.
16 | require('../config/env');
17 |
18 |
19 | const jest = require('jest');
20 | const execSync = require('child_process').execSync;
21 | let argv = process.argv.slice(2);
22 |
23 | function isInGitRepository() {
24 | try {
25 | execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
26 | return true;
27 | } catch (e) {
28 | return false;
29 | }
30 | }
31 |
32 | function isInMercurialRepository() {
33 | try {
34 | execSync('hg --cwd . root', { stdio: 'ignore' });
35 | return true;
36 | } catch (e) {
37 | return false;
38 | }
39 | }
40 |
41 | // Watch unless on CI, in coverage mode, or explicitly running all tests
42 | if (
43 | !process.env.CI &&
44 | argv.indexOf('--coverage') === -1 &&
45 | argv.indexOf('--watchAll') === -1
46 | ) {
47 | // https://github.com/facebook/create-react-app/issues/5210
48 | const hasSourceControl = isInGitRepository() || isInMercurialRepository();
49 | argv.push(hasSourceControl ? '--watch' : '--watchAll');
50 | }
51 |
52 |
53 | jest.run(argv);
54 |
--------------------------------------------------------------------------------
/src/router.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:08:54
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 13:30:35
6 | */
7 | import React from 'react';
8 | import { routerRedux, Route, Switch } from 'dva/router';
9 | import { LocaleProvider, language } from 'quant-ui';
10 | import zh_CN from 'antd/lib/locale-provider/zh_CN';
11 | import en_US from 'antd/lib/locale-provider/en_US';
12 | import { getRouterData } from './common/router';
13 | import Authorized from './utils/Authorized';
14 | import { getQueryPath } from './utils/utils';
15 |
16 | const { ConnectedRouter } = routerRedux;
17 | const { AuthorizedRoute } = Authorized;
18 | let currlanguage = zh_CN;
19 | if (language.getCurrentLanguage() !== 'zh_CN') {
20 | currlanguage = en_US;
21 | }
22 | function RouterConfig({ history, app }) {
23 | const routerData = getRouterData(app);
24 | const UserLayout = routerData['/user'].component;
25 | const BasicLayout = routerData['/'].component;
26 | return (
27 |
28 |
29 |
30 |
31 | }
34 | authority={['admin', 'user']}
35 | redirectPath={getQueryPath('/user/login')}
36 | />
37 |
38 |
39 |
40 | );
41 | }
42 |
43 | export default RouterConfig;
44 |
--------------------------------------------------------------------------------
/src/common/menu.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:10:52
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-11-15 18:12:18
6 | */
7 | import { isUrl } from '../utils/utils';
8 |
9 | const menuData = [
10 | {
11 | name: '首页',
12 | icon: 'home',
13 | path: 'home',
14 |
15 | },
16 | {
17 | name: '交易',
18 | icon: 'dollar',
19 | path: 'transaction',
20 |
21 | },
22 | {
23 | name: '账户',
24 | icon: 'team',
25 | path: 'account',
26 |
27 | },
28 | {
29 | name: '帮助中心',
30 | icon: 'issues-close',
31 | path: 'helpcenter',
32 |
33 | },
34 |
35 |
36 |
37 | {
38 | name: '账户',
39 | icon: 'user',
40 | path: 'user',
41 | authority: 'guest',
42 | children: [
43 | {
44 | name: '登录',
45 | path: 'login',
46 | },
47 | {
48 | name: '注册',
49 | path: 'register',
50 | }
51 | ],
52 | },
53 | ];
54 |
55 | function formatter(data, parentPath = '/', parentAuthority) {
56 | return data.map(item => {
57 | let { path } = item;
58 | if (!isUrl(path)) {
59 | path = parentPath + item.path;
60 | }
61 | const result = {
62 | ...item,
63 | path,
64 | authority: item.authority || parentAuthority,
65 | };
66 | if (item.children) {
67 | result.children = formatter(item.children, `${parentPath}${item.path}/`, item.authority);
68 | }
69 | return result;
70 | });
71 | }
72 |
73 | export const getMenuData = () => formatter(menuData);
74 |
--------------------------------------------------------------------------------
/src/routes/transaction/positionHold/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import "./index.less";
3 | import { Input, Row, Col, Radio, Icon } from 'quant-ui';
4 | const RadioGroup = Radio.Group;
5 |
6 | class Index extends Component {
7 | constructor(props){
8 | super(props);
9 | this.state = {
10 | value:1
11 | }
12 | }
13 | onChangeRadio = (e) => {
14 | this.setState({
15 | value: e.target.value,
16 | });
17 | }
18 | onChangeInput = () => {
19 |
20 | }
21 | onClick = () => {
22 | }
23 | render() {
24 | return (
25 |
26 |
27 | 杠杆倍数
28 |
29 |
30 |
31 |
32 | 全仓
33 | 1x
34 | 5x
35 | 10x
36 |
37 |
38 |
39 |
40 |
41 | 注意:设置将对当前合约的所有产品生效,且有持仓时不得改动。
42 |
43 |
44 |
45 | )
46 | }
47 | }
48 |
49 | export default Index
50 |
--------------------------------------------------------------------------------
/public/charting_library/static/bundles/10.ef75a963f37114f76e2f.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([10],{1193:function(t,e,i){"use strict";function r(){return n.enabled("saveload_requires_authentication")&&!window.is_authenticated?Promise.resolve([]):new Promise(function(t){c.getCharts(function(e){t(e)})})}var n,o,a,c,s,u,h,l;Object.defineProperty(e,"__esModule",{value:!0}),n=i(5),o=i(1320),a=i(397),c=i(92),s=i(398),u=i(93),h=i(24),l=function(){function t(t){var e=this;this._favoriteChartsService=new o.FavoriteChartsService(u.TVXWindowEvents,h),this._dialog=new a,this._getChartEntry=function(t){return{id:t.id,url:t.url,title:t.name,symbol:t.short_symbol,interval:t.interval,toolsCount:0,modified:t.modified_iso,active:function(){return e._isActiveChart(t.id)},openAction:function(){return c.loadChart(t)},deleteAction:function(i,r){s.deleteChart(r,t.image_url,function(){e._deleteChart(t.id),i.resolve()},i.reject.bind(i))},favoriteAction:e._updateFavorites}},this._updateFavorites=function(t){return e._favoriteChartsService.set(t)},this._isActiveChart=function(t){return t===e._chartWidgetCollection.metaInfo.id.value()},this._deleteChart=function(t){e._isActiveChart(t)&&(n.enabled("saveload_storage_customization")?e._chartWidgetCollection.clearChartMetaInfo():location.href="/chart/")},this._chartWidgetCollection=t}return t.prototype.showLoadDialog=function(){var t=this;r().then(function(e){return e.map(t._getChartEntry)}).then(function(e){t._dialog.show(e,t._favoriteChartsService.get())})},t}(),e.LoadChartService=l},1320:function(t,e,i){"use strict";var r,n,o;Object.defineProperty(e,"__esModule",{value:!0}),r=i(0),n=i(174),o=function(t){function e(e,i){return t.call(this,e,i,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})||this}return r.__extends(e,t),e}(n.CommonJsonStoreService),e.FavoriteChartsService=o}});
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
14 |
23 | 量投
24 |
25 |
26 |
29 |
30 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/components/SiderMenu/index.less:
--------------------------------------------------------------------------------
1 | @ease-in-out-circ: cubic-bezier(0.78, 0.14, 0.15, 0.86);
2 | .siderMenu-logo {
3 | height: 64px;
4 | position: relative;
5 | line-height: 64px;
6 | padding-left: (@menu-collapsed-width - 32px) / 2;
7 | transition: all 0.3s; // background: #002140;
8 | background: #002140;
9 | overflow: hidden;
10 | img {
11 | display: inline-block;
12 | vertical-align: middle;
13 | height: 32px;
14 | }
15 | h1 {
16 | color: white;
17 | display: inline-block;
18 | vertical-align: middle;
19 | font-size: 20px;
20 | margin: 0 0 0 12px;
21 | font-family: 'Myriad Pro', 'Helvetica Neue', Arial, Helvetica, sans-serif;
22 | font-weight: 600;
23 | }
24 | }
25 |
26 | .siderMenu-sider {
27 | min-height: 100vh;
28 | box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
29 | position: relative;
30 | z-index: 10;
31 | &.siderMenu-ligth {
32 | background-color: white;
33 | .siderMenu-logo {
34 | background: white;
35 | h1 {
36 | color: #002140;
37 | }
38 | }
39 | }
40 | }
41 |
42 | .siderMenu-icon {
43 | width: 14px;
44 | margin-right: 10px;
45 | }
46 |
47 | .drawer .drawer-content {
48 | background: #001529;
49 | }
50 |
51 | .ant-menu-inline-collapsed {
52 | &>.ant-menu-item .sider-menu-item-img+span,
53 | &>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .sider-menu-item-img+span,
54 | &>.ant-menu-submenu>.ant-menu-submenu-title .sider-menu-item-img+span {
55 | max-width: 0;
56 | display: inline-block;
57 | opacity: 0;
58 | }
59 | }
60 |
61 | .ant-menu-item .sider-menu-item-img+span,
62 | .ant-menu-submenu-title .sider-menu-item-img+span {
63 | transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
64 | opacity: 1;
65 | }
--------------------------------------------------------------------------------
/src/components/TopNavHeader/index.less:
--------------------------------------------------------------------------------
1 | .TopNavHeader {
2 | .head {
3 | width: 100%;
4 | transition: background 0.3s, width 0.2s;
5 | height: 64px;
6 | padding: 0 12px 0 0;
7 | box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
8 | position: relative;
9 | .ant-menu.ant-menu-root.ant-menu-horizontal>.ant-menu-item{
10 | height: 100%;
11 | margin-top: 9px;
12 | }
13 | .ant-menu-submenu.ant-menu-submenu-horizontal {
14 | height: 100%;
15 | padding-top: 9px;
16 | .ant-menu-submenu-title {
17 | height: 100%;
18 | }
19 | }
20 | &.light {
21 | background-color: #fff;
22 | }
23 | .main {
24 | display: flex;
25 | height: 64px;
26 | padding-left: 24px;
27 | &.wide {
28 | max-width: 1200px;
29 | margin: auto;
30 | padding-left: 4px;
31 | }
32 | .left {
33 | flex: 1;
34 | display: flex;
35 | }
36 | .right {
37 | width: 324px;
38 | }
39 | }
40 | }
41 | .logo {
42 | width: 165px;
43 | height: 64px;
44 | position: relative;
45 | line-height: 64px;
46 | transition: all 0.3s;
47 | overflow: hidden;
48 | img {
49 | display: inline-block;
50 | vertical-align: middle;
51 | height: 32px;
52 | }
53 | h1 {
54 | color: #fff;
55 | display: inline-block;
56 | vertical-align: middle;
57 | font-size: 16px;
58 | margin: 0 0 0 12px;
59 | font-weight: 400;
60 | }
61 | }
62 | .light {
63 | h1 {
64 | color: #002140;
65 | }
66 | }
67 | }
--------------------------------------------------------------------------------
/src/routes/transaction/perpetual/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import './index.less';
3 | class index extends Component {
4 | render() {
5 | return (
6 |
7 |
8 |
9 | 动态权益/BTC1
10 |
11 |
12 | 15,265.12345678
13 |
14 |
15 |
16 |
17 | 可用/BTC2
18 |
19 |
20 | 15,265.12345678
21 |
22 |
23 |
24 |
25 | 冻结保证金/BTC3
26 |
27 |
28 | 15,265.12345678
29 |
30 |
31 |
32 |
33 | 占用保证金/BTC4
34 |
35 |
36 | 15,265.12345678
37 |
38 |
39 |
40 |
41 | 风险系数/BTC4
42 |
43 |
44 | 15,265.12345678
45 |
46 |
47 |
52 |
53 | )
54 | }
55 | }
56 |
57 | export default index
58 |
--------------------------------------------------------------------------------
/src/routes/transaction/orderList/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import './index.less';
3 | import {Icon, Select } from 'quant-ui';
4 | import { connect } from 'dva';
5 | import BuyTable from "./buyTable";
6 | import SellTable from "./sellTable";
7 | const Option = Select.Option;
8 |
9 | class Index extends Component {
10 | constructor(props){
11 | super(props);
12 | this.state = {
13 | positionSetting: "10"
14 | }
15 | }
16 | onChange = (value) => {
17 | this.setState({
18 | positionSetting: value
19 | })
20 | }
21 | render() {
22 | const {icon, lastPrice} = this.props
23 | return (
24 |
25 |
26 |
27 | {lastPrice}
28 |
29 |
30 |
31 | 盘口档位设置
32 |
40 |
41 |
42 | )
43 | }
44 | }
45 |
46 | export default connect(({instrument}) => {
47 | const { instrumentData } = instrument
48 | return {
49 | icon:instrumentData.icon,
50 | lastPrice:instrumentData.lastPrice,
51 | }
52 | })(
53 | Index
54 | )
55 |
--------------------------------------------------------------------------------
/src/components/TopNavHeader/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:09:29
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 10:09:29
6 | */
7 | import React, { PureComponent } from 'react';
8 | import { Link } from 'dva/router';
9 | import RightContent from '../GlobalHeader/RightContent';
10 | import BaseMenu from '../SiderMenu/BaseMenu';
11 | import config from "../../common/config.js";
12 | export default class TopNavHeader extends PureComponent {
13 | constructor(props) {
14 | super(props);
15 |
16 | this.state = {
17 | maxWidth: 'calc(100vw - 430px)',
18 | };
19 | }
20 |
21 | render() {
22 | const { maxWidth } = this.state;
23 |
24 | return (
25 |
26 |
27 |
{
29 | this.maim = ref;
30 | }}
31 | className={`${'main'} ${ ''}`}
32 | >
33 |
34 |
35 |
36 |

37 |
38 |
39 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/components/GlobalHeader/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:10:33
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-10-18 10:10:33
6 | */
7 | import React, { PureComponent } from 'react';
8 | import { theme, Icon, language,utils, } from 'quant-ui';
9 | import { Link } from 'dva/router';
10 | import { connect } from 'dva';
11 | import config from "../../common/config.js";
12 | import RightContent from "./RightContent.js";
13 | const { store } = utils;
14 | const { getCurrentColor, refreshColor, setCurrentColor } = theme;
15 | let { getCurrentLanguage, setCurrentLanguage, refreshLanguage, getLanguageData } = language;
16 | let $ = getLanguageData;
17 | class GlobalHeader extends PureComponent {
18 | state = {
19 | icontype: "arrows-alt"
20 | }
21 |
22 | toggle = () => {
23 | const { collapsed, onCollapse } = this.props;
24 | onCollapse(!collapsed);
25 | this.triggerResizeEvent();
26 | };
27 | triggerResizeEvent = () => {
28 | const event = document.createEvent('HTMLEvents');
29 | event.initEvent('resize', true, false);
30 | window.dispatchEvent(event);
31 | }
32 |
33 |
34 | render() {
35 | const {
36 | collapsed,
37 | isMobile,
38 | } = this.props;
39 | return (
40 |
41 | {isMobile && [
42 |
43 |

44 |
45 | ]}
46 |
47 |
52 |
53 |
54 |
55 | );
56 | }
57 | }
58 | export default connect(({ loading }) => ({
59 |
60 | }))(GlobalHeader)
--------------------------------------------------------------------------------
/src/routes/transaction/instrumentDetal/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { Icon, Spin } from 'quant-ui';
3 | import "./index.less";
4 | import { connect } from 'dva';
5 | class Index extends Component {
6 | componentWillMount = () => {
7 | // const { dispatch } = this.props;
8 | // dispatch({
9 | // type: "instrument/getInstrumentBySymbol",
10 | // payload: { symbol: "XBTUSD" }
11 | // })
12 | }
13 | render() {
14 | const { instrumentData, loading } = this.props;
15 | let instrument = instrumentData;
16 | return (
17 |
18 |
19 |
20 | {instrument.lastPrice}
21 |
22 |
23 |
24 |
25 | 24小时交易量
26 | {instrument.foreignNotional24h} USD
27 |
28 |
29 |
30 |
31 | BitMEX 指数 的价格
32 | {instrument.indicativeSettlePrice}
33 |
34 |
35 |
36 |
37 |
38 | )
39 | }
40 | }
41 |
42 | export default connect(({ instrument, loading }) => {
43 | const { instrumentData } = instrument;
44 | return {
45 | instrumentData,
46 | loading: !!loading.effects["instrument/getInstrumentBySymbol"]
47 | }
48 | })(
49 | Index
50 | )
--------------------------------------------------------------------------------
/src/theme/index.less:
--------------------------------------------------------------------------------
1 | @import "../components/SiderMenu/index.less";
2 | @import "../components/GlobalHeader/index.less";
3 | @import "../routes/User/Login.less";
4 | @import "../layouts/UserLayout.less";
5 | @import "../layouts/PageHeaderLayout.less";
6 | @import "../components/TopNavHeader/index.less";
7 | @import "../routes/User/Register.less";
8 | .global-spin {
9 | width: 100%;
10 | margin: 40px 0 !important;
11 | }
12 |
13 | //立体动画
14 | .hover-shadow {
15 | transition: all .3s;
16 | }
17 |
18 | .hover-shadow:hover {
19 | box-shadow:2px 2px 10px 4px rgba(0, 0, 0, 0.15);
20 | }
21 |
22 | //end
23 | //滚动条样式
24 | /* 设置滚动条的样式 */
25 |
26 | ::-webkit-scrollbar {
27 | width: 10px;
28 | height: 10px;
29 | }
30 |
31 | ::-webkit-scrollbar-button {
32 | width: 0;
33 | height: 0;
34 | }
35 |
36 | ::-webkit-scrollbar-button:start:increment,
37 | ::-webkit-scrollbar-button:end:decrement {
38 | display: none;
39 | }
40 |
41 | ::-webkit-scrollbar-corner {
42 | display: block;
43 | }
44 |
45 | ::-webkit-scrollbar-thumb {
46 | border-radius: 8px;
47 | background-color: rgba(0, 0, 0, .2);
48 | }
49 |
50 | ::-webkit-scrollbar-thumb:hover {
51 | border-radius: 8px;
52 | background-color: rgba(0, 0, 0, .5);
53 | }
54 |
55 | ::-webkit-scrollbar-track,
56 | ::-webkit-scrollbar-thumb {
57 | border-right: 1px solid transparent;
58 | border-left: 1px solid transparent;
59 | }
60 |
61 | ::-webkit-scrollbar-track:hover {
62 | background-color: rgba(0, 0, 0, .15);
63 | }
64 |
65 | ::-webkit-scrollbar-button:start {
66 | width: 10px;
67 | height: 10px;
68 | background: none;
69 | }
70 |
71 | ::-webkit-scrollbar-button:start:hover {
72 | background: none;
73 | }
74 |
75 | ::-webkit-scrollbar-button:start:active {
76 | background: none;
77 | }
78 |
79 | ::-webkit-scrollbar-button:end {
80 | width: 10px;
81 | height: 10px;
82 | background: none;
83 | }
84 |
85 | ::-webkit-scrollbar-button:end:hover {
86 | background: none;
87 | }
88 |
89 | ::-webkit-scrollbar-button:end:active {
90 | background: none;
91 | }
--------------------------------------------------------------------------------
/src/common/config.js:
--------------------------------------------------------------------------------
1 | /*
2 | * @Author: 刘文柱
3 | * @Date: 2018-10-18 10:10:38
4 | * @Last Modified by: 刘文柱
5 | * @Last Modified time: 2018-11-01 18:05:19
6 | */
7 | import { language, Icon } from "quant-ui";
8 | import React from 'react';
9 | import Logo from '../assets/logo.png';
10 | import LogoAndTitle from '../assets/logo-title.png';
11 | import LoginLogo from '../assets/login-logo.png';
12 | import LOGIN_BG from "../assets/background.png";
13 | import flowImg from "../assets/flow-img.jpg";
14 | //中文配置
15 | let zhConfig = {
16 | 'TITLE': "量投", //标题
17 | "LOGO": Logo, //LOGO 32x32
18 | "LOGOANTTITLE": LogoAndTitle, //LOGO带标题 height 小于 50 width 小于 220
19 | "LOGON_LOGO": LoginLogo, //登录页标题
20 | "LOGON_DESC": "量投科技XXXXXXXXXXXX", //登录页描述
21 | "LOGIN_BG": LOGIN_BG, //登陆页背景
22 | "LEAD_IMG": flowImg, //操作引导
23 | "Help": flowImg, //帮助文档 bas64图片 或者 url
24 | "privacy": "当前版本:0.125", //关于
25 | "flowImg": flowImg, //首页流程图
26 | "isTop": true, //导航栏是否在顶部
27 | "FOOTER": Copyright 2018 量投极速柜台交易系统 //页脚
28 | }
29 |
30 | //英文配置
31 | let enConfig = {
32 | 'TITLE': "量投", //标题
33 | "LOGO": Logo, //LOGO 32x32
34 | "LOGOANTTITLE": LogoAndTitle, //LOGO带标题
35 | "LOGON_LOGO": LoginLogo, //登录页标题
36 | "LOGON_DESC": "量投科技 XXXXXXXXX", //登录页描述
37 | "LOGIN_BG": LOGIN_BG, //登陆页背景
38 | "LEAD_IMG": flowImg, //操作引导
39 | "Help": flowImg, //帮助文档 bas64图片 或者 url
40 | "privacy": "当前版本:0.125", //关于
41 | "flowImg": flowImg, //首页流程图
42 | "isTop": true,
43 | "FOOTER": Copyright 2018 QuantDo Plantform //页脚
44 | }
45 |
46 | let config = zhConfig;
47 | if (language.getCurrentLanguage() === "en_US") {
48 | config = enConfig;
49 | }
50 | export default config;
--------------------------------------------------------------------------------
/config/paths.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const path = require('path');
4 | const fs = require('fs');
5 | const url = require('url');
6 |
7 | // Make sure any symlinks in the project folder are resolved:
8 | // https://github.com/facebook/create-react-app/issues/637
9 | const appDirectory = fs.realpathSync(process.cwd());
10 | const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
11 |
12 | const envPublicUrl = process.env.PUBLIC_URL;
13 |
14 | function ensureSlash(inputPath, needsSlash) {
15 | const hasSlash = inputPath.endsWith('/');
16 | if (hasSlash && !needsSlash) {
17 | return inputPath.substr(0, inputPath.length - 1);
18 | } else if (!hasSlash && needsSlash) {
19 | return `${inputPath}/`;
20 | } else {
21 | return inputPath;
22 | }
23 | }
24 |
25 | const getPublicUrl = appPackageJson =>
26 | envPublicUrl || require(appPackageJson).homepage;
27 |
28 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer
29 | // "public path" at which the app is served.
30 | // Webpack needs to know it to put the right