浏览代码

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

wenliming 3 年之前
父节点
当前提交
eee171ad2b
共有 3 个文件被更改,包括 12 次插入2 次删除
  1. 1 1
      src/logic/content/nft.js
  2. 2 1
      src/logic/content/twitter.js
  3. 9 0
      src/view/iframe/buy-nft/group/tip.vue

+ 1 - 1
src/logic/content/nft.js

@@ -180,7 +180,7 @@ export const addJoinedGroupList = () => {
         let iframe = document.createElement('iframe');
             iframe.id = 'de-joined-group-list';
             iframe.src = chrome.runtime.getURL('/iframe/joined-group-list.html');
-            iframe.style.cssText = `border: medium none;width: 350px;height: 120px;border-radius: 16px;margin-bottom: 16px`
+            iframe.style.cssText = `border: medium none;height: 120px;border-radius: 16px;margin-bottom: 16px`
 
         let iframeContent = document.getElementById('de-joined-group-list');
 

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

@@ -1197,6 +1197,7 @@ export function doTaskTwitterAPI({ task_data, task_type }) {
 export function showJoinDialog(data) {
     let iframe = document.querySelector('#nftProjectId')
     iframe.style.display = 'block'
+    iframe.contentWindow.postMessage({ actionType: 'SHOW_JOIN_DATA', data }, '*');
     iframe.src = chrome.runtime.getURL(`/iframe/buy-nft.html#/group?params=${JSON.stringify(data)}&time=${new Date().getTime()}`)
 }
 
@@ -1455,7 +1456,7 @@ export const showGroupTip = () => {
 export const hideBuyNFT = () => {
     let iframe = document.querySelector('#nftProjectId')
     iframe.style.display = 'none'
-    iframe.src = ''
+    iframe.src =''
 }
 
 export const showBuyNFT = ({ nft_project_Id }) => {

+ 9 - 0
src/view/iframe/buy-nft/group/tip.vue

@@ -102,6 +102,15 @@ const clickClose = () => {
     })
 }
 
+window.addEventListener("message", function (event) {
+    if (event.data) {
+        switch (event.data.actionType) {
+            case 'SHOW_JOIN_DATA':
+                state.params = event.data.data
+        }
+    }
+});
+
 const clickFinish = () => {
     clickClose()
 }