소스 검색

[add][抽奖需求]

zhangwei 2 년 전
부모
커밋
9f17426868

BIN
src/assets/gif/002.png


+ 3 - 0
src/assets/subject/002-back-head-top-1.svg

@@ -0,0 +1,3 @@
+<svg width="375" height="110" viewBox="0 0 375 110" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0 0H375V85.8417C375 85.8417 320.624 110 187.5 110C54.376 110 0 85.8417 0 85.8417V0Z" fill="#7D52FD"/>
+</svg>

+ 3 - 0
src/assets/subject/002-back-head-top-180.svg

@@ -0,0 +1,3 @@
+<svg width="375" height="180" viewBox="0 0 375 180" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0 0H375V140.468C375 140.468 320.624 180 187.5 180C54.376 180 0 140.468 0 140.468V0Z" fill="#7D52FD"/>
+</svg>

+ 3 - 0
src/assets/subject/002-back-head-top.svg

@@ -0,0 +1,3 @@
+<svg width="375" height="160" viewBox="0 0 375 160" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M0 0H375V124.861C375 124.861 320.624 160 187.5 160C54.376 160 0 124.861 0 124.861V0Z" fill="#7D52FD"/>
+</svg>

+ 16 - 0
src/assets/subject/002-card.svg

@@ -0,0 +1,16 @@
+<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_19822_278074)"/>
+<g clip-path="url(#clip0_19822_278074)">
+<rect x="284.926" y="-27" width="152" height="31" transform="rotate(40 284.926 -27)" fill="#FFBB55"/>
+<path d="M309.266 18.332L304.682 14.4856L310.638 7.38815L308.463 5.56327L300.814 14.6792L307.573 20.3505L309.266 18.332ZM320.664 15.5128C317.851 13.1525 314.176 13.4861 311.892 16.2079C309.608 18.9296 309.918 22.607 312.731 24.9673C315.544 27.3276 319.219 26.994 321.503 24.2723C323.787 21.5505 323.477 17.8731 320.664 15.5128ZM318.916 17.5965C320.4 18.8422 320.548 20.8082 319.237 22.3709C317.926 23.9336 315.964 24.1294 314.479 22.8837C312.995 21.638 312.847 19.672 314.158 18.1092C315.469 16.5465 317.431 16.3507 318.916 17.5965ZM333.407 26.4936L325.834 20.1394L324.14 22.1579L326.842 24.4253L320.887 31.5227L323.062 33.3476L329.017 26.2502L331.713 28.5122L333.407 26.4936ZM341.661 33.42L334.089 27.0658L332.395 29.0843L335.097 31.3517L329.142 38.4491L331.316 40.274L337.272 33.1766L339.968 35.4386L341.661 33.42ZM343.856 47.4559L339.05 43.4236L340.449 41.7567L344.948 45.5321L346.587 43.5787L342.088 39.8033L343.41 38.2276L348.19 42.2379L349.834 40.278L342.88 34.4428L335.231 43.5587L342.211 49.4158L343.856 47.4559ZM351.58 41.7427L343.931 50.8586L346.105 52.6835L348.968 49.2715L349.287 49.5392L348.827 54.9673L351.419 57.1419L351.719 51.4684C353.572 52.5793 355.336 52.3284 356.549 50.8829C358.057 49.0858 357.798 46.9605 355.545 45.0701L351.58 41.7427ZM353.864 47.0212C354.632 47.6659 354.876 48.3806 354.335 49.0253C353.788 49.6764 353.05 49.5781 352.268 48.9225L350.504 47.4418L352.099 45.5405L353.864 47.0212ZM368.351 55.8157L365.903 53.7613L360.811 55.6911L361.82 50.3356L359.301 48.2212L358.049 56.7472L355.115 60.2438L357.297 62.0741L360.242 58.5645L368.351 55.8157Z" fill="white"/>
+</g>
+<defs>
+<linearGradient id="paint0_linear_19822_278074" x1="56.5" y1="500" x2="227" y2="106" gradientUnits="userSpaceOnUse">
+<stop stop-color="#3438FF"/>
+<stop offset="1" stop-color="#8B56FC"/>
+</linearGradient>
+<clipPath id="clip0_19822_278074">
+<rect width="110" height="94" fill="white" transform="translate(265)"/>
+</clipPath>
+</defs>
+</svg>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 6 - 0
src/assets/svg/icon-flower.svg


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 5 - 0
src/assets/svg/icon-participate.svg


+ 73 - 0
src/assets/svg/icon-ticket.svg

@@ -0,0 +1,73 @@
+<svg width="280" height="128" viewBox="0 0 280 128" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g filter="url(#filter0_d_19708_300008)">
+<g clip-path="url(#clip0_19708_300008)">
+<g filter="url(#filter1_d_19708_300008)">
+<rect x="10" y="6" width="260" height="108" fill="#FCAB40"/>
+<rect x="238" y="13" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="28.666" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="40.9766" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="53.2852" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="43.2148" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="71.1914" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="80.1426" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="85.7383" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="82.3809" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="73.4277" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="87.9766" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="100.285" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="91.334" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="102.523" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="62.2383" width="22" height="1.11905" fill="#FFFAD1"/>
+<rect x="238" y="17.4766" width="22" height="3.35714" fill="#FFFAD1"/>
+<rect x="238" y="30.9043" width="22" height="3.35714" fill="#FFFAD1"/>
+<rect x="238" y="45.4531" width="22" height="3.35714" fill="#FFFAD1"/>
+<rect x="238" y="58.8809" width="22" height="2.2381" fill="#FFFAD1"/>
+<rect x="238" y="21.9531" width="22" height="3.35714" fill="#FFFAD1"/>
+<rect x="238" y="35.3809" width="22" height="2.2381" fill="#FFFAD1"/>
+<rect x="238" y="49.9277" width="22" height="2.2381" fill="#FFFAD1"/>
+<rect x="238" y="64.4766" width="22" height="4.47619" fill="#FFFAD1"/>
+<rect x="238" y="93.5723" width="22" height="3.35714" fill="#FFFAD1"/>
+<rect x="238" y="104.762" width="22" height="2.2381" fill="#FFFAD1"/>
+<path d="M41.1475 51.6313H34.791V39.2104H30.0293V55.416H41.1475V51.6313ZM50.2617 38.9297C45.2529 38.9297 42.0971 42.1416 42.0971 47.3188C42.0971 52.4961 45.2417 55.6968 50.2617 55.6968C55.2705 55.6968 58.4262 52.4961 58.4262 47.3188C58.4262 42.1416 55.2705 38.9297 50.2617 38.9297ZM50.2617 42.7256C52.2495 42.7256 53.5747 44.5112 53.5747 47.3188C53.5747 50.1152 52.2607 51.9009 50.2617 51.9009C48.2627 51.9009 46.9487 50.1152 46.9487 47.3188C46.9487 44.5112 48.2739 42.7256 50.2617 42.7256ZM68.1244 55.416V42.9951H72.392V39.2104H59.0951V42.9951H63.3627V55.416H68.1244ZM82.6517 55.416V42.9951H86.9193V39.2104H73.6224V42.9951H77.89V55.416H82.6517ZM100.2 51.6313H93.5291V49.0259H99.7845V45.6118H93.5291V42.9951H100.2V39.2104H88.7674V55.416H100.2V51.6313ZM107.405 42.7256L109.382 42.7256C110.662 42.7256 111.527 43.5903 111.527 44.792C111.527 46.0161 110.707 46.8359 109.37 46.8359L107.405 46.8359V42.7256ZM107.405 49.9805H108.966L111.527 55.416H116.85L113.773 49.2729C115.469 48.4644 116.389 46.6226 116.389 44.7134C116.389 41.2432 114.166 39.2104 109.842 39.2104H102.643V55.416H107.405V49.9805ZM127.379 55.416V50.2837L132.916 39.2104H127.941L125.099 45.7803H125.01L122.168 39.2104H117.081L122.617 50.2837V55.416L127.379 55.416Z" fill="#FFFAD1"/>
+<path d="M40.5137 83V67.8789H45.709V63.2715H29.5215V67.8789H34.7168V83H40.5137ZM53.708 83V63.2715H47.9111V83H53.708ZM65.9726 83.3418C71.2909 83.3418 75.1327 79.9648 75.1601 75.043H69.6093C69.4316 77.3262 67.9823 78.7891 65.9862 78.7891C63.58 78.7891 62.0898 76.6836 62.0898 73.1152C62.0898 69.5879 63.5937 67.4824 65.9726 67.4824C67.9823 67.4824 69.4452 68.9727 69.5819 71.2148H75.1327C75.1191 66.3203 71.1816 62.9297 65.9726 62.9297C59.9433 62.9297 56.1835 66.6211 56.1835 73.1289C56.1835 79.6367 59.9296 83.3418 65.9726 83.3418ZM83.3778 83V77.832L84.9227 75.7539L89.2294 83H95.9696L89.1747 72.0352L95.6688 63.2715H89.5848L83.4872 71.6387H83.3778V63.2715H77.5809V83H83.3778ZM111.488 78.3926H103.367V75.2207H110.982V71.0645H103.367V67.8789H111.488V63.2715L97.5701 63.2715V83H111.488V78.3926ZM124.655 83V67.8789H129.85V63.2715H113.663V67.8789H118.858V83H124.655Z" fill="#FFFAD1"/>
+<rect x="18.1094" y="13.5703" width="209" height="92.587" stroke="#FFFAD1" stroke-width="2"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M167.297 12.5664L198.369 12.5664V26.5413C208.972 32.188 216.19 43.3533 216.19 56.2044C216.19 69.0554 208.972 80.2207 198.369 85.8674V101.213L182.833 93.9021L167.297 101.213V86.1063C156.445 80.5397 149.02 69.2392 149.02 56.2044C149.02 43.1695 156.445 31.869 167.297 26.3025V12.5664ZM182.605 86.5919C199.135 86.5919 212.535 73.1919 212.535 56.6622C212.535 40.1325 199.135 26.7325 182.605 26.7325C166.076 26.7325 152.676 40.1325 152.676 56.6622C152.676 73.1919 166.076 86.5919 182.605 86.5919Z" fill="#FFFAD1"/>
+<circle cx="182.377" cy="56.434" r="26.9596" stroke="#FFFAD1" stroke-width="1.82777"/>
+<path d="M168.331 70.6986C168.331 71.4019 168.911 71.9701 169.629 71.9701H181.227V57.0301H168.331V70.6986ZM183.985 71.9701H195.583C196.301 71.9701 196.881 71.4019 196.881 70.6986V57.0301H183.985V71.9701ZM197.53 47.4939H191.544C192.096 46.6436 192.42 45.6344 192.42 44.5536C192.42 41.5299 189.91 39.0703 186.824 39.0703C185.145 39.0703 183.632 39.8014 182.606 40.9537C181.58 39.8014 180.068 39.0703 178.389 39.0703C175.303 39.0703 172.792 41.5299 172.792 44.5536C172.792 45.6344 173.113 46.6436 173.668 47.4939H167.682C166.965 47.4939 166.385 48.0621 166.385 48.7654V54.3282H181.227V47.4939H183.985V54.3282H198.828V48.7654C198.828 48.0621 198.248 47.4939 197.53 47.4939ZM181.227 47.335H178.389C176.823 47.335 175.55 46.0874 175.55 44.5536C175.55 43.0199 176.823 41.7722 178.389 41.7722C179.954 41.7722 181.227 43.0199 181.227 44.5536V47.335ZM186.824 47.335H183.985V44.5536C183.985 43.0199 185.258 41.7722 186.824 41.7722C188.389 41.7722 189.663 43.0199 189.663 44.5536C189.663 46.0874 188.389 47.335 186.824 47.335Z" fill="#FFFAD1"/>
+</g>
+<g style="mix-blend-mode:overlay" opacity="0.6" filter="url(#filter2_f_19708_300008)">
+<path d="M-53.5469 -175.893L471.55 127.272L424.28 209.146L-100.817 -94.0185L-53.5469 -175.893Z" fill="white"/>
+</g>
+</g>
+</g>
+<defs>
+<filter id="filter0_d_19708_300008" x="0.384616" y="0.23077" width="279.231" height="127.231" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="3.84615"/>
+<feGaussianBlur stdDeviation="4.80769"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19708_300008"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19708_300008" result="shape"/>
+</filter>
+<filter id="filter1_d_19708_300008" x="5.43058" y="3.25835" width="269.139" height="117.139" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="1.82777"/>
+<feGaussianBlur stdDeviation="2.28471"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19708_300008"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19708_300008" result="shape"/>
+</filter>
+<filter id="filter2_f_19708_300008" x="-124.816" y="-199.893" width="620.367" height="433.039" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
+<feGaussianBlur stdDeviation="12" result="effect1_foregroundBlur_19708_300008"/>
+</filter>
+<clipPath id="clip0_19708_300008">
+<path d="M10 9.84615C10 7.72198 11.722 6 13.8462 6L266.154 6C268.278 6 270 7.72198 270 9.84615V110.154C270 112.278 268.278 114 266.154 114L13.8462 114C11.722 114 10 112.278 10 110.154L10 9.84615Z" fill="white"/>
+</clipPath>
+</defs>
+</svg>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 6 - 0
src/assets/svg/icon-time.svg


