소스 검색

Merge branch 'dev_1.1.5' into dev_v1.1.4_220707

wenliming 2 년 전
부모
커밋
4bae78901f

+ 3 - 0
src/assets/svg/icon-wallet-success.svg

@@ -0,0 +1,3 @@
+<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.9981 4.5H22.0044C23.6547 4.5 25 5.84533 25 7.4981V10.238H17.3117C15.4179 10.238 13.8684 11.7874 13.8684 13.6812V14.5617C13.8684 16.4555 15.4179 18.005 17.3117 18.005H25V20.7448C25 22.4 23.6547 23.7429 22.0019 23.7429H5.9981C4.34287 23.7429 3 22.3976 3 20.7448V7.4981C3 5.84287 4.34533 4.5 5.9981 4.5ZM15.0938 13.6823C15.0938 13.0945 15.3249 12.5411 15.7455 12.1205C16.1636 11.6999 16.7195 11.4688 17.3073 11.4688H24.9956V16.7763H17.3073C16.7195 16.7763 16.1661 16.5451 15.7455 16.1245C15.3249 15.704 15.0938 15.1506 15.0938 14.5628V13.6823ZM19.1962 14.1225C19.1962 13.579 18.7559 13.1387 18.2124 13.1387C17.6688 13.1387 17.2286 13.579 17.2286 14.1225C17.2286 14.6661 17.6688 15.1063 18.2124 15.1063C18.7559 15.1063 19.1962 14.6661 19.1962 14.1225Z" fill="#1D9BF0"/>
+</svg>

+ 17 - 11
src/entry/background.js

@@ -89,18 +89,9 @@ chrome.tabs.onActivated.addListener(function (activeInfo) {
     setPopupConfig(activeInfo);
 })
 
-function onInstalledMethod() {
+function thenInstalledMethod() {
     try {
-        // 版本更新判断
-        getChromeStorage('baseInfo', (info) => {
-            if (!info || !info.appVersionCode) {
-                setChromeStorage({ baseInfo: JSON.stringify({ appVersionCode }) })
-            } else if (appVersionCode != info.appVersionCode) {
-                setChromeStorage({ baseInfo: JSON.stringify({ appVersionCode }) }, () => {
-                    chrome.runtime.reload()
-                })
-            }
-        })
+
         onInstalledCreateTab()
         onInstalledMid()
         onInstalledUserSet()
@@ -132,6 +123,21 @@ function onInstalledMethod() {
         });
     }
 }
+function onInstalledMethod() {
+    // 版本更新判断
+    getChromeStorage('baseInfo', (info) => {
+        if (!info || !info.appVersionCode) {
+            setChromeStorage({ baseInfo: JSON.stringify({ appVersionCode }) })
+            thenInstalledMethod()
+        } else if (appVersionCode != info.appVersionCode) {
+            setChromeStorage({ baseInfo: JSON.stringify({ appVersionCode }) }, () => {
+                chrome.runtime.reload()
+            })
+        } else {
+            thenInstalledMethod()
+        }
+    })
+}
 
 function onMessageMethod(req, sender, sendResponse) {
     try {

+ 10 - 10
src/manifest.json

@@ -24,7 +24,6 @@
             "js": [
                 "/js/content_help.js"
             ],
-            "all_frames": true,
             "css": [
                 "/css/content_help.css"
             ]
@@ -45,17 +44,18 @@
             ]
         }
     ],
