浏览代码

Merge branch 'feture_220727_treasure' into dev_1.1.7

# Conflicts:
#	src/logic/background/twitter.js
#	src/view/iframe/publish/tool-box/child/preview.vue
wenliming 2 年之前
父节点
当前提交
e79b0d761f
共有 44 个文件被更改,包括 1135 次插入463 次删除
  1. 二进制
      src/assets/img/icon-card-cover-treasure-big.png
  2. 二进制
      src/assets/img/img-preview-treasure-link-bg.png
  3. 2 0
      src/assets/svg/icon-card-cover-treasure-small.svg
  4. 1 0
      src/assets/svg/icon-card-cover-treasure-tasks.svg
  5. 3 0
      src/assets/svg/icon-custom-cover-btn.svg
  6. 3 0
      src/assets/svg/icon-form-amount.svg
  7. 4 0
      src/assets/svg/icon-form-cost.svg
  8. 3 0
      src/assets/svg/icon-form-custom-cover.svg
  9. 1 0
      src/assets/svg/icon-form-follow.svg
  10. 3 0
      src/assets/svg/icon-form-task.svg
  11. 8 0
      src/assets/svg/icon-form-time.svg
  12. 1 0
      src/assets/svg/icon-form-winners.svg
  13. 0 19
      src/assets/svg/img-A0.svg
  14. 0 19
      src/assets/svg/img-A1.svg
  15. 0 44
      src/assets/svg/img-B0.svg
  16. 0 44
      src/assets/svg/img-B1.svg
  17. 3 0
      src/assets/svg/img-LT0.svg
  18. 3 0
      src/assets/svg/img-LT1.svg
  19. 3 0
      src/assets/svg/img-P1.svg
  20. 3 0
      src/assets/svg/img-P2.svg
  21. 3 0
      src/assets/svg/img-P3.svg
  22. 2 0
      src/assets/svg/img-T0.svg
  23. 2 0
      src/assets/svg/img-T1.svg
  24. 11 0
      src/assets/svg/img-preview-treasure-01-bg.svg
  25. 9 0
      src/http/treasureApi.js
  26. 21 1
      src/log-center/logger.js
  27. 9 0
      src/logic/background/twitter.js
  28. 43 44
      src/logic/content/twitter.js
  29. 6 2
      src/types/global.js
  30. 19 7
      src/view/components/component-zoom.vue
  31. 0 1
      src/view/components/currency-list.vue
  32. 152 14
      src/view/components/custom-card-cover.vue
  33. 112 28
      src/view/components/custom-card-horizontal-cover.vue
  34. 11 3
      src/view/iframe/publish/components/follow-input.vue
  35. 61 0
      src/view/iframe/publish/components/form-input.vue
  36. 6 0
      src/view/iframe/publish/components/preview-card.vue
  37. 8 2
      src/view/iframe/publish/components/preview-sheet.vue
  38. 523 205
      src/view/iframe/publish/give-dialog.vue
  39. 3 1
      src/view/iframe/publish/publish.vue
  40. 2 1
      src/view/iframe/publish/tool-box/child/preview.vue
  41. 6 3
      src/view/iframe/red-packet/luck-draw.vue
  42. 6 3
      src/view/iframe/red-packet/red-packet.vue
  43. 72 18
      src/view/popup/tabbar-page/message/index.vue
  44. 7 4
      src/view/popup/withdraw/info.vue

二进制
src/assets/img/icon-card-cover-treasure-big.png


二进制
src/assets/img/img-preview-treasure-link-bg.png


文件差异内容过多而无法显示
+ 2 - 0
src/assets/svg/icon-card-cover-treasure-small.svg


文件差异内容过多而无法显示
+ 1 - 0
src/assets/svg/icon-card-cover-treasure-tasks.svg


+ 3 - 0
src/assets/svg/icon-custom-cover-btn.svg

@@ -0,0 +1,3 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M17.8749 11.7838L17.1198 12.5169L15.6097 11.0508L16.3648 10.3177C16.4403 10.2444 16.5158 10.1711 16.6668 10.1711C16.7423 10.1711 16.8933 10.2444 16.9688 10.3177L17.9504 11.2707C18.0259 11.4173 18.0259 11.6372 17.8749 11.7838ZM10.5507 15.8891V17.4286H12.1364L16.7423 12.9568L15.2321 11.4906L10.5507 15.8891ZM16.5913 4.96617C16.5913 4.15977 15.9117 3.5 15.0811 3.5H4.51014C3.67956 3.5 3 4.15977 3 4.96617V15.2293C3 16.0357 3.67956 16.6955 4.51014 16.6955H9.04057V15.3026L9.87115 14.4962H4.51014L7.15289 11.1974L9.04057 13.3966L11.6833 10.0977L12.8914 11.6372L16.5913 7.9718V4.96617Z" fill="#2F2F2F"/>
+</svg>

+ 3 - 0
src/assets/svg/icon-form-amount.svg

@@ -0,0 +1,3 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M4 12.0058V13.5734C4 14.8694 6.6875 15.9231 10 15.9231C13.3125 15.9231 16 14.8694 16 13.5734V12.0058C14.7094 13.0741 12.35 13.5734 10 13.5734C7.65 13.5734 5.29062 13.0741 4 12.0058ZM4 8.15454V10.049C4 11.3449 6.6875 12.3986 10 12.3986C13.3125 12.3986 16 11.3449 16 10.049V8.15454C14.7094 9.4028 12.3469 10.049 10 10.049C7.65313 10.049 5.29062 9.4028 4 8.15454ZM10 3C6.6875 3 4 4.31434 4 5.93706C4 7.55979 6.6875 8.87413 10 8.87413C13.3125 8.87413 16 7.55979 16 5.93706C16 4.31434 13.3125 3 10 3Z" fill="#2F2F2F"/>
+</svg>

+ 4 - 0
src/assets/svg/icon-form-cost.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M11 13.575V14.5455C11 15.3477 12.5677 16 14.5 16C16.4323 16 18 15.3477 18 14.5455V13.575C17.2471 14.2364 15.8708 14.5455 14.5 14.5455C13.1292 14.5455 11.7529 14.2364 11 13.575ZM11 11.1909V12.3636C11 13.1659 12.5677 13.8182 14.5 13.8182C16.4323 13.8182 18 13.1659 18 12.3636V11.1909C17.2471 11.9636 15.869 12.3636 14.5 12.3636C13.131 12.3636 11.7529 11.9636 11 11.1909ZM14.5 8C12.5677 8 11 8.81364 11 9.81818C11 10.8227 12.5677 11.6364 14.5 11.6364C16.4323 11.6364 18 10.8227 18 9.81818C18 8.81364 16.4323 8 14.5 8Z" fill="#2F2F2F"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.42061 15.1282H5.4046C5.36893 15.2284 5.31128 15.3204 5.23468 15.397C5.09904 15.5326 4.91508 15.6088 4.72326 15.6088C4.53144 15.6088 4.34747 15.5326 4.21184 15.397C4.0762 15.2614 4 15.0774 4 14.8856C4 14.8202 4.01049 14.7614 4.02325 14.7114C4.33797 12.5974 5.72065 10.833 7.60544 9.98625C6.73631 9.26192 6.18262 8.1708 6.18262 6.95024C6.18262 4.76854 7.95117 3 10.1329 3C11.9921 3 13.5513 4.28442 13.9716 6.01437C13.5574 6.03701 13.1526 6.08619 12.7643 6.16045C12.6313 5.7191 12.3901 5.32421 12.0716 5.00682C12.3898 5.32432 12.6308 5.71925 12.7636 6.16059C12.6833 6.17595 12.6037 6.19239 12.5248 6.20988C12.2083 5.18971 11.2556 4.44651 10.1329 4.44651C8.75252 4.44651 7.62914 5.5699 7.62914 6.95024C7.62914 7.92308 8.18723 8.76842 9 9.18266V11.0304C7.15844 11.4847 5.73735 13.02 5.45165 14.9216L5.42061 15.1282ZM4.24375 14.8867C4.24375 15.0139 4.29418 15.1359 4.38397 15.226L4.38341 15.2254C4.29328 15.1353 4.24264 15.013 4.24264 14.8856C4.24264 14.842 4.25033 14.8004 4.26132 14.7602C4.56633 12.6796 5.9484 10.9491 7.82382 10.1557C7.91323 10.1179 8.00376 10.0822 8.09535 10.0487L8.09682 10.0497C6.08391 10.7858 4.582 12.5814 4.26243 14.7613C4.25144 14.8016 4.24375 14.8432 4.24375 14.8867Z" fill="#2F2F2F"/>
+</svg>

