From ebb0a5462f44a37ab56ef6ffc675a59900b7607a Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Tue, 23 Jan 2024 11:36:17 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/shortPopup.vue | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/components/shortPopup.vue b/components/shortPopup.vue
index 8e8f656..5e334f8 100644
--- a/components/shortPopup.vue
+++ b/components/shortPopup.vue
@@ -61,7 +61,7 @@
购物车
{{goodsNum}}
- 加入购物车
+ {{isBuy?'立即购买':'加入购物车'}}
@@ -79,6 +79,10 @@
source:{
type: Number,
default: null
+ },
+ isBuy: {
+ type: Boolean,
+ default: false
}
},
data() {
@@ -234,6 +238,9 @@
})
this.$emit('addCart');
this.close();
+ if(this.isBuy){
+ this.navgoCart();
+ }
}).catch(err => {
uni.showToast({
title: err,
@@ -253,7 +260,10 @@
this.current = e.detail.current;
},
navgoCart(url=null) {
- if(!url && this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
+ if(!url) {
+ if(this.source) url = '/pages/order_addcart/order_addcart?source='+this.source;
+ else url = '/pages/order_addcart/order_addcart';
+ }
uni.navigateTo({
url
})