|
@@ -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>
|