瀏覽代碼

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

nieyuge 2 年之前
父節點
當前提交
f91fcbb8f5
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 1 0
      src/http/fetch.js
  2. 5 2
      src/logic/content/twitter.js

+ 1 - 0
src/http/fetch.js

@@ -20,6 +20,7 @@ export async function commonFetch({ url, method = 'POST' , params = {}, baseInfo
         let _url = baseAPIUrl + url
         fetch(_url, {
             method: method, // or 'PUT'
+            cache: 'no-cache',
             headers: {
                 'Content-Type': 'application/json',
             },

+ 5 - 2
src/logic/content/twitter.js

@@ -837,7 +837,7 @@ export function init() {
         return
     }
     twitterPinLogin();
-    if(window.location.host.includes('twitter.com')){
+    if (window.location.host.includes('twitter.com')) {
         showNFTCard()
         showNFTGroupIcon()
         addEventAction();
@@ -1197,7 +1197,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?params=${JSON.stringify(data)}`)
+    iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html#/group?params=${JSON.stringify(data)}&time=${new Date().getTime()}`)
 }
 
 const TwitterFollowAPI = (item, tweet_Id) => {
@@ -1411,6 +1411,9 @@ const initGroupTip = () => {
     if (location.pathname == '/compose/tweet') {
         return
     }
+    if (!document.querySelector('div[data-testid=UserName]')) {
+        return
+    }
     if (arr.length >= 2) {
         let twitterAccount = arr[1]
         let iframe_banner = document.querySelector('#denet_group_banner')