Commit 47532b5e authored by 汪晓凯's avatar 汪晓凯

bugfix

parent fc556d1c
......@@ -38,11 +38,7 @@
},
props: ['platInfo'],
created() {
if (this.$route.path.split('/').pop() === 'RobotDetail') {
this.active = this.$route.path.split('/').splice(0,3).join('/');
}else {
this.active = this.$route.path;
}
this.active = this.$route.path.split('/').splice(0,3).join('/');
},
methods: {
navClick(index) {
......@@ -55,11 +51,7 @@
},
watch: {
$route() {
if (this.$route.path.split('/').pop() === 'RobotDetail') {
this.active = this.$route.path.split('/').splice(0,3).join('/');
}else {
this.active = this.$route.path;
}
this.active = this.$route.path.split('/').splice(0,3).join('/');
},
},
}
......
......@@ -225,40 +225,46 @@
methods: {
init(type) {
const RoutePath = this.$route.path;
// console.log(RoutePath);
const RouteParam = RoutePath.split('/')[2];
var StatusParams = {platform: '', coin: ''};//预警状态查询入参
switch (RoutePath) {
case '/monitor/home':
switch (RouteParam) {
case 'home':
this.checkedPairs = [];
this.showWebFilter = this.showCurrencyFilter = true;
this.showPairFilter = false;
this.RobotListParams.coin = [];
this.RobotListParams.platform = [];
break;
case '/monitor/BTY':
case '/monitor/YCC':
case 'BTY':
case 'YCC':
this.checkedPairs = [];
this.checkedCurrencies = [];
this.showWebFilter = true;
this.showCurrencyFilter = this.showPairFilter = false;
StatusParams.coin = RoutePath.split('/').pop();
this.RobotListParams.coin = [RoutePath.split('/').pop()];
StatusParams.coin = RouteParam;
this.RobotListParams.coin = [RouteParam];
this.RobotListParams.platform = [];
break;
default:
if (RoutePath) {
this.showPairFilter = true;
this.showWebFilter = this.showCurrencyFilter = false;
var index = RoutePath.split('/').pop();
this.checkedPairs = this.pairs = JSON.parse(sessionStorage.getItem('platInfo'))[index].symbol;
this.platform = JSON.parse(sessionStorage.getItem('platInfo'))[index].platform;
StatusParams.platform = this.platform;
this.RobotListParams.platform = [this.platform];
this.RobotListParams.coin = [];
this.checkedWebs = [];
this.checkedCurrencies = [];
this.showPairFilter = true;
this.showWebFilter = this.showCurrencyFilter = false;
var index = +RouteParam;
this.pairs = JSON.parse(sessionStorage.getItem('platInfo'))[index].symbol;
if(type !== 'back') {
this.checkedPairs = this.pairs;
}
this.platform = JSON.parse(sessionStorage.getItem('platInfo'))[index].platform;
StatusParams.platform = this.platform;
this.RobotListParams.platform = [this.platform];
this.RobotListParams.coin = [];
break;
}
this.getRobotStatus(StatusParams);
if (type === 'back') {
let Coin = RoutePath === 'BTY' || RoutePath === 'YCC' ? [RoutePath] : [];
let Platform = (RoutePath!=='home'&&RoutePath!=='BTY'&&RoutePath !== 'YCC') ? [this.platform] : [];
let Coin = RouteParam === 'BTY' || RouteParam === 'YCC' ? [RouteParam] : [];
let Platform = (RouteParam!=='home'&&RouteParam!=='BTY'&&RouteParam !== 'YCC') ? [this.platform] : [];
var Params = {//详情返回时的请求参数
class: "robot", //账户级别
coin: 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