+ 3 - 0
src/assets/svg/icon-form-custom-cover.svg

@@ -0,0 +1,3 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M17.8749 11.7838L17.1198 12.5169L15.6097 11.0508L16.3648 10.3177C16.4403 10.2444 16.5158 10.1711 16.6668 10.1711C16.7423 10.1711 16.8933 10.2444 16.9688 10.3177L17.9504 11.2707C18.0259 11.4173 18.0259 11.6372 17.8749 11.7838ZM10.5507 15.8891V17.4286H12.1364L16.7423 12.9568L15.2321 11.4906L10.5507 15.8891ZM16.5913 4.96617C16.5913 4.15977 15.9117 3.5 15.0811 3.5H4.51014C3.67956 3.5 3 4.15977 3 4.96617V15.2293C3 16.0357 3.67956 16.6955 4.51014 16.6955H9.04057V15.3026L9.87115 14.4962H4.51014L7.15289 11.1974L9.04057 13.3966L11.6833 10.0977L12.8914 11.6372L16.5913 7.9718V4.96617Z" fill="#2F2F2F"/>
+</svg>

文件差异内容过多而无法显示
+ 1 - 0
src/assets/svg/icon-form-follow.svg


+ 3 - 0
src/assets/svg/icon-form-task.svg

@@ -0,0 +1,3 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M4.267 4.82609L4.27273 15.7875L15.7324 15.7826L15.7273 4.82122L13.8182 4.82609V5.4287C13.819 5.75195 13.6858 6.06233 13.4476 6.29171C13.2095 6.52109 12.886 6.65072 12.548 6.65217H7.452C6.75136 6.65217 6.18182 6.10313 6.18182 5.4287V4.82609H4.267ZM12.548 5.43478L12.5455 4.22348L7.452 4.21739L7.45455 4.22348V5.4287L12.548 5.43478ZM13.64 3.6087H15.7241C16.0613 3.60789 16.3851 3.73512 16.6243 3.96246C16.8635 4.1898 16.9987 4.49866 17 4.82122V15.7875C16.9995 16.1089 16.8658 16.417 16.6282 16.6443C16.3905 16.8716 16.0684 16.9995 15.7324 17H4.26764C3.56891 17 3 16.4558 3 15.7875V4.82122C3.00017 4.49979 3.13369 4.19157 3.37124 3.96423C3.6088 3.73689 3.93096 3.60902 4.267 3.6087H6.36C6.58082 3.24591 6.98491 3 7.452 3H12.548C13.0151 3 13.4198 3.24652 13.64 3.6087ZM9.17585 11.4432L11.9743 8.20321C12.0799 8.08088 12.2271 8.00801 12.3835 8.00062C12.5399 7.99324 12.6926 8.05195 12.8081 8.16383C12.9236 8.27572 12.9924 8.43162 12.9994 8.59723C13.0064 8.76285 12.951 8.92461 12.8453 9.04694L9.60606 12.7969C9.49393 12.9263 9.33577 13 9.17054 13H9.167C9.08447 12.9995 9.00296 12.9806 8.92774 12.9447C8.85252 12.9087 8.78526 12.8565 8.7303 12.7913L7.14992 10.9163C7.04568 10.7926 6.99209 10.6302 7.00095 10.4647C7.0098 10.2992 7.08037 10.1442 7.19713 10.0338C7.31389 9.92341 7.46727 9.86665 7.62354 9.87603C7.77981 9.88541 7.92616 9.96014 8.0304 10.0838L9.17585 11.4432Z" fill="#2F2F2F"/>
+</svg>

+ 8 - 0
src/assets/svg/icon-form-time.svg

@@ -0,0 +1,8 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<mask id="path-1-outside-1_24371_182246" maskUnits="userSpaceOnUse" x="2" y="2" width="16" height="16" fill="black">
+<rect fill="white" x="2" y="2" width="16" height="16"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M3 10C3 6.14 6.14 3 10 3C13.86 3 17 6.14 17 10C17 13.86 13.86 17 10 17C6.14 17 3 13.86 3 10ZM4.0045 10C4.0045 13.3055 6.694 15.9955 10 15.9955C13.3055 15.9955 15.9955 13.3055 15.9955 10C15.9955 6.694 13.3055 4.0045 10 4.0045C6.694 4.0045 4.0045 6.694 4.0045 10ZM10.001 9.99788H12.5005C12.778 9.99788 13.0025 10.2204 13.0025 10.4979C13.0025 10.7754 12.778 10.9979 12.5005 10.9979H9.50104C9.22404 10.9979 9.00104 10.7754 9.00104 10.4979V6.49887C9.00104 6.22187 9.22354 5.99688 9.50104 5.99688C9.77854 5.99688 10.001 6.22137 10.001 6.49887V9.99788Z"/>
+</mask>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M3 10C3 6.14 6.14 3 10 3C13.86 3 17 6.14 17 10C17 13.86 13.86 17 10 17C6.14 17 3 13.86 3 10ZM4.0045 10C4.0045 13.3055 6.694 15.9955 10 15.9955C13.3055 15.9955 15.9955 13.3055 15.9955 10C15.9955 6.694 13.3055 4.0045 10 4.0045C6.694 4.0045 4.0045 6.694 4.0045 10ZM10.001 9.99788H12.5005C12.778 9.99788 13.0025 10.2204 13.0025 10.4979C13.0025 10.7754 12.778 10.9979 12.5005 10.9979H9.50104C9.22404 10.9979 9.00104 10.7754 9.00104 10.4979V6.49887C9.00104 6.22187 9.22354 5.99688 9.50104 5.99688C9.77854 5.99688 10.001 6.22137 10.001 6.49887V9.99788Z" fill="#2F2F2F"/>
+<path d="M10.001 9.99788H9.80104V10.1979H10.001V9.99788ZM10 2.8C6.02954 2.8 2.8 6.02954 2.8 10H3.2C3.2 6.25046 6.25046 3.2 10 3.2V2.8ZM17.2 10C17.2 6.02954 13.9705 2.8 10 2.8V3.2C13.7495 3.2 16.8 6.25046 16.8 10H17.2ZM10 17.2C13.9705 17.2 17.2 13.9705 17.2 10H16.8C16.8 13.7495 13.7495 16.8 10 16.8V17.2ZM2.8 10C2.8 13.9705 6.02954 17.2 10 17.2V16.8C6.25046 16.8 3.2 13.7495 3.2 10H2.8ZM10 15.7955C6.80447 15.7955 4.2045 13.1951 4.2045 10H3.8045C3.8045 13.4159 6.58353 16.1955 10 16.1955V15.7955ZM15.7955 10C15.7955 13.195 13.195 15.7955 10 15.7955V16.1955C13.416 16.1955 16.1955 13.416 16.1955 10H15.7955ZM10 4.2045C13.1951 4.2045 15.7955 6.80447 15.7955 10H16.1955C16.1955 6.58353 13.4159 3.8045 10 3.8045V4.2045ZM4.2045 10C4.2045 6.80446 6.80446 4.2045 10 4.2045V3.8045C6.58354 3.8045 3.8045 6.58354 3.8045 10H4.2045ZM12.5005 9.79788H10.001V10.1979H12.5005V9.79788ZM13.2025 10.4979C13.2025 10.1089 12.8875 9.79788 12.5005 9.79788V10.1979C12.6686 10.1979 12.8025 10.3319 12.8025 10.4979H13.2025ZM12.5005 11.1979C12.8875 11.1979 13.2025 10.8869 13.2025 10.4979H12.8025C12.8025 10.6639 12.6686 10.7979 12.5005 10.7979V11.1979ZM9.50104 11.1979H12.5005V10.7979H9.50104V11.1979ZM8.80104 10.4979C8.80104 10.886 9.11372 11.1979 9.50104 11.1979V10.7979C9.33437 10.7979 9.20104 10.6648 9.20104 10.4979H8.80104ZM8.80104 6.49887V10.4979H9.20104V6.49887H8.80104ZM9.50104 5.79688C9.11192 5.79688 8.80104 6.11259 8.80104 6.49887H9.20104C9.20104 6.33116 9.33517 6.19688 9.50104 6.19688V5.79688ZM10.201 6.49887C10.201 6.11196 9.89004 5.79688 9.50104 5.79688V6.19688C9.66705 6.19688 9.80104 6.33079 9.80104 6.49887H10.201ZM10.201 9.99788V6.49887H9.80104V9.99788H10.201Z" fill="#2F2F2F" mask="url(#path-1-outside-1_24371_182246)"/>
+</svg>