+ 21 - 0
src/assets/svg/icon-win-1.svg

@@ -0,0 +1,21 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="0.5" width="19" height="19" rx="9.5" fill="url(#paint0_linear_19985_38886)" stroke="white"/>
+<g filter="url(#filter0_d_19985_38886)">
+<path d="M9.83008 14H11.582V5.54492H9.82422L7.63867 7.0625V8.65625L9.79492 7.16797H9.83008V14Z" fill="white"/>
+</g>
+<defs>
+<filter id="filter0_d_19985_38886" x="7.63867" y="5.54492" width="4.44336" height="8.95508" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="0.5" dy="0.5"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19985_38886"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19985_38886" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_19985_38886" x1="14.4444" y1="-1.66667" x2="2.77778" y2="22.2222" gradientUnits="userSpaceOnUse">
+<stop stop-color="#FEDE24"/>
+<stop offset="1" stop-color="#DFBF00"/>
+</linearGradient>
+</defs>
+</svg>

+ 21 - 0
src/assets/svg/icon-win-2.svg

@@ -0,0 +1,21 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="0.5" width="19" height="19" rx="9.5" fill="url(#paint0_linear_19985_38889)" stroke="white"/>
+<g filter="url(#filter0_d_19985_38889)">
+<path d="M6.87695 8.08789V8.11719H8.51758V8.08789C8.51758 7.30859 9.12109 6.73438 9.94141 6.73438C10.7266 6.73438 11.2832 7.23828 11.2832 7.87109C11.2832 8.45703 11.0195 8.88477 10.1641 9.74023L6.97656 12.8105V14H13.123V12.5938H9.30859V12.5586L11.3711 10.5723C12.3027 9.64648 13.0059 8.85547 13.0059 7.80078C13.0059 6.38867 11.7812 5.35742 10 5.35742C8.1543 5.35742 6.87695 6.48828 6.87695 8.08789Z" fill="white"/>
+</g>
+<defs>
+<filter id="filter0_d_19985_38889" x="6.87695" y="5.35742" width="6.74609" height="9.14258" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="0.5" dy="0.5"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19985_38889"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19985_38889" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_19985_38889" x1="7.77778" y1="20" x2="20" y2="3.33333" gradientUnits="userSpaceOnUse">
+<stop stop-color="#AFC3D2"/>
+<stop offset="1" stop-color="#CCDBE7"/>
+</linearGradient>
+</defs>
+</svg>

+ 21 - 0
src/assets/svg/icon-win-3.svg

