@@ -107,7 +107,7 @@
- {{ item.close }}
+ {{ item.price }}
{{ item.increaseStr }}
@@ -321,6 +321,7 @@ export default {
});
// console.info(this.$refs)
bus.$on('collapse', msg => {
+ console.log(msg.close);
this.activeContract.price =this.activeContract.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3);
this.holdPositionList.map(item=>{
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price
@@ -353,10 +354,10 @@ export default {
if (sub == msg) {
if( data.symbol=='BTC' )(data.price).toFixed(1)
this.contractList = data;
- if(this.filterCoin==''){
- this.contractListFilter = data;
- // this.Listes();
- }
+ // if(this.filterCoin==''){
+ // this.contractListFilter = data;
+ // // this.Listes();
+ // }
}else if (cmd == "ping") {
this.ws.send({
cmd: "pong"
@@ -371,7 +372,7 @@ export default {
},
Listes(){
this.Liste = []
- this.contractListFilter[0].marketInfoList.map(item=>{
+ this.contractList[0].marketInfoList.map(item=>{
this.Liste.push({
pair_name: item.pair_name,
symbol: item.symbol,
@@ -392,10 +393,11 @@ export default {
if(this.activeSymbol==''){
// 页面初始获取
this.contractList = res;
- if(this.filterCoin==''){
- this.contractListFilter = res;
- this.Listes();
- }
+ this.Listes();
+ // if(this.filterCoin==''){
+ // this.contractListFilter = res;
+ // this.Listes();
+ // }
// 默认值
let firstParent = res[0];
@@ -471,7 +473,8 @@ export default {
// let name = symbol.coinName || symbol.pair;
// return name.search(reg) >= 0;
let name = symbol.pair_name || symbol.symbol;
- return name.search(reg) >= 0;
+ return reg.test(name);
+ // return name.search(reg) >= 0;
}
// return !this.keyword || symbol.coinName.concat(symbol.pair).search(reg) >= 0;