This commit is contained in:
dzc committed 2024-11-16 09:16:26 +08:00
1 parent 89b679ebbb
commit 544fb32762
6 files changed
+74 -7

No files matched your search

@@ -65,7 +65,8 @@ const remove = () => {
<template>
<view class="flex-row items-start card p-x-15rpx p-y-25rpx m-b-20rpx"
<view :class="[props.mode == 'car' ? 'car_border' : '']"
class="flex-row items-start card p-x-15rpx p-y-25rpx m-b-20rpx"
@tap="props.productId && router.jump('/pages/merchant/product-detail', { id: props.productId })">
<image v-if="props.mode == 'default'" class=" size-180rpx rounded-12rpx" :src="props.pic" mode="aspectFill" />
<image v-if="props.mode == 'car'" class=" size-120rpx rounded-12rpx" :src="props.pic" mode="aspectFill" />
@@ -101,4 +102,8 @@ const remove = () => {
</view>
</template>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.car_border {
border: 1px solid #f2f2f2;
}
</style>
+13 -1
View File
@@ -148,7 +148,7 @@ const doVisibleCar = async () => {
state.showCarDialog = true
}
const doPay = async () => {
const submitPay = async () => {
try {
if (isEmpty(state.carList)) {
uni.showToast({ title: '请至少购买一件商品', icon: "none" })
@@ -170,6 +170,18 @@ const doPay = async () => {
}
}
const doPay = async () => {
uni.showModal({
title: '提示',
content: '是否确定购买',
confirmColor: '#0094ff',
success: async (res) => {
if (!res.confirm) return
submitPay()
}
})
}
const getHeight = () => {
const rpx = 480
return `calc(100vh - ${uni.upx2px(rpx)}px)`