积分兑换

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

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="detail"> <div class="detail">
<div class="goods-img"> <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>
<div class="goods-title">{{goodsInfo.merchandiseName}}</div> <div class="goods-title">{{goodsInfo.merchandiseName}}</div>
<div class="goods-point"> <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> </script>

View File

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