Browse Source

Merge branch 'dev_220318_test' into test

wenliming 3 years ago
parent
commit
43640ecfad

+ 2 - 2
src/logic/twitter.js

@@ -199,12 +199,12 @@ function _publishTweetEvent(contentStr, cb) {
  */
 function _addDeNetEditBtn(parent, dom, isClick = false) {
     setTimeout(() => {
-        if (parent) {
+        if (parent && parent.parentNode) {
             parent.parentNode.insertBefore(dom, parent.nextElementSibling);
         } else {
             setTimeout(() => {
                 parent = _getScheduleDom(isClick);
-                parent.parentNode.insertBefore(dom, parent.nextElementSibling);
+                parent && parent.parentNode && parent.parentNode.insertBefore(dom, parent.nextElementSibling);
             }, 1000)
         }
     })

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

@@ -0,0 +1,231 @@
+<!-- 货币列表 -->
+<template>
+    <div class="currency-list-wrapper">
+        <div class="search-input-wrapper">
+            <input class="input" v-model="keywords" @input="onInput" placeholder="Search name or paste address" />
+            <img :src="require('../../assets/svg/icon-form-refresh.svg')" class="icon">
+            <img :src="require('../../assets/svg/icon-clear-search.svg')" class="icon-clear"
+            @click="clearIpt" v-if="keywords">
+        </div>
+        <div class="list-wrapper">
+            <div class="page-list" v-if="!showSearch">
+                <div class="list-item">
+                    <div class="item-title">
+                        <img
+                            class="icon"
+                            src="../../assets/subject/icon-USD.png"
+                        />
+                        Legal Tender
+                    </div>
+                    <div class="item-detail" @click="selectCurrency">
+                        <div class="left">
+                            <img
+                                class="icon-currency"
+                                src="../../assets/subject/icon-USD.png"
+                            />
+                            <div class="currency-info">
+                                <div class="name">USD</div>
+                                <div class="desc">PayPal</div>
+                            </div>
+                        </div>
+                        <div class="right">
+                            <div class="num">1.02546572</div>
+                            <div class="amount">$21.26</div>
+                        </div>
+                    </div>
+                </div>
+                <div class="list-item">
+                    <div class="item-title">
+                        <img
+                            class="icon"
+                            src="../../assets/subject/icon-USD.png"
+                        />
+                        Token
+                    </div>
+                    <div class="item-detail" @click="selectCurrency">
+                        <div class="left">
+                            <img
+                                class="icon-currency"
+                                src="../../assets/subject/icon-USD.png"
+                            />
+                            <div class="currency-info">
+                                <div class="name">USD</div>
+                                <div class="desc">PayPal</div>
+                            </div>
+                        </div>
+                        <div class="right">
+                            <div class="num">1.02546572</div>
+                            <div class="amount">$21.26</div>
+                        </div>
+                    </div>
+                    <div class="item-detail" @click="selectCurrency">
+                        <div class="left">
+                            <img
+                                class="icon-currency"
+                                src="../../assets/subject/icon-USD.png"
+                            />
+                            <div class="currency-info">
+                                <div class="name">USD</div>
+                                <div class="desc">PayPal</div>
+                            </div>
+                        </div>
+                        <div class="right">
+                            <div class="num">1.02546572</div>
+                            <div class="amount">$21.26</div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <!-- 显示搜索结果列表 -->
+            <div class="search-list" v-else>
+                    <div class="item-detail" @click="selectCurrency">
+                        <div class="left">
+                            <img
+                                class="icon-currency"
+                                src="../../assets/subject/icon-USD.png"
+                            />
+                            <div class="currency-info">
+                                <div class="name">USD</div>
+                                <div class="desc">PayPal</div>
+                            </div>
+                        </div>
+                        <div class="right">
+                            <div class="num">1.02546572</div>
+                            <div class="amount">$21.26</div>
+                        </div>
+                    </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup>
+/* eslint-disable */
+import { defineProps, defineEmits, ref } from "vue";
+
+let keywords = ref('');
+let showSearch = ref(false)
+
+const emits = defineEmits(["selectCurrency"]);
+
+const selectCurrency = () => {
+    emits("selectCurrency", { amount: 0, id: 1, value: "USDT" });
+};
+
+const onInput = (val) => {
+    console.log(keywords.value);
+    if(keywords.value) {
+        showSearch.value = true;
+    } else {
+        showSearch.value = false;
+    }
+}
+
+const clearIpt = () => {
+    keywords.value = '';
+    showSearch.value = false;   
+}
+</script>
+
+<style scoped lang="scss">
+.currency-list-wrapper {
+    width: 100%;
+    height: 100%;
+    background-color: #fff;
+    box-sizing: border-box;
+
+    .search-input-wrapper {
+        padding: 10px;
+        box-sizing: border-box;
+        background: #f7f7f7;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        position: relative;
+        .input {
+            background: #f1f1f1;
+            border-radius: 110px;
+            width: 88%;
+            height: 40px;
+            box-sizing: border-box;
+            border: none;
+            outline: none;
+            padding: 10px 80px 10px 22px;
+        }
+
+        .icon {
+            width: 32px;
+            cursor: pointer;
+        }
+
+        .icon-clear {
+            position: absolute;
+            right: 16%;
+            cursor: pointer;
+        }
+    }
+    .list-wrapper {
+        height: calc(100% - 60px);
+        .list-item {
+            .item-title {
+                display: flex;
+                align-items: center;
+                height: 42px;
+                padding: 0 10px;
+                box-sizing: border-box;
+                background: #f7f7f7;
+                font-weight: 500;
+                font-size: 14px;
+                color: #a2a2a2;
+                .icon {
+                    width: 24px;
+                    height: 24px;
+                    margin-right: 6px;
+                }
+            }
+        }
+        .item-detail {
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                padding: 12px 20px;
+                box-sizing: border-box;
+                cursor: pointer;
+                .left {
+                    display: flex;
+
+                    .icon-currency {
+                        width: 24px;
+                        height: 24px;
+                        margin-right: 12px;
+                    }
+                    .currency-info {
+                        .name {
+                            font-weight: 500;
+                            font-size: 15px;
+                            margin-bottom: 5px;
+                        }
+                        .desc {
+                            font-weight: 400;
+                            font-size: 12px;
+                            color: #a2a2a2;
+                        }
+                    }
+                }
+                .right {
+                    text-align: right;
+                    .num {
+                        font-weight: 500;
+                        font-size: 15px;
+                        margin-bottom: 5px;
+                    }
+                    .amount {
+                        font-weight: 400;
+                        font-size: 12px;
+                        color: #a2a2a2;
+                    }
+                }
+            }
+    }
+}
+</style>

+ 2 - 2
src/view/components/custom-card-cover.vue

@@ -19,7 +19,7 @@
             <div class="txt">{{ data.amountCurrencyCode }} GIVEAWAY</div>
             <div class="coin">
                 <img :src="data.currencyIconUrl" />
-                <span>{{ data.amountValue > 100 ? data.amountValue / 100 : 0 }}</span>
+                <span>{{ data.amountValue }}</span>
             </div>
             <div class="people">
                 {{ data.totalCount }} WINNERS TO SHARE
@@ -83,7 +83,7 @@ const open = () => {
             margin: 0 auto;
             display: flex;
             align-items: center;
-            display: block;
+            justify-content: center;
 
             img {
                 width: 46px;

+ 1 - 3
src/view/components/follow-input.vue

@@ -288,7 +288,7 @@ const onUserMouseLeave = (params, index) => {
                 overflow-y: scroll;
                 background-color: #fff; 
                 top: 30px;
-                left: -90px;
+                left: -150px;
                 z-index: 1000;
                 border-radius: 10px;
 
@@ -355,7 +355,5 @@ const onUserMouseLeave = (params, index) => {
             align-items: center;
             margin-top: 14px;
         }
-
-
     }
 </style>

File diff suppressed because it is too large
+ 516 - 290
src/view/components/give-dialog.vue


+ 4 - 4
src/view/components/message-box.vue

@@ -1,11 +1,11 @@
 <template>
-    <div class="overlay" v-if="dialogVisible">
+    <div class="msg-box-overlay" v-if="dialogVisible">
         <div class="content-wrapper">
             <div class="title">{{title}}</div>
             <div class="desc">{{content}}</div>
             <div class="btn-wrapper">
-                <div class="btn cancel" @click="cancel">Continue</div>
-                <div class="btn confirm" @click="confirm">Modify</div>
+                <div class="btn cancel" @click="cancel">Cancel</div>
+                <div class="btn confirm" @click="confirm">Confirm</div>
             </div>
         </div>
     </div>
@@ -43,7 +43,7 @@ const confirm = () => {
 </script>
 
 <style lang="scss" scoped>
-.overlay {
+.msg-box-overlay {
     position: fixed;
     top: 0;
     right: 0;

+ 1 - 1
src/view/components/preview-card.vue

@@ -25,7 +25,7 @@
                 <div class="after-cover-wrapper">
                     <custom-card-cover :data="{
                         totalCount: baseFormData.totalCount,
-                        amountValue: baseFormData.amountValue * 100,
+                        amountValue: baseFormData.amountValue,
                         amountCurrencyCode: 'USD',
                         currencyIconUrl: require('../../assets/subject/icon-USD.png'),
                         userInfo: {

+ 134 - 0
src/view/components/top-up.vue

@@ -0,0 +1,134 @@
+<!-- 充值 -->
+<template>
+    <div class="top-up-wrapper">
+        <div class="content-wrapper">
+            <div class="top">
+                <div class="item">
+                    <div class="label">
+                        Token
+                    </div>
+                    <div class="content">
+                        <img src="" alt=""> USDT
+                    </div>  
+                </div>
+                <div class="item">
+                    <div class="label">
+                        Network
+                    </div>
+                    <div class="content btn-network">
+                        Binance Smart Chain
+                    </div>
+                </div>
+            </div>
+            <div class="qrcode-wrapper">
+                <img class="img" src="../../assets/img/img-qrcode.png" />
+                <div class="address">TJGkVQQ8e3HQSghPQkkYYE9AZf5Pmvc3vG</div>
+                <div class="btn">copy</div>
+            </div>
+            <div class="tips-box">
+                <div>TIPS</div>
+                <div>1、请通过客户端或在线钱包将您需要充值的相应币种数目发送到该地址。</div> 
+                <div>2、发送完成后,系统会自动在此交易获得 相应数量确认后将该笔虚拟币充值到您在本站的账户,相应数量的确认需要大约 0.5 到 1 小时时间,请耐心等待</div>
+                <div>3、同一个地址可多次充值,不影响到账。最小充值金额 0.0001。</div>
+            </div>
+        </div>
+        <div class="btn-done">
+            Done
+        </div>
+    </div>
+</template>
+
+<script setup>
+/* eslint-disable */
+import { defineProps, defineEmits } from "vue";
+
+</script>
+
+<style scoped lang="scss">
+.top-up-wrapper {
+    width: 100%;
+    height: 100%;
+    box-sizing: border-box;
+    padding: 18px;
+    position: relative;
+    .content-wrapper {
+        height: calc(100% - 60px);
+        overflow-y: scroll;
+        .top {
+            display: flex;
+
+            .item {
+                margin-right: 24px;
+
+                .label {
+                    color: #A0A0A0;
+                    margin-bottom: 5px;
+                }
+
+                .content {
+                    height: 38px;
+                    display: flex;
+                    align-items: center;
+                }
+
+            }
+        }
+        .qrcode-wrapper {
+            margin-top: 22px;
+            height: 290px;
+            background: #F7F7F7;
+            border-radius: 20px;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+            flex-direction: column;
+            padding: 20px;
+            box-sizing: border-box;
+
+            .img {
+                width: 140px;
+                height: 140px;
+            }
+
+            .address {
+                padding: 20px 0;
+                box-sizing: border-box;
+                font-weight: 500;
+                font-size: 15px;
+            }
+
+            .btn {
+                height: 40px;
+                width: 160px;
+                border-radius: 1000px;
+                border: 1px solid #389AFF;
+                font-weight: 600;
+                font-size: 16px;
+                color: #389AFF;
+                text-align: center;
+                line-height: 40px;
+            }
+        }
+        .tips-box {
+            margin-top: 18px;
+            font-weight: 400;
+            font-size: 13px;
+            div{
+                line-height: 20px;
+            }
+        }
+    }
+    .btn-done {
+        background: #389AFF;
+        width: 100%;
+        height: 46px;
+        line-height: 46px;
+        text-align: center;
+        border-radius: 1000px;
+        font-weight: 600;
+        font-size: 16px;
+        color: #fff;
+        margin-top: 10px;
+    }
+}
+</style>

+ 0 - 1
src/view/publish.vue

@@ -3,7 +3,6 @@
         <give-dialog
             :dialogVisible="dialogVisible"
             @close="close"
-            @confirm="confirm"
             @payPalFinsh="payPalFinsh"
         ></give-dialog>
     </div>

Some files were not shown because too many files changed in this diff