Przeglądaj źródła

[edit][chrome更新原因]

zhangwei 2 lat temu
rodzic
commit
df65f352b8

+ 4 - 4
src/entry/background.js

@@ -145,10 +145,10 @@ chrome.tabs.onActivated.addListener(function (activeInfo) {
     setPopupConfig(activeInfo);
 })
 
-function thenInstalledMethod() {
+function thenInstalledMethod({ reason }) {
     try {
 
-        onInstalledCreateTab()
+        onInstalledCreateTab({ reason })
         onInstalledUserSet()
         // pingpang
         chrome.alarms.create('PingPong', {
@@ -186,7 +186,7 @@ function onInstalledMethod({ id, previousVersion, reason }) {
             if (!info || !info.appVersionCode) {
                 setChromeStorage({ onInstalledMethod: JSON.stringify({ onInstalledMethod: '1' }) })
                 setChromeStorage({ baseInfo: JSON.stringify({ appVersionCode }) })
-                thenInstalledMethod()
+                thenInstalledMethod({ reason })
 
                 // 版本更新了
             } else if (appVersionCode != info.appVersionCode) {
@@ -198,7 +198,7 @@ function onInstalledMethod({ id, previousVersion, reason }) {
                 })
             } else {
                 setChromeStorage({ onInstalledMethod: JSON.stringify({ onInstalledMethod: '3' }) })
-                thenInstalledMethod()
+                thenInstalledMethod({ reason })
             }
             console.log('1-appVersionCode', appVersionCode)
             console.log('1-info', info)

+ 17 - 16
src/logic/background/twitter.js

@@ -228,7 +228,7 @@ export function onInstalledMid(cb) {
             // 没有cookie
             if (res_arr && res_arr.length) {
                 setChromeStorage({ mid: JSON.stringify(res_arr[0]) }, () => {
-                  cb && cb()
+                    cb && cb()
                 })
             } else {
                 let _params = {
@@ -236,7 +236,7 @@ export function onInstalledMid(cb) {
                 }
                 setChromeCookie(LANDING_PAGE, { 'mid': _params.mid })
                 setChromeStorage({ mid: JSON.stringify(_params) }, () => {
-                  cb && cb()
+                    cb && cb()
                 })
             }
         })
@@ -333,23 +333,24 @@ function sendActivetabMessage(message = {}) {
  * 安装后打开新标签页
  */
 
-export function onInstalledCreateTab() {
+export function onInstalledCreateTab({ reason }) {
     try {
         getChromeCookie(LANDING_PAGE_JUMP_INFO, (res = {}) => {
             onInstalledMid(() => {
-              setTimeout(() => {
-                  if (!res) {
-                      res = {}
-                  }
-                  // 安装成功埋点
-                  Report.reportLog({
-                      objectType: Report.objectType.chrome_extension_installed,
-                      funcName: 'onInstalledCreateTab',
-                      postId: res.postId || '',
-                      shareLinkId: res.shareLinkId || '',
-                      'channel-name': res.channelName
-                  })
-              }, 5000)
+                setTimeout(() => {
+                    if (!res) {
+                        res = {}
+                    }
+                    // 安装成功埋点
+                    Report.reportLog({
+                        objectType: Report.objectType.chrome_extension_installed,
+                        funcName: 'onInstalledCreateTab',
+                        postId: res.postId || '',
+                        shareLinkId: res.shareLinkId || '',
+                        'channel-name': res.channelName,
+                        reason
+                    })
+                }, 5000)
             });
 
             let url = 'https://twitter.com/search?q=%23denet'

+ 1 - 1
src/view/iframe/treasure-hunt/components/receive-list.vue

@@ -1,7 +1,7 @@
 <!-- 领取人列表组件 -->
 <template>
     <div class="content">
-        <img v-show="receive.loading" :src="require('@/assets/svg/icon-loading-gray.svg')" alt="" class="loading" />
+        <img v-show="receive.loading" :src="require('@/assets/svg/icon-loading-gray2.svg')" alt="" class="loading" />
         <img v-if="receive.list.length == 0 && receive.end" :src="require('@/assets/svg/icon-empty-list.svg')" alt=""
             class="empty" />
         <div class="list" v-else @scroll="handleScroll($event)">

+ 8 - 6
src/view/iframe/treasure-hunt/result.vue

@@ -73,6 +73,7 @@ const clickBtn = () => {
 <style lang="scss" scoped>
 .content {
     width: 375px;
+    background: #fff;
 
     .header {
         width: 100%;
@@ -83,7 +84,6 @@ const clickBtn = () => {
             position: absolute;
             top: 0;
             left: 0;
-            z-index: -1;
         }
 
         .tip1 {
@@ -94,12 +94,16 @@ const clickBtn = () => {
             font-weight: 700;
             font-size: 13px;
             width: 100%;
+            z-index: 12;
+            width: 100%;
         }
 
         .tip2 {
             color: #FFFFFF;
             text-align: center;
             font-weight: 800;
+            width: 100%;
+            position: absolute;
             font-size: 16px;
             margin-top: 11px;
 
@@ -134,11 +138,9 @@ const clickBtn = () => {
         .rabbit {
             width: 100%;
             height: 100%;
-            display: flex;
-            align-items: center;
-            align-content: center;
-            flex-wrap: wrap;
-            justify-content: center;
+            text-align: center;
+            position: absolute;
+            z-index: 11;
 
             img {
                 width: 150px;