tremble 3 anni fa
parent
commit
c77f66b11d
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/app.vue

+ 2 - 2
src/app.vue

@@ -296,7 +296,7 @@ onMounted(async () => {
           if (tag.type == "coupon") {
             try {
               document.querySelector(`[data-tag-id="${tag.sid}"] .tag-icon`).style.display = 'none'
-              let hotcontent = JSON.parse(tag.hotContent);
+              let hotcontent = (typeof tag.hotContent =='string') ? JSON.parse(tag.hotContent) : tag.hotContent;
               browser.openLink(
                 "/subPackage/pages/activity/activity?pageId=" + hotcontent.couponLink,
                 `https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.couponLink}`,
@@ -313,7 +313,7 @@ onMounted(async () => {
               console.log(tag);
 
             try {
-              let hotcontent = tag.hotContent;
+              let hotcontent = (typeof tag.hotContent =='string') ? JSON.parse(tag.hotContent) : tag.hotContent;
               browser.openLink(
                 "/subPackage/pages/home/home?pageType=2&pageId=" + hotcontent.liveLink,
                 `https://m.cdfmembers.com/shop/600667208/showactivity?pageId=${hotcontent.liveLink}`,