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

bugfix

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