Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
robot-monitor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
汪晓凯
robot-monitor
Commits
cfdf24cc
Commit
cfdf24cc
authored
Jul 03, 2018
by
wxk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台配置接口ok
parent
eb83ea77
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
38 deletions
+51
-38
index.js
config/index.js
+2
-3
index.html
index.html
+1
-0
navLeft.vue
src/components/navLeft.vue
+1
-1
api-config.js
src/config/api-config.js
+7
-8
container.vue
src/views/container.vue
+33
-19
overview.vue
src/views/overview.vue
+7
-7
.gitkeep
static/.gitkeep
+0
-0
robot.ico
static/robot.ico
+0
-0
No files found.
config/index.js
View file @
cfdf24cc
...
...
@@ -6,13 +6,12 @@ const path = require('path')
module
.
exports
=
{
dev
:
{
// Paths
assetsSubDirectory
:
'static'
,
assetsPublicPath
:
'/'
,
proxyTable
:
{
'/
asset_monitor
'
:
{
target
:
'http://47.91.221.203:4665
6
'
,
// 接口的域名
'/'
:
{
target
:
'http://47.91.221.203:4665
7
'
,
// 接口的域名
// secure: false, // 如果是https接口,需要配置这个参数
changeOrigin
:
true
,
// 如果接口跨域,需要进行这个参数配置
pathRewrite
:
{
...
...
index.html
View file @
cfdf24cc
...
...
@@ -3,6 +3,7 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<link
rel=
"shortcut icon"
media=
"screen"
type=
"image/x-icon"
href=
"static/robot.ico"
>
<title>
机器人监控
</title>
</head>
<body>
...
...
src/components/navLeft.vue
View file @
cfdf24cc
...
...
@@ -10,7 +10,7 @@
</el-menu-item>
<el-submenu
index=
"1"
>
<template
slot=
"title"
>
网站监控
</
template
>
<el-menu-item
:index=
"'/monitor/' + index"
v-for=
"(item, index) in platInfo"
>
{{item.platform}}
</el-menu-item>
<el-menu-item
:index=
"'/monitor/' + index"
v-for=
"(item, index) in platInfo"
:key=
"item.platform"
>
{{item.platform}}
</el-menu-item>
</el-submenu>
<el-submenu
index=
"2"
>
<
template
slot=
"title"
>
币种监控
</
template
>
...
...
src/config/api-config.js
View file @
cfdf24cc
const
baseUrl
=
"/asset_monitor"
;
const
Api
=
{
Login
:
baseUrl
+
"/login"
,
//登录
Register
:
baseUrl
+
"/register"
,
//注册
ResetPassword
:
baseUrl
+
"/resetPassword"
,
//重置密码
SendEmailVcode
:
baseUrl
+
"/sendEmailVcode"
,
//发送验证码
GetMatchRobots
:
baseUrl
+
"/accountlist"
,
//获取符合条件的机器人
GetRobotStatus
:
baseUrl
+
"/robotStatus"
,
//机器人预警状态查询
GetPlatformInfo
:
baseUrl
+
"/platform"
,
//交易所及匹配的交易对、目标币信息查询
Login
:
"/login"
,
//登录
Register
:
"/register"
,
//注册
ResetPassword
:
"/resetPassword"
,
//重置密码
SendEmailVcode
:
"/sendEmailVcode"
,
//发送验证码
GetMatchRobots
:
"/accountlist"
,
//获取符合条件的机器人
GetRobotStatus
:
"/robotStatus"
,
//机器人预警状态查询
GetPlatformInfo
:
"/platform"
,
//交易所及匹配的交易对、目标币信息查询
}
export
default
Api
;
src/views/container.vue
View file @
cfdf24cc
...
...
@@ -15,33 +15,47 @@
<
script
>
import
PreHeader
from
'../components/preHeader'
import
NavLeft
from
'../components/navLeft'
import
axios
from
'axios'
;
import
ApiConfig
from
"../config/api-config"
;
export
default
{
data
()
{
return
{
platInfo
:
[
{
"platform"
:
"找币"
,
"symbol"
:[
"DCR/BTC"
,
"YCC/BTC"
],
"coin"
:[
"DCR"
,
"BTY"
]
},{
"platform"
:
"火币"
,
"symbol"
:[
"DCR/BTC"
,
"BTY/BTC"
],
"coin"
:[
"DCR"
,
"YCC"
]
},{
"platform"
:
"币安"
,
"symbol"
:[
"DCR/BTC"
,
"YCC/BTC"
,
"BTY/USDT"
],
"coin"
:[
"DCR"
,
"BTC"
]
},{
"platform"
:
"Gateio"
,
"symbol"
:[
"DCR/BTC"
],
"coin"
:[
"DCR"
]
}
]
platInfo
:
[],
// platInfo: [
// {
// "platform":"找币",
// "symbol":["DCR/BTC", "YCC/BTC"],
// "coin":["DCR", "BTY"]
// },{
// "platform":"火币",
// "symbol":["DCR/BTC", "BTY/BTC"],
// "coin":["DCR", "YCC"]
// },{
// "platform":"币安",
// "symbol":["DCR/BTC", "YCC/BTC", "BTY/USDT"],
// "coin":["DCR", "BTC"]
// },{
// "platform":"Gateio",
// "symbol":["DCR/BTC"],
// "coin":["DCR"]
// }
// ]
}
},
components
:
{
PreHeader
,
NavLeft
},
created
()
{
this
.
getPlatInfo
();
},
methods
:
{
getPlatInfo
()
{
axios
.
post
(
ApiConfig
.
GetPlatformInfo
).
then
(
res
=>
{
this
.
platInfo
=
res
.
data
.
data
;
// console.log(this.platInfo)
})
}
}
}
</
script
>
...
...
src/views/overview.vue
View file @
cfdf24cc
...
...
@@ -298,12 +298,10 @@
this
.
subtitle
=
'所有机器人'
;
this
.
checkAll
=
false
;
//交易所筛选
this
.
checkedWebs
=
[];
this
.
webs
=
[];
this
.
isIndeterminate
=
true
;
this
.
foldExchange
=
true
;
this
.
checkAll0
=
false
;
//币种筛选
this
.
checkedCurrencies
=
[];
this
.
currencies
=
[];
this
.
sIndeterminate0
=
true
;
this
.
foldExchange0
=
true
;
this
.
checkAll1
=
false
;
//交易对筛选
...
...
@@ -321,11 +319,6 @@
},
methods
:
{
init
()
{
//获取所有的交易所和币种
for
(
let
item
of
this
.
platInfo
){
this
.
webs
.
push
(
item
.
platform
);
this
.
currencies
=
this
.
allCurrencies
=
[...
new
Set
(
this
.
currencies
.
concat
(
item
.
coin
))];
}
const
RoutePath
=
this
.
$route
.
params
.
name
;
// console.log(RoutePath);
switch
(
RoutePath
)
{
...
...
@@ -444,6 +437,13 @@
watch
:{
$route
(
newVal
,
oldVal
){
// console.log(newVal.params.name)
},
platInfo
(
val
){
//获取所有的交易所和币种
for
(
let
item
of
val
){
this
.
webs
.
push
(
item
.
platform
);
this
.
currencies
=
this
.
allCurrencies
=
[...
new
Set
(
this
.
currencies
.
concat
(
item
.
coin
))];
}
}
}
};
...
...
static/.gitkeep
deleted
100644 → 0
View file @
eb83ea77
static/robot.ico
0 → 100644
View file @
cfdf24cc
9.44 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment