Selaa lähdekoodia

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

zhangwei 2 vuotta sitten
vanhempi
commit
0b285e384f

+ 2 - 0
src/log-center/logEnum.js

@@ -26,6 +26,8 @@ export const objectType = {
     loginButton: "login-button",
     withdrawButton: "withdraw-button",
     topupButton: "topup-button",
+    previewNextButton: 'preview-next-button',
+    setPublishContent: 'set-publish-content',
 
 
     getMoreGiveaway: "get-more-giveaway",

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

@@ -11,6 +11,8 @@ import { clearPostContent, setGroupIconStatus } from '@/logic/content/nft.js'
 import { toolBox } from '@/logic/content/ToolBox'
 import axios from 'axios';
 import messageCenter from '@/uilts/messageCenter';
+import { PlayType } from '@/types';
+import { reSetBindPostContent } from '@/http/help.js'
 
 let dom = {};
 
@@ -118,6 +120,13 @@ export function showTwitterPublishDialogHandler(publishRes) {
     // _setPublishContent(publishRes.srcContent);
     setDialogPublishContent(publishRes.srcContent);
     _publishTweetEvent(publishRes, bindTwitterArtMethod);
+
+    Report.reportLog({
+      businessType: Report.businessType.pageView,
+      objectType: Report.objectType.setPublishContent,
+      postId: publishRes.postId
+    }, {
+    });
 }
 
 export function twitterPublishHandler(res) {
@@ -227,12 +236,30 @@ function _publishTweetEvent(params, cb) {
             bindTwitterArt.needBind = true;
             bindTwitterArt.postId = params.postId;
             tweetPublishStore.showPublishDialog = false;
+
+            bindContentStr(params);
             // checkIsShowReSend(dialog, params);
             cb && cb()
         });
     }, 800)
 }
 
+function bindContentStr(params) {
+  if(params && params.postBizData) {
+    if(typeof params.postBizData == 'string') {
+      let objBizData = JSON.parse(params.postBizData);
+      let inputEle = document.querySelector('div[contenteditable="true"]');
+      if(objBizData.luckdropType == PlayType.treasure && inputEle) {
+        let textContent = inputEle.innerText;
+        reSetBindPostContent({
+          postId: params.postId,
+          postSrcContent: textContent,
+        })
+      }
+    }
+  }
+}
+
 function onClosePublishDialogHandle(dom, params) {
     // 如果是 Tool box
     if (params.postType == 3) {
@@ -2627,7 +2654,7 @@ export const showPublishDialog = () => {
     }
 }
 
-// 获取推文发送回去 
+// 获取推文发送回去
 export const sendContentByTwitterID = (tweet_Id) => {
     // 获取内容
     let txt = parseCard.getContentByTwitterId(tweet_Id)
@@ -2638,4 +2665,4 @@ export const sendContentByTwitterID = (tweet_Id) => {
             txt
         }
     })
-}
+}

+ 19 - 1
src/view/iframe/nft/card.vue

@@ -56,6 +56,7 @@ const isShare = ref(false);
 const isLoading = ref(true);
 const isShowGuide = ref(false);
 const nftProjectId = ref('');
+const nftAccount = ref('');
 let tweetId = ref('');
 
 const getSaleInfo = () => {
@@ -89,6 +90,7 @@ const getSaleData = (projectId) => {
 }
 
 const getSaleProjectInfo = (account) => {
+    nftAccount.value = account;
     getTwitterSaleNftProjectInfo({
         params: {
             twitterAccount: account
@@ -125,7 +127,7 @@ const share = () => {
             tagSearch = `${btoa(tagArr[0])}`
         }
         let url = pageUrl + `/nft/${saleData.value.nftProjectId}/${tagSearch}`
-        let content = `#DNFT\r\r${url}`
+        let content = `${url} #DNFT \r\r `
         chrome.tabs.getCurrent((tab) => {
             chrome.tabs.sendMessage(tab.id, { actionType: "IFRAME_TWITTER_PUBLISH", publishRes: { srcContent: content }  });
         });
@@ -193,6 +195,22 @@ const msgListener = (req, sender, sendResponse) => {
 
 onMounted(() => {
     onRuntimeMsg();
+    // 切换用户
+    chrome.tabs.onUpdated.addListener((id, info) => {
+        if (info.status === "loading" && (info && info.url) && !isShare.value) {
+            let url = new URL(info.url);
+            let pathname = url.pathname;
+            let pathArr;
+            if (pathname) {
+                pathname = pathname.slice(1);
+                pathArr = pathname.split('/');
+                if (nftAccount.value !== pathArr[0]) {
+                    console.log(3333)
+                    getSaleInfo()
+                }
+            }
+        }
+    })
 })
 
 

+ 16 - 0
src/view/iframe/publish/give-dialog.vue

@@ -1361,6 +1361,14 @@ const payStatusHandle = (payStatus) => {
     switch (payStatus) {
         case 1:
             emits("postPublishFinish", { publishRes });
+            Report.reportLog({
+              pageSource: Report.pageSource.previewPage,
+              businessType: Report.businessType.buttonClick,
+              objectType: Report.objectType.previewNextButton,
+              postId: publishRes.postId
+            }, {
+              type: Report.getCurrentBizType(selectModeInfo.type)
+            });
             showComType.value = "default";
             initParams();
             break;
@@ -2167,6 +2175,14 @@ const onToolBoxPageChange = (params) => {
 
 const toolBoxPublishFinish = (params) => {
     toolBoxPageData.activePage = 'EDITOR';
+    Report.reportLog({
+      pageSource: Report.pageSource.previewPage,
+      businessType: Report.businessType.buttonClick,
+      objectType: Report.objectType.previewNextButton,
+      postId: params.publishRes.postId
+    }, {
+      type: Report.getCurrentBizType(PlayType.postEditor)
+    });
     emits("postPublishFinish", { publishRes: params.publishRes });
 }
 

+ 3 - 3
src/view/iframe/red-packet/luck-draw.vue

@@ -232,9 +232,9 @@
                 totalCount: state.detail.totalCount,
                 amountValue: state.detail.amountValue,
                 tokenSymbol: state.detail.currencySymbol,
-                encyCode: state.detail.amountCurrencyCode,
-                encyIconUrl: state.detail.currencyIconPath,
-                pe: PlayType.lottery,
+                currencyCode: state.detail.amountCurrencyCode,
+                currencyIconUrl: state.detail.currencyIconPath,
+                type: PlayType.lottery,
                 validityDuration: state.count_down_time,
                 countDown: state.count_down_time,
                 userInfo: {

+ 2 - 2
src/view/iframe/tool-box/buy-nft.vue

@@ -2,14 +2,14 @@
     <div class="nft-layer">
         <div class="title">
             <img @click="close" :src=" require('@/assets/svg/icon-close.svg') " />
-            <span class="text">Unlock by Ruomeng NFT</span>
+            <span class="text">Unlock by {{ nftAuthINfo.nftProjectName }} NFT</span>
         </div>
         <div class="content">
             <div class="img">
                 <img v-if="nftAuthINfo && nftAuthINfo.icon" :src="nftAuthINfo.icon" />
             </div>
             <div class="tips">
-                <span>only Ruomeng NFT holder can view the content</span>
+                <span>only {{ nftAuthINfo.nftProjectName }} NFT holder can view the content</span>
             </div>
             <div
                 class="btn"