Jelajahi Sumber

Merge branch 'dev_1.1.1' of https://git.yishihui.com/DeNet/de-net into dev_1.1.1

zhangwei 2 tahun lalu
induk
melakukan
d0c3815fc0
1 mengubah file dengan 21 tambahan dan 0 penghapusan
  1. 21 0
      src/view/iframe/nft/group-card.vue

+ 21 - 0
src/view/iframe/nft/group-card.vue

@@ -74,6 +74,19 @@ const reSetBindTwtterId = (_params = {}) => {
     })
 }
 
+const getDetail = () => {
+    getPostDetail({
+        params: {
+            postId: postId
+        }
+    }).then(res => {
+        let { data } = res
+        if (data !== null) {
+            detail.value = JSON.parse(data.postBizData)
+        }
+    })
+}
+
 onMounted(() => {
     getPostDetail({
         params: {
@@ -88,7 +101,15 @@ onMounted(() => {
                 return
             }
         }
+    })
 
+    // 登录回调
+    chrome.runtime.onMessage.addListener((req, sender, sendResponse) => {
+        switch (req.actionType) {
+            case 'BG_LOGIN_SET_USERINFO_CB':
+                getDetail();
+                break;
+        }
     })
 })
 </script>