|
@@ -16,47 +16,54 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</van-sticky>
|
|
</van-sticky>
|
|
|
|
|
+ <van-pull-refresh
|
|
|
|
|
+ success-text="刷新成功"
|
|
|
|
|
+ success-duration="500"
|
|
|
|
|
+ class="discover"
|
|
|
|
|
+ v-model="refreshing"
|
|
|
|
|
+ @refresh="onRefresh"
|
|
|
|
|
+ >
|
|
|
|
|
+ <van-empty
|
|
|
|
|
+ v-if="empty"
|
|
|
|
|
+ description="没有符合兑换的藏品哦~"
|
|
|
|
|
+ :image="require('../../assets/kong_png_yongyoude (1).png')"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
- <van-empty
|
|
|
|
|
- v-if="empty"
|
|
|
|
|
- description="没有符合兑换的藏品哦~"
|
|
|
|
|
- :image="require('../../assets/kong_png_yongyoude (1).png')"
|
|
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- <div class="list">
|
|
|
|
|
- <div
|
|
|
|
|
- class="product"
|
|
|
|
|
- :class="{ active: chooseIds.includes(item.id) }"
|
|
|
|
|
- v-for="item in list"
|
|
|
|
|
- :key="item.id"
|
|
|
|
|
- @click="choose(item.id)"
|
|
|
|
|
- >
|
|
|
|
|
- <img
|
|
|
|
|
- class="icon"
|
|
|
|
|
- :src="
|
|
|
|
|
- chooseIds.includes(item.id)
|
|
|
|
|
- ? require('../../assets/icon_gouxuan_pre.png')
|
|
|
|
|
- : require('../../assets/icon_gouxuan_huise.png')
|
|
|
|
|
- "
|
|
|
|
|
- alt=""
|
|
|
|
|
- />
|
|
|
|
|
- <div class="product-content">
|
|
|
|
|
- <van-image
|
|
|
|
|
- width="60"
|
|
|
|
|
- height="60"
|
|
|
|
|
- radius="6"
|
|
|
|
|
- :src="getImg(changeImgs(item.pic, 600))"
|
|
|
|
|
- fit="contain"
|
|
|
|
|
|
|
+ <div class="list">
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="product"
|
|
|
|
|
+ :class="{ active: chooseIds.includes(item.id) }"
|
|
|
|
|
+ v-for="item in list"
|
|
|
|
|
+ :key="item.id"
|
|
|
|
|
+ @click="choose(item.id)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img
|
|
|
|
|
+ class="icon"
|
|
|
|
|
+ :src="
|
|
|
|
|
+ chooseIds.includes(item.id)
|
|
|
|
|
+ ? require('../../assets/icon_gouxuan_pre.png')
|
|
|
|
|
+ : require('../../assets/icon_gouxuan_huise.png')
|
|
|
|
|
+ "
|
|
|
|
|
+ alt=""
|
|
|
/>
|
|
/>
|
|
|
- <div class="product-info">
|
|
|
|
|
- <div class="text1 van-ellipsis">{{ item.name }}</div>
|
|
|
|
|
- <div class="flex1"></div>
|
|
|
|
|
- <div class="text2" v-if="item.category">{{ item.category }}</div>
|
|
|
|
|
- <div class="text2" v-if="item.number">编号:{{ item.number }}</div>
|
|
|
|
|
|
|
+ <div class="product-content">
|
|
|
|
|
+ <van-image
|
|
|
|
|
+ width="60"
|
|
|
|
|
+ height="60"
|
|
|
|
|
+ radius="6"
|
|
|
|
|
+ :src="getImg(changeImgs(item.pic, 600))"
|
|
|
|
|
+ fit="contain"
|
|
|
|
|
+ />
|
|
|
|
|
+ <div class="product-info">
|
|
|
|
|
+ <div class="text1 van-ellipsis">{{ item.name }}</div>
|
|
|
|
|
+ <div class="flex1"></div>
|
|
|
|
|
+ <div class="text2" v-if="item.category">{{ item.category }}</div>
|
|
|
|
|
+ <div class="text2" v-if="item.number">编号:{{ item.number }}</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </van-pull-refresh>
|
|
|
|
|
|
|
|
<div class="tips" v-if="showTips">当前可兑换藏品不足</div>
|
|
<div class="tips" v-if="showTips">当前可兑换藏品不足</div>
|
|
|
|
|
|
|
@@ -80,7 +87,8 @@ export default {
|
|
|
needChoose: 3,
|
|
needChoose: 3,
|
|
|
search: '',
|
|
search: '',
|
|
|
activityId: 0,
|
|
activityId: 0,
|
|
|
- info: {}
|
|
|
|
|
|
|
+ info: {},
|
|
|
|
|
+ refreshing: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -113,24 +121,22 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- getList() {
|
|
|
|
|
|
|
+ getList(refresh, done) {
|
|
|
this.$http
|
|
this.$http
|
|
|
- .post(
|
|
|
|
|
- '/asset/all',
|
|
|
|
|
- {
|
|
|
|
|
- page: 0,
|
|
|
|
|
- size: 999,
|
|
|
|
|
- query: { status: 'NORMAL,TRADING,GIFTING', userId: this.$store.state.userInfo.id },
|
|
|
|
|
- search: this.search
|
|
|
|
|
- },
|
|
|
|
|
- { body: 'json' }
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ .get('/asset/assetsForMint', {
|
|
|
|
|
+ page: 0,
|
|
|
|
|
+ size: 999,
|
|
|
|
|
+ mintActivityId: this.activityId,
|
|
|
|
|
+ refresh
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
this.list = res.content;
|
|
this.list = res.content;
|
|
|
this.empty = res.empty;
|
|
this.empty = res.empty;
|
|
|
|
|
+ done && done();
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
this.$toast.clear();
|
|
this.$toast.clear();
|
|
|
|
|
+ done && done();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
choose(id) {
|
|
choose(id) {
|
|
@@ -180,6 +186,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
+ },
|
|
|
|
|
+ onRefresh() {
|
|
|
|
|
+ this.refreshing = true;
|
|
|
|
|
+ this.getList(true, () => {
|
|
|
|
|
+ this.refreshing = false;
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|