修复宝箱最后一页开宝箱后不返回上一页
This commit is contained in:
parent
d634ba1260
commit
aec6d87ddb
@ -14,18 +14,17 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props:{
|
props:{
|
||||||
|
currentPage: Number,
|
||||||
total: Number,
|
total: Number,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageSize: 6,
|
pageSize: 6,
|
||||||
currentPage: 1,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
this.currentPage = val
|
|
||||||
this.$emit("onChangePage", val);
|
this.$emit("onChangePage", val);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -166,7 +166,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-pagination" v-if="boxList.length > 6">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -207,7 +207,8 @@
|
|||||||
<img src="./../../assets/common/Icon_Points.png" alt />
|
<img src="./../../assets/common/Icon_Points.png" alt />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="row.items !== undefined && row.items.length > 0">
|
<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-if="row.items[0].name == 'NFT'" src="./../../assets/common/common_icon_NFT.png" alt />
|
||||||
<img v-else src="./../../assets/common/wallet-yes.png" alt />
|
<img v-else src="./../../assets/common/wallet-yes.png" alt />
|
||||||
</div>
|
</div>
|
||||||
@ -407,6 +408,7 @@ export default {
|
|||||||
// 分页
|
// 分页
|
||||||
onChangePage(val) {
|
onChangePage(val) {
|
||||||
this.currentPage = val;
|
this.currentPage = val;
|
||||||
|
this.getMyBoxList()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 修改中间宝箱数据
|
// 修改中间宝箱数据
|
||||||
@ -457,11 +459,14 @@ export default {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// alert(`领取成功,显示奖励: ${JSON.stringify(data)}`)
|
// alert(`领取成功,显示奖励: ${JSON.stringify(data)}`)
|
||||||
|
if(this.currentPageItems.length == 1) {
|
||||||
|
if(this.currentPage > 1) {
|
||||||
|
this.onChangePage(this.currentPage-1)
|
||||||
|
}
|
||||||
|
}
|
||||||
this.boostingList = [];
|
this.boostingList = [];
|
||||||
this.currentPageItems = []
|
this.getMyBoxList()
|
||||||
this.getMyBoxList();
|
|
||||||
this.openBoxLog();
|
this.openBoxLog();
|
||||||
console.log('currentPageItems',this.currentPageItems)
|
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.$emit("awardDialog", data);
|
this.$emit("awardDialog", data);
|
||||||
localStorage.removeItem(storeageKey);
|
localStorage.removeItem(storeageKey);
|
||||||
@ -1125,7 +1130,7 @@ export default {
|
|||||||
img {
|
img {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 14px;
|
height: 14px;
|
||||||
margin-left: 10px;
|
margin-left: 5px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
div {
|
div {
|
||||||
@ -1134,14 +1139,14 @@ export default {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
div:nth-child(2) {
|
div:nth-child(2) {
|
||||||
width: 105px;
|
width: 140px;
|
||||||
margin-left: 20px;
|
margin-left: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
img {
|
img {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 15px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user