浏览代码

[edit] fix

wenliming 2 年之前
父节点
当前提交
d86dfa6ae7

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

@@ -346,7 +346,8 @@ export function onInstalledCreateTab() {
                       objectType: Report.objectType.chrome_extension_installed,
                       funcName: 'onInstalledCreateTab',
                       postId: res.postId || '',
-                      shareLinkId: res.shareLinkId || ''
+                      shareLinkId: res.shareLinkId || '',
+                      'channal-name': res.channalName
                   })
               }, 5000)
             });

+ 4 - 3
src/view/iframe/treasure-hunt/components/boxs.vue

@@ -3,6 +3,7 @@
         <!-- 箱子 -->
         <div class="box-process">
             <div class="item" v-for="item, i in state.boxs"
+                :key="i"
                 :style="{ 'margin-left': item.icon_margin_left, 'z-index': 10 - i }">
                 <!--悬浮 -->
                 <!-- < hover - tip : txt=" item.txt" v-show="item.show || item.openStatus" :icon="item.hover_icon">
@@ -15,10 +16,10 @@
                 <!-- 宝箱 -->
                 <img :src="item.icon" alt="" @mouseenter="mouseItem(i)" @mouseleave="mouseLeaveItem(i)"
                     :style="{ 'width': item.icon_width, 'height': item.icon_width }" class="box"
-                    :class="{ 'active': item.openStatus == 0 && item.taskFinishStatus == 1 }" @click="clickBox(item)" />
+                    :class="{ 'active': i == 0 && item.openStatus == 0 ? true : item.openStatus == 0 && state.boxs[i-1]['openStatus'] == 1  }" @click="clickBox(item)" />
                 <!-- 发光 -->
                 <img :src="require('@/assets/img/icon-flash-active.png')" alt="" class="flash"
-                    v-if="item.openStatus == 0 && item.taskFinishStatus == 1"
+                    v-if="i == 0 && item.openStatus == 0 ? true : item.openStatus == 0 && state.boxs[i-1]['openStatus'] == 1"
                     :style="{ 'margin-left': item.flash_margin_top, 'margin-top': item.flash_margin_top, 'width': item.flash_width, 'height': item.flash_width }" />
 
                 <!-- 进度条 -->
@@ -331,4 +332,4 @@ const boxsStatus = () => {
         -webkit-transform: translateY(-1px);
     }
 }
-</style>
+</style>

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

@@ -31,7 +31,7 @@
             v-click-log="state.log_invite_btn_click" @onClick="clickBtn" font-weight="600"></v-btn>
       <div class="mask" v-show="showShareTips">
         <div class="content">
-          <img class="icon-loading" :src="require('@/assets/svg/icon-loading-channel.svg')" />
+          <img class="icon-loading" :src="channelLoadingImg" />
           <div class="text">
             Link copied to clipboard
              <br/>
@@ -52,6 +52,9 @@ import { setChromeStorage } from '@/uilts/chromeExtension.js'
 
 let ClipboardJS = require('clipboard');
 
+let loadingImg = require('@/assets/img/icon-loading-channel.png');
+
+let channelLoadingImg = ref(loadingImg);
 let state = inject('state')
 
 state.log_invite_btn_show = {
@@ -166,6 +169,7 @@ async function clickBtn() {
 }
 
 const clickShare = (item) => {
+    channelLoadingImg.value = loadingImg;
     var clipboard = new ClipboardJS('.share-item');
     clipboard.on('success', function (e) {
         // state.toast.txt = 'Copy Successfully'
@@ -203,6 +207,7 @@ const clickShare = (item) => {
     } else {
         setTimeout(() => {
           showShareTips.value = false;
+          channelLoadingImg.value = '';
           chrome.tabs.create({
               url: item.redirectPath
           });
@@ -215,7 +220,8 @@ const clickShare = (item) => {
         shareLinkId: state.invite_code,
         myShareLinkId: state.detail.inviteCopyUrl,
         currentInvitedNum: state.inviteCount,
-        postId: state.postId
+        postId: state.postId,
+        redPacketType: Report.redPacketType.treasure
     }, {
         'channel-name': item.name
     });
@@ -365,7 +371,6 @@ const clickCopy = () => {
       .icon-loading {
         width: 60px;
         height: 60px;
-        animation: loading 1 1s linear forwards;
         margin-bottom: 30px;
       }
 
@@ -375,18 +380,6 @@ const clickCopy = () => {
         color: #FFFFFF;
       }
     }
-
-
-  @keyframes loading {
-      0% {
-          transform: rotate(0);
-      }
-
-      100% {
-          transform: rotate(280deg);
-      }
-  }
-
   @keyframes fade-in-gray {
     from {
       background: none;

+ 6 - 2
src/view/iframe/treasure-hunt/cover.vue

@@ -325,11 +325,15 @@ async function clickBtn() {
     }
     if (state.cover_status == '奖励已被领光') {
         Report.reportLog({
-            pageSource: Report.pageSource.pending_page,
+            pageSource: Report.pageSource.expiredPage,
             businessType: Report.businessType.buttonClick,
             objectType: Report.objectType.getMoreGiveaway,
-            postId: state.postId
+            postId: state.postId,
+            shareLinkId: state.invite_code,
+            currentInvitedNum: state.inviteCount,
+            redPacketType: Report.redPacketType.treasure
         });
+
         window.open('https://twitter.com/search?q=%23denet');
         return
     }

+ 10 - 0
src/view/iframe/treasure-hunt/index.vue

@@ -296,6 +296,16 @@ const handleStatus = (callback) => {
         state.page = '封面页'
         state.cover_status = '奖励已被领光'
         state.btn_loading = false
+        // Report.reportLog({
+        //   pageSource: Report.pageSource.expiredPage,
+        //   businessType: Report.businessType.pageView,
+        //   postId: state.postId,
+        //   shareLinkId: state.invite_code,
+        //   myShareLinkId: state.detail.inviteCopyUrl,
+        //   currentInvitedNum: state.inviteCount,
+        //   postId: state.postId,
+        //   redPacketType: Report.redPacketType.treasure
+        // });
         return
     }
     callback && callback()