文件差异内容过多而无法显示
+ 1 - 0
src/assets/svg/icon-form-winners.svg


文件差异内容过多而无法显示
+ 0 - 19
src/assets/svg/img-A0.svg


文件差异内容过多而无法显示
+ 0 - 19
src/assets/svg/img-A1.svg


文件差异内容过多而无法显示
+ 0 - 44
src/assets/svg/img-B0.svg


文件差异内容过多而无法显示
+ 0 - 44
src/assets/svg/img-B1.svg


文件差异内容过多而无法显示
+ 3 - 0
src/assets/svg/img-LT0.svg


文件差异内容过多而无法显示
+ 3 - 0
src/assets/svg/img-LT1.svg


文件差异内容过多而无法显示
+ 3 - 0
src/assets/svg/img-P1.svg


文件差异内容过多而无法显示
+ 3 - 0
src/assets/svg/img-P2.svg


文件差异内容过多而无法显示
+ 3 - 0
src/assets/svg/img-P3.svg


文件差异内容过多而无法显示
+ 2 - 0
src/assets/svg/img-T0.svg


文件差异内容过多而无法显示
+ 2 - 0
src/assets/svg/img-T1.svg


+ 11 - 0
src/assets/svg/img-preview-treasure-01-bg.svg

@@ -0,0 +1,11 @@
+<svg width="375" height="500" viewBox="0 0 375 500" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="375" height="500" fill="url(#paint0_linear_24395_274606)"/>
+<defs>
+<linearGradient id="paint0_linear_24395_274606" x1="187" y1="-7.83211e-09" x2="187.5" y2="500" gradientUnits="userSpaceOnUse">
+<stop offset="0.388068" stop-color="#25180D"/>
+<stop offset="0.554041" stop-color="#5E4025"/>
+<stop offset="0.616047" stop-color="#876635"/>
+<stop offset="0.716041" stop-color="#24180C"/>
+</linearGradient>
+</defs>
+</svg>

+ 9 - 0
src/http/treasureApi.js

@@ -0,0 +1,9 @@
+import { service } from "./request";
+
+export function upGainCalculate(params) {
+    return service({
+        url: `/post/treasure/upGainCalculate`,
+        method: 'post',
+        data: params
+    })
+}

+ 21 - 1
src/log-center/logger.js

@@ -90,4 +90,24 @@ function wrapObject(extParams) {
  */
 function typeDecide(o, type) {
     return Object.prototype.toString.call(o) === `[object ${type}]`;
-}
+}
+
+export async function getReportCommonParams () {
+  let commonParams = {};
+  if (!userInfo) {
+      userInfo = await getChromeStorage('userInfo') || null;
+  }
+  let isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
+  let platform = isMobile ? `mobile` : `pc`;
+
+  if (chrome && chrome.tabs) {
+      let tab = await chrome.tabs.getCurrent();
+      commonParams = {
+          url: tab && tab.url ? tab.url : '',
+          platform,
+          browser: getBrowser(),
+          twitterId: userInfo && userInfo.nickName || '',
+      }
+  }
+  return commonParams;
+}

+ 9 - 0
src/logic/background/twitter.js

@@ -393,6 +393,15 @@ export function onInstalledCreateTab() {
                         });
                     }
                     break
