瀏覽代碼

Merge branch 'test' into feature_220509_new

# Conflicts:
#	src/view/iframe/red-packet/red-packet.vue
wenliming 3 年之前
父節點
當前提交
f4a425b3d3

文件差異過大導致無法顯示
+ 8 - 0
src/assets/svg/icon-rabbit.svg


+ 2 - 1
src/entry/popup.js

@@ -7,7 +7,7 @@ const app = createApp(App)
 import router from '@/router/popup.js'
 import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
 
-import {Button,message} from "ant-design-vue";
+import {Button,message,Tooltip} from "ant-design-vue";
 
 
 message.config({
@@ -17,6 +17,7 @@ message.config({
 });
 app.use(Button);
 app.use(message)
+app.use(Tooltip)
 
 
 app.use(router)

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

@@ -185,16 +185,16 @@ class ParseCard {
 
         dom.style = 'min-height:500px'
         if (dom) {
-            let div = document.createElement('div')
-            div.style.color = 'red'
-            div.innerText = `
-            tweet_Id:${tweet_Id} , 
-            post_Id:${post_Id}
-            获取dom时间:${time}
-            短链接:${short_url}
-            渲染时长:${(new Date().getTime() - time) / 1000}s
-            `
-            dom.parentElement.appendChild(div)
+            // let div = document.createElement('div')
+            // div.style.color = 'red'
+            // div.innerText = `
+            // tweet_Id:${tweet_Id} , 
+            // post_Id:${post_Id}
+            // 获取dom时间:${time}
+            // 短链接:${short_url}
+            // 渲染时长:${(new Date().getTime() - time) / 1000}s
+            // `
+            // dom.parentElement.appendChild(div)
             dom.appendChild(this.createIframe(post_Id, tweet_Id))
         }
 

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

@@ -0,0 +1,51 @@
+<template>
+    <div class="getMore" @click="jumpMore">
+        <img width="20" :src=" require('@/assets/svg/icon-big-give.svg') " />
+        <font>Get More Giveaway</font>
+        <img height="20" :src=" require('@/assets/svg/icon-cell-arrow-right.svg') " />
+      </div>
+</template>
+
+<script setup>
+import { getFrontConfig } from "@/http/account";
+import { onBeforeMount, ref } from "vue";
+
+// const
+const moreUrl = ref('');
+
+onBeforeMount(() => {
+    getFrontConfig({
+        params: {},
+    }).then(res => {
+        moreUrl.value = res.data.moreLuckdropsUrl;
+    })
+})
+
+const jumpMore = () => {
+    if (moreUrl.value) {
+        window.open(moreUrl.value)
+    }
+}
+
+</script>
+
+<style lang="scss" scoped>
+.getMore {
+    display: flex;
+    height: 50px;
+    cursor: pointer;
+    user-select: none;
+    align-items: center;
+    justify-content: center;
+    box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.06);
+    img {
+        margin: 0 5px;
+    }
+    font {
+        color: #000;
+        font-size: 15px;
+        font-weight: 500;
+        line-height: 18px;
+    }
+}
+</style>

+ 15 - 16
src/view/iframe/red-packet/red-packet.vue

@@ -117,7 +117,7 @@
             data.detail.currencySymbol || ''
         }}</div>
       </div>
-      <div class="luck-list" @scroll="handleScroll($event)">
+      <div class="luck-list max" @scroll="handleScroll($event)">
         <div class="luck-item" v-for="item, i in data.detail.allReceived" v-bind:key="i">
           <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
           <img v-else :src="require('@/assets/svg/icon-twitter.svg')" alt />
@@ -137,6 +137,7 @@
           </div>
         </div>
       </div>
+      <get-more></get-more>
     </div>
 
 
@@ -205,7 +206,7 @@
             data.detail.currencySymbol || ''
         }}</div>
       </div>
-      <div class="luck-list" @scroll="handleScroll">
+      <div class="luck-list max" @scroll="handleScroll">
         <div class="luck-item" v-for="item, i in data.detail.allReceived" v-bind:key="i">
           <img v-if="item.simpleUserInfoVO.avatarUrl" :src="item.simpleUserInfoVO.avatarUrl" alt />
           <img v-else :src="require('@/assets/svg/icon-twitter.svg')" alt />
@@ -224,6 +225,7 @@
           </div>
         </div>
       </div>
+      <get-more></get-more>
     </div>
 
 
@@ -245,9 +247,6 @@
     </div>
 
   </div>
-  <div style="position: fixed; width: 100%; min-height: 30px; color: red; top: 0;">
-    {{ data.console_str }}
-  </div>
 </template>
 
 <script>
@@ -261,6 +260,7 @@ import { getPostDetail, getRedPacket, finishRedPacket, oneKeyLike, oneKeyReTweet
 import { getQueryString, guid } 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 { getChromeStorage } from '@/uilts/chromeExtension.js'
 import Report from "@/log-center/log"
 import { srcPublishSuccess } from '@/http/publishApi'
@@ -547,7 +547,6 @@ const reSetBindTwtterId = (_params) => {
           });
           init()
         }
