This commit is contained in:
2024-03-18 19:23:28 +08:00
parent f07d7f282b
commit 401572a446

View File

@ -11,13 +11,14 @@
{{item.score?item.score:''}}积分 {{item.score?item.score:''}}积分
</view> </view>
<view class="button" @tap="goexchange(item)"> <view class="button" @tap="goexchange(item)">
提交兑换申请 兑换
</view> </view>
</view> </view>
<view style="width: 48%;" v-if="list.length%2!=0"> <view style="width: 48%;" v-if="list.length%2!=0">
</view> </view>
</view> </view>
<u-empty v-else mode="list" icon-size='220' text='暂无可兑换商品'></u-empty> <u-empty v-else mode="list" icon-size='220' text='暂无可兑换商品'></u-empty>
<u-modal v-model="updatashow" content="是否确认兑换?" :show-cancel-button='true' @confirm='updataconfirm'></u-modal>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -33,6 +34,8 @@
export default { export default {
data() { data() {
return { return {
updatashow: false,
updataitem: {},
query: { query: {
identity: uni.getStorageSync('userinfo').cardNo, identity: uni.getStorageSync('userinfo').cardNo,
pageNum: 1, pageNum: 1,
@ -54,10 +57,10 @@
} }
}, },
methods: { methods: {
goexchange(item) { updataconfirm() {
var obj = { var obj = {
identity: this.query.identity, identity: this.query.identity,
prizeId: item.prizeId, prizeId: this.updataitem.prizeId,
source: 2 source: 2
} }
prizeExchangesave(obj).then(res => { prizeExchangesave(obj).then(res => {
@ -76,6 +79,10 @@
} }
}) })
}, },
goexchange(item) {
this.updatashow = true
this.updataitem = item
},
info() { info() {
prizelist(this.query).then(res => { prizelist(this.query).then(res => {
res.rows.forEach(e => { res.rows.forEach(e => {