Przeglądaj źródła

fix: 报价信息提示

刘秀芳 2 dni temu
rodzic
commit
b17e14b4fb
1 zmienionych plików z 5 dodań i 5 usunięć
  1. 5 5
      src/components/popup/priceSheetPopup.vue

+ 5 - 5
src/components/popup/priceSheetPopup.vue

@@ -218,8 +218,8 @@ function fetchPriceData() {
 }
 
 const handleShare = () => {
-    if (!priceData.value.itemsList || priceData.value.itemsList.length === 0) {
-        ElMessage.warning('暂无报价数据,无法分享')
+    if (!priceData.value?.id || !priceData.value?.itemsList || priceData.value?.itemsList?.length === 0) {
+        ElMessage.warning('请补全报价数据')
         return;
     }
     const userId = quotationData.value.users[0]?.userId;
@@ -240,9 +240,9 @@ const handleShare = () => {
 };
 
 const handleWechat = () => {
-    console.log("handleWechat");
-    if (!priceData.value.itemsList || priceData.value.itemsList.length === 0) {
-        ElMessage.warning('暂无报价数据,无法分享')
+    console.log("handleWechat", quotationData.value, priceData.value);
+    if (!priceData.value?.id || !priceData.value?.itemsList || priceData.value?.itemsList?.length === 0) {
+        ElMessage.warning('请补全报价数据')
         return;
     }
     // router.push({