Quellcode durchsuchen

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

zhangwei vor 2 Jahren
Ursprung
Commit
fb9b6f8cac

+ 4 - 0
src/assets/svg/icon-loading-channel.svg

@@ -0,0 +1,4 @@
+<svg width="66" height="66" viewBox="0 0 66 66" fill="none" xmlns="http://www.w3.org/2000/svg">
+<circle cx="33" cy="33" r="30" stroke="#424242" stroke-width="5"/>
+<path d="M63 33C63 16.4315 49.5685 3 33 3" stroke="#1D9BF0" stroke-width="5"/>
+</svg>

+ 4 - 0
src/assets/svg/icon-sort-amount.svg

@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1 12V10H11.4667V12H1ZM1 5H17V7H1V5ZM1 17V15H8.6V17H1Z" fill="black"/>
+<path d="M16.9798 20V19.1831C18.9112 19.0121 20 18.0115 20 16.403C20 15.0288 19.2127 14.1865 17.638 13.8319L16.9798 13.6989V11.3368C17.638 11.4318 18.1054 11.9257 18.1239 12.5273H19.8339C19.8093 11.0708 18.7021 10.0322 16.9798 9.87392V9H16.1125V9.86759C14.2671 10.0196 13.1845 11.0201 13.1845 12.5717C13.1845 13.8889 13.978 14.7691 15.4605 15.1238L16.1125 15.2821V17.7519C15.3313 17.6632 14.8023 17.1819 14.7592 16.5233H13C13.0062 18.0748 14.181 19.0754 16.1125 19.1894V20H16.9798ZM18.2592 16.6056C18.2592 17.2769 17.7856 17.7075 16.9798 17.7582V15.4404C17.8533 15.6177 18.2592 15.9914 18.2592 16.6056ZM14.9622 12.4134C14.9622 11.8117 15.442 11.3685 16.1125 11.3305V13.5153C15.362 13.3506 14.9622 12.9706 14.9622 12.4134Z" fill="black"/>
+</svg>

+ 4 - 0
src/assets/svg/icon-sort-time.svg

@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1 12V10H8.46667V12H1ZM1 5H15V7H1V5ZM1 17V15H6.6V17H1Z" fill="black"/>
+<path d="M17 8C13.14 8 10 11.13 10 15C10 18.87 13.13 22 17 22C20.86 22 24 18.87 24 15C24 11.13 20.87 8 17 8ZM19.19 17.53L16 15.69V12H17.5V14.82L19.94 16.23L19.19 17.53Z" fill="#609FC9"/>
+</svg>

+ 1 - 1
src/http/treasure.js

@@ -27,7 +27,7 @@ export function inviteDetail(params) {
 
 export function inviteList(params) {
     return service({
-        url: `/post/treasure/invite/list/v3`,
+        url: `/post/treasure/invite/list/v2`,
         method: "post",
         data: params,
     });

+ 15 - 4
src/view/iframe/treasure-hunt/components/invite-friends.vue

@@ -31,7 +31,7 @@
       @onClick="clickBtn" font-weight="600"></v-btn>
     <div class="mask" v-show="showShareTips">
       <div class="content">
-        <img class="icon-loading" :src="require('@/assets/svg/icon-tweet-loading.svg')" />
+        <img class="icon-loading" :src="require('@/assets/svg/icon-loading-channel.svg')" />
         <div class="text">
           Link copied to clipboard
           <br />
@@ -344,7 +344,7 @@ const clickCopy = () => {
         }
 
         .share-item:hover {
-          background: #E3E3E4;
+          animation: fade-in-gray 0.25s linear forwards;
         }
 
       }
@@ -370,10 +370,11 @@ const clickCopy = () => {
     .icon-loading {
       width: 60px;
       height: 60px;
-      animation: loading 1.5 1s linear;
+      animation: loading 1 1s linear forwards;
       margin-bottom: 30px;
     }
 
+
     .text {
       font-weight: 600;
       font-size: 17px;
@@ -388,7 +389,17 @@ const clickCopy = () => {
     }
 
     100% {
-      transform: rotate(360deg);
+      transform: rotate(280deg);
+    }
+  }
+
+  @keyframes fade-in-gray {
+    from {
+      background: none;
+    }
+
+    to {
+      background: #E3E3E4;
     }
   }
 }

+ 30 - 23
src/view/iframe/treasure-hunt/components/invite-list.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="content">
     <div class="horizontal-invited-wrapper" v-if="state.invited_list.length">
-      invited({{ state.detail.inviteCount }})
+      invited({{ state.inviteCount }})
       <div class="horizontal-invited-list" v-show-log="state.log_invite_list_show " @mouseleave="invitedListMouseleave($event)">
         <template v-for="(item, index) in state.invited_list" :key="index">
           <div class="invited-item" v-if="index < 5" @mouseenter="invitedItemMouseenter(item)">
@@ -91,15 +91,13 @@ state.log_invite_list_show = {
 
 watch(global_refresh, () => {
     if (global_refresh.value) {
-        inviteListScroll({isRefresh: true});
+      list()
     }
 })
 
 onMounted(() => {
   state.btn_loading = false;
-  inviteListScroll({isRefresh: true})
-  console.log('state-->', state)
-  // list()
+  list()
 })
 
 const invitedItemMouseenter = (params) => {
@@ -131,13 +129,13 @@ const clickItem = (item) => {
 }
 
 function handleScroll(e) {
+  if (list_end) {
+    return
+  }
   e = e.target
   if ((e.clientHeight + e.scrollTop) / e.scrollHeight > .8) {
-    if(!listLoadMore) {
-      listLoadMore = true;
-      page_num++;
-      inviteListScroll()
-    }
+    list_end = true
+    inviteListScroll()
   }
 }
 
@@ -165,29 +163,36 @@ state.inviteListRefresh = () => {
 }
 
 const handleCommon = (data) => {
-  if(data && data.length) {
-    if(page_num < 2) {
-      state.invited_list = data;
-    } else {
-      let dataList = state.invited_list;
-      dataList = dataList.concat(data);
-      state.invited_list = dataList;
-    }
-    listLoadMore = false;
+  state.inviteCount = data.inviteCount
+   if (data.inviteUsers.length > 0) {
+    data.inviteUsers.forEach(item => {
+      if (state.invited_list.filter((item2) => { return item2.userInfo.uid == item.userInfo.uid }).length == 0) {
+        state.invited_list.push(item)
+      }
+    })
+    state.invited_list = state.invited_list.sort((a, b) => {
+      return b.timestamp - a.timestamp
+    })
+
+    list_end = false
+  } else {
+    list_end = false
   }
 }
 
 // 滚动
-let inviteListScroll = ({isRefresh = false}) => {
-  if(isRefresh) {
-    page_num = 1
+let inviteListScroll = () => {
+  let last_timestamp = 0
+  let len = state.invited_list.length
+  if (len > 0) {
+    last_timestamp = state.invited_list[len - 1].timestamp
   }
 
   inviteList({
     params: {
       inviteCode: state.invite_code,
       postId: state.postId,
-      pageNum: page_num,
+      lastTimestamp: last_timestamp,
       pageSize: page_size
     }
   }).then((res) => {
@@ -284,7 +289,9 @@ async function clickBtn() {
     position: absolute;
     bottom: -316px;
     left: 16px;
+    z-index: 1000;
     animation: fade-in 0.25s linear forwards;
+    background: #fff;
 
     .invited-user-info {
       position: static !important;