Commit cfdf24cc authored by wxk's avatar wxk

平台配置接口ok

parent eb83ea77
......@@ -6,13 +6,12 @@ const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/asset_monitor': {
target: 'http://47.91.221.203:46656', // 接口的域名
'/': {
target: 'http://47.91.221.203:46657', // 接口的域名
// secure: false, // 如果是https接口,需要配置这个参数
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
pathRewrite: {
......
......@@ -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>
......
......@@ -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>
......
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;
......@@ -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>
......
......@@ -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))];
}
}
}
};
......
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