forked from natuka/web.puabadge.com
形状选择
This commit is contained in:
1 parent
aa62b0b1f7
commit
e78d31c8b8
2 files changed
+13
-49
No files matched your search
@@ -312,14 +312,6 @@ const sizeList = ref([])
|
||||
const getSizeList = () => {
|
||||
badgeApi.getOrderPrice({}).then((res: any) => {
|
||||
sizeList.value = res
|
||||
if (orderStat.value.use_type == 1) {
|
||||
sizeList.value.forEach((item: any) => {
|
||||
if (item.shape_item == null || item.shape_item == undefined || item.shape_item == '' || !item.shape_item) {
|
||||
showToast('该链接异常,请联系客服')
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+13
-41
@@ -93,16 +93,7 @@
|
||||
<div class="order-section" v-if="trialCode == false && imageUrl">
|
||||
<div class="order-title">订购数量</div>
|
||||
<block v-for="item in sizeList" :key="item.id">
|
||||
<block v-if="orderStat.use_type == 1">
|
||||
<div class="order-item" v-show="item.shape_id == shapeId">
|
||||
<span class="order-size">{{ item.size }}</span>
|
||||
<span class="order-free">(剩余兑换:{{ item.remaining }})</span>
|
||||
<div class="order-ctrl">
|
||||
<van-stepper v-model="item.count" :min="0" :max="item.remaining" @change="changeValue" />
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
<block v-if="orderStat.use_type == 2">
|
||||
<block>
|
||||
<div class="order-item">
|
||||
<span class="order-size">{{ item.size }}</span>
|
||||
<span class="order-free">(剩余兑换:{{ item.remaining }})</span>
|
||||
@@ -111,6 +102,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
<!-- <block v-if="orderStat.use_type == 2">
|
||||
<div class="order-item">
|
||||
<span class="order-size">{{ item.size }}</span>
|
||||
<span class="order-free">(剩余兑换:{{ item.remaining }})</span>
|
||||
<div class="order-ctrl">
|
||||
<van-stepper v-model="item.count" :min="0" :max="item.remaining" @change="changeValue" />
|
||||
</div>
|
||||
</div>
|
||||
</block> -->
|
||||
</block>
|
||||
</div>
|
||||
<div class="address-box" v-if="orderStat.use_type == 2 && imageUrl">
|
||||
@@ -303,23 +303,7 @@ const getSizeList = () => {
|
||||
badgeApi.getOrderPrice({}).then((res: any) => {
|
||||
console.log('getSizeList', res);
|
||||
sizeList.value = res
|
||||
if (orderStat.value.use_type == 1) {
|
||||
sizeList.value.forEach((item: any) => {
|
||||
if (item.shape_item) {
|
||||
if (!shapeList.value.some(shape => shape.id === item.shape_id)) {
|
||||
shapeList.value.push(item.shape_item)
|
||||
}
|
||||
} else {
|
||||
showToast('该链接异常,请联系客服')
|
||||
return
|
||||
}
|
||||
})
|
||||
if (shapeList.value.length > 0) {
|
||||
shapeChange(shapeList.value[0])
|
||||
}
|
||||
} else {
|
||||
getShapeList()
|
||||
}
|
||||
getShapeList()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -605,20 +589,6 @@ const getImageList = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// const typeId = ref(1)
|
||||
// const typesList = ref([])
|
||||
// const getTypesList = () => {
|
||||
// badgeApi.getTypesList({}).then((res: any) => {
|
||||
// console.log('getTypesList', res)
|
||||
// typesList.value = res.list
|
||||
// typeId.value = res.list[0].id
|
||||
// getShapeList()
|
||||
// }).catch((err) => {
|
||||
// console.log('getTypesList', err)
|
||||
// }).finally((err) => {
|
||||
|
||||
// })
|
||||
// }
|
||||
const shapeId = ref(0)
|
||||
const shapeImage = ref('')
|
||||
|
||||
@@ -984,6 +954,7 @@ onUnmounted(() => {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-radius: 10px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.box1-round-shadow {
|
||||
position: absolute;
|
||||
@@ -1275,6 +1246,7 @@ onUnmounted(() => {
|
||||
height: 20vw;
|
||||
border-radius: 12px;
|
||||
border: 3px solid #fff;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.image-list-item-img.imgActive {
|
||||
border: 3px solid #50cf54;
|
||||
|
||||
Reference in new issue
Block a user