修复宝箱最后一页开宝箱后不返回上一页
This commit is contained in:
parent
d634ba1260
commit
aec6d87ddb
@ -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);
|
||||
},
|
||||
},
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user