Bläddra i källkod

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

zhangwei 2 år sedan
förälder
incheckning
c872497960

+ 26 - 4
src/logic/content/twitter.js

@@ -64,7 +64,7 @@ function getDiscordAuthCode() {
  * @param port
  */
 function renderDom() {
-    if (window.location.href.indexOf('https://twitter.com') > -1) {
+    if (window.location.href.indexOf('https://twitter.com') > -1 || window.location.href.indexOf('https://mobile.twitter.com') > -1 ) {
         _createBtnDom();
         onWindowResize();
         checkHasDeBtn();
@@ -1245,13 +1245,35 @@ function onReplyDialogOpen(params, iframe) {
                     businessType: Report.businessType.buttonClick,
                     objectType: Report.objectType.replyClickByTwitterList
                 });
+                let editDom = dialog.querySelector('div[contenteditable="true"]');
+                let eleList = []
+                if(editDom) {
+                  eleList = editDom.querySelectorAll('span[data-text="true"]');
+                } else {
+                  // mobile.twitter.com
+                  editDom = dialog.querySelector('textarea');
+                  if(editDom) {
+                    let value = editDom.value;
+                    if(value) {
+                      let strArr = value.split(' ');
+                      if(strArr && strArr.length) {
+                        for(let i = 0; i < strArr.length; i++) {
+                          eleList.push({
+                            innerText: strArr[i]
+                          })
+                        }
+                      }
+                    }
+                  }
+                }
 
-                let eleList = dialog.querySelector('div[contenteditable="true"]').querySelectorAll('span[data-text="true"]');
-                reportReplyResult(eleList, params, () => {
+                if(eleList.length) {
+                  reportReplyResult(eleList, params, () => {
                     // 上報完成
                     iframe.contentWindow.postMessage({ actionType: 'CONTENT_RED_PACKET_REPLY_RASK_FINSH', data: { postId: params.postId } }, '*');
                     // chrome.runtime.sendMessage({ actionType: "CONTENT_RED_PACKET_REPLY_RASK_FINSH", data: { postId: params.postId } }, () => { })
-                })
+                  })
+                }
             });
         }
     }, 1000);

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

@@ -716,6 +716,7 @@ async function clickRetweetBtn() {
 function onTweetReplyClick(params) {
     let replyData = {
         postId: state.postId,
+        iframeId: state.iframeId,
         type: params.type,
         taskLuckdropId: state.detail.taskLuckdropId
     }

+ 3 - 3
src/view/iframe/treasure-hunt/components/invite-friends.vue

@@ -289,13 +289,13 @@ const clickCopy = () => {
   box-sizing: border-box;
 
   .invite-friends-content {
-    max-height: 242px;
-    overflow-y: auto;
+    height: 238px;
+    overflow-y: hidden;
     margin-bottom: 10px;
     box-sizing: border-box;
 
     .invite-friends-content-head {
-      margin-bottom: 16px;
+      margin-bottom: 14px;
       padding: 0 6px;
       box-sizing: border-box;
 

+ 2 - 2
src/view/iframe/treasure-hunt/result.vue

@@ -4,10 +4,10 @@
         <div class="header">
             <img :src="require('@/assets/subject/004-back-head-top.svg')" alt class="back" />
             <!-- 领到钱了 -->
-            <template v-if="Number(state.detail.amountUsdValue) > 0">
+            <template v-if="Number(state.detail.receiveAmountUsdValue) > 0">
                 <div class="tip1">This Giveaway Expired on {{ moment(state.detail.endTimestamp).format('MM-DD') }}</div>
                 <div class="tip2">🎉 Awesome! You are the Winner!</div>
-                <div class="tip3">+${{ state.detail.amountUsdValue }}</div>
+                <div class="tip3">+${{ state.detail.receiveAmountUsdValue }}</div>
                 <div class="tip3-back"></div>
             </template>
             <!-- 没有领到钱 -->