浏览代码

feat: 更新优惠券跳转

tremble 3 年之前
父节点
当前提交
b781b5b973
共有 1 个文件被更改,包括 13 次插入4 次删除
  1. 13 4
      src/components/Tags/treasure.vue

+ 13 - 4
src/components/Tags/treasure.vue

@@ -23,11 +23,20 @@ const tagclick = computed(() => store.getters["tag/tagClickType"]);
 const emit = defineEmits(["close"]);
 const emit = defineEmits(["close"]);
 
 
 const goto_now = () => {
 const goto_now = () => {
-  emit("close");
 
 
-  browser.openLink('/subPackage/pages/activity/activity?pageId='+tag.hotContent.couponLink,
-   `https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${tag.hotContent.couponLink}`,
-   `/pages/showactivity/main?pageId=${tag.hotContent.couponLink}`)
+  let tag = {};
+
+  try {
+    tag = JSON.parse(tagclick.value.data.hotContent);
+    browser.openLink(
+      "/subPackage/pages/activity/activity?pageId=" + tag.couponLink,
+      `https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${tag.couponLink}`,
+      `/pages/showactivity/main?pageId=${tag.couponLink}`
+    );
+    emit("close");
+  } catch (error) {
+    console.log(error);
+  }
 };
 };
 </script>
 </script>