-    "optional_permissions":[
+    "optional_permissions": [
         "declarativeNetRequest"
     ],
-    "declarative_net_request" : {
-        "rule_resources" : [{
-          "id": "ruleset_1",
-          "enabled": true,
-          
-          "path": "/rules/rules_1.json"
-        }]
-      },
+    "declarative_net_request": {
+        "rule_resources": [
+            {
+                "id": "ruleset_1",
+                "enabled": true,
+                "path": "/rules/rules_1.json"
+            }
+        ]
+    },
     "host_permissions": [
         "*://*/*",
         "<all_urls>",

+ 9 - 3
src/rules/rules_1.json

@@ -1,15 +1,14 @@
 [
     {
         "id": 1,
-        "condition": {
-        },
+        "condition": {},
         "action": {
             "type": "modifyHeaders",
             "responseHeaders": [
                 {
                     "header": "X-Frame-Options",
                     "operation": "remove"
-                },        
+                },
                 {
                     "header": "Frame-Options",
                     "operation": "remove"
@@ -18,6 +17,13 @@
                     "header": "content-security-policy",
                     "operation": "remove"
                 }
+            ],
+            "requestHeaders": [
+                {
+                    "header": "sec-fetch-dest",
+                    "operation": "set",
+                    "value": "document"
+                }
             ]
         }
     }

+ 73 - 0
src/view/components/icon-svg.vue

@@ -0,0 +1,73 @@
+<template>
+    <!-- 固定 -->
+    <template v-if="icon == '固定'">
+        <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" :class="class"
+            @click.stop="clickStop">
+            <mask id="path-1-inside-1_22849_40056" fill="white">
+                <rect x="1" y="2" width="18" height="16" rx="1" />
+            </mask>
+            <rect x="1" y="2" width="18" height="16" rx="1" fill="#D9D9D9" fill-opacity="0.01" stroke="white"
+                stroke-width="3" mask="url(#path-1-inside-1_22849_40056)" />
+            <rect x="9" y="5" width="7" height="5" fill="white" />
+        </svg>
+    </template>
+
+    <!-- 放大 -->
+    <template v-if="icon == '放大'">
+        <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" :class="class"
+            @click.stop="clickStop">
+            <path
+                d="M11.3054 3.39557H15.4646L11.8944 6.8807L11.8944 6.88068L11.8923 6.88281C11.7377 7.03738 11.6759 7.2515 11.6759 7.45338C11.6759 7.65758 11.7381 7.87294 11.8611 8.05744L11.8888 8.09904L11.9304 8.12678C12.1149 8.24978 12.3303 8.31196 12.5345 8.31196C12.7363 8.31196 12.9505 8.25011 13.105 8.09554L16.5923 4.6083V8.77794C16.5923 9.00244 16.702 9.20602 16.8445 9.34851C16.987 9.49099 17.1905 9.60072 17.4151 9.60072C17.6396 9.60072 17.8431 9.49099 17.9856 9.34851C18.1281 9.20602 18.2378 9.00244 18.2378 8.77794V3.5396C18.2871 3.02389 18.1855 2.58065 17.9514 2.25868C17.7118 1.92926 17.3491 1.75 16.9377 1.75H11.3054C11.0809 1.75 10.8773 1.85973 10.7348 2.00222C10.5923 2.1447 10.4826 2.34828 10.4826 2.57278C10.4826 2.79729 10.5923 3.00087 10.7348 3.14335C10.8773 3.28583 11.0809 3.39557 11.3054 3.39557ZM9.77794 15.6877H5.6083L9.09554 12.2005C9.2485 12.0475 9.31196 11.8347 9.31196 11.6419C9.31196 11.4566 9.25337 11.2528 9.11311 11.1015C8.97067 10.9011 8.75564 10.7952 8.52497 10.7952C8.29228 10.7952 8.06427 10.9018 7.88281 11.0832L4.39557 14.5705V10.019C4.39557 9.79447 4.28583 9.59089 4.14335 9.44841C4.00087 9.30592 3.79729 9.19619 3.57278 9.19619C3.34828 9.19619 3.1447 9.30592 3.00222 9.44841C2.85973 9.59089 2.75 9.79447 2.75 10.019V15.4604C2.75 15.8987 2.91219 16.3805 3.19379 16.756C3.47667 17.1332 3.90175 17.4288 4.43196 17.4288H9.77794C10.0024 17.4288 10.206 17.319 10.3485 17.1765C10.491 17.0341 10.6007 16.8305 10.6007 16.606C10.6007 16.1115 10.2265 15.6877 9.77794 15.6877Z"
+                fill="white" stroke="white" stroke-width="0.5" />
+        </svg>
+    </template>
+
+    <!-- 缩小 -->
+    <svg v-if="icon == '缩小'" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
+        :class="class" @click.stop="clickStop">
+        <g clip-path="url(#clip0_22829_232305)">
+            <path
+                d="M2.57362 11.9381H6.74327L3.25602 15.4254C3.10307 15.5783 3.0396 15.7912 3.0396 15.984C3.0396 16.1693 3.09819 16.373 3.23846 16.5244C3.38089 16.7248 3.59592 16.8307 3.82659 16.8307C4.05929 16.8307 4.28729 16.7241 4.46875 16.5426L7.956 13.0554V17.6069C7.956 17.8314 8.06573 18.035 8.20821 18.1775C8.3507 18.32 8.55428 18.4297 8.77878 18.4297C9.00328 18.4297 9.20686 18.32 9.34934 18.1775C9.49183 18.035 9.60156 17.8314 9.60156 17.6069V12.1655C9.60156 11.7271 9.43937 11.2454 9.15777 10.8699C8.87489 10.4927 8.44981 10.1971 7.9196 10.1971H2.57362C2.34912 10.1971 2.14554 10.3068 2.00306 10.4493C1.86057 10.5918 1.75084 10.7954 1.75084 11.0199C1.75084 11.5144 2.12504 11.9381 2.57362 11.9381Z"
+                fill="white" stroke="white" stroke-width="0.5" />
+            <path
+                d="M16.6276 2.25602L13.1403 5.74327V1.57362C13.1403 1.34912 13.0306 1.14554 12.8881 1.00306C12.7456 0.860574 12.542 0.750839 12.3175 0.750839C12.093 0.750839 11.8894 0.860574 11.747 1.00306C11.6045 1.14554 11.4947 1.34912 11.4947 1.57362V6.81196C11.4455 7.32767 11.5471 7.77091 11.7812 8.09288C12.0208 8.4223 12.3835 8.60156 12.7948 8.60156H18.4272C18.6517 8.60156 18.8553 8.49183 18.9978 8.34934C19.1403 8.20686 19.25 8.00328 19.25 7.77878C19.25 7.55427 19.1403 7.3507 18.9978 7.20821C18.8553 7.06573 18.6517 6.956 18.4272 6.956H14.268L17.8381 3.47087L17.8382 3.47088L17.8403 3.46875C17.9949 3.31418 18.0567 3.10006 18.0567 2.89818C18.0567 2.69398 17.9945 2.47862 17.8715 2.29412L17.8438 2.25252L17.8022 2.22479C17.6177 2.10179 17.4023 2.0396 17.1981 2.0396C16.9962 2.0396 16.7821 2.10145 16.6276 2.25602Z"
+                fill="white" stroke="white" stroke-width="0.5" />
+        </g>
+        <defs>
+            <clipPath id="clip0_22829_232305">
+                <rect width="18" height="18" fill="white" transform="translate(1 1)" />
+            </clipPath>
+        </defs>
+    </svg>
+
+    <!-- 关闭 -->
+    <svg v-if="icon == '关闭'" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"
+        :class="class" @click.stop="clickStop">
+        <line y1="-1" x2="16.7592" y2="-1" transform="matrix(-0.698077 0.716023 -0.698077 -0.716023 15.1914 4)"
+            stroke="white" stroke-width="2" />
+        <line y1="-1" x2="16.7592" y2="-1" transform="matrix(0.698077 0.716022 0.698077 -0.716022 4.79297 4)"
+            stroke="white" stroke-width="2" />
+    </svg>
+
+
+</template>
+<script setup>
+import { defineProps, defineEmits } from 'vue'
+const emits = defineEmits("back");
+let props = defineProps({
+    icon: {
+        type: String,
+        default: ''
+    },
+    class: {
+        type: String,
+        default: ''
+    }
+})
+const clickStop = () => {
+    emits("clickStop");
+}
+
+</script>
+<style>
+</style>

+ 20 - 4
src/view/content/tool-box/full.vue

@@ -3,10 +3,12 @@
         <div class="head">
             <span></span>
             <div>
-                <!-- 缩放 -->
-                <img :src="require('@/assets/img/icon-full.png')" alt class="fixed" @click="clickFull" />
+                <!-- 缩小 -->
+                <icon-svg v-if="state.status == '全屏'" :icon="'缩小'" @clickStop="clickFull" :class="'full'"></icon-svg>
+                <icon-svg v-else :icon="'放大'" @clickStop="clickFull" :class="'full'"></icon-svg>
+
                 <!-- 关闭 -->
-                <img :src="require('@/assets/img/icon-close.png')" alt class="full" @click="clickClose" />
+                <icon-svg :icon="'关闭'" @clickStop="clickClose" :class="'fixed'"></icon-svg>
             </div>
         </div>
         <div class="content">
@@ -18,6 +20,7 @@
 import { onMounted, reactive, ref } from "vue";
 import { sendEventInfo } from "@/uilts/event";
 import { $ } from "@/uilts/help";
+import IconSvg from '@/view/components/icon-svg.vue'
 
 let state = reactive({
     status: '固定', // 全屏
@@ -38,6 +41,14 @@ window.addEventListener("onEvent", e => {
             state.iframe_url = info.data.iframe_url
             state.tweetId = info.data.tweetId
             break
+        case 'ToolBox_To_Full':
+            if (state.iframe_url || state.tweetId) {
+                sendClose()
+            }
+            state.status = '全屏'
+            state.iframe_url = info.data.iframe_url
+            state.tweetId = info.data.tweetId
+            break
     }
 });
 
@@ -119,7 +130,12 @@ const sendClose = () => {
             margin-left: 16px;
         }
 
-        img {
+        div {
+            display: flex;
+            justify-content: center;
+        }
+
+        svg {
             width: 20px;
             height: 20px;
             cursor: pointer;

+ 15 - 7
src/view/content/tool-box/index.vue

@@ -3,15 +3,16 @@
         <div class="head" @click.stop="clickHead">
             <span></span>
             <div v-show="state.show_btn && state.status == ''">
-                <img :src="require('@/assets/img/icon-fixed.png')" alt class="fixed" @click.stop="clickFixed" />
-                <img :src="require('@/assets/img/icon-full.png')" alt class="full" @click.stop="clickFull" />
+                <icon-svg :icon="'固定'" @clickStop="clickFixed" :class="'fixed'"></icon-svg>
+                <icon-svg :icon="'放大'" @clickStop="clickFull" :class="'full'"></icon-svg>
             </div>
         </div>
         <div class="content" v-if="pre_view">
             <iframe :src="iframe_url" frameborder="0"></iframe>
         </div>
         <div class="content" v-else>
-            <iframe :src="state.iframe_url" v-show="state.status == ''" ref="dom_iframe" frameborder="0" allow="camera *;microphone *"></iframe>
+            <iframe :src="state.iframe_url" v-show="state.status == ''" ref="dom_iframe" frameborder="0"
+                allow="camera *;microphone *"></iframe>
             <!-- 网页错误 -->
             <div class="state" v-show="state.status == '网页错误'">
                 <img :src="require('@/assets/img/icon-page-fail.png')" alt />
@@ -57,6 +58,7 @@ import { guid } from "@/uilts/help";
 import { sendEventInfo } from "@/uilts/event";
 import { onMounted, reactive, ref } from "vue";
 import { $ } from "@/uilts/help";
+import IconSvg from '@/view/components/icon-svg.vue'
 let dom_toolbox = ref(null)
 let dom_iframe = ref(null)
 let state = reactive({
@@ -132,7 +134,7 @@ onMounted(() => {
                 return
             }
         }
-    }catch(error){
+    } catch (error) {
         console.log(error)
     }
     getDetail()
@@ -206,10 +208,10 @@ const handleFull = () => {
     dom.fixed.dataset.tweetId = state.tweetId
     state.show_btn = false
     sendEventInfo({
-        event_type: 'ToolBox_To_Fixed',
+        event_type: 'ToolBox_To_Full',
         data: {
             iframe_url: state.iframe_url,
-            tweetId: state.tweetId
+            tweetId: state.tweetId,
         }
     })
     // 清除当前iframe src
@@ -366,6 +368,11 @@ const clickFull = () => {
         align-items: center;
         justify-content: space-between;
 
+        div {
+            display: flex;
+            justify-content: center;
+        }
+
         span {
             color: #FFFFFF;
             font-style: normal;
@@ -374,7 +381,7 @@ const clickFull = () => {
             margin-left: 16px;
         }
 
-        img {
+        svg {
             width: 20px;
             height: 20px;
             cursor: pointer;
@@ -399,6 +406,7 @@ const clickFull = () => {
         justify-content: center;
 
         iframe {
+            background: #fff;
             width: 100%;
             height: 100%;
         }

+ 49 - 0
src/view/iframe/publish/components/get-more.vue

@@ -1,4 +1,14 @@
 <template>
+    <div class="get-more-btns"  v-if="props.style_type == 3">
+        <div class="get-more-btn" @click="jumpMore">
+            <img width="22" :src="require('@/assets/svg/icon-wallet-success.svg')" />
+            <font>View wallet</font>
+        </div>
+        <div class="get-more-btn" @click="jumpMore">
+            <img width="22" :src="require('@/assets/svg/icon-big-give.svg')" />
+            <font>Get More Giveaway</font>
+        </div>
+    </div>
     <div class="getMore" @click="jumpMore" v-if="props.style_type == 1">
         <img width="20" :src="require('@/assets/svg/icon-big-give.svg')" />
         <font>Get More Giveaway</font>
@@ -78,4 +88,43 @@ const jumpMore = () => {
         margin-right: 8px;
     }
 }
+.get-more-btns  {
+    display: flex;
+    cursor: pointer;
+    user-select: none;
+    align-items: center;
+    justify-content: center;
+    padding: 13px 0;
+    box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.06);
+    position: relative;
+    .get-more-btn {
+        flex: 1;
+        display: flex;
+        cursor: pointer;
+        user-select: none;
+        flex-direction: column;
+        align-items: center;
+        justify-content: center;
+        height: 44px;
+        font {
+            font-weight: 600;
+            font-size: 14px;
+            line-height: 17px;
+            text-align: center;
+            letter-spacing: 0.3px;
+            color: #000000;
+        }
+    }
+    &::after {
+        content: "";
+        width: 1px;
+        height: 88px;
+        position: absolute;
+        left: 50%;
+        top: 13px;
+        background-color: rgba(0,0,0,.2);
+        transform: scale(0.5);
+        transform-origin: 0 0;
+    }
+}
 </style>

+ 19 - 12
src/view/iframe/publish/tool-box/child/editor.vue

@@ -6,7 +6,7 @@
       </div>
       <div class="search-wrapper">
         <input class="input" type="text" v-model="siteUrl" placeholder="Enter link">
-        <div class="btn" @click="searchHandler">
+        <div class="btn" @click="searchHandler()">
           <img :src="require('@/assets/svg/icon-tool-box-search-arrow.svg')" />
         </div>
       </div>
@@ -55,7 +55,7 @@ import axios from 'axios';
 import { message } from "ant-design-vue";
 import { convertUrl, getAllPostEditorAppData } from "@/http/toolBoxApi";
 import { getChromeStorage } from "@/uilts/chromeExtension"
-import { checkURL } from "@/uilts/help"
+import { checkURL, debounce } from "@/uilts/help"
 
 const props = defineProps({
   linkInputDescImage: {
@@ -68,6 +68,7 @@ const props = defineProps({
 let siteUrl = ref('');
 
 let selectAppGuideData = {};
+let selectGuideApp = {};
 let openWindowList = [];
 
 let historyList = ref([])
@@ -76,7 +77,7 @@ let appList = ref();
 
 const emits = defineEmits(["changeShowCom"]);
 
-const searchHandler = async () => {
+const searchHandler = async (_params) => {
   let siteTitle = '', favicon = '';
   let timer = null;
 
@@ -127,6 +128,9 @@ const searchHandler = async () => {
     linkImagePath: "",
     name: siteTitle,
   }
+  if(_params) {
+    currentApp = _params;
+  }
 
   let convertRes = await convertUrl({ params: { originUrl: siteUrl.value } });
   let params = { convertUrl: siteUrl.value, originUrl: siteUrl.value, appId: '', currentApp };
@@ -146,23 +150,24 @@ const getTitleByHtmlStr = (str = '') => {
   let tag_end = '</title>'
   let index1 = str.indexOf(tag_start) + tag_start.length;
   let index2 = str.indexOf(tag_end);
-  if (index1 < 0 || index2 < 0) {
+  
+  if (index1 < tag_start.length || index2 < 0) {
     return '';
   }
 
   return str.substring(index1, index2) || '';
 };
 
-const clickHistoryAppHandler = (params) => {
+const clickHistoryAppHandler =  debounce(function(params) {
   if (params.appId) {
     clickAppHandler(params);
   } else {
     siteUrl.value = params.defaultUrl;
-    searchHandler();
+    searchHandler(params);
   }
-};
+}, 800);
 
-const clickAppHandler = (params) => {
+const clickAppHandler =  debounce(function(params) {
   let { createType, defaultUrl, appId, linkImagePath } = params;
   switch (createType) {
     case 1:
@@ -172,7 +177,7 @@ const clickAppHandler = (params) => {
       openWindow(params);
       break;
   }
-}
+}, 800);
 
 const openWindow = (params) => {
   chrome.windows.getCurrent({},
@@ -194,6 +199,7 @@ const openWindow = (params) => {
 const createGuideWindow = (params, isUpdate = false) => {
   openWindowList = [];
   selectAppGuideData = {};
+  selectGuideApp = {};
 
   let windowWith = window.screen.width - 500;
   let guideUrl = chrome.runtime.getURL('/iframe/tool-box-guide.html');
@@ -215,7 +221,7 @@ const createGuideWindow = (params, isUpdate = false) => {
   }, function (window) {
     openWindowList.push(window);
   })
-
+  selectGuideApp = params;
   if (params.guideData) {
     selectAppGuideData = JSON.parse(params.guideData);
   }
@@ -239,13 +245,14 @@ const onRuntimeMsg = () => {
           actionType: "CONTENT_EDIT_SEND_GUIDE_DATA",
           data: {
             guideData: selectAppGuideData,
-            windowData: openWindowList
+            windowData: openWindowList,
+            selectGuideApp
           }
         }, (response) => { });
         break;
       case 'CONTENT_GUIDE_APPLY_APP':
         siteUrl.value = req.data.siteUrl;
-        searchHandler();
+        searchHandler(req.data.selectGuideApp);
         break;
     }
   })

+ 6 - 3
src/view/iframe/publish/tool-box/child/guide.vue

@@ -35,7 +35,8 @@ let siteUrl = ref('');
 
 let pageData = reactive({
     guideType: '',
-    guideData: []
+    guideData: [],
+    selectGuideApp: {}
 });
 
 const confirm = () => {
@@ -48,7 +49,8 @@ const confirm = () => {
     chrome.runtime.sendMessage({ 
         actionType: "CONTENT_GUIDE_APPLY_APP", 
         data: {
-            siteUrl: siteUrl.value
+            siteUrl: siteUrl.value,
+            selectGuideApp: pageData.selectGuideApp
         }
     },(response) => {});
 
@@ -68,9 +70,10 @@ const onRuntimeMsg = () => {
         sendResponse('ok')
         switch (req.actionType) {
             case 'CONTENT_EDIT_SEND_GUIDE_DATA':
-                let {guideData, windowData} = req.data;
+                let {guideData, windowData, selectGuideApp} = req.data;
                 pageData.guideData = guideData;
                 pageData.windowData = windowData;
+                pageData.selectGuideApp = selectGuideApp;
                 break;
         }
     })

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

@@ -151,19 +151,12 @@
                     🎉 Awesome! You are the Winner!
                 </div>
                 <div class="custom-prize-show">
-                    
-
                     <component-zoom width="340" fontSize="22" class="custom-prise-name">
                         <img :src="require('@/assets/subject/icon-gift-inline.svg')" alt />
                         <span>{{state.detail.customizedReward}}</span>
                     </component-zoom>
                     <!-- <font-zoom :amount="state.detail.customizedReward" width="500" class="custom-prise-name" fontSize="22"></font-zoom> -->
                 </div>
-                <div class="done" @click="clickDone">
-                    <img :src="require('@/assets/subject/001-icon-done.svg')" alt class="icon-done" />
-                    <span>View Rewards In Wallet</span>
-                    <img :src="require('@/assets/svg/icon-right.svg')" alt class="icon-right" />
-                </div>
             </div>
             <div class="luck-list-title">
                 <div>{{ state.detail.receiveCount || 0 }}/{{ state.detail.totalCount || 0 }} Winners</div>
@@ -1392,7 +1385,7 @@ function init(initParams) {
             state.userId = res.data.srcUserId;
             state.tweet_author = state.detail.postUserInfo && state.detail.postUserInfo.nickName || '';
             state.customCover = state.detail.posterType == 2 ? 1 : 0;
-            state.customGiveaway = state.detail.posterType == 2 ? 1 : 0;
+            state.customGiveaway = state.detail.rewardType == 2 ? 1 : 0;
             // 不要删除这个console
             console.log('postBizData', state.detail)
             checkFacebookReply();

+ 0 - 5
src/view/iframe/red-packet/red-packet.vue

@@ -166,11 +166,6 @@
             <img :src="require('@/assets/subject/icon-gift-inline.svg')" alt />
             <font-zoom :amount="state.detail.customizedReward" width="500" class="custom-prise-name" fontSize="22"></font-zoom>
         </div>
-        <div class="done" @click="clickDone">
-          <img :src="require('@/assets/subject/001-icon-done.svg')" alt class="icon-done" />
-          <span>View Rewards In Wallet</span>
-          <img :src="require('@/assets/svg/icon-right.svg')" alt class="icon-right" />
-        </div>
       </div>
       <div class="luck-list-title">
         <div>{{ state.detail.receiveCount || 0 }}/{{ state.detail.totalCount || 0 }} Winners</div>

+ 14 - 248
src/view/iframe/test/index.vue

@@ -1,265 +1,31 @@
 <template>
-    <div class="denet-toolbox" @click.stop="clickHead">
-        <div class="head" @click.stop="clickHead">
-            <span></span>
-            <div>
-                <img :src="require('@/assets/img/icon-fixed.png')" alt class="fixed" @click.stop="clickFixed" />
-                <img :src="require('@/assets/img/icon-full.png')" alt class="full" @click.stop="clickFull" />
-                <!-- <img :src="require('@/assets/img/icon-close.png')" alt class="full" @click="clickFull" /> -->
-            </div>
-        </div>
-        <div class="content">
-            <iframe src="https://www.bilibili.com" v-show="state.status == ''" frameborder="0"></iframe>
-            <!-- 网页错误 -->
-            <div class="state" v-show="state.status == '网页错误'">
-                <img :src="require('@/assets/img/icon-page-fail.png')" alt />
-                <div>Oops, this link is invalid</div>
-            </div>
+    <!-- <div class="denet-toolbox" @click.stop="clickHead">
+        
+    </div> -->
+    <input type="button" value="点击" @click="state.show = !state.show">
+    <p v-if="state.show" :data-view="1" :data-click="'按钮'" @click.stop="clickTest">1</p>
+    <p v-else :data-view="2">2</p>
 
-            <!-- 加载 -->
-            <div class="state" v-show="state.status == '加载'">
-                <img :src="require('@/assets/img/icon-loading-gray.png')" alt />
-            </div>
-
-            <!-- 关闭 -->
-            <div class="state" v-show="state.status == '关闭'">
-
-            </div>
-            <!-- 固定右上角 -->
-            <div class="state" v-show="state.status == '固定右上角'">
-                <img :src="require('@/assets/img/icon-page-fail.png')" alt />
-                <div>Pinned to the top right</div>
-            </div>
-        </div>
-        <!-- alert -->
-        <div class="alert" v-show="state.show_alert">
-            <div class="back" @click.stop="clickCancel"></div>
-            <div class="confirm">
-                <div class="check">
-                    <input :id="state.checkbox_id" type='checkbox' v-model="state.checkbox" />
-                    <label :for="state.checkbox_id">Don't remind</label>
-                </div>
-
-                <div class="title">Web Page Progress May Reset</div>
-                <div class="handle">
-                    <div class="cancel" @click.stop="clickCancel">Cancel</div>
-                    <div class="continue" @click.stop="clickContinue">Continue</div>
-                </div>
-            </div>
-        </div>
-    </div>
 </template>
 <script setup>
-import { getChromeStorage, setChromeStorage, httpContentToBack } from "@/uilts/chromeExtension";
-import { guid } from "@/uilts/help";
 import { onMounted, reactive } from "vue";
 
 let state = reactive({
-    status: '', //
-    show_alert: false,
-    list: [],
-    checkbox: false,
-    checkbox_id: `denet-${guid()}`
+    show: false
 })
 onMounted(() => {
-   
-})
-
-const clickHead = () => {
-    // 
-}
-
-const clickContinue = () => {
-    if (state.checkbox) {
-        setChromeStorage({ fullCheck: JSON.stringify({ fullCheck: 1 }) })
-        // 全屏
-    }
-}
-
-const clickCancel = () => {
-    state.show_alert = false
-}
+    var io = new IntersectionObserver((e) => {
+        console.log(e[0].target)
+    });
+    io.observe(document.querySelector('p[data-view]'))
 
-const clickFixed = () => {
-    getChromeStorage('fullCheck', (res) => {
-        if (res && res.fullCheck) {
-            // 固定
-
-        } else {
-            state.show_alert = true
-        }
-    })
-}
-
-const clickFull = () => {
-    getChromeStorage('fullCheck', (res) => {
-        if (res && res.fullCheck) {
-            // 全屏
+})
 
-        } else {
-            state.show_alert = true
-        }
-    })
+function clickTest() {
+    console.log('clickTest')
 }
 
-
 </script>
 
 <style lang="scss">
-.denet-toolbox {
-    width: 505px;
-    height: 544px;
-    filter: drop-shadow(0px 4px 20px rgba(0, 0, 0, 0.2));
-    border-radius: 12px;
-    overflow: hidden;
-    position: relative;
-
-    .alert {
-        text-align: center;
-        position: absolute;
-        top: 0;
-        left: 0;
-        width: 100%;
-        height: 100%;
-
-        .back {
-            background: #000000;
-            opacity: 0.8;
-            position: absolute;
-            top: 0;
-            left: 0;
-            width: 100%;
-            height: 100%;
-            cursor: auto;
-        }
-
-        .confirm {
-            position: absolute;
-            width: 355px;
-            height: 180px;
-            background: #FFFFFF;
-            border-radius: 20px;
-            top: 173px;
-            left: 50%;
-            margin-left: -180px;
-
-            .title {
-                font-weight: 600;
-                font-size: 18px;
-                color: #000000;
-                margin-bottom: 34px;
-            }
-
-            .check {
-                color: #899099;
-                font-weight: 400;
-                font-size: 14px;
-                margin: 12px 15px 32px 0;
-                text-align: right;
-                align-content: center;
-                justify-content: flex-end;
-                display: flex;
-                line-height: 17px;
-
-                input {
-                    margin-right: 8px;
-                }
-
-                label {
-                    line-height: 19px;
-                }
-
-            }
-
-            .handle {
-                display: flex;
-                justify-content: center;
-                align-items: center;
-
-                div {
-                    font-weight: 600;
-                    font-size: 16px;
-                    width: 156px;
-                    height: 47px;
-                    line-height: 47px;
-                    cursor: pointer;
-                    border-radius: 1000px;
-                    user-select: none;
-                }
-
-                .cancel {
-                    color: #000000;
-                    background: rgba(56, 154, 255, 0.01);
-                    border: 1px solid #E6E6E6;
-                }
-
-                .continue {
-                    background: #1D9BF0;
-                    font-weight: 600;
-                    margin-left: 11px;
-                    color: #FFFFFF;
-                }
-            }
-        }
-    }
-
-    .head {
-        width: 100%;
-        height: 40px;
-        background: #373737;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-
-        span {
-            color: #FFFFFF;
-            font-style: normal;
-            font-weight: 500;
-            font-size: 14px;
-            margin-left: 16px;
-        }
-
-        img {
-            width: 20px;
-            height: 20px;
-            cursor: pointer;
-
-        }
-
-        .full {
-            margin-right: 16px;
-        }
-
-        .fixed {
-            margin-right: 20px;
-        }
-    }
-
-    .content {
-        width: 100%;
-        height: calc(100% - 40px);
-        background: #686868;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-
-        iframe {
-            width: 100%;
-            height: 100%;
-        }
-
-        .state {
-            img {
-                margin-bottom: 14px;
-            }
-
-            div {
-                color: #8E8E8E;
-                text-align: center;
-                font-weight: 500;
-                font-size: 22px;
-            }
-        }
-    }
-}
 </style>

+ 69 - 88
src/view/popup/tabbar-page/message/index.vue

@@ -4,53 +4,33 @@
       <div class="list-wrapper" ref="pageGiveListDom">
         <div class="give-list" v-if="currentTabIndex == 0">
           <template v-if="giveList.length">
-            <div
-              class="cell"
-              :class="{ 'cell-center': item.type == 1 || item.type == 3 }"
-              v-for="(item, index) in giveList"
-              :key="index"
-              @click="clickListItem(item, index)"
-            >
-              <red-dot
-                class="red-dots"
-                v-if="item.unReadMsgCount > 0 && isReadMsg"
-              ></red-dot>
+            <div class="cell" :class="{ 'cell-center': item.type == 1 || item.type == 3 }"
+              v-for="(item, index) in giveList" :key="index" @click="clickListItem(item, index)">
+              <red-dot class="red-dots" v-if="item.unReadMsgCount > 0 && isReadMsg"></red-dot>
 
               <div class="img-wrapper">
                 <!-- 收到红包 -->
                 <template v-if="item.type == 1 || item.type == 3">
                   <img class="icon-avatar" :src="item.userInfo.avatarUrl" />
-                  <img
-                    class="icon-give"
-                    :src="require('@/assets/svg/icon-get-giveaways-s.svg')"
-                  />
+                  <img class="icon-give" :src="require('@/assets/svg/icon-get-giveaways-s.svg')" />
                 </template>
                 <!-- 发出去红包 -->
                 <template v-else-if="2">
-                  <img
-                    class="icon-big-give"
-                    :src="require('@/assets/svg/icon-send-giveaways-s.svg')"
-                  />
-                  <img
-                    class="icon-mark-give"
-                    :src="require('@/assets/svg/icon-send-giveaways-mark.svg')"
-                  />
+                  <img class="icon-big-give" :src="require('@/assets/svg/icon-send-giveaways-s.svg')" />
+                  <img class="icon-mark-give" :src="require('@/assets/svg/icon-send-giveaways-mark.svg')" />
                 </template>
               </div>
-              <div
-                class="info-wrapper"
-                :class="{ 'info-center': item.type == 1 }"
-              >
+              <div class="info-wrapper" :class="{ 'info-center': item.type == 1 }">
                 <div class="left">
                   <div class="nickname">
                     <template v-if="item.type == 1">
-                        Get Giveaway
+                      Get Giveaway
                     </template>
                     <template v-else-if="item.type == 2">
-                        {{ item.postTaskLuckdrop.luckdropType === 1 ? 'Send Giveaway' : 'Lottery Giveaway' }}
+                      {{ item.postTaskLuckdrop.luckdropType === 1 ? 'Send Giveaway' : 'Lottery Giveaway' }}
                     </template>
                     <template v-else-if="item.type == 3">
-                        Lottery
+                      Lottery
                     </template>
                   </div>
                   <div class="time">
@@ -59,20 +39,19 @@
                 </div>
                 <div class="right">
                   <div class="msg">
-                    <div
-                      class="bold"
-                      :class="{
+                    <div class="bold" :class="{
                         'align-content':
                           (item.type == 2 || 
                             (item.type == 1 && item.status == 1)) &&
-                          item?.amount?.length + item?.currencySymbol?.length > 12,
+                            item?.amount?.length + item?.currencySymbol?.length > 12,
+                        'custom-bold': item.rewardType === RewardType.custom
                       }"
                     >
                       <!-- 收到的 -->
                       <template v-if="item.type == 1">
                         <!-- 进行中-->
                         <template v-if="item.status == 0">
-                          in progress
+                          In Progress
                         </template>
                         <!-- 已完成 -->
                         <template v-else-if="item.status == 1">
@@ -80,13 +59,12 @@
                           <template v-if="item.rewardType === RewardType.money">
                             <span class="blance">
                               <a-tooltip :title="item.amount">
-                                {{ getBit(item.amount) }}</a-tooltip
-                              >
+                                {{ getBit(item.amount) }}</a-tooltip>
                             </span>
                             <div class="coin-type-wrapper">
                               <span class="coin-type">{{
                                 item.currencySymbol || ""
-                              }}</span>
+                                }}</span>
                               <img :src="item.currencyIconPath" alt="" />
                             </div>
                           </template>
@@ -113,19 +91,23 @@
                           <div class="coin-type-wrapper">
                             <span class="coin-type">{{
                               item.currencySymbol || ""
-                            }}</span>
+                              }}</span>
                             <img :src="item.currencyIconPath" alt="" />
                           </div>
                         </template>
                         <!-- 已中奖-通用型奖品展示 -->
                         <template v-else>
-                          <span class="blance cuntom-prize">{{item.customizedReward}}</span>
+                          <span class="blance cuntom-prize">
+                            {{item.customizedReward || ''}}<span class="cuntom-prize-icon">X</span>
+                            <span class="cuntom-prize-total">{{item?.postTaskLuckdrop?.totalCount || ''}}</span>
+                          </span>
+                          
                         </template>
                       </template>
                       <template v-else-if="item.type == 3">
                         <template v-if="item.status == 1">In Progress</template>
                         <template v-else-if="item.status == 2">
-                        Open in {{ item.downTime || '' }}
+                          Open in {{ item.downTime || '' }}
                         </template>
                         <template v-else-if="item.status == 3">
                           Unfinished
@@ -141,7 +123,7 @@
                             <div class="coin-type-wrapper">
                               <span class="coin-type">{{
                                 item.currencySymbol || ""
-                              }}</span>
+                                }}</span>
                               <img :src="item.currencyIconPath" alt="" />
                             </div>
                           </template>
@@ -149,7 +131,7 @@
                           <template v-else>
                             <span class="blance cuntom-prize">{{item.customizedReward}}</span>
                           </template>
-                          
+
                         </template>
                         <template v-else-if="item.status == 5">
                           Didn't win
@@ -167,89 +149,78 @@
                       </template>
                       <!-- 进行中 -->
                       <template v-else-if="item.status == 1">
-                        {{ item.postTaskLuckdrop.receivedCount }}/{{
+                        <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 2">
+                          {{ item.downTime || '' }}
+                        </template>
+                        <template v-else>
+                          {{ item.postTaskLuckdrop.receivedCount }}/{{
                           item.postTaskLuckdrop.totalCount
-                        }}
+                          }}
+                        </template>
                       </template>
                       <!-- 2:已结束; 3:提前终止-->
                       <template v-else-if="item.status == 2 || item.status == 3">
+                        <!-- 普通红包 -->
                         <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1">
-                            ({{
-                            item.status == 2 ? "Time expired" : "Termination"
-                            }}) 
-                            <template v-if="item.status == 2 || item.status == 3 && item.srcContentId">
-                              {{ item.postTaskLuckdrop.receivedCount }}/{{
-                              item.postTaskLuckdrop.totalCount
-                              }}
-                            </template>
+                          <template v-if="item.status == 2">
+                            (Time expired)
+                          </template>
+                          <template v-if="item.status == 3">
+                            {{item.srcContentId ? '(Termination)' : 'Termination'}}
+                          </template>
+                          <template v-if="item.status == 2 || item.status == 3 && item.srcContentId">
+                            {{ item.postTaskLuckdrop.receivedCount }}/{{
+                            item.postTaskLuckdrop.totalCount
+                            }}
+                          </template>
                         </template>
+                        <!-- 抽奖红包 -->
                         <template v-else>
-                            Termination
+                            <!-- 自定义奖品类型 结束时显示 Complete -->
+                            {{ item.rewardType === RewardType.custom && item.status == 2 ? 'Complete' : 'Termination' }}
                         </template>
                       </template>
                       <!-- 红包提前终止/退款(进行中)显示-->
                       <template v-if="item.status == 4">
-                        {{ item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1 ? 'Terminating' : 'Open in ' + item.downTime || '' }}
+                        {{ item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1 ? 'Terminating' : 'Open in '
+                        + item.downTime || '' }}
                       </template>
 
                       <!-- 进行中或者未发送成功时显示 
                                                 v-if="item.status == 1 || item.postTaskLuckdrop.reSendAvailable"-->
                       <div class="desc-bottom-bar">
                         <!-- 没有终止红包时显示 -->
-                        <div
-                          v-if="item.postTaskLuckdrop.terminatedAvailable"
-                          class="btn"
-                          @click.stop="terminaHandler(item, index)"
-                        >
+                        <div v-if="item.postTaskLuckdrop.terminatedAvailable" class="btn"
+                          @click.stop="terminaHandler(item, index)">
                           Termination
                         </div>
 
                         <!-- 红包未发出显示 -->
-                        <div
-                          class="btn send-btn"
-                          v-if="item.postTaskLuckdrop.reSendAvailable"
-                          @click.stop="sendTwitter(item)"
-                        >
+                        <div class="btn send-btn" v-if="item.postTaskLuckdrop.reSendAvailable"
+                          @click.stop="sendTwitter(item)">
                           Send
                         </div>
-                        <div
-                          v-else-if="item.srcContentId"
-                          class="btn detail-btn"
-                          @click.stop="clickListItem(item, index)"
-                        >
+                        <div v-else-if="item.srcContentId" class="btn detail-btn"
+                          @click.stop="clickListItem(item, index)">
                           details
                         </div>
                       </div>
                     </div>
                   </div>
                   <!-- 发红包—— 未发出、进行中 隐藏 -->
-                  <img
-                    v-if="item.type != 2"
-                    class="icon"
-                    :src="require('@/assets/svg/icon-cell-arrow-right.svg')"
-                  />
+                  <img v-if="item.type != 2" class="icon" :src="require('@/assets/svg/icon-cell-arrow-right.svg')" />
                 </div>
               </div>
             </div>
           </template>
           <template v-else>
-            <img
-              class="icon-empty"
-              :src="require('@/assets/svg/icon-empty-list.svg')"
-            />
+            <img class="icon-empty" :src="require('@/assets/svg/icon-empty-list.svg')" />
           </template>
         </div>
       </div>
     </div>
-    <modal
-      :visible="modalVisible"
-      :title="modalTitle"
-      :content="modalContent"
-      cancelText="Termination"
-      confirmText="Cancel"
-      @cancel="modalCancel"
-      @confirm="modalConfirm"
-    />
+    <modal :visible="modalVisible" :title="modalTitle" :content="modalContent" cancelText="Termination"
+      confirmText="Cancel" @cancel="modalCancel" @confirm="modalConfirm" />
   </div>
 </template>
 
@@ -697,6 +668,16 @@ onBeforeUnmount(() => {
                   .cuntom-prize {
                     max-width: 130px;
                     word-break: break-word;
+                    text-align: left;
+                  }
+
+                  .cuntom-prize-icon {
+                    color: #000;
+                  }
+
+                  .cuntom-prize-total {
+                    color: #000;
+                    word-break: break-word;
                   }
 
                   .coin-type-wrapper {