@@ -0,0 +1,21 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.5" y="0.5" width="19" height="19" rx="9.5" fill="url(#paint0_linear_19985_38892)" stroke="white"/>
+<g filter="url(#filter0_d_19985_38892)">
+<path d="M8.875 10.3086H9.91797C10.873 10.3086 11.4531 10.7773 11.4531 11.5508C11.4531 12.2656 10.832 12.7637 9.94727 12.7637C9.01562 12.7637 8.42969 12.2949 8.37695 11.5801H6.68359C6.76562 13.1387 8.01367 14.1875 9.92383 14.1875C11.875 14.1875 13.252 13.1797 13.252 11.6621C13.252 10.4902 12.4375 9.72852 11.1777 9.62305V9.58789C12.2148 9.40039 12.9238 8.65039 12.9238 7.61328C12.9238 6.25977 11.7227 5.35742 9.96484 5.35742C8.13086 5.35742 6.91211 6.37695 6.84766 7.94141H8.47656C8.52344 7.20312 9.06836 6.7168 9.88867 6.7168C10.7676 6.7168 11.2539 7.16797 11.2539 7.85352C11.2539 8.55078 10.709 9.03125 9.90039 9.03125H8.875V10.3086Z" fill="white"/>
+</g>
+<defs>
+<filter id="filter0_d_19985_38892" x="6.68359" y="5.35742" width="7.06836" height="9.33008" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dx="0.5" dy="0.5"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_19985_38892"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_19985_38892" result="shape"/>
+</filter>
+<linearGradient id="paint0_linear_19985_38892" x1="7.77778" y1="17.7778" x2="20" y2="3.33333" gradientUnits="userSpaceOnUse">
+<stop stop-color="#D5AD88"/>
+<stop offset="1" stop-color="#F3DCC7"/>
+</linearGradient>
+</defs>
+</svg>

+ 3 - 0
src/assets/svg/icon-win-time.svg

@@ -0,0 +1,3 @@
+<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M11 0C4.93429 0 0 4.93429 0 11C0 17.0657 4.93429 22 11 22C17.0657 22 22 17.0657 22 11C22 4.93429 17.0657 0 11 0ZM14.9105 12.5714H10.2182C9.7845 12.5714 9.42857 12.2163 9.42857 11.7818V5.52671C9.42857 5.093 9.78057 4.741 10.2143 4.741C10.648 4.741 11 5.093 11 5.52671V11H14.9105C15.345 11 15.6962 11.352 15.6962 11.7857C15.6962 12.2202 15.3442 12.5714 14.9105 12.5714Z" fill="#1D9BF0"/>
+</svg>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 6 - 0
src/assets/svg/icon-win.svg


+ 4 - 2
src/iframe/red-packet.js

@@ -1,17 +1,19 @@
 import { createApp } from 'vue'
-import App from '@/view/iframe/red-packet/red-packet.vue'
+import App from '@/view/iframe/red-packet/index.vue'
 const app = createApp(App)
 
 // 引入路由对象实例
 import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
 import "@/assets/css/reset.css";
 
-import { message, Tooltip } from "ant-design-vue";
+import { message, Tooltip, Switch } from "ant-design-vue";
 message.config({
     top: `10px`,
     duration: 3,
     maxCount: 1,
 });
 app.use(Tooltip);
+app.use(Switch);
+
 app.use(message)
 app.mount('#app')

+ 7 - 7
src/logic/content/ParseCard.js

@@ -228,7 +228,7 @@ class ParseCard {
         return _array
     }
 
-    createIframe({ post_Id = '', tweet_Id = '', tweet_author = '' }, if_center = false) {
+    createIframe({ post_Id = '', tweet_Id = '', tweet_author = '', page_type = '' }, if_center = false) {
         let _iframe = document.createElement('iframe')
         let _iframe_url = ''
         let tweet_str = ''
@@ -236,9 +236,9 @@ class ParseCard {
             tweet_str = `&tweetId=${tweet_Id}`
         }
         _iframe.id = post_Id
-        _iframe_url =  chrome.runtime.getURL('/iframe/red-packet.html') + `?postId=${post_Id}${tweet_str}&tweet_author=${tweet_author}&window_origin=${window.location.origin}`;
+        _iframe_url = chrome.runtime.getURL('/iframe/red-packet.html') + `?postId=${post_Id}${tweet_str}&tweet_author=${tweet_author}&window_origin=${window.location.origin}&page_type=${page_type}`;
         // debugger mode
-        if(window.location.href.includes('denet_debugger')){
+        if (window.location.href.includes('denet_debugger')) {
             _iframe_url = _iframe_url + '&denet_debugger=1'
         }
         _iframe.src = _iframe_url
@@ -257,7 +257,7 @@ class ParseCard {
         _iframe.style.cssText = 'border:medium none; width:375px; min-height:300px;'
         return _iframe
     }
-    createNftGroupIframe({ project_Id, tweet_Id}) {
+    createNftGroupIframe({ project_Id, tweet_Id }) {
         let _iframe = document.createElement('iframe')
         _iframe.id = project_Id
         _iframe.src = chrome.runtime.getURL('/iframe/nft-group-card.html') + `?projectId=${project_Id}&tweet_Id=${tweet_Id}`;
@@ -330,7 +330,7 @@ class ParseCard {
         }
         return false
     }
-    replaceDOMRedPacket({ dom_card, tweet_Id, post_Id, time, short_url }) {
+    replaceDOMRedPacket({ dom_card, tweet_Id, post_Id, time, short_url, page_type = '' }) {
         if (!dom_card || !dom_card.parentElement) {
             return
         }
@@ -363,7 +363,7 @@ class ParseCard {
                 `
                 dom.parentElement.appendChild(div)
             }
-            dom.appendChild(this.createIframe({ post_Id, tweet_Id }))
+            dom.appendChild(this.createIframe({ post_Id, tweet_Id, page_type }))
         }
     }
     replaceNftDomRedPacket({ dom_card, tweet_Id, post_Id, time, short_url }) {
@@ -427,7 +427,7 @@ class ParseCard {
         dom.style = 'min-height:180px'
         if (dom) {
             let project_Id = post_Id.replace('nft_group/', '');
-            dom.appendChild(this.createNftGroupIframe({ project_Id,tweet_Id }))
+            dom.appendChild(this.createNftGroupIframe({ project_Id, tweet_Id }))
         }
     }
 }

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

@@ -726,7 +726,11 @@ function setIframeRedPacket(type = 'twitter') {
                         parseCard.replaceNftDomRedPacket(item)
                     } else if (item && item.post_Id && item.post_Id.indexOf('nft_group/') >= 0) {
                         parseCard.replaceNftGroupDomRedPacket(item)
+                    } else if (item && item.post_Id && item.post_Id.indexOf('luck/') >= 0) {
+                        item.page_type = '抽奖'
+                        parseCard.replaceDOMRedPacket(item)
                     } else {
+                        item.page_type = '红包'
                         parseCard.replaceDOMRedPacket(item)
                     }
                 }

+ 12 - 0
src/view/iframe/red-packet/index.vue

@@ -0,0 +1,12 @@
+<template>
+    <red-packet v-if="state.page_type == '红包'"></red-packet>
+    <luck-draw v-else-if="state.page_type == '抽奖'"></luck-draw>
+</template>
+<script setup>
+import { reactive } from "vue";
+import RedPacket from '@/view/iframe/red-packet/red-packet.vue'
+import LuckDraw from '@/view/iframe/red-packet/luck-draw.vue'
+import { getQueryString } from '@/uilts/help.js'
+let state = reactive({})
+state.page_type = getQueryString('page_type') || '红包'
+</script>

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

@@ -0,0 +1,2882 @@
+<!-- 红包任务页面 -->
+<template>
+    <div class="content">
+        <!-- global-tip -->
+        <!-- <global-tip :type="'1'"></global-tip> -->
+        <!-- open -->
+        <div v-show="state.status == 'opened'" class="opened">
+
+            <div class="header"
+                :style="{ 'backgroundImage': `url(${require('@/assets/subject/002-back-head-top-1.svg')})` }">
+                <!--  -->
+                <img :src="require('@/assets/subject/001-icon-red-packet.svg')" alt="">
+                <div class="txt">
+                    <p>Complete tasks</p>
+                    <p>to Draw Prizes</p>
+                </div>
+            </div>
+
+            <div class="list">
+                <template v-for="item, i in state.detail.taskCondition" v-bind:key="i">
+                    <div class="item" v-if="item.type == 1 && item.relatedUsers && item.relatedUsers.length > 0">
+                        <div class="item-content">
+                            <div class="item-follow-title">
+                                <img :src="require('@/assets/svg/icon-task-twitter.svg')" alt />
+                                <!-- <img :src="require('@/assets/svg/icon-follow.svg')" alt /> -->
+                                <div class="item-title">Follow</div>
+                                <img :src="require('@/assets/gif/red-right.gif')" alt class="red-right"
+                                    v-show="!state.done.follow && state.done.follow_red" />
+                                <img v-if="state.done.follow" :src="require('@/assets/svg/icon-true.svg')" alt />
+                                <div v-else class="btn" @click="clickFollowAll(item.relatedUsers, 'all')">Follow All
+                                </div>
+                            </div>
+                            <div class="item-follow-area">
+                                <template v-for="item2, i in item.relatedUsers" v-bind:key="i">
+                                    <div class="item-follow" v-if="item2.finished">
+                                        <span :class="{ finished: item2.finished }">@{{ item2.name }}</span>
+                                        <img :src="require('@/assets/svg/icon-true-ed.svg')" alt />
+                                    </div>
+                                    <div class="item-follow" v-else @click="clickFollowAll([item2])">
+                                        <span :class="{ finished: item2.finished }">@{{ item2.name }}</span>
+                                        <img :src="require('@/assets/svg/icon-add.svg')" alt />
+                                    </div>
+                                </template>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="item" v-if="item.type == 2">
+                        <img :src="require('@/assets/svg/icon-task-twitter.svg')" alt />
+                        <!-- <img :src="require('@/assets/svg/icon-like.svg')" alt /> -->
+                        <div class="item-content">
+                            <div class="item-title">Like</div>
+                        </div>
+                        <img :src="require('@/assets/gif/red-right.gif')" alt class="red-right"
+                            v-show="!state.done.like && state.done.like_red" />
+                        <img v-if="state.done.like" :src="require('@/assets/svg/icon-true.svg')" alt />
+                        <div v-else class="btn" @click="clickLikeBtn">Like</div>
+                    </div>
+                    <div class="item" v-if="item.type == 3">
+                        <img :src="require('@/assets/svg/icon-task-twitter.svg')" alt />
+                        <!-- <img :src="require('@/assets/svg/icon-retweet.svg')" alt /> -->
+                        <div class="item-content">
+                            <div class="item-title">Retweet</div>
+                        </div>
+                        <img :src="require('@/assets/gif/red-right.gif')" alt class="red-right"
+                            v-show="!state.done.retweet && state.done.retweet_red" />
+                        <img v-if="state.done.retweet" :src="require('@/assets/svg/icon-true.svg')" alt />
+                        <div v-else class="btn" @click="clickRetweetBtn">Retweet</div>
+                    </div>
+                    <!-- Comment、艾特 friends -->
+                    <div class="item" v-if="item.type == 9">
+                        <img :src="require('@/assets/svg/icon-task-twitter.svg')" alt />
+                        <div class="item-content">
+                            <div class="item-title">Comment and Tag 3 friends</div>
+                        </div>
+                        <img :src="require('@/assets/gif/red-right.gif')" alt class="red-right"
+                            v-show="!state.done.reply && state.done.reply_red" />
+                        <img v-if="state.done.reply" :src="require('@/assets/svg/icon-true.svg')" alt />
+                        <div v-else class="btn" @click="clickReply(item)">Comment</div>
+                    </div>
+                    <!-- repost feacebook -->
+                    <div class="item" v-if="item.type == 8">
+                        <img :src="require('@/assets/svg/icon-task-facebook.svg')" alt />
+                        <div class="item-content">
+                            <div class="item-title">Repost to Facebook</div>
+                        </div>
+                        <img :src="require('@/assets/gif/red-right.gif')" alt class="red-right"
+                            v-show="!state.done.repost_facebook && state.done.repost_facebook_red" />
+                        <img v-if="state.done.repost_facebook" :src="require('@/assets/svg/icon-true.svg')" alt />
+                        <div v-else class="btn" @click="clickRepostFacebook(item)">Repost</div>
+                    </div>
+                    <!-- join discord  -->
+                    <div class="item" v-if="item.type == 7">
+                        <img :src="require('@/assets/svg/icon-discord-mini.svg')" alt />
+                        <div class="item-content">
+                            <div class="item-title">Join Discord</div>
+                        </div>
+                        <img :src="require('@/assets/gif/red-right.gif')" alt class="red-right"
+                            v-show="!state.done.join_discord && state.done.join_discord_red" />
+                        <img v-if="state.done.join_discord" :src="require('@/assets/svg/icon-true.svg')" alt />
+                        <template v-else>
+                            <div v-if="joinDiscordIng" class="loading-wrapper">
+                                <img class="icon-loading" :src="require('@/assets/svg/icon-loading-gray.svg')" />
+                            </div>
+                            <div v-else class="btn" @click="joinDiscord">
+                                Join
+                            </div>
+                        </template>
+                    </div>
+                </template>
+            </div>
+            <!-- <div class="people" @click="clickRoad">
+        <div class="txt">
+          {{ state.detail.receiveCount || 0 }}/{{ state.detail.totalCount || 0 }} Winners,{{
+              state.detail.receiveAmountValue
+          }}/{{ state.detail.amountValue }} {{ state.detail.currencySymbol }}</div>
+        <div class="right" v-if="state.detail.allReceived">
+
+          <img :src="require('@/assets/svg/icon-right.svg')" alt class="road" />
+        </div>
+      </div> -->
+            <div class="footer">
+
+                <div class="btn" @click="clickGetGiveaways">Complete</div>
+            </div>
+        </div>
+
+
+        <!-- success -->
+        <div v-if="state.status == 'success'" class="success">
+            <div class="header"
+                :style="{ 'backgroundImage': `url(${require('@/assets/subject/002-back-head-top-180.svg')})` }">
+                <div class="success-title">
+                    🎉 Awesome! You are Winner!
+                </div>
+                <div class="money">
+                    <img :src="state.detail.currencyIconPath" alt />
+                    <font-amount :amount="state.receiveAmount" class="big" :fontSize="46"></font-amount>
+                    <!-- <span class="small">{{ state.detail.currencySymbol }}</span> -->
+                </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>
+                <div class="right">
+                    <span class="text">
+                        <a-tooltip :title="state.detail.receiveAmountValue">
+                            {{ getBit(state.detail.receiveAmountValue) }}
+                        </a-tooltip>
+                        /
+                        <a-tooltip :title="state.detail.amountValue">
+                            {{ getBit(state.detail.amountValue) || '' }}
+                        </a-tooltip>
+                    </span>
+                    {{ state.detail.currencySymbol || '' }}
+                </div>
+            </div>
+            <div class="luck-list max" @scroll="handleScroll($event)">
+                <div class="luck-item" v-for="item, i in state.detail.allReceived" v-bind:key="i">
+                    <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl"
+                        @click="openTwitterDetail(item)" alt />
+                    <img v-else :src="require('@/assets/svg/icon-twitter.svg')" alt />
+                    <div class="luck-content">
+                        <div class="luck-title" v-if="item.simpleUserInfoVO.nickName">{{ item.simpleUserInfoVO.nickName
+                        }}</div>
+                        <div class="luck-title" v-else>Twitter User</div>
+                        <div class="luck-time">{{ moment(item.receiveTimestamp).format('MM-DD HH:mm') }}</div>
+                    </div>
+                    <div class="luck-money">
+                        <img :src="state.detail.currencyIconPath" alt />
+                        <div class="luck-money-txt">
+                            <a-tooltip :title="item.amountValue">
+                                {{ getBit(item.amountValue) }}
+                            </a-tooltip>
+                        </div>
+                    </div>
+                    <div class="luck-king" v-if="item.maxAmount">
+                        <img :src="require('@/assets/svg/icon-king-hat.svg')" alt />
+                        <span>Luckiest Draw</span>
+                    </div>
+                </div>
+            </div>
+            <get-more></get-more>
+        </div>
+
+
+        <!-- no-open -->
+        <div v-else-if="state.status == 'not-open'" class="not-open">
+            <img :src="require('@/assets/subject/002-card.svg')" alt="">
+            <img class="open-gif" :src="require('@/assets/gif/002.png')" />
+
+            <img :src="require('@/assets/svg/icon-participate.svg')" alt="" class="open" @click="clickOpenRedPacket">
+            <div class="title" v-if="state.detail.postUserInfo">
+                <img :src="state.detail.postUserInfo.avatarUrl" alt />
+                <span>{{ state.detail.postUserInfo.nickName || 'FutureDoctor' }}</span>
+            </div>
+            <div class="money-area">
+                <div class="txt">{{ state.detail.currencySymbol }} GIVEAWAY</div>
+                <div class="coin">
+                    <img :src="state.detail.currencyIconPath" alt />
+                    <font-amount :amount="state.detail.amountValue" style="color:#fff;"></font-amount>
+                </div>
+                <!-- <div class="people">{{ state.detail.totalCount }} WINNERS TO SHARE</div> -->
+                <div class="mark-area">
+                    <div class="time">
+                        <img :src="require('@/assets/svg/icon-time.svg')" />
+                        <span>24H</span>
+                    </div>
+                    <div class="win">
+                        <img :src="require('@/assets/svg/icon-win.svg')" />
+                        <span>3 WINNERS</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+
+        <!-- 领取列表 -->
+        <div v-else-if="state.status == 'luck-peopel-list'" class="luck-peopel-list">
+            <div class="head">
+                <img :src="require('@/assets/svg/icon-back.svg')" alt />
+            </div>
+            <div class="luck-list-title">
+                <div>{{ state.detail.receiveCount || 0 }}/{{ state.detail.totalCount || 0 }} Winners</div>
+                <div class="right">
+                    <span class="text">
+                        <a-tooltip :title="state.detail.receiveAmountValue">
+                            {{ getBit(state.detail.receiveAmountValue) }}
+                        </a-tooltip>
+                        /
+                        <a-tooltip :title="state.detail.amountValue">
+                            {{ getBit(state.detail.amountValue) || '' }}
+                        </a-tooltip>
+                    </span> {{
+                            state.detail.currencySymbol || ''
+                    }}
+                </div>
+            </div>
+            <div class="luck-list" @scroll="handleScroll">
+                <div class="luck-item" v-for="item, i in state.detail.allReceived" v-bind:key="i">
+                    <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt
+                        @click="openTwitterDetail(item)" />
+                    <img v-else :src="require('@/assets/svg/icon-twitter.svg')" alt />
+                    <div class="luck-content">
+                        <div class="luck-title" v-if="item.simpleUserInfoVO.nickName">{{ item.simpleUserInfoVO.nickName
+                        }}</div>
+                        <div class="luck-title" v-else>Twitter User</div>
+                        <div class="luck-time">{{ moment(item.receiveTimestamp).format('MM-DD HH:mm:ss') }}</div>
+                    </div>
+                    <div class="luck-money">
+                        <img :src="state.detail.currencyIconPath" alt />
+                        <div class="luck-money-txt">
+                            <a-tooltip :title="item.amountValue">
+                                {{ getBit(item.amountValue) }}
+                            </a-tooltip>
+                        </div>
+                    </div>
+
+                    <div class="luck-king" v-if="item.maxAmount">
+                        <img :src="require('@/assets/svg/icon-king-hat.svg')" alt />
+                        <span>Luckiest Draw</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <!-- 关闭状态 -->
+        <div v-else-if="state.status == 'close'" class="close">
+            <!-- 红包被领完了 -->
+            <div class="header"
+                :style="{ 'backgroundImage': `url(${require('@/assets/subject/002-back-head-top.svg')})` }"
+                v-if="state.close_status == '已经过期了'">
+                <div class="rabbit">
+                    <img class="flower" :src="require('@/assets/svg/icon-flower.svg')" alt />
+                    <p>This Draw is Complete</p>
+                </div>
+            </div>
+            <!-- 没有抽中 -->
+            <div class="header"
+                :style="{ 'backgroundImage': `url(${require('@/assets/subject/002-back-head-top.svg')})` }"
+                v-if="state.close_status == '没有抽中'">
+                <div class="rabbit">
+                    <img :src="require('@/assets/subject/001-icon-rabbit.svg')" alt />
+                    <p>Good Luck Next Time!</p>
+                </div>
+            </div>
+
+
+            <!-- 等待结果 -->
+            <div class="header"
+                :style="{ 'backgroundImage': `url(${require('@/assets/subject/002-back-head-top.svg')})` }"
+                v-if="state.close_status == '等待结果'">
+            </div>
+            <div class="load-result" v-if="state.close_status == '等待结果'">
+                <div class="title">
+                    <img :src="require('@/assets/svg/icon-enter-ed.svg')" alt />
+                    <span>Participate Successful</span>
+                </div>
+                <!-- 票 -->
+                <div class="ticket">
+                    <div class="div-ticket">
+                        <img :src="require('@/assets/svg/icon-ticket.svg')" alt />
+                    </div>
+                </div>
+                <p>Announcement Winner</p>
+                <div class="time">
+                    <img :src="require('@/assets/svg/icon-win-time.svg')" alt />
+                    <span>20:22:33</span>
+                </div>
+                <div class="get_more">
+                    <img width="18" :src="require('@/assets/svg/icon-big-give.svg')" />
+                    <span>Get More Giveaway</span>
+                </div>
+                <div class="notification_switch">
+                    <span>Announcement Notification</span>
+                    <a-switch v-model:checked="state.notification_switch" />
+                </div>
+            </div>
+
+            <div class="luck-list-title" v-show="state.close_status != '等待结果'">
+                <div>{{ state.detail.receiveCount || 0 }}/{{ state.detail.totalCount || 0 }} Winners</div>
+                <div class="right">
+                    <span class="text">
+                        <a-tooltip :title="state.detail.receiveAmountValue">
+                            {{ getBit(state.detail.receiveAmountValue) }}
+                        </a-tooltip>
+                        /
+                        <a-tooltip :title="state.detail.amountValue">
+                            {{ getBit(state.detail.amountValue || '') }}
+                        </a-tooltip>
+                    </span> {{
+                            state.detail.currencySymbol || ''
+                    }}
+                </div>
+            </div>
+
+            <div class="luck-list max" @scroll="handleScroll" v-show="state.close_status != '等待结果'">
+                <div class="luck-item" v-for="item, i in state.detail.allReceived" v-bind:key="i">
+                    <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt
+                        @click="openTwitterDetail(item)" />
+                    <img v-else :src="require('@/assets/svg/icon-twitter.svg')" alt />
+                    <div class="luck-content">
+                        <div class="luck-title" v-if="item.simpleUserInfoVO.nickName">{{ item.simpleUserInfoVO.nickName
+                        }}</div>
+                        <div class="luck-title" v-else>Twitter User</div>
+                        <div class="luck-time">{{ moment(item.receiveTimestamp).format('MM-DD HH:mm:ss') }}</div>
+                    </div>
+                    <div class="luck-money">
+                        <img :src="state.detail.currencyIconPath" alt />
+                        <div class="luck-money-txt">
+                            <a-tooltip :title="item.amountValue">
+                                {{ getBit(item.amountValue) }}
+                            </a-tooltip>
+                        </div>
+                    </div>
+                    <div class="luck-king" v-if="item.maxAmount">
+                        <img :src="require('@/assets/svg/icon-king-hat.svg')" alt />
+                        <span>Luckiest Draw</span>
+                    </div>
+                </div>
+
+                <div class="empty" v-show="state.detail.allReceived && state.detail.allReceived.length == 0">
+                    <img :src="require('@/assets/svg/icon-error.svg')" alt />
+                </div>
+            </div>
+            <get-more v-show="state.close_status != '等待结果'"></get-more>
+        </div>
+
+
+        <!-- error -->
+        <div v-else-if="state.status == 'error'" class="error">
+            <img :src="require('@/assets/svg/icon-error.svg')" alt />
+            <div class="txt">
+                {{ state.error_txt }}
+            </div>
+            <div class="retry" v-show="state.retry" @click="clickRetry">
+                Retry
+            </div>
+        </div>
+
+
+        <!-- loading -->
+        <div v-show="state.loading_show" class="loading">
+            <img :src="require('@/assets/svg/icon-loading.svg')" alt />
+        </div>
+
+        <div v-show="state.loading_redbag" class="redbag">
+            <img :src="require('@/assets/img/icon-loading-redbag.gif')" alt />
+        </div>
+
+    </div>
+    <div style="width: 100%; height: 30px; position: fixed; color: red; top:0;"
+        v-if="state.process_mode != 'production'">
+        {{ state.detail.validity }}</div>
+</template>
+
+<script>
+export default {
+    name: 'redPacket',
+}
+</script>
+<script setup>
+import { onMounted, reactive, ref } from "vue";
+import { getPostDetail, getRedPacket, finishRedPacket, oneKeyLike, oneKeyReTweet, oneKeyFollow, getTaskDetail, getReceivedList, addFinishEvent } from '@/http/redPacket.js'
+import { getQueryString, guid, getBit } from '@/uilts/help.js'
+import { message } from 'ant-design-vue';
+import FontAmount from '@/view/components/font-amount.vue'
+import GetMore from '@/view/iframe/publish/components/get-more.vue'
+import { setChromeStorage, getChromeStorage } from '@/uilts/chromeExtension.js'
+import Report from "@/log-center/log"
+import { srcPublishSuccess } from '@/http/publishApi'
+import { discordAuthUrl, checkGuildJoined } from '@/http/discordApi'
+import { discordAuthRedirectUri, faceShareRedirectUrl } from '@/http/configAPI'
+import { getFrontConfig } from "@/http/account";
+import GlobalTip from '@/view/components/global-tip.vue'
+var moment = require('moment');
+
+let discordAuthorizeRequired = false;
+let joinDiscordActionState = 'default'; //authAndJoinIng  joinIng  reAuth
+let joinDiscordIng = ref(false);
+
+let facebookAppConfig = {
+    facebookAppId: "",
+    faceShareRedirectUrl
+};
+
+let state = reactive({
+    status: '',
+    userId: '',
+    loading_show: false,
+    loading_redbag: false,
+    detail: {},
+    luck_list_end: false,
+    page_index: 1,
+    page_size: 20,
+    srcContentId: '',
+    error_txt: `oops, new accounts cannot participate in this event,`,
+    receiveAmount: 0,
+    money: 0,
+    // 状态
+    done: {
+        follow: false,
+        like: false,
+        retweet: false,
+        join_discord: false,
+        repost_facebook: false,
+        reply: false
+    },
+    notification_switch: false
+})
+
+let fullName = '';
+
+function clickRetry() {
+    init()
+}
+
+let follow_open_tabs = []
+
+async function clickLikeBtn() {
+    let _userInfo = await checkIsLogin()
+    if (!_userInfo) {
+        return
+    }
+    state.detail.finishTaskTypeV2 = state.detail.finishTaskTypeV2.toString() || ''
+    if (state.window_origin.indexOf('facebook.com') >= 0) {
+        state.detail.finishTaskTypeV2 = '2'
+    }
+    switch (state.detail.finishTaskTypeV2) {
+        case '1':
+            state.loading_show = true
+            oneKeyLike({
+                params: {
+                    tweetId: state.srcContentId
+                }
+            }).then((res) => {
+                state.loading_show = false
+                if (res.code == 0) {
+                    if (res.data.result) {
+                        state.done.like = true
+                    } else {
+                        state.done.like = false
+                        window.open(`https://twitter.com/intent/like?tweet_id=${state.tweetId}`)
+                    }
+                } else {
+                    window.open(`https://twitter.com/intent/like?tweet_id=${state.tweetId}`)
+                    state.done.like = false
+                }
+            }).catch(() => {
+                state.loading_show = false
+            })
+            break
+        case '2':
+            window.open(`https://twitter.com/intent/like?tweet_id=${state.tweetId}`)
+            break
+        case '3':
+            state.loading_show = true
+            chrome.tabs.getCurrent((tab) => {
+                chrome.tabs.sendMessage(tab.id, {
+                    actionType: "IFRAME_TWITTER_API_DO_TASK", task_data: {
+                        tweet_Id: state.tweetId
+                    }, task_type: 'like'
+                }, (res) => { console.log(res) });
+            })
+            break
+        default:
+            window.open(`https://twitter.com/intent/like?tweet_id=${state.tweetId}`)
+            break
+    }
+
+    // 埋点
+    Report.reportLog({
+        objectType: Report.objectType.like,
+        pageSource: Report.pageSource.task_page,
+        businessType: Report.businessType.buttonClick,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+function clickDone() {
+    window.open(`${chrome.runtime.getURL('/iframe/home.html')}`)
+    // 埋点
+    Report.reportLog({
+        objectType: Report.objectType.wallet_button,
+        pageSource: Report.pageSource.received_success_page,
+        businessType: Report.businessType.buttonClick,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+function handleScroll(e) {
+    if (state.luck_list_end) {
+        return
+    }
+    e = e.target
+    if ((e.clientHeight + e.scrollTop) / e.scrollHeight > .8) {
+        state.luck_list_end = true
+        state.page_index++
+        handleReceivedList()
+    }
+}
+function handleReceivedList() {
+    getReceivedList({
+        params: {
+            pageNum: state.page_index,
+            pageSize: state.page_size,
+            postId: state.postId
+        }
+    }).then((res) => {
+        if (res.code == 0) {
+            if (res.data.length > 0) {
+                state.detail.allReceived = state.detail.allReceived.concat(res.data)
+                state.luck_list_end = false
+            } else {
+                state.luck_list_end = true
+            }
+        } else {
+            console.log('getReceivedList', res)
+        }
+    })
+}
+
+const openTwitterDetail = (item) => {
+    if (item.simpleUserInfoVO.nickName) {
+        window.open(`https://twitter.com/${item.simpleUserInfoVO.nickName}`)
+    }
+}
+
+async function clickRetweetBtn() {
+    let _userInfo = await checkIsLogin()
+    if (!_userInfo) {
+        return
+    }
+
+    state.detail.finishTaskTypeV2 = state.detail.finishTaskTypeV2.toString() || ''
+    if (state.window_origin.indexOf('facebook.com') >= 0) {
+        state.detail.finishTaskTypeV2 = '2'
+    }
+    switch (state.detail.finishTaskTypeV2) {
+        case '1':
+            state.loading_show = true
+            oneKeyReTweet({
+                params: {
+                    tweetId: state.srcContentId
+                }
+            }).then((res) => {
+                state.loading_show = false
+                if (res.code == 0) {
+                    if (res.data.result) {
+                        state.done.retweet = true
+                    } else {
+                        window.open(`https://twitter.com/intent/retweet?tweet_id=${state.tweetId}`)
+                        state.done.retweet = false
+                    }
+                } else {
+                    window.open(`https://twitter.com/retweet/like?tweet_id=${state.tweetId}`)
+                    state.done.retweet = false
+                }
+            }).catch(() => {
+                state.loading_show = false
+            })
+            break;
+        case '2':
+            window.open(`https://twitter.com/intent/retweet?tweet_id=${state.tweetId}`)
+            break
+        case '3':
+            state.loading_show = true
+            chrome.tabs.getCurrent((tab) => {
+                chrome.tabs.sendMessage(tab.id, {
+                    actionType: "IFRAME_TWITTER_API_DO_TASK", task_data: {
+                        tweet_Id: state.tweetId
+                    }, task_type: 'retweet'
+                }, (res) => { console.log(res) });
+            })
+            break
+        default:
+            window.open(`https://twitter.com/intent/retweet?tweet_id=${state.tweetId}`)
+            break;
+    }
+
+    // 埋点
+    Report.reportLog({
+        objectType: Report.objectType.retweet,
+        pageSource: Report.pageSource.task_page,
+        businessType: Report.businessType.buttonClick,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+
+function onTweetReplyClick(params) {
+    let replyData = {
+        postId: state.postId,
+        type: params.type,
+        taskLuckdropId: state.detail.taskLuckdropId
+    }
+
+    window.parent.postMessage({ actionType: "IFRAME_RED_PACKET_ON_TWEET_REPLY_CLICK", data: replyData }, "*");
+}
+
+async function clickReply(params) {
+    let _userInfo = await checkIsLogin()
+    if (!_userInfo) {
+        return
+    }
+
+    let replyData = {
+        postId: state.postId,
+        type: params.type,
+        taskLuckdropId: state.detail.taskLuckdropId
+    }
+    if (state.window_origin.indexOf('facebook.com') > -1) {
+        let url = `https://twitter.com/${state.tweet_author}/status/${state.tweetId}?actionType=denetFacebookToTwitterReply&deReplyParams=${JSON.stringify(replyData)}`
+        window.open(url)
+    } else {
+        window.parent.postMessage({ actionType: "IFRAME_RED_PACKET_REPLY_CLICK", data: replyData }, "*");
+    }
+}
+
+/**
+ * 点击repost facebook
+ */
+async function clickRepostFacebook(params) {
+    let _userInfo = await checkIsLogin()
+    if (!_userInfo) {
+        return
+    }
+
+    let deUrlParams = {
+        fullName,
+        tweetId: state.tweetId
+    }
+    let href = `${state.postRedirectUrl}?deUrlParams=${JSON.stringify(deUrlParams)}`;
+    console.log(href);
+    let shareUrlparams = {
+        href,
+        type: params.type,
+        taskLuckdropId: state.detail.taskLuckdropId
+    }
+
+    setChromeStorage({
+        shareFacebookData: JSON.stringify({
+            contentStr: state.srcContent
+        })
+    })
+
+    let shareUrl = feacebookShareUrl(shareUrlparams);
+    openShareFacebookWindow({ url: shareUrl });
+}
+
+/**
+ * 分享到facebook
+ */
+function openShareFacebookWindow({ url }) {
+    const width = 800;
+    chrome.windows.create({
+        width,
+        type: 'normal',
+        url
+    }, function (window) {
+
+    })
+}
+
+/**
+ * 分享fecebook 地址
+ */
+function feacebookShareUrl(params = {}) {
+    let { href = '', type = '', taskLuckdropId } = params;
+    let cbParams = JSON.stringify({
+        type,
+        taskLuckdropId
+    })
+    let shareUrl = `https://www.facebook.com/dialog/share?app_id=${facebookAppConfig.facebookAppId}&display=popup&href=${href}&redirect_uri=${facebookAppConfig.faceShareRedirectUrl}?params=${cbParams}`;
+
+    return shareUrl;
+}
+
+/**
+ * 分享成功
+ */
+function facebookShareSuccess(params) {
+    let { taskLuckdropId } = params;
+
+    if (taskLuckdropId == state.detail.taskLuckdropId) {
+        state.done.repost_facebook = true;
+        state.done.repost_facebook_red = false;
+    }
+}
+
+
+function getValidity() {
+    let _d1, _d2, _d3, _h, _m, _s
+    if (!state.detail.myReceived.taskEndTimestamp) {
+        return
+    }
+    let timer = setInterval(() => {
+        let _time = new Date().getTime()
+        _d3 = state.detail.myReceived.taskEndTimestamp - _time
+        if (_d3 > 0) {
+            _d1 = moment(state.detail.myReceived.taskEndTimestamp)
+            _d2 = moment(_time)
+            _h = moment.duration(_d1.diff(_d2)).hours()
+            if (_h < 10) {
+                _h = '0' + _h
+            }
+            _m = moment.duration(_d1.diff(_d2)).minutes()
+            if (_m < 10) {
+                _m = '0' + _m
+            }
+            _s = moment.duration(_d1.diff(_d2)).seconds()
+            if (_s < 10) {
+                _s = '0' + _s
+            }
+            state.detail.validity = `${_h}:${_m}:${_s}`
+        } else {
+            state.detail.validity = `00:00:00`
+            clearInterval(timer)
+        }
+    }, 1000)
+}
+
+const openFollowTabs = (arr_name) => {
+    let array_finish = arr_name.filter((item) => { return !item.finished })
+    // let array_finish = state.detail.taskCondition[0].relatedUsers.filter((item) => { return item.finished == false })
+    let url
+    if (array_finish.length > 0) {
+        state.done.follow = false
+        // 打开标签页的方法
+        array_finish.forEach((item) => {
+            url = `https://twitter.com/intent/follow?screen_name=${item.name}&tweet_id=${state.tweetId}`
+            chrome.tabs.create({ url }, (tab) => {
+                if (follow_open_tabs.filter((item) => { return item.url == tab.url }).length == 0) {
+                    follow_open_tabs.push(tab)
+                }
+            })
+        })
+    }
+}
+
+async function clickFollowAll(item, is_all) {
+    let _userInfo = await checkIsLogin()
+    if (!_userInfo) {
+        return
+    }
+    let arr_name = []
+    for (let i in item) {
+        if (!item[i].finished) {
+            arr_name.push(item[i])
+        }
+    }
+    // ---- 
+    state.detail.finishTaskTypeV2 = state.detail.finishTaskTypeV2.toString() || ''
+    if (state.window_origin.indexOf('facebook.com') >= 0) {
+        state.detail.finishTaskTypeV2 = '2'
+    }
+    switch (state.detail.finishTaskTypeV2) {
+        case '1':
+            // openapi
+            state.loading_show = true
+            oneKeyFollow({
+                params: {
+                    names: arr_name
+                }
+            }).then((res) => {
+                state.loading_show = false
+                if (res.code == 0) {
+                    res.data.forEach((item1) => {
+                        state.detail.taskCondition[0].relatedUsers.forEach(item2 => {
+                            if (item1.name == item2.name && item1.finished) {
+                                item2.finished = true
+                            }
+                        });
+                    })
+                    openFollowTabs(arr_name)
+                }
+            }).catch(() => {
+                state.loading_show = false
+            })
+            break
+        case '2':
+            openFollowTabs(arr_name)
+            break
+        case '3':
+            if (arr_name.filter((item) => { return !item.twitterUserId }).length > 0) {
+                openFollowTabs(arr_name)
+                return
+            }
+            let follow_data = []
+            arr_name.forEach((item) => {
+                follow_data.push(item)
+            })
+            state.loading_show = true
+            chrome.tabs.getCurrent((tab) => {
+                chrome.tabs.sendMessage(tab.id, {
+                    actionType: "IFRAME_TWITTER_API_DO_TASK",
+                    task_data: {
+                        tweet_Id: state.tweetId,
+                        follow_data: follow_data,
+                    },
+                    task_type: 'follow'
+                }, (res) => { console.log(res) });
+            })
+
+            break
+        default:
+            openFollowTabs(arr_name)
+            break
+    }
+    // -------- 埋点 --------
+    let _log_obj = {
+        pageSource: Report.pageSource.task_page,
+        businessType: Report.businessType.buttonClick,
+        objectType: Report.objectType.follow
+    }
+    if (is_all) {
+        _log_obj.objectType = Report.objectType.follow_button
+    }
+    Report.reportLog(_log_obj, {
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+
+
+// 重新绑定
+const reSetBindTwtterId = (_params) => {
+    getChromeStorage('userInfo', (_userInfo) => {
+        if (_userInfo.uid == _params.uid) {
+            srcPublishSuccess({
+                params: {
+                    postId: state.postId,
+                    srcContentId: state.tweetId
+                }
+            }).then((res) => {
+                if (res.code == 0 || res.code == 3003) {
+                    Report.reportLog({
+                        objectType: Report.objectType.tweetPostBinded
+                    });
+                    init({ from: 'reSetBindTwtterId' })
+                }
+            })
+        }
+    })
+}
+
+const showCloseEndTimePage = () => {
+    state.status = 'close'
+    state.close_status = '红包过期了'
+    state.close_text = [`This Giveaways`, `expired on ${moment(state.detail.endTimestamp).format('MM-DD')}`]
+}
+
+const showCloseEndTimePageReport = () => {
+    // 埋点
+    Report.reportLog({
+        pageSource: Report.pageSource.expired_page,
+        businessType: Report.businessType.pageView,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+
+const showSuccessPage = () => {
+    state.status = 'success'
+    // 埋点
+    Report.reportLog({
+        pageSource: Report.pageSource.received_success_page,
+        businessType: Report.businessType.pageView,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+const showNotOpenPage = () => {
+    state.status = 'not-open'
+    Report.reportLog({
+        pageSource: Report.pageSource.pending_page,
+        businessType: Report.businessType.pageView,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+const showOpenedPage = () => {
+    state.status = 'opened'
+
+    initTaskDetail()
+}
+const showOpenedPageReport = () => {
+    // 埋点
+    Report.reportLog({
+        pageSource: Report.pageSource.task_page,
+        businessType: Report.businessType.pageView,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+
+const showRabbitPage = () => {
+    state.status = 'close'
+    state.close_status = '没有抽中'
+
+
+}
+const showRabbitPageReport = () => {
+    Report.reportLog({
+        pageSource: Report.pageSource.received_empty_rewards_page,
+        businessType: Report.businessType.pageView,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+
+const handleStatusPage = () => {
+    // status 红包状态(0:未开始,1:进行中,2:已结束,3:已终止,4:终止退款进行中)
+    // myReceived 我是否领取过
+    // taskFinishStatus 任务完成状态(0:未完成,1:已完成,2:已过期)
+    // receiveTimeExpired 是否已经过了红包的领取截止时间
+
+    // ---- 判断结构 ----
+    // 如果 红包状态 = 未开始
+    //    显示未打开页面 return
+    // 
+    // 如果 我领取过了
+    //    如果 任务完成状态 = 未完成
+    //        显示任务未完成页面
+    //    如果 任务完成状态 = 已经完成
+    //        如果 领取到红包金额 = 0
+    //            显示兔子页面
+    //        否则 
+    //            显示成功页面
+    //    如果 任务完成状态 = 已经过期
+    //        如果 红包状态 = 进行中
+    //            显示未打开页面
+    //        否则 
+    //            显示已经过期页面
+
+    // 如果 我没有领取过 & 红包状态 = 进行中
+    //    如果 过了红包的领取截止时间 = true
+    //        显示已经过期页面
+    //    如果 过了红包的领取截止时间 = false
+    //        显示未打开页面
+
+    // 如果 我没有领取过 & 红包状态 = 已结束 | 已终止 | 终止退款进行中
+    //    显示过期页面
+
+    // -------- 华丽的分割线 --------
+    // 如果 红包状态 = 未开始
+    if (state.detail.status == 0) {
+        showNotOpenPage()
+        return
+    }
+    // 如果 我领取过了
+    if (state.detail.myReceived) {
+        state.receiveAmount = state.detail.myReceived.amountValue || 0
+        state.detail.taskCondition = JSON.parse(state.detail.taskCondition)
+        // 如果 任务完成状态 = 未完成
+        if (state.detail.myReceived.taskFinishStatus == 0) {
+            // 显示任务未完成页面
+            showOpenedPage()
+            showOpenedPageReport()
+            if (state.process_mode != 'production') {
+                getValidity()
+            }
+            //如果 任务完成状态 = 已经完成
+        } else if (state.detail.myReceived.taskFinishStatus == 1) {
+            // 领取到空红包
+            if (state.receiveAmount == 0) {
+                showRabbitPage()
+                showRabbitPageReport()
+            } else {
+                // 显示成功页面
+                showSuccessPage()
+            }
+            // 如果 任务完成状态 = 已经过期
+        } else {
+            // 如果 红包状态 = 进行中
+            if (state.detail.status == 1) {
+                // 显示未打开页面
+                showNotOpenPage()
+                // 否则 
+            } else {
+                // 显示已经过期页面
+                showCloseEndTimePage()
+                showCloseEndTimePageReport()
+            }
+        }
+        // 如果 我没有领取过
+    } else {
+        // 如果 红包状态 = 进行中
+        if (state.detail.status == 1) {
+            // 如果 过了红包的领取截止时间 = true
+            if (state.detail.receiveTimeExpired) {
+                // 显示过期页面      
+                showCloseEndTimePage()
+                showCloseEndTimePageReport()
+                // 如果 过了红包的领取截止时间 = false
+            } else {
+                // 显示未打开页面
+                showNotOpenPage()
+            }
+            // 红包状态 = 已经结束了 | 已经终止 | 终止退款中
+        } else {
+            // 显示过期页面
+            showCloseEndTimePage()
+            showCloseEndTimePageReport()
+        }
+    }
+
+}
+
+function setFrontConfig() {
+    getFrontConfig({
+        params: {},
+    }).then((res) => {
+        if (res.code == 0) {
+            facebookAppConfig.facebookAppId = res.data.fbClientId;
+        }
+    });
+};
+
+function init(initParams) {
+    let { type } = initParams || {};
+    onRuntimeMsg();
+    onPageVisbile();
+    onWindowMessage();
+    setFrontConfig();
+    getPostDetail({
+        params: {
+            postId: state.postId
+        }
+    }).then((res) => {
+        state.loading_show = false
+        // 领取0元为空红包继续流程
+        // ---- 完成任务接口 ----
+        // 如果金额是0
+        //    显示没有抽中
+        if (res.code == 0) {
+            state.srcContent = res.data.srcContent;
+            state.postRedirectUrl = res.data.postRedirectUrl;
+
+            // 判断推特id,绑定逻辑
+            state.srcContentId = res.data.srcContentId
+
+            if (!state.srcContentId) {
+                reSetBindTwtterId(res.data)
+                return
+            }
+            state.detail = JSON.parse(res.data.postBizData)
+            state.detail.taskCondition = state.detail.taskCondition || []
+            state.tweetId = state.srcContentId;
+            state.userId = res.data.srcUserId;
+            state.tweet_author = state.detail.postUserInfo && state.detail.postUserInfo.nickName || '';
+            // 不要删除这个console
+            console.log('postBizData', state.detail)
+            checkFacebookReply();
+            handleStatusPage()
+        } else {
+            handleErrorCode(res)
+        }
+    }).finally(() => {
+        state.loading_redbag = false
+    })
+}
+
+function initTaskDetail() {
+    getChromeStorage('userInfo', (_userInfo) => {
+        if (_userInfo.uid) {
+            // 任务详情
+            getTaskDetail({
+                params: {
+                    postId: state.postId
+                }
+            }).then((res) => {
+                if (res.code.toString()) {
+                    for (let i in res.data) {
+                        switch (res.data[i].type) {
+                            case 1:
+                                state.done.follow = res.data[i].finished
+                                state.detail.taskCondition[0].relatedUsers = res.data[i].detail
+                                break
+                            case 2:
+                                state.done.like = res.data[i].finished
+                                break
+                            case 3:
+                                state.done.retweet = res.data[i].finished
+                                break
+                            case 7:
+                                state.done.join_discord = res.data[i].finished
+                                discordAuthorizeRequired = res.data[i].discordAuthorizeRequired
+                                break
+                            case 8:
+                                state.done.repost_facebook = res.data[i].finished;
+                                break;
+                            case 9:
+                                state.done.reply = res.data[i].finished;
+                                if (!state.done.reply) {
+                                    onTweetReplyClick({ type: 9 });
+                                }
+                                break;
+                        }
+                    }
+                } else {
+                    handleErrorCode(res)
+                }
+            })
+        }
+    })
+}
+
+let tab_index = 0
+const doTaskReport = (req, sender) => {
+    state.loading_show = false
+    let follow_name = req.task_data.follow_name || ''
+    // 1 Twitter follow Twitter ScreenName
+    // 2 Tweet like
+    // 3 Retweet
+    let event_type = 0
+    switch (req.task_type) {
+        case 'retweet':
+            event_type = 3
+            state.done.retweet = req.task_done
+            if (!req.task_done && req.do_type == 'api') {
+                window.open(`https://twitter.com/intent/retweet?tweet_id=${state.tweetId}`)
+            }
+            break;
+        case 'like':
+            event_type = 2
+            state.done.like = req.task_done
+            // 
+            if (!req.task_done && req.do_type == 'api') {
+                window.open(`https://twitter.com/intent/like?tweet_id=${state.tweetId}`)
+            }
+            break
+        case 'follow':
+            event_type = 1
+            // for (let i = 0; i < follow_open_tabs.length; i++) {
+            //   if (follow_open_tabs[i].id == sender.tab.id) {
+            //     follow_open_tabs.splice(i, 1)
+            //     break
+            //   }
+            // }
+            // chrome.tabs.getCurrent((tab) => {
+            //   if (follow_open_tabs.length > 0) {
+            //     tab_index = follow_open_tabs[follow_open_tabs.length - 1].index
+            //   } else {
+            //     tab_index = tab.index
+            //   }
+            //   chrome.tabs.highlight({ windowId: tab.windowId, tabs: tab_index })
+            // })
+            let has_no_finished = false
+            state.detail.taskCondition[0].relatedUsers.forEach((item) => {
+                if (follow_name == item.name) {
+                    item.finished = req.task_done
+                }
+            })
+            state.detail.taskCondition[0].relatedUsers.forEach((item) => {
+                if (!item.finished) {
+                    has_no_finished = true
+                }
+            })
+            if (!has_no_finished) {
+                state.done.follow = true
+                state.done.follow_red = false
+                openFollowTabs(state.detail.taskCondition[0].relatedUsers)
+            }
+            break
+    }
+    if (req.do_type != 'api') {
+        chrome.tabs.remove(sender.tab.id)
+    }
+    if (req.task_done) {
+        addFinishEvent({
+            params: {
+                eventData: follow_name,
+                eventType: event_type,
+                luckdropId: state.detail.taskLuckdropId
+            }
+        })
+    }
+}
+
+// 倒计时开奖
+const open_timer = () => {
+    let new_time
+    let open_time
+    let timer = setInterval(() => {
+        new_time = new Date().getTime()
+        // 到时间了
+        if (new_time >= open_time) {
+            // 调用detail 查看结果
+            clearInterval(timer)
+        }
+    })
+}
+
+onMounted(() => {
+    state.process_mode = process.env.NODE_ENV
+    state.postId = getQueryString('postId')
+    state.window_origin = getQueryString('window_origin') || '';
+    if (state.window_origin.indexOf('twitter.com') > -1) {
+        state.tweetId = getQueryString('tweetId')
+        state.tweet_author = getQueryString('tweet_author');
+    }
+
+    getTweetAuthor();
+
+    //   init()
+    // state.loading_show = true
+    // state.status = 'success'
+    state.status = 'close'
+    // state.close_status = '等待结果'
+    state.close_status = '没有抽中'
+    // state.close_status = '已过期'
+
+})
+
+function getTweetAuthor() {
+    if (state.window_origin.indexOf('twitter.com') > -1) {
+        window.parent.postMessage({
+            actionType: "IFRAME_RED_PACKET_GET_TWEET_AUTHOR", data: {
+                postId: state.postId,
+                taskLuckdropId: state.detail.taskLuckdropId
+            }
+        }, "*");
+    }
+}
+
+function checkFacebookReply() {
+    console.log('checkFacebookReply')
+    if (state.window_origin.indexOf('twitter.com') > -1) {
+        window.parent.postMessage({
+            actionType: "IFRAME_RED_PACKET_CHECK_FACEBOOK_REPLY", data: {
+                postId: state.postId
+            }
+        }, "*");
+    }
+}
+
+// 点击领取
+function clickOpenRedPacket() {
+    callEventPageMethod('CONTENT_GET_PINED', {})
+    handleRedPacket()
+}
+
+function handleRedPacket() {
+    state.loading_show = true
+    getRedPacket({
+        params: {
+            postId: state.postId
+        }
+    }).then((res) => {
+        state.loading_show = false
+        if (res.code == 0) {
+            showOpenedPage()
+            init()
+        } else {
+            handleErrorCode(res)
+        }
+    }).catch(() => {
+        state.loading_show = false
+    })
+    // 埋点
+    Report.reportLog({
+        pageSource: Report.pageSource.pending_page,
+        businessType: Report.businessType.buttonClick,
+        objectType: Report.objectType.open_button,
+        postId: state.postId,
+        srcContentId: state.tweetId,
+        senderId: state.userId,
+    });
+}
+
+chrome.storage.onChanged.addListener(changes => {
+    if (changes.userInfo) {
+        // let item = JSON.parse(changes.userInfo.newValue)
+        state.loading_show = false
+        init()
+    }
+})
+
+// 校验是否封路
+function checkIsLogin() {
+
+    return new Promise((resolve) => {
+        getChromeStorage('userInfo', (_userInfo) => {
+            if (!_userInfo) {
+                state.loading_show = true
+                setTimeout(() => {
+                    state.loading_show = false
+                }, 3000)
+                chrome.runtime.sendMessage(
+                    { actionType: "POPUP_LOGIN", data: "" },
+                    (response) => {
+                        console.log("res", response);
+                    }
+                )
+                resolve(_userInfo)
+            } else {
+                resolve(_userInfo)
+            }
+        })
+    })
+}
+
+async function clickGetGiveaways() {
+    let _userInfo = await checkIsLogin()
+    if (_userInfo) {
+        handleFinishRedPacket()
+    }
+}
+
+function handleFinishRedPacket() {
+    state.loading_show = true
+    finishRedPacket({
+        params: {
+            postId: state.postId
+        }
+    }).then((res) => {
+        state.loading_show = false
+        if (res.code == 0) {
+            if (res.data.finished) {
+                state.receiveAmount = res.data.receiveAmount
+                if (state.receiveAmount == 0) {
+                    showRabbitPage()
+                } else {
+                    state.status = 'success'
+                }
+                init()
+                // 埋点
+                Report.reportLog({
+                    pageSource: Report.pageSource.task_page,
+                    businessType: Report.businessType.buttonClick,
+                    objectType: Report.objectType.get_giveaway,
+                    postId: state.postId,
+                    srcContentId: state.tweetId,
+                    senderId: state.userId,
+                }, {
+                    get_giveaway_result: Report.extParams.success
+                });
+            } else {
+                let _data = res.data.conditionResult
+                for (let i in _data) {
+                    switch (_data[i].type.toString()) {
+                        case '1':
+                            state.detail.taskCondition[0].relatedUsers = _data[i].detail
+                            if (_data[i].finished) {
+                                state.done.follow = true
+                                state.done.follow_red = false
+                            } else {
+                                // alert('Please complete the task: follow')
+                                state.done.follow = false
+                                state.done.follow_red = true
+                            }
+                            break
+                        case '2':
+                            if (_data[i].finished) {
+                                state.done.like = true
+                                state.done.like_red = false
+                            } else {
+                                // alert('Please complete the task: like tweet')
+                                state.done.like = false
+                                state.done.like_red = true
+                            }
+                            break
+                        case '3':
+                            if (_data[i].finished) {
+                                state.done.retweet = true
+                                state.done.retweet_red = false
+                            } else {
+                                // alert('Please complete the task: Retweet')
+                                state.done.retweet_red = true
+                                state.done.retweet = false
+                            }
+                            break
+                        case '7':
+                            //join discord
+                            discordAuthorizeRequired = _data[i].discordAuthorizeRequired;
+                            if (_data[i].finished) {
+                                state.done.join_discord = true
+                                state.done.join_discord_red = false
+                            } else {
+                                state.done.join_discord = false;
+                                state.done.join_discord_red = true
+                            }
+                            break
+                        case '8':
+                            //repost feacebook
+                            if (_data[i].finished) {
+                                state.done.repost_facebook = true
+                                state.done.repost_facebook_red = false
+                            } else {
+                                state.done.repost_facebook = false;
+                                state.done.repost_facebook_red = true
+                            }
+                            break
+                        case '9':
+                            //reply
+                            if (_data[i].finished) {
+                                state.done.reply = true
+                                state.done.reply_red = false
+                            } else {
+                                state.done.reply = false;
+                                state.done.reply_red = true
+                            }
+                            break
+                    }
+                }
+                // 埋点
+                Report.reportLog({
+                    pageSource: Report.pageSource.task_page,
+                    businessType: Report.businessType.buttonClick,
+                    objectType: Report.objectType.get_giveaway,
+                    postId: state.postId,
+                    srcContentId: state.tweetId,
+                    senderId: state.userId,
+                }, {
+                    get_giveaway_result: Report.extParams.failure,
+                });
+                if (discordAuthorizeRequired) {
+                    discordAuth('reAuth');
+                }
+            }
+        } else {
+            // 埋点
+            Report.reportLog({
+                pageSource: Report.pageSource.task_page,
+                businessType: Report.businessType.buttonClick,
+                objectType: Report.objectType.get_giveaway,
+                postId: state.postId,
+                srcContentId: state.tweetId,
+                senderId: state.userId,
+            }, {
+                get_giveaway_result: Report.extParams.failure,
+            });
+            handleErrorCode(res)
+        }
+    }).catch(() => {
+        state.loading_show = false
+    })
+}
+
+
+function handleErrorCode(res) {
+    switch (res.code.toString()) {
+        // 数据异常,请联系管理员
+        case '-102':
+
+            break
+        //系统错误
+        case '-101':
+
+            break
+
+        // 参数不对
+        case '-103':
+            break
+        // 接口被限流
+        case '-105':
+            break
+
+        // 访问凭证不存在
+        case '-107':
+            break
+        // 重复操作过于频繁
+        case '-106':
+            message.error('Clicking too often, wait a moment and click again')
+            state.loading_show = false
+            break
+        // 红包不存在
+        case '2001':
+            // message.error(res.msg)
+            break
+        // 还未到红包领取时间
+        case '2002':
+            // message.error(res.msg)
+            break
+        // 已超过红包领取时间
+        case '2003':
+            init()
+            break
+        // 红包支付状态异常 没有可提交的任务红包
+        case '2004':
+            init()
+            break
+        // 红包活动已结束
+        case '2006':
+            init()
+            break
+        // 红包金额已经被领取完了
+        case '2007':
+            state.status = 'close'
+            state.close_status = '红包过期了'
+            state.close_text = [`This Giveaways`, `expired on ${moment(state.detail.endTimestamp).format('MM-DD')}`]
+            init()
+            break
+        // 红包个数已经被领取完了
+        case '2008':
+            state.status = 'close'
+            state.close_status = '红包过期了'
+            state.close_text = [`This Giveaways`, `expired on ${moment(state.detail.endTimestamp).format('MM-DD')}`]
+            init()
+            break
+        // 该用户不满足领取条件
+        case '2009':
+            state.error_txt = [`oops, new accounts cannot participate in this event,`]
+            state.status = 'error'
+            state.retry = true
+            // 埋点
+            Report.reportLog({
+                pageSource: Report.pageSource.robot_detection_failed_page,
+                businessType: Report.businessType.pageView,
+                postId: state.postId,
+                srcContentId: state.tweetId,
+                senderId: state.userId,
+            });
+            break
+        // 无法校验用户Twitter信息
+        case '2010':
+            // message.error(res.msg)
+            break
+        // 用户已经领过该红包
+        case '2011':
+            // message.error(res.msg)
+            break
+        // 推文不存在
+        case '2022':
+            // message.error(res.msg)
+            break
+        // 推文未发布 and 不是红包任务的推文
+        case '2023':
+            // message.error(res.msg)
+            break
+        // 没有可提交的任务红包
+        case '2024':
+            state.status = 'not-open'
+            break
+        // 红包任务已完成
+        case '2025':
+            break
+        // 任务已经过期
+        case '2026':
+            break
+        // 任务未完成
+        case '2027':
+            break
+        // 红包金额每人不足1分钱
+        case '2028':
+            break
+        // 推文未发布
+        case '2029':
+            message.error('Tweet not posted')
+            break
+        // 不是红包任务的推文
+        case '2030':
+            break
+        case '2037':
+            showCloseEndTimePage()
+            init()
+            break
+        //用户没有领取过红包,无法重抽
+        case '2031':
+            break
+        // 需要重新授权 discord
+        case '1010':
+            discordAuth('reAuth');
+            break
+    }
+}
+
+// function clickBack() {
+//   state.status = 'opened'
+//   // 埋点
+//   Report.reportLog({
+//     pageSource: Report.pageSource.task_page,
+//     businessType: Report.businessType.pageView,
+//   });
+// }
+
+// function clickRoad() {
+//   state.status = 'luck-peopel-list'
+//   // 埋点
+//   Report.reportLog({
+//     pageSource: Report.pageSource.task_page,
+//     businessType: Report.businessType.buttonClick,
+//     objectType: Report.objectType.received_list
+//   });
+//   // 埋点
+//   Report.reportLog({
+//     pageSource: Report.pageSource.received_list_page,
+//     businessType: Report.businessType.pageView
+//   });
+// }
+function onWindowMessage() {
+    window.addEventListener("message", function (event) {
+        if (event.data) {
+            switch (event.data.actionType) {
+                case 'CONTENT_RED_PACKET_REPLY_RASK_FINSH':
+                    state.done.reply = true;
+                    state.done.reply_red = false;
+                    break;
+                case 'CONTENT_RED_PACKET_GET_TWEET_AUTHOR':
+                    fullName = event.data.data.fullName
+                    break;
+                case 'CONTENT_RED_PACKET_FACEBOOK_REPLY':
+                    clickReply(event.data.data)
+                    break;
+            }
+        }
+    });
+}
+
+function onPageVisbile() {
+    document.addEventListener('visibilitychange', function () {
+        let isHidden = document.hidden;
+        if (!isHidden) {
+            checkJoinDiscord();
+        }
+    });
+}
+
+function onRuntimeMsg() {
+    chrome.runtime.onMessage.addListener((req, sender, sendResponse) => {
+        sendResponse('');
+        switch (req.actionType) {
+            case 'BACK_DISCORD_LOGIN_SUCCESS':
+                discordLoginSuccess();
+                break;
+            case 'BG_FACEBOOK_SHARE_SUCCESS':
+                facebookShareSuccess(req.data);
+                break;
+            case 'DO_TASK':
+                if (!req.task_type || state.tweetId != req.tweet_Id) {
+                    return
+                }
+                state.loading_show = false
+                doTaskReport(req, sender);
+                break;
+            case 'CONTENT_RED_PACKET_REPLY_RASK_FINSH':
+                if (req.data && req.data.postId == state.postId) {
+                    state.done.reply = true;
+                    state.done.reply_red = false;
+                }
+                break;
+        }
+    })
+}
+
+/**
+ * 检查是否加入discord
+ */
+function checkJoinDiscord() {
+    // 如果上次的状态是 joinIng 检查是否真正join
+    if (joinDiscordActionState == 'joinIng') {
+        joinDiscordActionState = 'default';
+        let url = getInviteUrl();
+        if (url) {
+            joinDiscordIng.value = true;
+            checkGuildJoinedStatus({ url }, (res = {}) => {
+                joinDiscordIng.value = false;
+                if (res.code == 0) {
+                    let { joined } = res.data || {};
+                    if (joined) {
+                        state.done.join_discord = true;
+                    } else {
+                        state.done.join_discord = false;
+                    }
+                } else if (res.code == 1010) {
+                    discordAuth('reAuth');
+                }
+            })
+        }
+    }
+}
+
+
+const checkGuildJoinedStatus = ({ url }, cb) => {
+    checkGuildJoined({
+        params: {
+            inviteUrl: url
+        }
+    }).then(res => {
+        cb && cb(res);
+    }).catch(err => {
+        cb && cb({ catch: true })
+    })
+}
+
+/**
+ * 加入discord 事件
+ */
+async function joinDiscord() {
+    let _userInfo = await checkIsLogin();
+    if (!_userInfo) {
+        return
+    }
+    if (joinDiscordIng.value) {
+        return;
+    }
+    let url = getInviteUrl();
+    if (url) {
+        joinDiscordIng.value = true;
+        checkGuildJoinedStatus({ url }, (res) => {
+            setTimeout(() => {
+                joinDiscordIng.value = false;
+            }, 1500);
+            if (res.code == 0) {
+                let { joined } = res.data || {};
+                if (joined) {
+                    state.done.join_discord = true;
+                } else {
+                    state.done.join_discord = false;
+                    if (discordAuthorizeRequired) {
+                        discordAuth('authAndJoinIng');
+                    } else {
+                        openInviteUrl();
+                    }
+                }
+            } else if (res.code == 1010) {
+                discordAuth('authAndJoinIng');
+            }
+            if (res.catch) {
+                //判断是否需要授权
+                if (discordAuthorizeRequired) {
+                    discordAuth('authAndJoinIng');
+                } else {
+                    openInviteUrl();
+                }
+            }
+        })
+    }
+}
+
+/**
+ * discord授权
+ */
+function discordAuth(actionState = 'default') {
+    let state = guid();
+    discordAuthUrl({
+        params: {
+            redirectUrl: discordAuthRedirectUri,
+            state
+        }
+    }).then(res => {
+        if (res.code == 0) {
+            let { authorizeUrl = '' } = res.data || {};
+            if (authorizeUrl) {
+                joinDiscordActionState = actionState;
+                const width = 500;
+                chrome.windows.create({
+                    width,
+                    type: 'normal',
+                    url: authorizeUrl
+                }, function (window) {
+                    let windowId = window.id;
+                    callEventPageMethod("RED_PACKET_SAVE_DISCORD_AUTH_WINDOW_ID", {
+                        windowId: windowId
+                    }, function (response) {
+                    });
+                })
+            }
+        }
+    })
+}
+
+/**
+ * sendMessage
+ */
+const callEventPageMethod = (actionType, data, callback) => {
+    chrome.runtime.sendMessage(
+        {
+            actionType: actionType,
+            data: data
+        },
+        function (response) {
+            if (typeof callback === "function") callback(response);
+        }
+    );
+};
+
+/**
+ * discord 授权成功
+ */
+function discordLoginSuccess() {
+    console.log('discordloginSuccess');
+    // 如果是授权并join 默认打开 邀请链接
+    if (joinDiscordActionState == 'authAndJoinIng') {
+        openInviteUrl();
+    }
+    if (discordAuthorizeRequired) {
+        discordAuthorizeRequired = false;
+    }
+}
+
+/**
+ * 获取discord邀请链接
+ */
+function getInviteUrl() {
+    let inviteData = state.detail.taskCondition.find(item => {
+        return item.type == 7;
+    });
+    let url;
+    if (inviteData && inviteData.bizData) {
+        url = JSON.parse(inviteData.bizData).inviteUrl;
+    }
+    return url;
+}
+
+/**
+ * 打开邀请discord链接
+ */
+function openInviteUrl() {
+    joinDiscordActionState = 'joinIng';
+    let url = getInviteUrl();
+    if (url) {
+        if (!url.startsWith('http')) {
+            url = 'https://' + url;
+        }
+        window.open(url);
+    }
+}
+
+</script>
+ 
+<style lang="scss" scoped>
+html,
+body {
+    margin: 0;
+    padding: 0;
+    width: 375px;
+    height: 500px;
+    background-color: unset !important;
+}
+
+.content {
+    position: relative;
+    width: 375px;
+    height: 500px;
+    background: #fafafa;
+    border-radius: 11px;
+    overflow: hidden;
+    box-sizing: border-box;
+    border: 1px solid #DCDCDC;
+    font-family: "SF Pro Display";
+    font-style: normal;
+
+    .loading {
+        background: #FFFFFF;
+        opacity: 0.8;
+        z-index: 222;
+        text-align: center;
+        width: 375px;
+        height: 500px;
+        position: fixed;
+        top: 0;
+        left: 0;
+
+        img {
+            margin-top: 216px;
+            width: 70px;
+            height: 70px;
+        }
+    }
+
+    .redbag {
+        z-index: 222;
+        text-align: center;
+        width: 375px;
+        height: 500px;
+        position: fixed;
+        top: 0;
+        left: 0;
+
+        img {
+            margin-top: 172px;
+            width: 130px;
+            height: 130px;
+        }
+    }
+
+    .error {
+        width: 100%;
+        height: 100%;
+        text-align: center;
+        position: relative;
+
+        img {
+            width: 100px;
+            height: 100px;
+            margin-top: 100px;
+        }
+
+        .txt {
+            font-weight: 500;
+            font-size: 22px;
+            line-height: 26px;
+            text-align: center;
+            letter-spacing: 0.3px;
+            color: #a8a8a8;
+            margin: 34px 44px 0 44px;
+        }
+
+        .retry {
+            position: absolute;
+            bottom: 30px;
+            left: 50%;
+            margin-left: -167.5px;
+            width: 335px;
+            height: 46px;
+            line-height: 46px;
+            text-align: center;
+            border-radius: 100px;
+            border: 1px solid #1D9BF0;
+            background: rgba(196, 196, 196, 0.01);
+            color: #1D9BF0;
+            font-size: 16px;
+            font-weight: 500;
+            cursor: pointer;
+        }
+    }
+
+    .success,
+    .close,
+    .luck-peopel-list {
+        filter: drop-shadow(0px 4px 94px rgba(0, 0, 0, 0.3));
+        width: 100%;
+        height: 100%;
+        border-radius: 11px;
+        background: #fff;
+        overflow: hidden;
+        display: flex;
+        flex-direction: column;
+
+        .close-title {
+            width: 100%;
+            font-weight: 600;
+            font-size: 27px;
+            line-height: 32px;
+            text-align: center;
+            letter-spacing: 0.3px;
+
+            color: #ffffff;
+        }
+
+        .head {
+            padding: 14px 16px;
+
+            img {
+                cursor: pointer;
+                width: 24px;
+                height: 24px;
+            }
+        }
+
+        .header {
+            text-align: center;
+            min-height: 160px;
+            width: 100%;
+            background: #fff;
+            // padding-top: 30px;
+            background-size: 100% 100%;
+            position: relative;
+            display: flex;
+            align-content: center;
+            flex-wrap: wrap;
+
+            .rabbit {
+                width: 100%;
+                height: 100%;
+                display: flex;
+                align-items: center;
+                align-content: center;
+                flex-wrap: wrap;
+                justify-content: center;
+
+                img {
+                    width: 150px;
+                    height: 80px;
+                    margin-bottom: 6px;
+                }
+
+                .flower {
+                    width: 62px;
+                    height: 62px;
+                }
+
+                p {
+                    width: 100%;
+                    margin: 0;
+                    padding: 0;
+                    font-size: 22px;
+                    font-weight: 800;
+
+                    color: #fff;
+                    text-align: center;
+                    letter-spacing: 0.3px;
+                }
+            }
+
+            .done {
+                cursor: pointer;
+                position: absolute;
+                top: 107px;
+                left: 50%;
+                margin-left: -150px;
+                width: 300px;
+                height: 60px;
+                display: flex;
+                align-items: center;
+                border-radius: 100px;
+                background: #ffffff;
+                box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
+                justify-content: center;
+
+                span {
+                    color: #000000;
+                    font-size: 14px;
+                }
+
+                .icon-done {
+                    width: 24px;
+                    height: 24px;
+                    margin-right: 10px;
+                }
+
+                .icon-right {
+                    margin-left: 5px;
+                    width: 7px;
+                    height: 14px;
+                }
+            }
+
+            .title {
+                margin-top: 30px;
+                color: #fff7e4;
+                opacity: 0.6;
+
+                font-weight: 700;
+                font-size: 18px;
+                line-height: 21px;
+                letter-spacing: -0.3px;
+            }
+
+            .money {
+                margin-bottom: 30px;
+                width: 100%;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+
+                img {
+                    width: 40px;
+                    height: 40px;
+                    margin-right: 9px;
+                    border-radius: 50%;
+                    border: solid 2px #fff;
+                }
+
+                .big {
+                    font-weight: 700;
+                    font-size: 46px;
+                    line-height: 55px;
+                    /* identical to box height */
+
+                    letter-spacing: 0.3px;
+
+                    color: #fff;
+                }
+
+                .small {
+                    margin-left: 4px;
+
+                    font-weight: 700;
+                    font-size: 13px;
+                    line-height: 16px;
+                    /* identical to box height */
+
+                    letter-spacing: 0.5px;
+
+                    color: #fff;
+                }
+            }
+        }
+
+        .luck-list-title {
+            /*      margin-top: 47px;*/
+            margin: 0 16px;
+            padding: 14px 0 11px 0;
+            background: #fff;
+            display: flex;
+            justify-content: space-between;
+            color: #B0B0B0;
+            font-weight: 500;
+            border-bottom: 1px solid #F2F2F2;
+
+            div:last-child {
+                text-align: right;
+            }
+
+            .text {
+                cursor: pointer;
+            }
+        }
+
+        .luck-list {
+            background: #fff;
+            overflow: auto;
+
+            &.max {
+                height: 250px;
+            }
+
+            .empty {
+                width: 100%;
+                height: 100%;
+                text-align: center;
+
+                img {
+                    margin-top: 70px;
+                    width: 100px;
+                    height: 100px;
+                }
+            }
+
+            .luck-item {
+                display: flex;
+                padding: 10px 0;
+                margin: 0 16px;
+                border-bottom: 1px solid #F2F2F2;
+                justify-content: space-between;
+                position: relative;
+
+                img:first-child {
+                    border-radius: 50%;
+                }
+
+                .luck-king {
+                    position: absolute;
+                    top: 36px;
+                    right: 0px;
+                    display: flex;
+                    align-items: center;
+
+                    img {
+                        width: 22px;
+                        height: 19px;
+                        margin: 0;
+                    }
+
+                    span {
+                        font-weight: 500;
+                        font-size: 12px;
+                        line-height: 14px;
+                        letter-spacing: 0.3px;
+                        color: #f5b945;
+                    }
+                }
+
+                img {
+                    cursor: pointer;
+                    width: 42px;
+                    height: 42px;
+                    margin-right: 12px;
+                }
+
+                .luck-content {
+                    flex: auto;
+
+                    .luck-title {
+                        color: #444444;
+                        font-weight: 500;
+                        font-size: 16px;
+                        letter-spacing: 0.3px;
+                        margin-bottom: 5px;
+                    }
+
+                    .luck-time {
+                        font-weight: 400;
+                        font-size: 12px;
+                        line-height: 14px;
+                        color: #B0B0B0;
+                    }
+                }
+
+                .luck-money {
+                    display: flex;
+                    height: 17px;
+                    align-items: center;
+                    height: 100%;
+
+                    img {
+                        width: 14px;
+                        height: 14px;
+                        margin-right: 6px;
+                    }
+
+                    .luck-money-txt {
+                        font-weight: 500;
+                        font-size: 14px;
+                        word-break: break-all;
+                        /* identical to box height */
+
+                        text-align: right;
+                        letter-spacing: 0.3px;
+
+                        color: #444444;
+                    }
+                }
+            }
+
+            .luck-item:last-child {
+                border: 0;
+            }
+        }
+
+
+    }
+
+    .close {
+        position: relative;
+
+        .load-result {
+            position: absolute;
+            width: 100%;
+            height: 100%;
+            top: 0;
+            left: 0;
+            text-align: center;
+            display: flex;
+            flex-wrap: wrap;
+            justify-content: center;
+            align-content: flex-start;
+
+            .title {
+                width: 100%;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                margin-top: 36px;
+
+                img {
+                    width: 26px;
+                    height: 26px;
+                    margin-right: 10px;
+                }
+
+                span {
+                    color: #FFFFFF;
+                    font-size: 18px;
+                    font-weight: 800;
+                    letter-spacing: 0.3px;
+
+                }
+            }
+
+            .ticket {
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                width: 100%;
+                height: 163px;
+
+                img {
+                    width: 250px;
+                    height: 103px;
+                    animation: myfirst 0.5s;
+                }
+
+            }
+
+            .div-ticket {
+                position: relative;
+                overflow: hidden;
+                transition-delay: 1s;
+            }
+
+            .div-ticket:after {
+                position: absolute;
+                right: -100%;
+                /*改变left的值,让其相对box影藏*/
+                top: 0;
+                width: 30%;
+                height: 100%;
+                content: "";
+                /* Safari 5.1 - 6.0 */
+                background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .3) 50%, rgba(255, 255, 255, 0) 100%);
+                /* Opera 11.1 - 12.0 */
+                background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .3) 50%, rgba(255, 255, 255, 0) 100%);
+                /* Firefox 3.6 - 15 */
+                background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .3) 50%, rgba(255, 255, 255, 0) 100%);
+                /* 标准的语法 */
+                background: linear-gradient(to right, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .3) 50%, rgba(255, 255, 255, 0) 100%);
+                transform: skewX(45deg);
+                animation: div_light 1s;
+                animation-delay: 0.5s;
+            }
+
+            // .div-ticket:hover:after {
+            //     right: 150%;
+            //     transition: 1s ease;
+            // }
+
+            p {
+                width: 100%;
+                margin: 0;
+                padding: 0;
+                color: #FCAB40;
+                text-align: center;
+                letter-spacing: 0.3px;
+                font-size: 18px;
+                font-weight: 700;
+
+            }
+
+            .time {
+                width: 100%;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                margin-top: 16px;
+
+                img {
+                    width: 22px;
+                    height: 22px;
+                    margin-right: 10px;
+                }
+
+                span {
+                    font-weight: 800;
+                    font-size: 28px;
+                    color: #3F3F3F;
+                }
+            }
+
+            .get_more {
+                margin-top: 58px;
+                width: 240px;
+                height: 54px;
+                background: #FFFFFF;
+                border: 1px solid #E8E8E8;
+                border-radius: 100px;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                cursor: pointer;
+
+                img {
+                    margin-right: 8px;
+                }
+            }
+
+            .notification_switch {
+                border-top: 1px solid #EFEFEF;
+                justify-content: space-between;
+                position: absolute;
+                height: 48px;
+                width: 100%;
+                display: flex;
+                align-items: center;
+                bottom: 0;
+                padding: 0 22px 0 16px;
+
+            }
+        }
+    }
+
+
+
+    .success {
+        .header {
+
+            min-height: 180px;
+            align-content: flex-start;
+
+            .success-title {
+                color: #FFFFFF;
+                font-weight: 800;
+                font-size: 21px;
+                line-height: 27px;
+                margin-top: 28px;
+                text-align: center;
+                width: 100%;
+            }
+
+            .done {
+                top: 130px;
+            }
+        }
+
+        .luck-list-title {
+            margin-top: 10px;
+            border-bottom: 1px solid #ECECEC;
+        }
+    }
+
+    .opened {
+        filter: drop-shadow(0px 4px 94px rgba(0, 0, 0, 0.3));
+        width: 100%;
+        height: 100%;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+        border-radius: 11px;
+        overflow: hidden;
+
+        .header {
+            text-align: center;
+            min-height: 110px;
+            width: 100%;
+            background: #fff;
+            // padding-top: 30px;
+            background-size: 100% 100%;
+            display: flex;
+            flex-wrap: wrap;
+            align-content: center;
+            justify-content: center;
+
+            img {
+                width: 52px;
+                height: 52px;
+                margin-right: 14px;
+            }
+
+            .txt {
+                color: #FFFFFF;
+                font-weight: 700;
+                font-size: 18px;
+                letter-spacing: 0.3px;
+
+                p {
+                    margin: 0;
+                    padding: 0;
+                    text-align: left;
+                }
+            }
+        }
+
+        .list {
+            overflow-y: auto;
+            padding: 0 16px 0 16px;
+            background: #ffffff;
+            flex: 1;
+
+            .item {
+                display: flex;
+                align-items: center;
+                // min-height: 50px;
+                border-bottom: 1px solid #f0f0f0;
+                padding: 12px 0;
+                box-sizing: border-box;
+
+                img {
+                    width: 24px;
+                    height: 24px;
+                }
+
+                .red-right {
+                    width: 35px;
+                    height: 24px;
+                }
+
+                .item-content {
+                    width: 100%;
+                    flex: 1;
+
+
+                    .item-follow-title {
+                        display: flex;
+                        align-items: center;
+                        margin-top: 20px;
+                        margin-bottom: 11px;
+                        position: relative;
+
+                        .btn {
+                            // position: absolute;
+                            // right: 0;
+                        }
+                    }
+
+                    .item-title {
+                        flex: 1;
+                        margin-left: 10px;
+                        font-weight: 500;
+                        font-size: 15px;
+                        letter-spacing: 0.3px;
+                        color: #000000;
+                    }
+
+                    .item-follow-area {
+                        display: flex;
+                        flex-wrap: wrap;
+
+                        .item-follow {
+                            cursor: pointer;
+                            border: 1px solid #ebebeb;
+                            border-radius: 1000px;
+                            height: 26px;
+                            margin-right: 5px;
+                            margin-bottom: 5px;
+                            display: flex;
+                            align-items: center;
+
+                            .finished {
+                                text-decoration: line-through;
+                                color: #949494;
+                            }
+
+                            span {
+                                margin-left: 8px;
+                                margin-right: 2px;
+                                color: #1D9BF0;
+                                opacity: 1;
+                            }
+
+                            img {
+                                width: 16px;
+                                height: 16px;
+                                margin-right: 7px;
+                            }
+                        }
+                    }
+
+                    span {
+                        font-weight: 400;
+                        font-size: 11px;
+                        line-height: 13px;
+                        letter-spacing: 0.3px;
+
+                        color: #000000;
+
+                        opacity: 0.4;
+                    }
+                }
+
+                .btn {
+                    width: 90px;
+                    height: 29px;
+                    line-height: 29px;
+                    background: rgba(56, 154, 255, 0.1);
+                    border-radius: 500px;
+                    text-align: center;
+                    letter-spacing: 0.3px;
+                    color: #1D9BF0;
+                    cursor: pointer;
+                }
+
+                .loading-wrapper {
+                    width: 90px;
+                    text-align: center;
+
+                    .icon-loading {
+                        animation: loading 1s infinite linear;
+                    }
+                }
+            }
+        }
+
+        .people {
+            cursor: pointer;
+            padding-left: 16px;
+            height: 38px;
+            line-height: 38px;
+            background: #fff;
+            box-shadow: 0px 1px 0px #f2f2f2;
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+
+            .txt {
+                width: 90%;
+                font-weight: 400;
+                font-size: 12px;
+                line-height: 14px;
+                letter-spacing: 0.3px;
+                color: #000000;
+                opacity: 0.4;
+            }
+
+
+        }
+
+        .footer {
+            background: #ffffff;
+            display: flex;
+            padding: 15px 22px 15px 17px;
+
+            .btn {
+                background: #1D9BF0;
+                border-radius: 100px;
+                color: #fff;
+                width: 100%;
+                height: 48px;
+                font-weight: 600;
+                font-size: 18px;
+                line-height: 48px;
+                text-align: center;
+                cursor: pointer;
+            }
+
+            .grey {
+                background: #DDDDDD;
+                cursor: auto;
+            }
+        }
+    }
+
+    .not-open {
+        width: 100%;
+        height: 100%;
+        filter: drop-shadow(0px 2px 20px rgba(0, 0, 0, 0.1));
+        position: relative;
+        overflow: hidden;
+        border-radius: 11px;
+
+        .money-area {
+            width: 100%;
+            position: absolute;
+            top: 65px;
+            display: flex;
+            flex-wrap: wrap;
+            align-items: center;
+            justify-content: center;
+
+            .mark-area {
+                width: 100%;
+                display: flex;
+                justify-content: center;
+
+                img {
+                    width: 16px;
+                    height: 16px;
+                    margin-right: 4px;
+                }
+
+                .time {
+                    display: flex;
+                    align-items: center;
+
+                    span {
+                        color: #FFFFFF;
+                        font-weight: 800;
+                        font-size: 17px;
+                        letter-spacing: 0.05em;
+                        line-height: 22px;
+
+
+                    }
+
+                }
+
+                .win {
+                    display: flex;
+                    align-items: center;
+                    margin-left: 12px;
+                    color: #FFCC4D;
+                    letter-spacing: 0.05em;
+                    line-height: 22px;
+                    font-size: 17px;
+                    font-weight: 800;
+
+                }
+            }
+
+            .txt {
+                font-weight: 800;
+                font-size: 16px;
+                text-align: center;
+                letter-spacing: 0.3px;
+                color: #FFFFFF;
+            }
+
+            .coin {
+                text-align: center;
+                margin-top: 6px;
+                margin-bottom: 7px;
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                width: 90%;
+
+                img {
+                    width: 46px;
+                    height: 46px;
+                    border-radius: 50%;
+                    border: 3px solid #FFFFFF;
+                }
+
+                span {
+                    margin-left: 12px;
+                    font-weight: 800;
+                    font-size: 60px;
+                    line-height: 76px;
+                    color: #FFFFFF;
+                }
+            }
+
+            .people {
+                font-weight: 800;
+                font-size: 13px;
+                line-height: 16px;
+                letter-spacing: 0.05em;
+                text-align: center;
+                color: #FFFFFF;
+            }
+        }
+
+        .title {
+            position: absolute;
+            top: 15px;
+            left: 15px;
+            z-index: 3;
+            display: flex;
+            align-items: center;
+
+            img {
+                width: 24px;
+                height: 24px;
+                border: 2px solid #FFF;
+                border-radius: 50%;
+            }
+
+            span {
+                margin-left: 10px;
+                font-weight: 600;
+                font-size: 16px;
+                letter-spacing: 0.3px;
+                color: #fff;
+            }
+        }
+
+        // .txt {
+        //   width: 100%;
+        //   position: absolute;
+        //   font-style: normal;
+        //   font-weight: 700;
+        //   font-size: 42px;
+        //   line-height: 50px;
+        //   text-align: center;
+
+        //   color: #FFF2D3;
+        //   top: 90px;
+        //   z-index: 3;
+        // }
+
+        img {
+            width: 100%;
+        }
+
+        .up {
+            position: absolute;
+            top: 0;
+            // box-shadow: 0px 4px 44px rgba(0, 0, 0, 0.1);
+            z-index: 1;
+        }
+
+        .down {
+            position: absolute;
+            top: 253px;
+        }
+
+        .open {
+            width: 335px;
+            height: 50px;
+            cursor: pointer;
+            position: absolute;
+            bottom: 28px;
+            left: 50%;
+            margin-left: -167.5px;
+            z-index: 4;
+        }
+
+        .open-gif {
+            width: 200px;
+            height: 200px;
+            text-align: center;
+            position: absolute;
+            bottom: 100px;
+            left: 50%;
+            margin-left: -100px;
+            z-index: 3;
+        }
+    }
+
+    @keyframes loading {
+        from {
+            transform: rotate(0deg);
+        }
+
+        to {
+            transform: rotate(360deg);
+        }
+    }
+}
+
+
+@keyframes div_light {
+    0% {
+        right: -100%;
+    }
+
+
+
+    100% {
+        right: 150%;
+    }
+}
+
+@keyframes myfirst {
+    0% {
+        width: 250px;
+        height: 103px;
+    }
+
+    50% {
+        width: 300px;
+        height: 153px;
+    }
+
+    100% {
+        width: 250px;
+        height: 103px;
+    }
+}
+
+.none {
+    display: flex;
+    align-item: center;
+    justify-content: center;
+    width: 100%;
+    height: 100%;
+}
+</style>

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.