修复宝箱最后一页开宝箱后不返回上一页

This commit is contained in:
yuyongdong 2024-04-25 11:52:52 +08:00
parent d634ba1260
commit aec6d87ddb
2 changed files with 15 additions and 11 deletions

View File

@ -14,18 +14,17 @@
<script>
export default {
props:{
currentPage: Number,
total: Number,
},
data() {
return {
pageSize: 6,
currentPage: 1,
}
},
mounted() {},
methods: {
handleCurrentChange(val) {
this.currentPage = val
this.$emit("onChangePage", val);
},
},

View File

@ -166,7 +166,7 @@
</li>
</div>
<div class="box-pagination" v-if="boxList.length > 6">
<Pagination @onChangePage="onChangePage" :total="boxList.length" />
<Pagination @onChangePage="onChangePage" :currentPage="currentPage" :total="boxList.length" />
</div>
</div>
</div>
@ -207,7 +207,8 @@
<img src="./../../assets/common/Icon_Points.png" alt />
</div>
<div v-if="row.items !== undefined && row.items.length > 0">
<span>{{ row.items[0].name }}</span>
<span v-if="row.items[0].name == 'NFT'">Founder's Tag</span>
<span v-else>{{ row.items[0].name }}</span>
<img v-if="row.items[0].name == 'NFT'" src="./../../assets/common/common_icon_NFT.png" alt />
<img v-else src="./../../assets/common/wallet-yes.png" alt />
</div>
@ -407,6 +408,7 @@ export default {
//
onChangePage(val) {
this.currentPage = val;
this.getMyBoxList()
},
//
@ -457,11 +459,14 @@ export default {
}
} else {
// alert(`,: ${JSON.stringify(data)}`)
if(this.currentPageItems.length == 1) {
if(this.currentPage > 1) {
this.onChangePage(this.currentPage-1)
}
}
this.boostingList = [];
this.currentPageItems = []
this.getMyBoxList();
this.getMyBoxList()
this.openBoxLog();
console.log('currentPageItems',this.currentPageItems)
this.isLoading = false;
this.$emit("awardDialog", data);
localStorage.removeItem(storeageKey);
@ -1125,7 +1130,7 @@ export default {
img {
width: 10px;
height: 14px;
margin-left: 10px;
margin-left: 5px;
margin-top: 2px;
}
div {
@ -1134,14 +1139,14 @@ export default {
text-align: right;
}
div:nth-child(2) {
width: 105px;
margin-left: 20px;
width: 140px;
margin-left: 10px;
font-size: 14px;
display: flex;
align-items: center;
img {
width: 20px;
height: 15px;
height: 20px;
}
}
}