积分兑换

This commit is contained in:
liuye
2022-11-30 13:49:53 +08:00
parent 46ba72a119
commit bbfe484604
3 changed files with 29 additions and 14 deletions

View File

@@ -14,7 +14,7 @@
<div class="list-content">
<div class="select">
<div :class="search.newStatus == 1 ? 'active' : ''" @click="clickNew()">最新上架</div>
<div class="price active" @click="clickPrice()">价格<span class="top" :class="search.priceStatus == 1 ? 'active' : ''"></span><span class="bottom" :class="search.priceStatus != 1 ? 'active' : ''"></span></div>
<div class="price active" @click="clickPrice()">价格<span class="top mar-l8" :class="search.priceStatus == 1 ? 'active' : ''"></span><span class="bottom mar-l8" :class="search.priceStatus != 1 ? 'active' : ''"></span></div>
<div class="sure" :class="search.status == 2 ? 'active' : ''" @click="clickStatus()">可兑换的
<img src="./components/imgs/check-icon.png" alt="" v-if="search.status == 2">
</div>
@@ -215,6 +215,9 @@ export default {
.active {
color: #CA906A;
}
.mar-l8 {
margin-left: 8px;
}
}
.sure {
img {

View File

@@ -1,7 +1,7 @@
<template>
<div class="detail">
<div class="goods-img">
<u-swiper :list="list" mode="none" img-mode="aspectFit" height="750" bg-color="#fff"></u-swiper>
<u-swiper :list="list" mode="none" img-mode="aspectFit" height="750" bg-color="#fff" @click="imgClick"></u-swiper>
</div>
<div class="goods-title">{{goodsInfo.merchandiseName}}</div>
<div class="goods-point">
@@ -53,6 +53,15 @@ export default {
}
})
},
imgClick(index) {
this.previewImages(this.list, this.list[index].image)
},
previewImages(images, img) {
uni.previewImage({
urls: images.map(v => v.image),
current: img
})
},
},
}
</script>

View File

@@ -74,19 +74,22 @@ export default {
})
},
submit() {
this.$http.post(`/app/appintegralmerchandiseorder/addOrUpdate`, {
merchandiseId: this.id,
merchandiseNumber: this.number,
remark: this.remark
}).then((res) => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack({delta: 2})
}, 600)
}
this.$confirm('是否确认提交订单?').then(() => {
this.$http.post(`/app/appintegralmerchandiseorder/addOrUpdate`, {
merchandiseId: this.id,
merchandiseNumber: this.number,
remark: this.remark
}).then((res) => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack({delta: 2})
}, 600)
}
})
})
},
},
}