tremble 3 years ago
parent
commit
362a2d2285
3 changed files with 23 additions and 6 deletions
  1. 11 5
      src/app.vue
  2. 7 0
      src/components/Tags/goods-list.vue
  3. 5 1
      src/components/Tags/waterfall.vue

+ 11 - 5
src/app.vue

@@ -336,12 +336,13 @@ const guideclicktag = (tag) => {
             sid: tag.sid,
           },
         });
-      console.log(tag, "触发--------------");
     }
   }
   return;
 };
 
+
+
 onMounted(async () => {
   apis.burying_point({ type: 0 });
 
@@ -409,6 +410,9 @@ onMounted(async () => {
         view.focus(tag.sid).then(() => {
           if (tag.type == "coupon") {
             try {
+              if (isshoppingguide.value) {
+                  return;
+              }
               document.querySelector(`[data-tag-id="${tag.sid}"] .tag-icon`).style.display = "none";
               let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
               browser.openLink(
@@ -417,6 +421,7 @@ onMounted(async () => {
                 `/pages/showactivity/showactivity?pageId=${hotcontent.couponLink}`
               );
               apis.burying_point({ type: 2 });
+
             } catch (error) {}
           } else if (tag.type == "waterfall") {
             store.commit("tag/setTagClickType", {
@@ -426,6 +431,9 @@ onMounted(async () => {
             guideclicktag(tag);
           } else if (tag.type == "applet_link") {
             try {
+              if (isshoppingguide.value) {
+                  return;
+              }
               let hotcontent = typeof tag.hotContent == "string" ? JSON.parse(tag.hotContent) : tag.hotContent;
               browser.openLink(
                 "/subPackage/pages/home/home?pageType=2&pageId=" + hotcontent.liveLink,
@@ -435,10 +443,8 @@ onMounted(async () => {
             } catch (error) {}
           } else if (tag.type == "link_scene") {
             guideclicktag(tag);
-            setTimeout(() => {
-              let sceneFirstView = tag.hotContent.sceneFirstView;
-              window.location.href = jumpNewScene(sceneFirstView);
-            }, 100);
+            let sceneFirstView = tag.hotContent.sceneFirstView;
+            window.location.href = jumpNewScene(sceneFirstView);
           }
         });
       });

+ 7 - 0
src/components/Tags/goods-list.vue

@@ -81,6 +81,7 @@ import viewimg from "@/views/viewimg";
 
 // get_product_info
 const store = useStore();
+const isshoppingguide = computed(() => store.getters["shoppingguide"]);
 
 const tagclick = computed(() => store.getters["tag/tagClickType"]);
 
@@ -89,6 +90,9 @@ const emit = defineEmits(["close"]);
 const current = ref(0);
 
 const viewDetail = (item) => {
+  if (isshoppingguide.value) {
+      return;
+  }
   apis.burying_point({ type: 3, productId: item.id });
   browser.openLink(
     `/pages/item/item?productId=${item.id}`,
@@ -98,6 +102,9 @@ const viewDetail = (item) => {
 };
 
 const onClickSku = (item) => {
+  if (isshoppingguide.value) {
+      return;
+  }
   let tempData = toRaw(tagclick.value.data);
 
   tempData.products[current.value] = {

+ 5 - 1
src/components/Tags/waterfall.vue

@@ -32,10 +32,14 @@ import * as apis from "@/apis/index.js";
 const store = useStore();
 
 const tagclick = computed(() => store.getters["tag/tagClickType"]);
+const isshoppingguide = computed(() => store.getters["shoppingguide"]);
 
 const emit = defineEmits(["close"]);
 const gotoGoods = (item) => {
-  apis.burying_point({type:3});
+  if (isshoppingguide.value) {
+      return;
+  }
+  apis.burying_point({ type: 3, productId: item.id });
   browser.openLink(`/pages/item/item?productId=${item.id}`, `https://m.cdfmembers.com/shop/600667208/item?productId=${item.id}`,`/pages/item/item?productId=${item.id}`);
 };
 </script>