优化店铺切换商品展示

This commit is contained in:
gyq
2025-03-26 09:48:23 +08:00
parent 4245b5a098
commit 95ab7730f5
12 changed files with 100 additions and 34 deletions

View File

@@ -226,7 +226,7 @@
</div>
</el-dialog>
<!-- 选择会员 -->
<SelectVipUser ref="SelectVipUserRef" @success="selectUserHandle" />
<SelectVipUser ref="SelectVipUserRef" :amount="0.01" @success="selectUserHandle" />
<!-- 选择优惠券 -->
<CouponModal ref="CouponModalRef" :orderList="props.orderList" @success="CouponModalSuccess" />
</template>
@@ -708,8 +708,10 @@ async function selectUserHandle(row) {
goodsStore.vipUserInfo = { ...row }
// 选择会员后重新计算会员价
if (store.shopInfo.isMemberPrice && row.isVip) {
console.log('选择会员后重新计算会员价===', row);
goodsStore.showVipPrice = 1
}
goodsStore.calcCartInfo()
emit('reset')
@@ -717,11 +719,10 @@ async function selectUserHandle(row) {
couponForm.value.discountRatio = ''
discountInput('')
setTimeout(() => {
couponDialogOpen()
}, 100)
if (showCoupon.value) {
setTimeout(() => {
couponDialogOpen()
}, 100)
couponFormUserList.value = [
{
id: row.userId,
@@ -737,7 +738,9 @@ async function selectUserHandle(row) {
}
} else {
if (payList.value[payActive.value].payType == 'member-account') {
vipPayAjax(row)
setTimeout(() => {
vipPayAjax(row)
}, 500)
}
}
} catch (error) {