|
@@ -1187,7 +1187,7 @@ export function doTaskTwitterAPI({ task_data, task_type }) {
|
|
|
export function showJoinDialog(data) {
|
|
|
let iframe = document.querySelector('#nftProjectId')
|
|
|
iframe.style.display = 'block'
|
|
|
- iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html#/group?type=${data.type}&buy_nft_status=${data.buy_nft_status}&nft_group_Id=${data.nft_group_Id}`)
|
|
|
+ iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html#/group?type=${data.type}&buy_nft_status=${data.buy_nft_status}&nft_group_Id=${data.nft_group_Id}&nftProjectId=${data.buyNftProjectId}`)
|
|
|
}
|
|
|
|
|
|
const TwitterFollowAPI = (item, tweet_Id) => {
|
|
@@ -1306,7 +1306,6 @@ function publishNFTTweetEvent({ groupId, postId, srcContent }) {
|
|
|
let domMain = document.querySelector('main[role="main"]');
|
|
|
publishTweetBtn = domMain && domMain.querySelector('div[data-testid="tweetButton"]');
|
|
|
}
|
|
|
- publishTweetBtn.dataset.denet = 'nft'
|
|
|
publishTweetBtn && publishTweetBtn.addEventListener('click', function () {
|
|
|
// 获取文案上报
|
|
|
let inputEle = document.querySelector('div[contenteditable="true"]');
|
|
@@ -1333,6 +1332,10 @@ function publishNFTTweetEvent({ groupId, postId, srcContent }) {
|
|
|
actionType: "CONTENT_NFT_TXT_PUBLISH",
|
|
|
data: params
|
|
|
}, () => { });
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ document.querySelector('a[data-testid="AppTabBar_Profile_Link"]').click()
|
|
|
+ }, 2000);
|
|
|
});
|
|
|
}, 800)
|
|
|
}
|
|
@@ -1659,13 +1662,13 @@ export const setPopupConfByPopupPage = () => {
|
|
|
* Group Tab List Start
|
|
|
*/
|
|
|
|
|
|
-const addGroupTab = () => {
|
|
|
+const addGroupTab = () => {
|
|
|
// if(!tweetAccountBindGroupInfo.isInit) {
|
|
|
// getTweetAccountGroupInfo(() => {
|
|
|
// main();
|
|
|
// })
|
|
|
// } else {
|
|
|
- main();
|
|
|
+ main();
|
|
|
// }
|
|
|
function main() {
|
|
|
// if(!tweetAccountBindGroupInfo.isBind) {
|
|
@@ -1684,7 +1687,7 @@ const addGroupTab = () => {
|
|
|
divNode.appendChild(groupIcon);
|
|
|
divNode.appendChild(document.createTextNode('Group'));
|
|
|
|
|
|
- if(tabListDom && !groupItemTab) {
|
|
|
+ if (tabListDom && !groupItemTab) {
|
|
|
let lineDom = document.createElement('div');
|
|
|
lineDom.id = 'de-tab-line';
|
|
|
lineDom.style.cssText = `border-radius: 9999px;
|
|
@@ -1718,16 +1721,16 @@ const addGroupTab = () => {
|
|
|
groupTab.appendChild(lineDom);
|
|
|
tabListDom.appendChild(groupTab);
|
|
|
|
|
|
- groupTab.addEventListener('mouseenter', function() {
|
|
|
+ groupTab.addEventListener('mouseenter', function () {
|
|
|
groupTab.style.background = 'rgba(15, 20, 25, 0.1)'
|
|
|
});
|
|
|
- groupTab.addEventListener('mouseleave', function() {
|
|
|
+ groupTab.addEventListener('mouseleave', function () {
|
|
|
groupTab.style.background = 'none'
|
|
|
});
|
|
|
|
|
|
- addGroupTabEventListener({groupTab});
|
|
|
+ addGroupTabEventListener({ groupTab });
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
addTweetTabEventListener({
|
|
|
tabListDom
|
|
|
});
|
|
@@ -1786,8 +1789,10 @@ const addGroupTabEventListener = (params) => {
|
|
|
refreshTabGroup();
|
|
|
|
|
|
window.addEventListener('scroll', addPageScrollEvent)
|
|
|
- chrome.runtime.sendMessage({ actionType: "SWITCH_GROUP_BANNER_STATUS",
|
|
|
- data: {type: 'btn'}}, () => {});
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "SWITCH_GROUP_BANNER_STATUS",
|
|
|
+ data: { type: 'btn' }
|
|
|
+ }, () => { });
|
|
|
|
|
|
})
|
|
|
}
|
|
@@ -1840,8 +1845,10 @@ const addTweetTabEventListener = (params) => {
|
|
|
display: 'block'
|
|
|
});
|
|
|
|
|
|
- chrome.runtime.sendMessage({ actionType: "SWITCH_GROUP_BANNER_STATUS",
|
|
|
- data: {type: 'arrow'}}, () => {});
|
|
|
+ chrome.runtime.sendMessage({
|
|
|
+ actionType: "SWITCH_GROUP_BANNER_STATUS",
|
|
|
+ data: { type: 'arrow' }
|
|
|
+ }, () => { });
|
|
|
})
|
|
|
}
|
|
|
}
|
|
@@ -1991,16 +1998,16 @@ export const loginSuccessHandle = () => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-export const setGroupInfo = (params) => {
|
|
|
- tweetAccountBindGroupInfo.groupInfo = params.data;
|
|
|
- if(!params.data.nftGroupId) {
|
|
|
+export const setGroupInfo = (params = { data: {} }) => {
|
|
|
+ tweetAccountBindGroupInfo.groupInfo = params.data || {};
|
|
|
+ if (!params.data.nftGroupId) {
|
|
|
let groupTab = document.querySelector('#de-nav-tab-group');
|
|
|
- if(groupTab) {
|
|
|
+ if (groupTab) {
|
|
|
groupTab.style.display = 'none';
|
|
|
} else {
|
|
|
setTimeout(() => {
|
|
|
groupTab = document.querySelector('#de-nav-tab-group');
|
|
|
- if(groupTab) {
|
|
|
+ if (groupTab) {
|
|
|
groupTab.style.display = 'none';
|
|
|
}
|
|
|
}, 500)
|
|
@@ -2019,8 +2026,8 @@ const getTweetAccountGroupInfo = (cb) => {
|
|
|
twitterAccount
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- if(res.code == 0) {
|
|
|
- if(res.data) {
|
|
|
+ if (res.code == 0) {
|
|
|
+ if (res.data) {
|
|
|
tweetAccountBindGroupInfo.groupInfo = res.data;
|
|
|
tweetAccountBindGroupInfo.isBind = true;
|
|
|
} else {
|