+                case 'treasure_info':
+                  if (res && res.postNickName && res.srcContentId) {
+                      created_detail = true
+                      url = `https://twitter.com/${res.postNickName}/status/${res.srcContentId}`
+                      chrome.tabs.create({
+                          url
+                      });
+                  }
+                  break;
             }
 
             if (created_detail == false) {

+ 43 - 44
src/logic/content/twitter.js

@@ -276,47 +276,45 @@ function checkIsShowReSend(dom, params) {
  * @private
  */
 function _addDeNetEditBtn(params = {}) {
-    setTimeout(() => {
-        let toolElem = document.querySelector('div[data-testid="toolBar"]');
-        if (toolElem) {
-            Report.reportLog({
-                pageSource: Report.pageSource.mainPage,
-                businessType: Report.businessType.buttonView,
-                objectType: Report.objectType.buttonSecond
-            });
-            let innerDeIcon = document.getElementById('de-btn1');
-            if (!innerDeIcon) {
-                toolElem.firstChild.appendChild(createTweetToolbarDenet());
-                popupShowGiveawayDialog();
-            }
+    let toolElem = document.querySelector('div[data-testid="toolBar"]');
+    if (toolElem) {
+        Report.reportLog({
+            pageSource: Report.pageSource.mainPage,
+            businessType: Report.businessType.buttonView,
+            objectType: Report.objectType.buttonSecond
+        });
+        let innerDeIcon = toolElem.querySelector('#de-btn1');
+        if (!innerDeIcon) {
+            toolElem.firstChild.appendChild(createTweetToolbarDenet());
+            popupShowGiveawayDialog();
+        }
 
-            let innerToolBoxIcon = document.getElementById('de-tool-box-btn-01');
-            if (!innerToolBoxIcon) {
-                toolElem.firstChild.appendChild(createTweetToolbarToolBox())
-            }
-        } else {
-            setTimeout(() => {
-                let toolElem = document.querySelector('div[data-testid="toolBar"]');
-                if (toolElem) {
-                    Report.reportLog({
-                        pageSource: Report.pageSource.mainPage,
-                        businessType: Report.businessType.buttonView,
-                        objectType: Report.objectType.buttonSecond
-                    });
-                    let innerDeIcon = document.getElementById('de-btn1');
-                    if (!innerDeIcon) {
-                        toolElem.firstChild.appendChild(createTweetToolbarDenet());
-                        popupShowGiveawayDialog();
-                    }
+        let innerToolBoxIcon = toolElem.querySelector('#de-tool-box-btn-01');
+        if (!innerToolBoxIcon) {
+            toolElem.firstChild.appendChild(createTweetToolbarToolBox())
+        }
+    } else {
+        setTimeout(() => {
+            let toolElem = document.querySelector('div[data-testid="toolBar"]');
+            if (toolElem) {
+                Report.reportLog({
+                    pageSource: Report.pageSource.mainPage,
+                    businessType: Report.businessType.buttonView,
+                    objectType: Report.objectType.buttonSecond
+                });
+                let innerDeIcon = toolElem.querySelector('#de-btn1');
+                if (!innerDeIcon) {
+                    toolElem.firstChild.appendChild(createTweetToolbarDenet());
+                    popupShowGiveawayDialog();
+                }
 
-                    let innerToolBoxIcon = document.getElementById('de-tool-box-btn-01');
-                    if (!innerToolBoxIcon) {
-                        toolElem.firstChild.appendChild(createTweetToolbarToolBox())
-                    }
+                let innerToolBoxIcon = toolElem.querySelector('#de-tool-box-btn-01');
+                if (!innerToolBoxIcon) {
+                    toolElem.firstChild.appendChild(createTweetToolbarToolBox())
                 }
-            }, 1000)
-        }
-    })
+            }
+        }, 1000)
+    }
 }
 
 const popupShowGiveawayDialog = async () => {
@@ -689,8 +687,9 @@ function onWindowResize() {
 function checkHasDeBtn() {
     try {
         let toolBar = document.querySelector('div[data-testid="toolBar"]');
-        let innerDeIcon = document.getElementById('de-btn1');
-        if (toolBar && !innerDeIcon) {
+        let append = toolBar && !toolBar.querySelector('#de-btn1');
+
+        if (append) {
             _addDeNetEditBtn();
         }
     } catch (e) {
@@ -713,9 +712,9 @@ export function bindTwitterArtMethod() {
             }
         }).then((res) => {
             if (res.code == 0) {
-                Report.reportLog({
-                    objectType: Report.objectType.tweetPostBinded
-                });
+                // Report.reportLog({
+                //     objectType: Report.objectType.tweetPostBinded
+                // });
                 bindTwitterArt.needBind = false;
                 bindTwitterArt.postId = '';
                 bindTwitterArt.isBindIng = false;
@@ -874,6 +873,7 @@ function initParseCard() {
             clearInterval(timer)
             setInterval(() => {
                 onChangePageMain(inTwitterNode)
+                checkHasDeBtn()
                 twitterPinLogin()
                 showNFTGroupIcon()
                 if (queue_num <= 0) {
@@ -881,7 +881,6 @@ function initParseCard() {
                 }
                 initGroupTip()
                 setIframeRedPacket()
-                checkHasDeBtn()
                 checkHasSliderDeBtn();
                 changeQueueNum(-1)
                 showNFTCard()

+ 6 - 2
src/types/global.js

@@ -6,10 +6,12 @@
  * 玩法类型
  * 普通任务:common=1;
  * 抽奖:lottery=2
+ * 夺宝:treasure=3
  */
 export const PlayType = {
   common: 1,
   lottery: 2,
+  treasure: 3
 };
 
 /**
@@ -32,6 +34,7 @@ export const TaskType = {
   joinDiscord: 7,
   repostToFacebook: 8,
   twitterCommentAndTag: 9,
+  twitterRePost: 10
 };
 
 /**
@@ -40,6 +43,7 @@ export const TaskType = {
 
 export const PostType = {
   giveaway: 1,
-  nftGroup: 2,
-  postEditor: 3
+  lottery: 2,
+  postEditor: 3,
+  treasure: 4
 }

+ 19 - 7
src/view/components/component-zoom.vue

@@ -5,26 +5,38 @@
     </span>
 </template>
 <script setup>
-import { ref, defineProps, onMounted, getCurrentInstance } from 'vue'
+import { ref, defineProps, onMounted, watch } from 'vue'
 
 let props = defineProps({
     width: {
-        type: String,
+        type: [String, Number],
         default: '375'
     },
     fontSize: {
         type: String,
         default: '22'
+    },
+    txt: {
+        type: String,
+        default: ''
     }
 })
 
+watch(() => props.txt, (newVal) => {
+    setFontZoom(300)
+},
+{
+    deep: true
+})
+
 let zoom = ref(1);
-let currentInstance;
+let zoomDom = ref({});
 
-const setFontZoom = () => {
-    const currentInstance = getCurrentInstance()
-    let offsetWidth = currentInstance.ctx.$refs.zoomDom.offsetWidth;
-    zoom.value = offsetWidth > props.width ? +props.width / offsetWidth : 1
+const setFontZoom = (time = 600) => {
+    setTimeout(() => {
+        let offsetWidth = zoomDom.value && zoomDom.value.offsetWidth || props.width;
+        zoom.value = offsetWidth > props.width ? +props.width / offsetWidth : 1
+    }, time)
 }
 
 onMounted(() => {

+ 0 - 1
src/view/components/currency-list.vue

@@ -356,7 +356,6 @@ defineExpose({
     .list-wrapper {
         height: calc(100% - 60px);
         overflow-y: auto;
-        padding-bottom: 50px;
 
         .list-item {
             .item-title {

+ 152 - 14
src/view/components/custom-card-cover.vue

@@ -21,51 +21,83 @@
         </div>
     </div>
     <div class="not-open" v-else-if="isMoneyRewardCpd">
-        <img class="cover" v-if="data.type == 2" :src="require('@/assets/svg/img-preview-draw-bg.svg')"  />
-        <img class="cover" v-else :src="require('@/assets/subject/001-card.png')"  />
+        <img class="cover" v-if="data.type == PlayType.lottery" :src="require('@/assets/svg/img-preview-draw-bg.svg')"  />
+        <img class="cover" v-else-if="data.type == PlayType.common" src="@/assets/subject/001-card.png"  />
+        <img class="cover" v-else-if="data.type == PlayType.treasure" :src="require('@/assets/svg/img-preview-treasure-01-bg.svg')"  />
 
         <img class="open-gif"
-            v-if="data.type == 2"
+            v-if="data.type == PlayType.lottery"
             src="@/assets/img/img-preview-draw-box.png" />
         <img class="open-gif"
-            v-else
+            v-else-if="data.type == PlayType.common"
             :src="require('@/assets/gif/001.gif')" />
 
-        <img v-if="data.type == 2"
+        <img v-if="data.type == PlayType.lottery"
             :src="require('@/assets/svg/img-preview-draw-open.svg')"
             class="open"
             @click="open" />
-        <img v-else
+        <img v-else-if="data.type == PlayType.common"
             :src="require('@/assets/svg/icon-open.svg')"
             class="open"
             @click="open"/>
 
         <div class="title" v-if="data.userInfo">
             <img :src="data.userInfo.avatarUrl" />
-            <span>{{
-                data.userInfo.nickName || ""
-            }}</span>
+            <span v-if="data.type != PlayType.treasure">
+                {{data.userInfo.nickName || ""}}
+            </span>
+            <span class="treasure-info" v-else>
+                from @{{data.userInfo.nickName || ""}}
+            </span>
         </div>
-        <div class="money-area">
+
+        <div class="money-area" v-if="data.type != PlayType.treasure">
             <div class="txt">
                 <span>{{data.currencyCode == 'USD' ? 'US Dollar' : data.tokenSymbol}} </span>
                 &nbsp;GIVEAWAY
             </div>
             <div class="coin">
-                <img :src="data.currencyIconUrl || imgHeaderCover" />
+                <img v-if="data.currencyIconUrl" :src="data.currencyIconUrl || imgHeaderCover" />
                 <span id="preview-after-amount"
                     :style="{
                         fontSize: amount_font_size + 'px'
-                    }">{{ data.amountValue }}</span>
+                    }">{{ data.amountValue || 0 }}</span>
             </div>
-            <div class="time-area" v-if="data.type == 2">
+            <div class="time-area" v-if="data.type == PlayType.lottery">
                 <img class="icon-clock" :src="require('@/assets/svg/icon-time.svg')" />
                 {{data.countDown || formatSecondsAsDaysOrTime(data.validityDuration * 3600)}} 
             </div>
-            <div class="people" v-else>
+            <div class="people" v-else-if="data.type == PlayType.common">
                 {{ data.totalCount }} WINNERS TO SHARE
             </div>
         </div>
+        <div class="treasure-card-info" v-else>
+            <div class="treasure-row-1">
+                <div class="left">Treasure</div>
+                <component-zoom :width="160" :txt="data.amountValue || 0">
+                    <div class="right">${{ data.usdEstimateOrderAmount || 0 }}</div>
+                </component-zoom>
+            </div>
+
+            <div class="treasure-row-2">
+                Your Gain Up to $ <div class="amount">{{data.upGainAmountUsdValue}}</div>
+            </div>
+
+            <div class="treasure-row-3" :style="{'visibility': data.currencyCode? 'visible' : 'hidden'}">
+                <img class="img" :src="data.currencyIconUrl" /> <span class="txt"> {{data.tokenSymbol}} equivalent (Crypto)</span>
+            </div>
+
+            <img class="img-treasure-big" :src="require('@/assets/img/icon-card-cover-treasure-big.png')">
+
+            <div class="treasure-row-4">
+               <img class="img" :src="require('@/assets/svg/icon-card-cover-treasure-tasks.svg')"> to Hunt Treasure
+            </div>
+
+            <div class="open-btn" @click="open">
+                <img :src="require('@/assets/svg/icon-card-cover-treasure-small.svg')" alt="">
+                START
+            </div>
+        </div>
     </div>
 
     <!-- 改版之后的卡片 -->
@@ -130,6 +162,7 @@ const props = defineProps({
                 },
                 rewardType: RewardType.money,
                 customizedReward: "",
+                upGainAmountUsdValue: ""
             };
         },
     },
@@ -250,6 +283,105 @@ onMounted(() => {
         }
     }
 
+    .treasure-card-info {
+        color: #fff; 
+        position: absolute; 
+        top: 86px;
+        width: 100%;
+        text-align: center;
+
+        .treasure-row-1 {
+            display: flex; 
+            align-items: center;
+            justify-content: center;
+            font-weight: 900;
+            font-size: 25px;
+
+            .left {
+                margin-right: 7px;
+                color: #FFC83A;
+            }
+
+            .right {
+                font-weight: 900;
+                font-size: 25px;
+            }
+        }
+
+        .treasure-row-2 {
+            margin: 6px 0; 
+            background: rgba(255, 255, 255, .1); 
+            width: 100%; 
+            height: 27px;
+            display: flex; 
+            align-items: center;
+            justify-content: center;
+            font-weight: 500;
+            font-size: 12px;
+
+            .amount {
+                font-weight: 800;
+                font-size: 17px;
+                margin-top: -2px;
+            }
+        }
+
+        .treasure-row-3 {
+            display: flex; 
+            align-items: center;
+            justify-content: center;
+
+            .img {
+                width: 13px; 
+                margin-right: 3px;
+            }
+
+            .txt {
+                zoom: .8;
+                opacity: 0.7;
+            }
+        }
+
+        .treasure-row-4 {
+            display: flex;
+            align-items:center;
+            justify-content: center;
+            color: #65C1FF;
+            margin-top: 18px;
+            font-size: 16px;
+
+            .img {
+                width: 76px;
+            }
+        }
+
+        .img-treasure-big {
+            width: 200px;
+        }
+
+        .open-btn {
+            width: 88%;
+            height: 40px;
+            background: #1D9BF0;
+            border-radius: 75px;
+            display: flex;
+            align-items:center;
+            justify-content: center;
+            cursor: pointer;
+            font-weight: 800;
+            font-size: 15px;
+            margin-top: 12px;
+            position: relative; 
+            left: 50%; 
+            transform: translateX(-50%);
+
+            img {
+                width: 18px;
+                margin-right: 5px;
+            }
+        }
+    }
+
     .title {
         position: absolute;
         top: 15px;
@@ -273,6 +405,12 @@ onMounted(() => {
             letter-spacing: 0.3px;
             color: #fff;
         }
+
+        .treasure-info {
+            color: #fff; 
+            opacity: 0.7;
+            font-weight: 300;
+        }
     }
 
     // .txt {

+ 112 - 28
src/view/components/custom-card-horizontal-cover.vue

@@ -6,47 +6,83 @@
         </template>
         <template v-else-if="isMoneyRewardCpd">
             <img :src="require('@/assets/img/img-preview-draw-after-bg.png')"
-                v-if="data.type == 2"
+                v-if="data.type == PlayType.lottery"
                 class="card-cover">
             <img :src="require('@/assets/subject/img-card-cover-blue.png')"
-                v-else
+                v-else-if="data.type == PlayType.common"
                 class="card-cover"/>
+            <img :src="require('@/assets/img/img-preview-treasure-link-bg.png')"
+                v-else-if="data.type == PlayType.treasure"
+                class="card-cover"/>
+
             <div class="bottom-bar">
                 <div class="title">
                     DeNet.me
                 </div>
                 <div class="desc">
-                    🎁 <template v-if="data.tokenSymbol=='USD'">$</template>{{data.amountValue}} GIVEAWAY
+                    DeNet: An Easy Web3 Tool For GIVEAWAY / AIRDROP
+                    <!-- 🎁 <template v-if="data.tokenSymbol=='USD'">$</template>{{data.amountValue}} GIVEAWAY -->
                 </div>
             </div>
+
             <div class="user-info">
                 <img :src="data.userInfo.avatarUrl" 
-                class="avatar"/> {{data.userInfo.name}}
+                class="avatar"/> 
+                <template v-if="data.type != PlayType.treasure">
+                    {{data.userInfo.nickName}}
+                </template>
+                <span class="treasure-info" style="color: #fff; opacity: 0.7;font-weight: 300;" v-else>
+                    from @{{data.userInfo.nickName || ""}}
+                </span>
             </div>
+
             <div class="content-text">
-                <div class="title">
-                    <span>{{data.currencyCode == 'USD' ? 'US Dollar' : data.tokenSymbol}} </span>
-                    &nbsp;GIVEAWAY
-                </div>
-                <div class="center"
-                    :style="{
-                        fontSize: amountFontSize + 'px'
-                    }">
-                    <img :src="data.currencyIconUrl" class="icon">
-                    <span id="preview-before-amount">
-                        {{data.amountValue}}
-                    </span>
-                </div>
-                <div class="desc">
-                    <template  v-if="data.type == 2">
-                        <img class="icon-clock" 
-                        :src="require('@/assets/svg/icon-preview-clock.svg')" />  {{data.validityDuration}} H
-                        <img class="icon-trophy" 
-                        :src="require('@/assets/svg/icon-preview-trophy.svg')" /> <span class="trophy-count">{{data.totalCount}} WINNERS</span>
-                    </template>
-                    <template v-else>
-                        {{data.totalCount}} WINNERS TO SHARE
-                    </template>
+                <template v-if="data.type != PlayType.treasure">
+                    <div class="title">
+                        <span>{{data.currencyCode == 'USD' ? 'US Dollar' : data.tokenSymbol}} </span>
+                        &nbsp;GIVEAWAY
+                    </div>
+
+                    <div class="center"
+                        :style="{
+                            fontSize: amountFontSize + 'px'
+                        }">
+                        <img :src="data.currencyIconUrl" class="icon">
+                        <span id="preview-before-amount">
+                            {{data.amountValue}}
+                        </span>
+                    </div>
+
+                    <div class="desc">
+                        <template  v-if="data.type == PlayType.lottery">
+                            <img class="icon-clock" 
+                            :src="require('@/assets/svg/icon-preview-clock.svg')" />  {{data.validityDuration}} H
+                            <img class="icon-trophy" 
+                            :src="require('@/assets/svg/icon-preview-trophy.svg')" /> <span class="trophy-count">{{data.totalCount}} WINNERS</span>
+                        </template>
+                        <template v-else-if="data.type == PlayType.common">
+                            {{data.totalCount}} WINNERS TO SHARE
+                        </template>
+                    </div>
+                </template>
+                <div class="treasure-layout" v-else>
+                    <div class="treasure-row-1">
+                        <span class="left">Treasure</span>
+                        <component-zoom width="160">
+                            <span class="right">${{data.amountValue}}</span>
+                        </component-zoom>
+                    </div>
+                    <div class="treasure-desc-data">
+                        <div class="item">
+                            <img class="icon" 
+                                :src="require('@/assets/svg/icon-preview-trophy.svg')" />
+                            {{data.totalCount}} Winners
+                        </div>
+                        <div class="item">
+                            <img class="icon" :src="data.currencyIconUrl">
+                            {{data.currencyCode == 'USD' ? 'US Dollar' : data.tokenSymbol}} equivalent
+                        </div>
+                    </div>
                 </div>
             </div>
         </template>
@@ -62,7 +98,7 @@
                 </div>
             </div>
             <div class="custom-card-prize">
-                <component-zoom :width="showBottom ? 210 : 300">
+                <component-zoom width="showBottom ? 210 : 300">
                     <span class="custom-card-prize-name" id="custom-name" >
                         <img class="custom-card-prize-gift-inline" :src="require('@/assets/subject/icon-gift-inline.svg')" />
                         {{data.customizedReward}}
@@ -169,6 +205,12 @@ watch(() => props.data, () => {
             border-radius: 50%;
             margin-right: 10px;
         }
+
+        .treasure-info {
+            color: #fff; 
+            opacity: 0.7;
+            font-weight: 300;
+        }
     }
     .content-text {
         position: absolute;
@@ -219,6 +261,48 @@ watch(() => props.data, () => {
                 color: #FFCC4D;
             }
         }
+
+        .treasure-layout {
+            margin-top: -8px;
+
+            .treasure-row-1 {
+                display: flex; 
+                align-items: center;
+                justify-content: center;
+                font-weight: 900;
+                font-size: 35px;
+                color: #fff;
+
+                .left {
+                    margin-right: 7px;
+                    color: #FFC83A;
+                }
+
+                .right {
+                    font-weight: 900;
+                    font-size: 35px;
+                    color: #fff;
+                }
+            }
+
+            .treasure-desc-data {
+                margin-top: 18px;
+
+                .item {
+                    font-weight: 500;
+                    font-size: 14px;
+                    color: #E1D4C5;
+                    margin-bottom: 10px;
+                    display: flex; 
+                    align-items: center;
+
+                    .icon {
+                        width: 20px;
+                        margin-right: 8px;
+                    }
+                }
+            }
+        }
     }
     .card-cover {
         width: 100%;

+ 11 - 3
src/view/iframe/publish/components/follow-input.vue

@@ -1,14 +1,16 @@
 <template>
 <!-- 发布器-@关注人 输入组件 -->
     <div class="follow-input-wrapper">
-        <div class="at-user-item" v-for="(item, index) in pageAtUserList" :key="index">
+        <div class="at-user-item" :style="{'padding': padding}" v-for="(item, index) in pageAtUserList" :key="index">
             <img :src="require('@/assets/svg/icon-del-follows-user.svg')" 
                 class="icon-del"
+                v-if="!isRequire || isRequire && index > 0"
                 @click="delUser(item, index)">
             <pre :id='"pre" + index' class="at-user-input-placeholder">{{item.name}}</pre>
             @<input class="at-user-input" 
                     :id='"input" + index' 
                     v-model="item.name" 
+                    :readonly="index == 0 && isRequire"
                     @change="onIptChange(item, index)"
                     @input="onInput(item, index)"
                     @keydown="onKeydown(item, index)"
@@ -72,6 +74,13 @@ const props = defineProps({
     isAddSelf: {
         type: Boolean,
         default: true
+    },
+    isRequire: {
+        type: Boolean,
+        default: false
+    },
+    padding: {
+        type: String,
     }
 })
 
@@ -273,7 +282,6 @@ const onUserMouseLeave = (params, index) => {
             color: #1D9BF0;
             font-weight: 500;
             font-size: 15px;
-            padding: 4px 12px;
             position: relative;
             margin-right: 10px;
             background-color: #fff;
@@ -308,7 +316,7 @@ const onUserMouseLeave = (params, index) => {
                 overflow-y: auto;
                 background-color: #fff; 
                 top: 30px;
-                left: -150px;
+                left: 0px;
                 z-index: 1000;
                 border-radius: 10px;
 

+ 61 - 0
src/view/iframe/publish/components/form-input.vue

@@ -0,0 +1,61 @@
+<template>
+    <div class="form-input-wrapper">
+        <div class="prefix" v-if="prefix">
+            {{prefix}}
+        </div>
+        <slot name="content"></slot>
+        <component-zoom width="50" fontSize="14" :txt="suffix" v-if="suffix">
+            <div class="suffix">
+                {{suffix}}
+            </div>
+        </component-zoom>
+    </div>
+</template>
+
+<script setup>
+import { onMounted, ref, defineProps, defineEmits } from "vue";
+import ComponentZoom from '@/view/components/component-zoom.vue'
+
+const props = defineProps({
+    prefix: {
+        type: String,
+        default: '',
+    },
+    suffix: {
+        type: String,
+        default: '',
+    },
+});
+const emits = defineEmits(["close", "confirm", "postPublishFinish"]);
+
+onMounted(() => {
+}) 
+</script>
+
+<style scoped lang="scss">
+.form-input-wrapper {
+    width: max-content;
+    height: 38px;
+    border: 1px solid #D9D9D9;
+    border-radius: 5px;
+    padding: 0 10px;
+    box-sizing: border-box;
+    display: flex;
+    align-items: center;
+    color: #999999;
+    font-weight: 500;
+    font-size: 12px;
+
+    .prefix {
+        margin-right: 4px;
+    }
+
+    .suffix {
+        margin-left: 4px;
+        white-space: nowrap;
+        color: #999999;
+        font-weight: 500;
+        font-size: 12px;
+    }
+}
+</style>

+ 6 - 0
src/view/iframe/publish/components/preview-card.vue

@@ -33,6 +33,7 @@
                             },
                             rewardType: baseFormData.rewardType,
                             customizedReward: baseFormData.customizedReward,
+                            upGainAmountUsdValue: upGainAmountUsdValue
                         }"></custom-card-cover>
                     </div>
                 </div>
@@ -68,6 +69,7 @@
                             type: baseFormData.type,
                             validityDuration: baseFormData.validityDuration,
                             customPosterUrl: customPosterInfo && customPosterInfo.before && customPosterInfo.before.imagePath || '',
+                            addFans: baseFormData.addFans,
                             userInfo: {
                                 nickName: userInfo.name,
                                 avatarUrl: userInfo.avatarUrl
@@ -134,6 +136,10 @@ defineProps({
             }
         }
     },
+    upGainAmountUsdValue: {
+        type: String,
+        default: ''
+    }
 })
 
 const getUserInfo = (cb) => {

+ 8 - 2
src/view/iframe/publish/components/preview-sheet.vue

@@ -23,7 +23,8 @@
                     :postData="publishRes"
                     :baseFormData="baseFormData" 
                     :amountFontSize="previewFontSize" 
-                    :customPosterInfo="customPosterData">
+                    :customPosterInfo="customPosterData"
+                    :upGainAmountUsdValue="upGainAmountUsdValue">
                 </preview-card>
             </div>
         </div>
@@ -118,7 +119,8 @@ const props = defineProps({
                 validityDuration: "",
                 type: selectModeInfo.type,
                 rewardType: RewardType.money,
-                customizedReward: ""
+                customizedReward: "",
+                addFans: ''
             }
         },
     },
@@ -160,6 +162,10 @@ const props = defineProps({
                 requestAmountValue: 0,
             }
         }
+    },
+    upGainAmountUsdValue: {
+        type: String, 
+        default: ''
     }
 });
 

文件差异内容过多而无法显示
+ 523 - 205
src/view/iframe/publish/give-dialog.vue


+ 3 - 1
src/view/iframe/publish/publish.vue

@@ -26,7 +26,9 @@ let selectVisible = ref(false);
 
 const close = () => {
     dialogData.visible = false;
-    hideIframe();
+    setTimeout(() => {
+        hideIframe();
+    }, 500)
 };
 
 const finish = (params) => {

+ 2 - 1
src/view/iframe/publish/tool-box/child/preview.vue

@@ -197,7 +197,8 @@ const publishHandler = () => {
     if (loadingHide) {
         return;
     }
-    if ((!appId || appId && !props.previewData.linkImagePath) && (!props.screenshotWebsiteData.url || props.screenshotWebsiteData.status)) {
+
+    if ((!appId || appId && !props.previewData.linkImagePath) && (!props.screenshotWebsiteData.url && !props.screenshotWebsiteData.status)) {
         loadingHide = message.loading('loading...', 0);
         return;
     }

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

@@ -1085,7 +1085,8 @@ const reportBindTweetSuccess = (params) => {
                         objectType: Report.objectType.tweetPostBinded,
                         twitterFans: reportParams.twitterFans,
                         discordFans: reportParams.discordFans,
-                        redPacketType: 1
+                        redPacketType: 1,
+                        postId: state.postId
                     });
                 }
             }
@@ -2016,7 +2017,8 @@ function onRuntimeMsg() {
                         Report.reportLog({
                             objectType: Report.objectType.tweetPostBinded,
                             twitterFans: reportParams.twitterFans,
-                            redPacketType: 1
+                            redPacketType: 1,
+                            postId: state.postId
                         });
                     } else {
                         if (reportParams.discordFans !== '') {
@@ -2026,7 +2028,8 @@ function onRuntimeMsg() {
                                 objectType: Report.objectType.tweetPostBinded,
                                 twitterFans: reportParams.twitterFans,
                                 discordFans: reportParams.discordFans,
-                                redPacketType: 1
+                                redPacketType: 1,
+                                postId: state.postId
                             });
                         }
                     }

+ 6 - 3
src/view/iframe/red-packet/red-packet.vue

@@ -968,7 +968,8 @@ const reportBindTweetSuccess = (params) => {
             objectType: Report.objectType.tweetPostBinded,
             twitterFans: reportParams.twitterFans,
             discordFans: reportParams.discordFans,
-            redPacketType: 0
+            redPacketType: 0,
+            postId: state.postId
           });
         }
       }
@@ -1811,7 +1812,8 @@ function onRuntimeMsg() {
             Report.reportLog({
               objectType: Report.objectType.tweetPostBinded,
               twitterFans: reportParams.twitterFans,
-              redPacketType: 0
+              redPacketType: 0,
+              postId: state.postId
             });
           } else {
             if (reportParams.discordFans !== '') {
@@ -1821,7 +1823,8 @@ function onRuntimeMsg() {
                 objectType: Report.objectType.tweetPostBinded,
                 twitterFans: reportParams.twitterFans,
                 discordFans: reportParams.discordFans,
-                redPacketType: 0
+                redPacketType: 0,
+                postId: state.postId
               });
             }
           }

+ 72 - 18
src/view/popup/tabbar-page/message/index.vue

@@ -4,20 +4,27 @@
       <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 }"
+            <div class="cell" :class="{ 'cell-center': item.type == 1 || item.type == 3 || item.type == 5 }"
               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">
+                <template v-if="item.type == 1 || item.type == 3 || item.type == 5">
                   <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" v-if="item.type == 5" :src="require('@/assets/svg/icon-small-treasure.svg')" />
+                  <img class="icon-give" v-else :src="require('@/assets/svg/icon-get-giveaways-s.svg')" />
                 </template>
                 <!-- 发出去红包 -->
                 <template v-else-if="item.type == 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')" />
+                  <template v-if="item.postTaskLuckdrop.luckdropType === PlayType.treasure">
+                    <img class="icon-big-give" :src="require('@/assets/svg/icon-big-treasure.svg')" />
+                    <img class="icon-mark-give" :src="require('@/assets/svg/icon-send-giveaways-mark.svg')" />
+                  </template>
+                  <template v-else>
+                    <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>
                 </template>
                 <!-- 转出NFT记录 -->
                 <template v-else-if="item.type == 4">
@@ -34,14 +41,22 @@
                   </div>
                 </template>
               </div>
-              <div class="info-wrapper" :class="{ 'info-center': item.type == 1 }">
+              <div class="info-wrapper" :class="{ 'info-center': item.type == 1 || item.type == 5 }">
                 <div class="left">
                   <div class="nickname">
                     <template v-if="item.type == 1">
                       Get Giveaway
                     </template>
                     <template v-else-if="item.type == 2">
-                      {{ item.postTaskLuckdrop.luckdropType === 1 ? 'Send Giveaway' : 'Lottery Giveaway' }}
+                        <template v-if="item.postTaskLuckdrop.luckdropType === PlayType.common">
+                          Send Giveaway
+                        </template>
+                        <template v-else-if="item.postTaskLuckdrop.luckdropType === PlayType.lottery">
+                          Lottery Giveaway
+                        </template>
+                        <template v-else-if="item.postTaskLuckdrop.luckdropType === PlayType.treasure">
+                          Treasure Hunt
+                        </template>
                     </template>
                     <template v-else-if="item.type == 3">
                       Lottery
@@ -49,6 +64,9 @@
                     <template v-else-if="item.type == 4">
                       Transfer NFT
                     </template>
+                    <template v-else-if="item.type == 5">
+                      Treasure Hunt
+                    </template>
                   </div>
                   <div class="time">
                     {{ moment(item.timestamp).format("MM-DD HH:mm:ss") }}
@@ -59,11 +77,11 @@
                     <div class="bold" :class="{
                       'align-content':
                         (item.type == 2 ||
-                          (item.type == 1 && item.status == 1)) &&
+                          (item.type == 1 && item.status == 1 || item.type == 5 && item.status == 1)) &&
                         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">
@@ -120,6 +138,7 @@
 
                         </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">
@@ -156,12 +175,38 @@
                           Giveaway Expired
                         </template>
                       </template>
+                      <!-- NFT 转出记录 -->
                       <template v-else-if="item.type == 4">
                         <template v-if="item.status == 0 || item.status == 1">Transferring</template>
                         <template v-else-if="item.status == 2">Successful</template>
                         <template v-else-if="item.status == 3">Transfe Failed</template>
                       </template>
+                      <!-- 领取的夺宝红包 -->
+                      <template v-else-if="item.type == 5">
+                        <!-- 进行中-->
+                        <template v-if="item.status == 0">
+                          In Progress
+                        </template>
+                        <!-- 已完成 -->
+                        <template v-else-if="item.status == 2">
+                            <span class="blance">
+                              <a-tooltip :title="item.amount">
+                                {{ getBit(item.amount) }}</a-tooltip>
+                            </span>
+                            <div class="coin-type-wrapper">
+                              <span class="coin-type">{{
+                                  item.currencySymbol || ""
+                              }}</span>
+                              <img :src="item.currencyIconPath" alt="" />
+                            </div>
+                        </template>
+                        <!-- 已过期 -->
+                        <template v-else-if="item.status == 3">
+                          Giveaway Expired
+                        </template>
+                      </template>
                     </div>
+
                     <!-- 发出的红包显示 -->
                     <div class="desc" v-if="item.type == 2">
                       <!-- 未发送-->
@@ -170,7 +215,7 @@
                       </template>
                       <!-- 进行中 -->
                       <template v-else-if="item.status == 1">
-                        <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 2">
+                        <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == PlayType.lottery">
                           {{ item.downTime || '' }}
                         </template>
                         <template v-else>
@@ -179,12 +224,13 @@
                           }}
                         </template>
                       </template>
+
                       <!-- 2:已结束; 3:提前终止-->
                       <template v-else-if="item.status == 2 || item.status == 3">
                         <!-- 普通红包 -->
-                        <template v-if="item.postTaskLuckdrop && item.postTaskLuckdrop.luckdropType == 1">
+                        <template v-if="item.postTaskLuckdrop.luckdropType == PlayType.common || item.postTaskLuckdrop.luckdropType == PlayType.treasure">
                           <template v-if="item.status == 2">
-                            (Time expired)
+                            {{item.postTaskLuckdrop.luckdropType == PlayType.common ? '(Time expired)': 'Complete'}}
                           </template>
                           <template v-if="item.status == 3">
                             {{ item.srcContentId ? '(Termination)' : 'Termination' }}
@@ -208,8 +254,7 @@
                         }}
                       </template>
 
-                      <!-- 进行中或者未发送成功时显示 
-                                                v-if="item.status == 1 || item.postTaskLuckdrop.reSendAvailable"-->
+                      <!-- 进行中或者未发送成功时显示 -->
                       <div class="desc-bottom-bar">
                         <!-- 没有终止红包时显示 -->
                         <div v-if="item.postTaskLuckdrop.terminatedAvailable" class="btn"
@@ -259,7 +304,7 @@ import { terminatedLuckdrop } from "@/http/redPacket";
 import { readAllMsgByType, getAllMessageInfo } from "@/http/messageApi"
 import { setBadgeInfo, hideBadge } from "@/logic/background/twitter";
 import { getChromeStorage } from "@/uilts/chromeExtension";
-import { RewardType } from "@/types";
+import { PlayType, RewardType } from '@/types';
 
 var moment = require("moment");
 
@@ -412,13 +457,22 @@ const terminaHandler = (params, index) => {
   terminaTask.index = index;
 
   // set font
-  if (params && params.postTaskLuckdrop && params.postTaskLuckdrop.luckdropType == 2) {
-    modalTitle.value = `Early Termination of Lottery?`
-    modalContent.value = `This operation will terminate the lottery process and refund the lottery prizes.`
+  if(params && params.postTaskLuckdrop) {
+    if (params.postTaskLuckdrop.luckdropType == PlayType.lottery) {
+      modalTitle.value = `Early Termination of Lottery?`
+      modalContent.value = `This operation will terminate the lottery process and refund the lottery prizes.`
+    } else if(params.postTaskLuckdrop.luckdropType == PlayType.treasure) {
+      modalTitle.value = `Early Termination of treasure Hunt?`
+      modalContent.value = `This operation will stop the treasure hunt and refund the remaining amount within 2 days`
+    } else{
+      modalTitle.value = `Early termination of Giveaway?`
+      modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
+    }
   } else {
     modalTitle.value = `Early termination of Giveaway?`
     modalContent.value = `The remaining amount will be returned to your wallet within 1 day.`
   }
+  
   modalVisible.value = true;
 };
 

+ 7 - 4
src/view/popup/withdraw/info.vue

@@ -93,6 +93,9 @@ let state = reactive({
 })
 
 const inputWithdrawCalcFee = () => {
+  if(!state.input_amount) {
+    return;
+  }
   withdrawCalcFee({
     params: {
       "amountValue": state.input_amount,
@@ -104,7 +107,7 @@ const inputWithdrawCalcFee = () => {
       if (res.data) {
         state.currency_code = res.data.currencyCode || ''
         state.fee_amount = res.data.feeAmountValue || 0
-        state.amount = res.data.finalAmountValue || 111
+        state.amount = res.data.finalAmountValue > 0 ? res.data.finalAmountValue : 0
         state.is_enter_state = true
         inputText('yes')
       }
@@ -114,6 +117,9 @@ const inputWithdrawCalcFee = () => {
 }
 
 const inputText = (is_check_input) => {
+  if (is_check_input != 'yes') {
+    inputWithdrawCalcFee()
+  }
   if (!state.withdraw_switch) {
     return
   }
@@ -144,9 +150,6 @@ const inputText = (is_check_input) => {
     return
   } else {
     state.error_msg = ''
-    if (is_check_input != 'yes') {
-      inputWithdrawCalcFee()
-    }
   }
 }
 

部分文件因为文件数量过多而无法显示