| | |
| | | class="el-icon-caret-top" |
| | | style="font-size: 0.3rem" |
| | | @click="priceAscending" |
| | | :style="{color: Ascend == 1?'#409eff':'#8c9fad'}" |
| | | :style="{ color: Ascend == 1 ? '#409eff' : '#8c9fad' }" |
| | | ></i> |
| | | <i |
| | | class="el-icon-caret-bottom" |
| | | style="font-size: 0.3rem" |
| | | @click="priceDescending" |
| | | :style="{color: Ascend == 2?'#409eff':'#8c9fad'}" |
| | | :style="{ color: Ascend == 2 ? '#409eff' : '#8c9fad' }" |
| | | ></i> |
| | | </span> |
| | | </div> |
| | |
| | | class="el-icon-caret-top" |
| | | style="font-size: 0.3rem" |
| | | @click="riseFallAscending" |
| | | :style="{color: Ascend == 3?'#409eff':'#8c9fad'}" |
| | | :style="{ color: Ascend == 3 ? '#409eff' : '#8c9fad' }" |
| | | ></i> |
| | | <i |
| | | class="el-icon-caret-bottom" |
| | | style="font-size: 0.3rem" |
| | | @click="riseFallDescending" |
| | | :style="{color: Ascend == 4?'#409eff':'#8c9fad'}" |
| | | :style="{ color: Ascend == 4 ? '#409eff' : '#8c9fad' }" |
| | | ></i> |
| | | </span> |
| | | </div> |
| | |
| | | getInterval: null, |
| | | num: 1, |
| | | refreshing: false, |
| | | Ascend: 0, //颜色问题 |
| | | } |
| | | Ascend: 0, //颜色问题 |
| | | }; |
| | | }, |
| | | |
| | | mounted() { |
| | |
| | | }, |
| | | methods: { |
| | | priceAscending() { |
| | | this.Ascend = 1 |
| | | this.Ascend = 1; |
| | | this.listArr.sort((a, b) => a.nowPrice - b.nowPrice); |
| | | }, |
| | | priceDescending() { |
| | | this.Ascend = 2 |
| | | this.Ascend = 2; |
| | | this.listArr.sort((a, b) => b.nowPrice - a.nowPrice); |
| | | }, |
| | | riseFallAscending() { |
| | | this.Ascend = 3 |
| | | this.Ascend = 3; |
| | | this.listArr.sort((a, b) => a.hcrate - b.hcrate); |
| | | }, |
| | | riseFallDescending() { |
| | | this.Ascend = 4 |
| | | this.Ascend = 4; |
| | | this.listArr.sort((a, b) => b.hcrate - a.hcrate); |
| | | }, |
| | | |
| | |
| | | this.listArr = data.data.list; |
| | | this.loadings = false; |
| | | // this.finished = true; |
| | | if (this.listArr.length % 20) { |
| | | if (!this.listArr.length || (this.listArr.length && this.listArr.length % 20)) { |
| | | this.finished = true; |
| | | } |
| | | } |
| | |
| | | this.listArr = data.data.list; |
| | | this.loadings = false; |
| | | // this.finished = true; |
| | | if (this.listArr.length % 20) { |
| | | if (!this.listArr.length || (this.listArr.length && this.listArr.length % 20)) { |
| | | this.finished = true; |
| | | } |
| | | } |
| | | } |
| | | if(this.Ascend == 1){ |
| | | this.listArr.sort((a, b) => a.nowPrice - b.nowPrice); |
| | | }else if(this.Ascend == 2){ |
| | | if (this.Ascend == 1) { |
| | | this.listArr.sort((a, b) => a.nowPrice - b.nowPrice); |
| | | } else if (this.Ascend == 2) { |
| | | this.listArr.sort((a, b) => b.nowPrice - a.nowPrice); |
| | | }else if(this.Ascend == 3){ |
| | | } else if (this.Ascend == 3) { |
| | | this.listArr.sort((a, b) => a.hcrate - b.hcrate); |
| | | }else if(this.Ascend == 4){ |
| | | } else if (this.Ascend == 4) { |
| | | this.listArr.sort((a, b) => b.hcrate - a.hcrate); |
| | | } |
| | | } |