-        data.console_str.tweet_info = res.msg
       })
     }
   })
@@ -557,7 +556,7 @@ function showLastTwoPlace(n) {
   return n
 }
 let start_time = new Date().getTime()
-data.console_str = {}
+
 function init() {
   onRuntimeMsg();
   onPageVisbile();
@@ -573,10 +572,7 @@ function init() {
         reSetBindTwtterId(res.data)
         return
       }
-      data.console_str.time = (new Date().getTime() - start_time) / 1000 + 's'
-      data.console_str.tweetId = res.data.srcContentId
       data.detail = JSON.parse(res.data.postBizData)
-      data.console_str.status = data.detail.status
 
       console.log(data.detail)
 
@@ -621,7 +617,7 @@ function init() {
         }
 
         // 任务已经结束了
-      } else if (data.detail.status == 2) {
+      } else if (data.detail.status == 2 || data.detail.status == 3 || data.detail.status == 4) {
         // 我领取过的状态
         if (data.detail.myReceived) {
           myReceivedState()
@@ -635,8 +631,6 @@ function init() {
         }
       }
     } else {
-      data.console_str.time = (new Date().getTime() - start_time) / 1000
-      data.console_str.msg = res.msg
       handleErrorCode(res)
     }
   })
@@ -1148,6 +1142,7 @@ body {
   padding: 0;
   width: 375px;
   height: 500px;
+  background-color: unset!important;
 }
 
 .content {
@@ -1356,7 +1351,7 @@ body {
       display: flex;
       justify-content: space-between;
       color: #B0B0B0;
-      border-bottom: 1px solid #D1D1D1;
+      border-bottom: 1px solid #F2F2F2;
 
       div:last-child {
         text-align: right;
@@ -1367,11 +1362,15 @@ body {
       background: #fff;
       overflow: auto;
 
+      &.max {
+        height: 250px;
+      }
+
       .luck-item {
         display: flex;
-        padding: 12px 0;
+        padding: 10px 0;
         margin: 0 16px;
-        border-bottom: 1px solid #d1d1d1;
+        border-bottom: 1px solid #F2F2F2;
         justify-content: space-between;
         position: relative;
 

+ 1 - 1
src/view/popup/top-up/home.vue

@@ -1,7 +1,7 @@
 <template>
     <!-- 公共组件 -->
     <div class="info">
-        <v-head :title="'TopUp'" :show_more="true" :show_help="true" :back_url="'/'"></v-head>
+        <v-head :title="'TopUp'" :show_more="true" :show_help="false" :back_url="'/'"></v-head>
         <currency-list style="height: calc(100% - 48px);" @selectCurrency="selectCurrency" :page="'top-up'"></currency-list>
     </div>
 

+ 1 - 1
src/view/popup/withdraw/home.vue

@@ -1,7 +1,7 @@
 <template>
     <!-- 公共组件 -->
     <div class="info">
-        <v-head :title="'Withdraw'" :show_more="true" :show_help="false" :back_url="'/'"></v-head>
+        <v-head :title="'Withdraw'" :show_more="true" :show_help="true" :back_url="'/'"></v-head>
         <currency-list style="height: calc(100% - 48px);" :filterEmptyBalance="true" @selectCurrency="selectCurrency" ></currency-list>
     </div>
 

+ 13 - 1
src/view/popup/withdraw/info.vue

@@ -59,7 +59,7 @@
       <div class="left">
         <div class="txt">Receive Amount</div>
         <div class="money">{{ state.amount || 0 }} {{ state.currency_code }}</div>
-        <div class="txt"> Network Fee: {{ state.fee_amount }} {{ withdraw_info.token_symbol }} </div>
+        <div class="txt"> Network Fee: <a-tooltip :title="state.fee_amount">{{ numToFixed(state.fee_amount) }}</a-tooltip> {{ withdraw_info.token_symbol }} </div>
       </div>
       <div class="right">
         <div class="btn" @click="clickBtn" :class="{ enter: state.is_enter_state }">Confirm</div>
@@ -203,6 +203,14 @@ const clickWithdrawalAll = () => {
   state.input_amount = state.balance
   inputText()
 }
+
+const numToFixed = (str) => {
+  if (String(str).indexOf('.') >= 0) {
+    return Number(str).toFixed(4);
+  } else {
+    return str
+  }
+}
 </script>
 
 
@@ -298,6 +306,9 @@ const clickWithdrawalAll = () => {
           padding: 0 16px;
           font-weight: 500;
           font-size: 15px;
+          &::placeholder {
+            color: #B8B8B8;
+          }
         }
 
         input::-webkit-outer-spin-button,
@@ -328,6 +339,7 @@ const clickWithdrawalAll = () => {
 
     .tips {
       margin-top: 12px;
+      margin-bottom: 12px;
       font-size: 13px;
       height: 118;
       overflow: auto;

部分文件因文件數量過多而無法顯示