浏览代码

Merge branch 'test' of https://git.yishihui.com/DeNet/de-net into test

zhangwei 3 年之前
父节点
当前提交
0738d629c5
共有 4 个文件被更改,包括 33 次插入32 次删除
  1. 5 1
      src/logic/twitter.js
  2. 12 3
      src/view/components/follow-input.vue
  3. 3 26
      src/view/components/give-dialog.vue
  4. 13 2
      src/view/components/top-up.vue

+ 5 - 1
src/logic/twitter.js

@@ -345,6 +345,10 @@ function _deNetBtnClick(port) {
             }
             dom.deBtn.insertBefore(dom.loadingImg, dom.deBtn.querySelector('span'));
             setTimeout(() => {
+                dom.loadingImg.style.transform = 'rotate(1080deg)'
+            });
+            setTimeout(() => {
+                dom.loadingImg.style.transform = 'rotate(0deg)'
                 dom.deBtn.innerHTML = '<span>DeNet<span>';
             }, 3000)
             port.postMessage({ state: 'CONTENT_TWITTER_LOGIN' })
@@ -380,7 +384,7 @@ function _createBtnDom(port) {
     let loadingImg = document.createElement('img');
     loadingImg.id = 'de-btn-loading'
     loadingImg.src = require("@/assets/img/icon-btn-loading.png");
-    loadingImg.style.cssText = 'width:20px;height: 20px;margin-right:3px;-webkit-animation:load 1.1s infinite linear;';
+    loadingImg.style.cssText = 'width:20px;height: 20px;margin-right:3px;transition-duration: 3s;';
 
     let style = document.createElement('style');
     style.innerHTML = "#de-btn:hover{opacity: .9;};@-webkit-keyframes load{from{ transform: rotate(0deg);} to{transform: rotate(360deg);}}";

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

@@ -18,7 +18,8 @@
                     @mouseenter="iptMouseenter"/>
 
             <template v-if="currentIptIndex == index && userList.length">
-                <div class="user-list-wrapper">
+                <div class="user-list-wrapper"
+                    :style="{ left: domStyle.left + 'px', top: domStyle.top + 'px' }">
                     <div class="item" 
                         v-for="(item, index) in userList"
                         :key="index"
@@ -79,6 +80,10 @@ const props = defineProps({
 let currentIptIndex = ref(-1);
 let isActiveAddBtn = ref(false);
 let currentUserIndex = ref(-1);
+let domStyle = ref({
+    left: 0,
+    top: 0
+})
 
 let userList = ref([]);
 let userInfo = reactive({});
@@ -202,9 +207,13 @@ const iptMouseenter = (e) => {
     rectClick(e);
 }
 
-function rectClick(event) {
+const rectClick = (event) => {
     //获取相对于当前所指向对象的位置坐标
     console.log(event,'x:' + event.clientX + "  y:" +  event.clientY);
+    domStyle.value = {
+        left : event.clientX / 2,
+        top: event.clientY
+    }
 }
 
 const getTwitterUsers = (query, cb) => {
@@ -293,7 +302,7 @@ const onUserMouseLeave = (params, index) => {
             .user-list-wrapper {
                 width: 284px;
                 max-height: 430px;
-                position: absolute;
+                position: fixed;
                 box-shadow: 0px 4px 20px 0px #0000004D;
                 overflow-y: scroll;
                 background-color: #fff; 

+ 3 - 26
src/view/components/give-dialog.vue

@@ -334,7 +334,7 @@ let submitIng = ref(false);
 // 艾特关注人列表
 let atUserList = ref([]);
 
-let iptErrMsgTxt = ref("Please select a currency");
+let iptErrMsgTxt = ref("Select a reward");
 
 // 是否返回
 let isBack = ref(false);
@@ -440,6 +440,7 @@ const emits = defineEmits(["close", "confirm", "payPalFinsh"]);
 const close = () => {
     if (showComType.value != "default") {
         showComType.value = "default";
+        calcDomZoom();
         isBack.value = true;
     } else {
         initParams();
@@ -900,33 +901,9 @@ const setInputErrorMsg = (params) => {
     //     scale = obj.scale;
     // }
 
-    // if(type == 'input') {
-        onIptSetErrorTxt(params);
-    // } else if(type == 'blur') {
-    //     setIsEmptyTxt();
-    // }
+    onIptSetErrorTxt(params);
 };
 
-/**
- * 设置参数为空的提示语
- */
-const setIsEmptyTxt = () => {
-    if (!baseFormData.amountValue) {
-        iptErrMsgTxt.value = "Please enter the ‘reward’ amount";
-    } else {
-        if (!baseFormData.totalCount) {
-            iptErrMsgTxt.value = "Please enter the ‘winners’ amount";
-        } else {
-            let res = calcIptValue();
-            if (!res.flag) {
-                iptErrMsgTxt.value = `Please reduce the 'winners' amount to ${res.count}`;
-            } else {
-                iptErrMsgTxt.value = "";
-            }
-        }
-    }
-}
-
 /**
  * 输入时 检测设置错误信息
  */

+ 13 - 2
src/view/components/top-up.vue

@@ -33,8 +33,10 @@
                 <div class="copy-btn" :data-clipboard-text="tokenRechargeAddress">copy</div>
             </div>
             <div class="tips-box">
-                <img :src="require('@/assets/svg/icon-top-up-tips-warning.svg')" >
-                Make sure you also selected BNB Smart Chain (BEP20) as the network on the platform where you are withdrawing funds for this deposit. Otherwise, you'll lose your assets.
+                <img class="icon" :src="require('@/assets/svg/icon-top-up-tips-warning.svg')" >
+                <div>
+                    Make sure you also selected <span class="blod">BNB Smart Chain (BEP20)</span> as the network on the platform where you are withdrawing funds for this deposit. Otherwise, you'll lose your assets.
+                </div>
             </div>
         </div>
         <div class="btn-done" @click="doneHandle">
@@ -229,6 +231,15 @@ onMounted(() => {
             background: #FCF5E5;
             padding: 12px 10px;
             box-sizing: border-box;
+            display: flex;
+            align-items: flex-start;
+            .icon {
+                margin-right: 10px;
+            }
+            .blod {
+                color: red;
+                font-weight: 500;
+            }
         }
     }
     .btn-done {