Commit 96c03c90 authored by 郭志伟's avatar 郭志伟

fix: 修复充值中心按钮状态问题

parent 46aab395
...@@ -65,6 +65,7 @@ export default { ...@@ -65,6 +65,7 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$nextTick(() => { this.$nextTick(() => {
this.listWrapper.refresh();
this.listWrapper.scrollToElement(this.$refs.spuItem[itemIndex], 500, -10, 0); this.listWrapper.scrollToElement(this.$refs.spuItem[itemIndex], 500, -10, 0);
}); });
}); });
......
export const SCROLL_ITEM_WIDTH = 108; export const SCROLL_ITEM_WIDTH = 108;
export const ITEM_WIDTH = 97; export const ITEM_WIDTH = 98;
...@@ -147,8 +147,7 @@ export default { ...@@ -147,8 +147,7 @@ export default {
if (res) { if (res) {
this.skuList = res.rechargeList; this.skuList = res.rechargeList;
const defaultItem = res.rechargeList.find(item => item.hasStock); const defaultItem = res.rechargeList.find(item => item.hasStock);
const defaultIndex = res.rechargeList.findIndex(item => item.hasStock); this.handleSkuSelected(defaultItem || {});
defaultItem && this.handleSkuSelected(defaultItem, defaultIndex);
} }
this.showLoading = false; this.showLoading = false;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment