|
|
@@ -162,19 +162,47 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.$http
|
|
|
- .post('/domainOrder/topTen')
|
|
|
- .then(res => {
|
|
|
- this.loading = false;
|
|
|
- this.domainList = res;
|
|
|
- this.newList = res.slice(3, 60);
|
|
|
- this.newList.forEach(item => {
|
|
|
- if (item.userName.length > 6) {
|
|
|
- item.userName = item.userName.slice(0, 6) + '...';
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(e => {});
|
|
|
+ this.totalPositions();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ changeRanking(ranking) {
|
|
|
+ this.ranking = ranking;
|
|
|
+ if (ranking == 'TOTAL') {
|
|
|
+ this.totalPositions();
|
|
|
+ } else {
|
|
|
+ this.purchaseRanking();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ totalPositions() {
|
|
|
+ this.$http
|
|
|
+ .post('/domainOrder/topTen')
|
|
|
+ .then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ this.domainList = res;
|
|
|
+ this.newList = res.slice(3, 20);
|
|
|
+ this.newList.forEach(item => {
|
|
|
+ if (item.userName.length > 6) {
|
|
|
+ item.userName = item.userName.slice(0, 6) + '...';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(e => {});
|
|
|
+ },
|
|
|
+ purchaseRanking() {
|
|
|
+ this.$http
|
|
|
+ .post('/domainOrder/domainTop')
|
|
|
+ .then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ this.domainList = res;
|
|
|
+ this.newList = res.slice(3, 20);
|
|
|
+ this.newList.forEach(item => {
|
|
|
+ if (item.userName.length > 6) {
|
|
|
+ item.userName = item.userName.slice(0, 6) + '...';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(e => {});
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|