瀏覽代碼

[edit][bug]

zhangwei 3 年之前
父節點
當前提交
9475535fd7
共有 3 個文件被更改,包括 27 次插入33 次删除
  1. 4 1
      src/logic/twitter.js
  2. 2 2
      src/view/popup/withdraw/confirm.vue
  3. 21 30
      src/view/red-packet.vue

+ 4 - 1
src/logic/twitter.js

@@ -546,7 +546,10 @@ function replaceDOMRedPacket(_type, _dom, postId, tweetId) {
     if (!_dom || !_dom.parentElement) {
         return
     }
-
+    if (_type == 'card' && !_dom.querySelector('iframe') && _dom.parentNode.querySelector('iframe')) {
+        _dom.style.display = 'none'
+        return
+    }
     if (_dom.parentElement.querySelector('iframe')) {
         return
     }

+ 2 - 2
src/view/popup/withdraw/confirm.vue

@@ -43,8 +43,8 @@
                 <img :src="require('@/assets/svg/icon-enter-ed.svg')" alt="" v-if="state.img_enter_state"
                     @click="clickEnter">
                 <img :src="require('@/assets/svg/icon-enter.svg')" alt="" v-else @click="clickEnter">
-                <span @click="clickEnter">同意</span> &nbsp;
-                <span class="agreement" @click="clickRisk">用户协议</span>
+                <span @click="clickEnter">Read </span> &nbsp;
+                <span class="agreement" @click="clickRisk">Risk Warning</span>
             </div>
             <div class="right">
                 <div class="btn" @click="clickBtn" :class="{ enter: state.img_enter_state }">Confirm</div>

+ 21 - 30
src/view/red-packet.vue

@@ -4,7 +4,7 @@
     <!-- open -->
     <div v-show="data.status == 'opened'" class="opened">
       <div class="header" :style="{ 'backgroundImage': `url(${require('@/assets/subject/001-back-head-top.svg')})` }">
-        <div class="title">Awesome! You Will Get</div>
+        <div class="title">AWESOME! YOU WILL GET</div>
         <div class="money">
           <img :src="data.detail.currencyIconPath" alt />
           <!-- <span class="big">{{ data.money }}</span> -->
@@ -63,7 +63,7 @@
       </div>
       <div class="people" @click="clickRoad">
         <div class="txt">
-          {{ data.detail.receiveCount || 0 }}/{{ data.detail.totalCount || 0 }} Get,{{
+          {{ data.detail.receiveCount || 0 }}/{{ data.detail.totalCount || 0 }} Winners,{{
               data.detail.receiveAmountValue
           }}/{{ data.detail.amountValue }} {{ data.detail.currencySymbol }}</div>
         <div class="right" v-if="data.detail.allReceived">
@@ -100,7 +100,7 @@
         </div>
       </div>
       <div class="luck-list-title">
-        <div>{{ data.detail.receiveCount || 0 }}/{{ data.detail.totalCount || 0 }} Get</div>
+        <div>{{ data.detail.receiveCount || 0 }}/{{ data.detail.totalCount || 0 }} Winners</div>
         <div> {{ data.detail.receiveAmountValue }} / {{ data.detail.amountValue || '' }} {{
             data.detail.currencySymbol || ''
         }}</div>
@@ -155,7 +155,7 @@
         <img :src="require('@/assets/svg/icon-back.svg')" alt @click="clickBack" />
       </div>
       <div class="luck-list-title">
-        <div>{{ data.detail.receiveCount || 0 }}/{{ data.detail.totalCount || 0 }} Get</div>
+        <div>{{ data.detail.receiveCount || 0 }}/{{ data.detail.totalCount || 0 }} Winners</div>
         <div> {{ data.detail.receiveAmountValue }} / {{ data.detail.amountValue || '' }} {{
             data.detail.currencySymbol || ''
         }}</div>
@@ -185,11 +185,10 @@
     <!-- 红包被领完了 -->
     <div v-else-if="data.status == 'close'" class="close">
       <div class="header" :style="{ 'backgroundImage': `url(${require('@/assets/subject/001-back-head-top.svg')})` }">
-        <div class="close-title">{{ data.close_title }}</div>
-        <div class="close-title" v-if="data.close_text">{{ data.close_text }}</div>
+        <div class="close-title" v-for="item in data.close_text">{{ item }}</div>
       </div>
       <div class="luck-list-title">
-        <div>{{ data.detail.receiveCount || 0 }}/{{ data.detail.totalCount || 0 }} Get</div>
+        <div>{{ data.detail.receiveCount || 0 }}/{{ data.detail.totalCount || 0 }} Winners</div>
         <div> {{ data.detail.receiveAmountValue }} / {{ data.detail.amountValue || '' }} {{
             data.detail.currencySymbol || ''
         }}</div>
@@ -257,7 +256,6 @@ let data = reactive({
   page_index: 1,
   page_size: 20,
   srcContentId: '',
-  close_title: 'Better luck next time!',
   error_txt: `oops, new accounts cannot participate in this event,`,
   receiveAmount: 0,
   money: 0,
@@ -435,7 +433,7 @@ function myReceivedState() {
     // 任务已经被领完了
     if (data.detail.totalCount == data.detail.receiveCount) {
       data.status = 'close'
-      data.close_title = 'Better luck next time!'
+      data.close_text = ['All the rewards have', 'been taken out, come', 'earlier next time! ']
     }
 
     // 我领取未完成 
@@ -449,9 +447,7 @@ function myReceivedState() {
     // 大红包不能领取了 and  我的红包过期了
   } else if (data.detail.receiveTimeExpired && data.detail.myReceived.taskFinishStatus == 2) {
     data.status = 'close'
-    data.close_title = `This Giveaways`
-    data.close_text = `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`
-
+    data.close_text = ['This Giveaways', `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`]
     // 我领取成功了
   } else if (data.detail.myReceived.taskFinishStatus == 1) {
     data.status = 'success'
@@ -493,13 +489,12 @@ function init() {
           // 大红包不可以领取了
           if (data.detail.receiveTimeExpired) {
             data.status = 'close'
-            data.close_title = `This Giveaways`
-            data.close_text = `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`
+            data.close_text = [`This Giveaways`, `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`]
           }
           // 任务已经被领完了
           if (data.detail.totalCount == data.detail.receiveCount) {
             data.status = 'close'
-            data.close_title = 'Better luck next time!'
+            data.close_text = ['All the rewards have', 'been taken out, come', 'earlier next time! ']
           }
         }
 
@@ -510,8 +505,7 @@ function init() {
           myReceivedState()
         } else {
           data.status = 'close'
-          data.close_title = `This Giveaways`
-          data.close_text = `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`
+          data.close_text = [`This Giveaways`, `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`]
         }
       }
     } else {
@@ -695,7 +689,7 @@ function handleErrorCode(res) {
     // 重复操作过于频繁
     case '-106':
       message.error('Clicking too often, wait a moment and click again')
-      this.loading_show =false
+      this.loading_show = false
       break
     // 红包不存在
     case '2001':
@@ -707,9 +701,6 @@ function handleErrorCode(res) {
       break
     // 已超过红包领取时间
     case '2003':
-      // data.status = 'close'
-      // data.close_title = `This Giveaways`
-      // data.close_text = `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`
       init()
       break
     // 红包支付状态异常 没有可提交的任务红包
@@ -718,22 +709,21 @@ function handleErrorCode(res) {
       break
     // 红包活动已结束
     case '2006':
-      // data.status = 'close'
-      // data.close_title = `This Giveaways`
-      // data.close_text = `expired on ${moment(data.detail.endTimestamp).format('MM-DD')}`
       init()
       break
     // 红包金额已经被领取完了
     case '2007':
-      message.error(res.msg)
+      data.status = 'close'
+      data.close_text = ['All the rewards have', 'been taken out, come', 'earlier next time! ']
       break
     // 红包个数已经被领取完了
     case '2008':
-      message.error(res.msg)
+      data.status = 'close'
+      data.close_text = ['All the rewards have', 'been taken out, come', 'earlier next time! ']
       break
     // 该用户不满足领取条件
     case '2009':
-      data.error_txt = `oops, new accounts cannot participate in this event,`
+      data.error_txt = [`oops, new accounts cannot participate in this event,`]
       data.status = 'error'
       data.retry = true
       break
@@ -755,7 +745,7 @@ function handleErrorCode(res) {
       break
     // 没有可提交的任务红包
     case '2024':
-      message.error(res.msg)
+      data.status = 'not-open'
       break
     // 红包任务已完成
     case '2025':
@@ -1005,7 +995,8 @@ body {
       justify-content: space-between;
       color: #B0B0B0;
       border-bottom: 1px solid #D1D1D1;
-      div:last-child{
+
+      div:last-child {
         text-align: right;
       }
     }
@@ -1410,7 +1401,7 @@ body {
         display: flex;
         justify-content: center;
         align-items: center;
-        width:90%;
+        width: 90%;
 
         img {
           width: 46px;