Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:JX3BOX/pvx into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
iRuxu committed May 6, 2024
2 parents 0855401 + 966159b commit a52e6eb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
10 changes: 6 additions & 4 deletions src/views/book/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default {
return this.$store.state.client;
},
params() {
const _params = { client: this.client, per: this.per };
const _params = { client: this.client };
if (this.keyword) _params.keyword = this.keyword;
if (this.active) _params.profession = this.active;
return _params;
Expand Down Expand Up @@ -264,6 +264,7 @@ export default {
showCount() {
if (this.isPhone) {
this.per = 8;
this.count = 8;
return;
}
const listWidth = this.$refs.listRef?.clientWidth - 120;
Expand All @@ -278,7 +279,7 @@ export default {
const page = this.list.filter((e) => e.id == type)[0].page;
let params = cloneDeep(this.params);
params.page = page + 1;
params.per = append ? this.per * 3 : this.per;
params.per = append ? this.count * 3 : this.per;
params.profession = type;
this.loadList(params, type);
},
Expand All @@ -295,7 +296,7 @@ export default {
});
} else {
params.page = this.page;
params.per = this.per * 3;
params.per = this.count * 3;
this.loadList({ ...params, profession: this.active }, this.active);
}
},
Expand All @@ -305,14 +306,15 @@ export default {
if (this.list[index].pages < params.page && this.active === 0) params.page = 1;
getList(params)
.then((res) => {
const { list, total, pages, page } = res.data;
const { list, total, pages, page, per } = res.data;
const _list = this.appendMode ? concat(this.list[index].list, list) : list;
this.list[index].list = _list || [];
this.list[index].page = page || 1;
this.list[index].pages = pages || 1;
this.list[index].total = total || 0;
if (this.active !== 0) this.page = page || 1;
this.total = total;
this.per = per;
})
.finally(() => {
this.loading = false;
Expand Down
10 changes: 6 additions & 4 deletions src/views/horse/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export default {
showCount() {
if (this.isPhone) {
this.per = 8;
this.count = 8;
return;
}
const listWidth = this.$refs.listRef?.clientWidth - 120;
Expand All @@ -362,7 +363,7 @@ export default {
const page = this.typeList.filter((e) => e.type === type)[0].page;
let params = cloneDeep(this.params);
params.page = page + 1;
params.per = append ? this.per * 3 : this.per;
params.per = append ? this.count * 3 : this.count;
params.type = type;
this.loadList(params, type);
},
Expand All @@ -374,12 +375,12 @@ export default {
list.forEach((e) => {
params.page = e.page;
params.type = e.type;
params.per = this.per;
params.per = this.count;
this.loadList(params, e.type);
});
} else {
params.page = this.page;
params.per = this.per * 3;
params.per = this.count * 3;
this.loadList({ ...params, type: this.active }, this.active);
}
},
Expand All @@ -388,7 +389,7 @@ export default {
if (this.typeList[index].pages < params.page && this.active === "") params.page = 1;
getHorses(params)
.then((res) => {
const { list, total, pages, page } = res.data;
const { list, total, pages, page, per } = res.data;
const _list = this.appendMode ? concat(this.typeList[index].list, list) : list;
const newList = _list.map((item) => {
item.typeName = this.getType(item);
Expand All @@ -410,6 +411,7 @@ export default {
this.typeList[index].pages = pages || 1;
if (this.active !== "") this.page = page || 1;
this.total = total;
this.per = per;
})
.finally(() => {
this.loading = false;
Expand Down
2 changes: 1 addition & 1 deletion src/views/pvg/Gonggao.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default {
<style lang="less">
.p-gonggao {
.pt(20px);
.pt(40px);
.m-content {
.pt(20px);
}
Expand Down

0 comments on commit a52e6eb

Please sign in to comment.